It was supposed to be simple. The plan was that Alex would temporarily inherit support an old VB e-commerce website for a week while a colleague was out on vacation. With the web being out there for years and years, Alex assumed that most of the old bugs had been squashed leaving him with a nice and quiet week on his hands. As it turned out, Alex had assumed incorrectly.

Shortly after taking temporary ownership, an issue arrived where small discounts were being hugely exaggerated on the invoices. Naturally, this resulted in the issue being made into Alex's top priority.

After a bit of digging, getting past a dizzying mix of misleading variable names and 1000's of lines of copypasta, he came across this single example of arithmetic by joining strings.

dDiscount = (ot * (Convert.ToDecimal("0." & Convert.ToInt32(O.DiscountPercentage))))

Alex groaned. One thing was for certain - this was going to be a long week.

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