Category Archives: Fun

Error’d: Choose Wisely


"I’m not sure how I can give feedback on this course, unless, figuring out this matrix is actually a final exam," wrote Mads.   Brian W. writes, "Sorry that you’re not happy with our spam, but before you go…just one more."   "I was looking forward to getting this Gerber Dime, but I guess I’ll have to wait till they

Read more

CodeSOD: A Dumbain Specific Language


I’ve had to write a few domain-specific-languages in the past. As per Remy’s Law of Requirements Gathering, it’s been mostly because the users needed an Excel-like formula language. The danger of DSLs, of course, is that they’re often YAGNI in the extreme, or at least a sign that you don’t really need XML, coupled with schemas, is a tool for

Read more

Poor Shoe


"So there’s this developer who is the end-all, be-all try-hard of the year. We call him Shoe. He’s the kind of over-engineering idiot that should never be allowed near code. And, to boot, he’s super controlling." Sometimes, you’ll be talking to a friend, or reading a submission, and they’ll launch into a story of some crappy thing that happened to

Read more

CodeSOD: Mutex.js


Just last week, I was teaching a group of back-end developers how to use Angular to develop front ends. One question that came up, which did suprise me a bit, was how to deal with race conditions and concurrency in JavaScript. I’m glad they asked, because it’s a good question that never occurred to me. The JavaScript runtime, of course,

Read more

Error’d: Have it Your Way!


"You can have any graphics you want, as long as it’s Intel HD Graphics 515," Mark R. writes.   "You know, I’m pretty sure that I’ve been living there for a while now," writes Derreck.   Sven P. wrote, "Usually, I blame production outages on developers who, I swear, have trouble counting to five. After seeing this, I may want

Read more

CodeSOD: string isValidArticle(string article)


Anonymous sends us this little blob of code, which is mildly embarassing on its own: static StringBuilder vsb = new StringBuilder(); internal static string IsValidUrl(string value) { if (value == null) { return “\”\””; } vsb.Length= 0; vsb.Append(“@\””); for (int i=0; i<value.Length; i++) { if (value[i] == ‘\”‘) vsb.Append(“\”\””); else vsb.Append(value[i]); } vsb.Append(“\””); return vsb.ToString(); } I’m willing to grant

Read more

CodeSOD: Cases, Cases, Cases


Paul R. shows us a classic example of the sort of case statement that maybe, you know, never should’ve been implemented as a case statement: It is cut and paste to the extreme.  Even worse, as fields were added, someone would have to go in and update this block of code.  This massive block was replaced with… var fieldName =

Read more

CodeSOD: A Bad Route


Ah, consumer products. Regardless of what the product in question is, therre’s a certain amount of “design” that goes into the device. Not design which might make the product more user-friendly, or useful, or in any way better. No, “design”, which means it looks nicer on the shelf at Target, or Best Buy, or has a better image on its

Read more
« Older Entries