They might have been chipping their code out of the living mountain with stone tools and classic ASP, but they weren't primitive. Colt's development team still required code reviews of all of the classic ASP code before it went to production. Sure, most of the time, an ASP code review ended with, "ARGH WHY WHY MY EYES THE PAIN!", but the code still got reviewed.

During one review, Colt noticed something odd about his co-worker's file-upload module. The module was meant to handle pretty small CSV files, and even had a check to ensure they weren't larger than expected. That wasn't the odd part.

After the file uploaded and processed, the code entered a massive For loop that did absolutely nothing. It took roughly fifteen seconds to execute. Colt scratched his head and wondered if this might just be a speed up loop. Puzzled, he asked his co-worker why it was there.

"Well," the developer explained, proudly, "it's for usability. I want to display a progress bar, but it takes so long to download the gif… well, it's probably easier if I just show you." The co-worker ran the application and demonstrated the CSV upload functionality. Sure enough, the "Processing…" page had a lovely animated GIF; it was a loop of a sparkling unicorn leaping over a rainbow towards a smiling sun. It also took about ten seconds to load, and combined with the for-loop, it was able to download and perform five loops before the browser was redirected to the next page.

"It's really important that the user knows the server is doing important work."

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