Alex Papadimoulis

Founder, The Daily WTF

Apr 2010

FBI Error

by in Error'd on

"The HP Windows 7 installer software that came with my shiny new HP is somewhat quirky, and most of the time ends up with this 'FBI error'," writes Peter, "while I fail to see why FBI error should be my problem (as I reside in European country, where FBI has no jurisdiction), I would like to help it anyway, just to get it over with the installation. But I simply don't know how to 'Restart The Order'."


Something Weird

by in CodeSOD on

Consider the following requirement. A Period can have anywhere from zero to forty eight Activities (though most will have only three) and each Activity within a Period should have a unique, non-sequential, two-digit identifier (e.g. 02, 41, 99).

Now consider how you might implement the code that generates a new identifier. Go ahead, think about it. I'll wait.


A Bit Excessive

by in Error'd on

"I got quite the surprise when I tried to leave the car park at the Orchard Centre in Coventry," Matt Outram wrote, "luckily the guy 'in the machine' agreed that this was a bit excessive and let me go."


sp_getNothing

by in CodeSOD on

"I was working on cleaning up some old code from a system I inherited," writes Anthony Mattas, "the system is an old ASP.NET application that has been around for a while, but won’t be replaced because it generates the staff meeting template for our CEOs weekly leadership meeting."

"The app itself had a lot of redundancy since my company didn’t have a good version control solution or strategy at that time. There was duplicate stored procedures, tables, and pages in the application (this was the old developers' method of version control). Along the way I found this stored procedure:"


Don't Pass The Password

by in CodeSOD on

It’s a generally accepted practice that passwords should be masked when being displayed to users. In addition to preventing over-the-shoulder password snooping, displaying “*****” instead of the actual password gives users a sense of security that somehow, through the magical wizardly of computers, their password is secure. Whether that’s worth the usability hassle, however, is certainly up for debate.

Adam’s colleagues take this practice very seriously, and have gone so far as to mask it from themselves. Their application is a fairly standard three-tier system – database, middle-tier objects, and user interface – and the password masking occurs smack-dab in the middle.


Wi(red)Fi

by in Error'd on

"I spotted this in Pembroke, Ontario," reports Karl Zimmerman, "does this sign imply that Canada has a somewhat different 802.11 standard from everyone else?"


The Doubleton Pattern

by in CodeSOD on

I'm sure many of you are familiar with the Singleton pattern. Simply put, it's a class that can only have a single instance, and the accessor for the instance is global.

Kristopher is certainly no stranger to the pattern, though he was thrown for a bit of a loop when he noticed this often-repeated pattern called Singleton in his new employer's codebase.


Check Digit Check

by in CodeSOD on

Seen any absurdly bad code lately? Send it on in!


Anne K has worked in the direct mail industry for almost twenty years, and has seen a bazillion ways to put names and addresses onto paper. One thing that's common across all mailing houses is that, in order to get discounts from the postal service, a postal barcode must be printed on every piece of mail. The barcode is made up of the ZIP code, the ZIP+4 code, and a couple more digits indicating (often) the house number. There's also a check digit on the bar code, which is calculated by adding up all the digits of the barcode, modding the result by 10, and then subtracting from 10. So, if all the digits of the barcode add up to 39, (10 - (9 mod 10)) leaves a result of 1.

It couldn't be simpler, right? It takes a teeny little loop and a mod. At least, that's what Anne thought. When she was doing developer training at a certain mailhouse, she just happened to be looking into the program that printed a simple name and address block on the piece. Curious as to why it was thousands of lines of code, she dove in and saw this.


Avoiding Continuums Bits

by in Error'd on

"I was trying to log into my bank's website when I got this message," L Bakker writes, "am I supposed to call their system admins and relay the message? And what part of displaying my transactions needs Audio? The other funny part is the "Restart Session" link just sends you right back to the same script that generated the error in the first place."


Java Destruction

by in CodeSOD on

“It can be difficult to develop complicated, J2EE software without a fundamental understanding of how Java works,” Vladimir writes, “difficult… but not impossible.”

“Following is a super-helpful class found in one of our heavily-used, enterprise beans. I don’t think it works the way the author intended it to.”


Fred Blogs' MegaQuit()

by in CodeSOD on

A few years ago, Gregory was about to start development on a quoting system, when the client pulled-out all of a sudden. “We appreciate all the work you put in so far,” they told him, “but your overall estimate was just too much; we were able to find someone else who could develop this for less than a third of your cost.”

Gregory was surprised, especially since he had bid the system fairly low. He would have considered renegotiating, but the “someone else” they found was Fred Blogs, who happened to be the VP’s son-in-law. And one thing that Gregory had learned over the years is that it’s pretty hard to compete with nepotism.


Announcing APDB: The World's Fastest Database

by in Feature Articles on

The Relational Database is dead.

It had a long, distinguished life that started in 1970 with Dr. Edgar F. Codd, but it has since seen its day. Like the sextant, slide rule, and punch card, relational databases are becoming relics of the past as the industry moves towards better, faster, and awesomer.