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.
« Mar 08

April 2008

May 08 »

Oh, XML

2008-04-30
"Having worked in the Computer industry for about twenty years now," Matt writes, "I rarely get the chance to actually write code. But I do get the joy of other people's problems landing at my feet when things go wrong."
"I started working at my company about four years ago," Craig F. writes. "When I started here there were a number of applications developed and floating around for use by the staff, all written by a contractor whom I've never met, but whose name I curse regularly.
Things started simply enough. In the first version of the now years-old ColdFusion application that Lindsay L maintains, all database queries were hard-coded.
"I've lost the will to live," Reacher writes, "or at the very least, debug my coworker's code."
K. K. sent in an example of his company's naming conventions for methods, in which if you have a method that's used frequently, you repeat part of its name for dramatic effect.
Hannes writes, "I'm currently working on maintaining rewriting an application from the early days of ASP.NET (c. 2001) to be all AJAXy and Web 2.0. One of the first things I stumbled over when I first fired up the debugger was a strange exception - the RedirectException - that got thrown on almost every page. Sometimes, it was thrown more than once in the page lifecycle, but it never made it up to the front-end.

Pop Quiz, Hotshot

2008-04-02
Something different for today — a multiple choice CodeSOD! Assume the following:
« Mar 08

April 2008

May 08 »