"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.

"Over the years I've re-written a number of the smaller applications he wrote. Usually because the users wanted new functionality, and I didn't want to (or couldn't) delve into the classic ASP code that they were made of. There is one application, however, that continues to haunt me.

"It's a big system. It uses classic ASP and an Access database to dynamically generate the on-screen components. Great idea, poor implementation. I have so many stories about this application, I could go on for a long while. But the one today is in the 'Why do it wrong when the right way is just as easy?' category.

"A user had reported a problem selecting the correct date on a certain report. I looked at it, and the drop-down year went from 1920 to 2005 — clearly not the correct range. It took some serious spelunking, but I finally found this line:

For cx = 1920 To 2005

"I laughed and breathed a sigh of relief that it would be easy to fix, and even called a co-worker over to share in my mirth. I then changed it to:

For cx = 1920 To Year(Date)

"But when I refreshed the page, nothing happened. The next two hours involved the following:

"1. Find out that I changed the code for a 'Datetime', whereas the component in question is a 'Date field.' Oh, of course. My bad.

"2. Figure out which of the seven different (identical) files in the codebase is the one that is actually being used:

\CR\dev\wiz\SupportFields.asp
\cr1\dev\dev\wiz\SupportFields.asp
\cr1\dev\dev\wiz\SupportFields.bas
\cr1\dev\dev\wiz\SupportFields.vb
\cr1\dev\wiz\SupportFields.asp
\cr1\dev\wiz\SupportFields.bas
\cr1\dev\wiz\SupportFields.vb

"3. Remember that the application caches all pages that are loaded, and that it takes a query string addition to make it stop. '&nocache=true' or '&cache=false'? It's the former.

"Now, on to the next error..."

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