Curious Perversions in Information Technology
7k followers 5 articles/week
Error'd: Just Beastly

Not to be outdone by Michael R., another prolific participant styles himself The Beast In Black. A handful of his experiences follow here. [psst. Mr Black. Check out this explanation of a half-closed interval) Buyer Beast bemoans "I knew that the global situation was bad, but when Amazon starts offering disdiscounts (or discountcounts,...

Fri Jun 21, 2024 15:21
CodeSOD: Extended Models

If I'm being completely honest, I'm mildly anti-ORM. I'm not about to go on a rampage and suggest they should absolutely, never, ever, ever be used, but I think they tend to create a lot of problems. Instead of being a true mapping between our object model and our relational model, they're their own tool, with its own idosynchracies, and a lot of "magic"...

Thu Jun 20, 2024 14:57
CodeSOD: Mostly In One Line

Today's a day for a smorgasbord. We're going to start with a classic kind of bad code, from astephens: pbUpdates.Value = int.Parse(Math.Truncate(percentage).ToString()); Here, we want to truncate a floating point down to an integer, but take a trip through a string to do it. Why? Probably because the person responsible knew about int.Parse but not...

Wed Jun 19, 2024 14:07
CodeSOD: All the Cases Covered

David's application has loads of unit tests. Many of the unit tests even go so far as to exhaustively test every combination of parameters. So seeing something like this is pretty common: [Test] [TestCase(false, false, false, false, false)] [TestCase(false, false, false, false, true)] [TestCase(false, false, false, true, false)] [TestCase(false,...

Tue Jun 18, 2024 14:43
CodeSOD: Actively Xing Out

Today, I'm honestly not sure that the WTF is in the code we're looking at. Jeff needed to support an older PHP application which used client side JavaScript heavily. This block was copy-pasted many times throughout the code base: var ajaxRequest; // The variable that makes Ajax possible! try{ // Opera 8.0+, Firefox, Safari ajaxRequest...

Mon Jun 17, 2024 15:36
Error'd: All Michael

One of our most dedicated readers, Michael R., is also one of our most dedicated contributors, sometimes sending us several submissions in a single day. We haven't featured all of them, but now we're making up for that. Today, it's wall-to-wall Michael, mostly food misadventures. Michael might tell you we've cooked the plot, but he can't prove...

Fri Jun 14, 2024 14:00

Build your own newsfeed

Ready to give it a go?
Start a 14-day trial, no credit card required.

Create account