AJ got his start at a very small, clientless, and ultimately doomed software company, and it was there that he met Jerry. By the time AJ came to the company, Jerry was off the dev team and in more of a sales role. Still, he'd been on the dev team for years and his code remained throughout the system.

Jerry fell into the common trap of writing code in one language the way he wrote code in another. You know, like when you made the switch from VBScript to VB.NET? Well, Jerry's Assembly background didn't prepare him much for C++, and it showed. AJ became intimately familiar with Jerry's confusing code after having to maintain it for years.

Hiring a team of interns from the local college, Jerry turned them loose testing the company's main product. It was during one of these testing sessions that one of the interns discovered The Bug to End All Bugs.

One of the interns had figured out a twisty route through the system that caused a crash. Since the computer totally hung at this point and would not respond to any keystrokes, he rebooted. And it didn't work. The system was totally dead and would have to be reimaged.

Upon hearing of this highly destructive bug, Jerry had the intern submit a bug report with the steps to reproduce. And rather than try to trace the code to what could've caused such a horrible meltdown, Jerry decided to follow the steps to reproduce the bug on his computer. The computer that he needed to perform his job. The computer that he'd just completely hosed by trying to reproduce the bug.

After two hosed computers, they'd learned their lesson. Instead, they'd try to follow the exact steps until the step right before a computer would die, then investigate the code that handled that part.

The software used a directory to temporarily store files used during its operation. After it was all done doing whatever, it'd clear the directory of temp files. It was even nicely separated into different directories to prevent accidental deletion of necessary files. And to handle these different subdirectories, they put together a function that would return the path of the appropriate temp file store prior to deleting the files.

These temp files also all had a common extension (.krq) that was exclusive (as far as anyone was aware) to their software. This made it easy to delete *.krq without fear of deleting important files.

In fact, it hadn't been long ago that AJ worked with another developer on these functions. The developer asked all the right questions; How do we want to separate the files? and When I'm clearing out one of these folders, should I just do a delete *.krq?

Anticipating that future changes might result in different file extensions going in the temp folder, AJ told the developer to "just delete *.*."

And after retracing the steps to produce the bug, what path was returned when determining where to delete files?

C:\

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