If you haven't had the opportunity to work on a behemoth application that requires more full-time production support developers than most companies employ, then you've missed out on a lot of fun. In these systems, trying to find quality code is like trying to find a needle in a stack of hay other needles ... while blindfolded ... with your feet. Now as much as I'd like to feature such an application, I suspect that most readers would stop reading after the eightieth page or so. Instead, I'll present a single line of code representative of the entire system Kico Zaninetti came to maintain ...

if (errMsg.indexOf("Violation of UNIQUE KEY constraint 'UQ__mbrs_pwd'") != -1)
  return "The password entered is already in use. Please enter another.";

And no, this was not taken out of context. And yes, it really was that bad. I'll leave it as an exercise for the reader to try to imagine what possibly could be surrounding this code.

[Advertisement] BuildMaster allows you to create a self-service release management platform that allows different teams to manage their applications. Explore how!