One thing I miss about working at a large corporation is being a part of a team that maintains a large business application. Well, that, and reading Slashdot all day. But let me clarify what I mean by the "team" thing. You see, working on the application itself isn't very fun. Actually, it pretty much sucks: large system, horrific codebase, ridiculous management, the whole nine yards. But watching other people work on it, especially the newbies -- now that's great!

You see, when a newbie joins such a team, he's generally coming from a small company that hired him straight out of college. He's full of hope and optimism, and is ready to dive in and make the world -- or, at least, the application -- a better place. And I should clarify that, when I said "watching other people work," I actually meant "watching their spirit get completely crushed by the monstrosity that has become their daily life." I admit it; I'm a bit of a sadist.

Needless to say, I was delighted when Rob sent in the story of his transformation from an enthusiastic go-getter to a heartless cynic. I just wish I was there to see it in person.

It all happened a few years ago when Rob joined a fairly large company as a maintenance programmer for The Behemoth, the organization's primary business application. His day-to-day job involved fixing bugs within The Behemoth that were caused by other bug fixes designed to fix bugs from previous bug fixes, ad infinitum. Despite that, Rob's spirit remained very high. He even took the initiative to get an internal-IT project commissioned to "clean up" the unused parts of The Behemoth.

The project was a task for Tantalus. Anytime Rob tried to remove a piece of seemingly unused code -- even one marked with comments "this module is no longer used as of 2001-08-21 and can be removed" -- The Behemoth would crash somewhere down the line. He searched, removed code, tested, and watched then The Behemoth crash time and time again; it was completely hopeless.

But then he found something. It was in the database -- a table named "_dummy" that couldn't possibly be used by anything. He took a peek inside it ...

> SELECT * FROM _dummy

Results:
    +-----+
    | num |
    +-----+
    |   1 |
    |   2 |
    |   3 |
    |   4 |
    +-----+

A code search revealed that there were several stored procedures executing a "SELECT * FROM _dummy" command, but they did absolutely nothing with the result. He commented out the code and dropped the table. He carefully started up The Behemoth and began testing ...

.... CRRRASSSSHHH! The whole application starting throwing error after error, crashing down all around him. Like everything else, "_dummy" was an integral part of The Behemoth. And it was at that very moment that Rob realized that the sun was not so bright, the sky was not so blue, and there was really no reason for him to get up in the morning ever again. The Behemoth had claimed yet another soul.


Make sure to look for the first article in the "CodeSOD: Code Snippet Of the Day" series a bit later tonite.