CodeSOD

Code Snippet Of the Day (CodeSOD) features interesting and usually incorrect code snippets taken from actual production code in a commercial and/or open source software projects.
« Aug 08

September 2008

Oct 08 »
J. K.'s boss loves the term "generic." Developing a feature that prompts if one specific field is left blank, that will only be used on that page? Make it generic enough to work on any page. Working on an application that will only ever be used by the local government in Podunk, MA? Make it generic enough to be able to easily change every line of text into Swahili, just in case. He didn't know the ins and outs of what was involved to make this possible, he just wanted his team to wave their collective genericification wand over the application's code.
Close your eyes for a moment and visualize with me. (Hopefully you have text-to-speech turned on.) I want to try some guided imagery on you.

syntax.vb

2008-09-19
For nearly two years, Hank T. tried his best to avoid the CEE system. He even made an effort to not know what CEE stood for (though he was pretty sure it was Customer something Engagement). But alas, the inevitable happened and he was finally tasked with fixing a bug in CEE.
"Not too long ago," writes R.S., "a coworker left the company for greener pastures. His motto was Keep It Simple and, until now, I wasn't sure how simple he liked things."
SQL Injection seems to be a pretty common theme around here on TDWTF. It's not so much pointing out SQL Injection vulnerabilities (aside from that one state that leaked a whole bunch of SSNs), but instead exploring all those "unique" ways that developers try to address the problem. Well, here are three more to add to the mix.
There was a small bug in the PHP order form that Jared L. had developed: the form would complain that "$1000" is an "invalid numeric value." While technically true, Jared's boss wanted to make the form as fool-proof as possible, and asked Jared to fix it.
It's a particularly busy week for me: on top of a few looming deadlines, I'll be at Business of Software 2008 in Boston. So, I figured it'd be the perfect opportunity to revisit some classics.
It's a particularly busy week for me: on top of a few looming deadlines, I'll be at Business of Software 2008 in Boston. So, I figured it'd be the perfect opportunity to revisit some classics.
« Aug 08

September 2008

Oct 08 »