Debugging source is even harder when you can't stop laughing at it

Forgive the self-taught Visual Basic programmer, for they know not what they do. Or do they?

Who, Me? Thank goodness for code reviews. However things weren't always so squeaky clean as one Register reader discovered while attempting to sort another's sweary source. Welcome to Who, Me?

This morning's story comes from a reader we shall call "Philip" (for it is not his name) and takes us to the 1990s when he was working for a company supplying color printers and scanning hardware.

Such devices were almost impossibly exotic back then and required all manner of upgrades to a vanilla PC in order to work. A full-length AT card was usually needed to provide the raw grunt that we take for granted these days.

As was so often the case, the cards occasionally failed and had to be replaced. A manual card index was used to keep track of things as broken hardware arrived and working kit was sent out. It worked about as well as you'd imagine. "We were quite proud if we only lost a few items a month," said Philip, "but management weren't quite so impressed by our finely honed skill."

However, the operations manager had contacts in the US and managed to secure the services of a student for six months. "Brad" (also not his name) would come to the UK on what Philip now reckons looked a bit like a modern zero-hours contract and do various work experience at the facility.

"He was an enthusiastic employee and took it on himself to learn enough Visual Basic to make a rudimentary replacement to our card index."

Like all too many quick and dirty Visual Basic/Access mash-ups of the time, it seemed to work pretty much perfectly after a few iterations. So much so that the business came to depend on Brad's work and the old manual filing system was filed in the bin. Brad eventually returned to the US, but the fruits of his labor lived on after his departure.

"After some time – I forget what caused it – an update was required to Brad's hard work," recalled Philip, "and we, the lads who were reasonably proficient at working at code level, were asked to break open his source and make the change."

"This is where things started to unravel."

Brad was a self-taught programmer, and the company had no concept of coding standards. Variable and function names that might be meaningful to his successors were an alien country to him. Instead he had used pretty much every offensive word he could think of as well as a good few we suspect he picked up from his UK colleagues.

"Scope" was also a concept with which Brad was unfamiliar, meaning that the swears might be global, local, and pretty much anywhere in between. His grasp was, as Philip put it, "variable at best."

We see what you did there.

As for the code, Philip and his team were left trying to work out what a function with a name that rhymed with "Chugger" - that took parameters more usually associated with bodily functions and body parts - actually did. "And that's just a reasonably printable example," he added.

Thanks to the puerile sense of humor of the team, coffee was often spat onto keyboards as the source was picked through. "All that laughter makes debugging code exceptionally difficult, believe me!" explained Philip. "If you've ever tried to debug an array of *****, or loop through ****, you'll sympathize."

"It took weeks of re-engineering to make sense of Brad's work," said Philip. "I lost touch with him but I sincerely hope he got a job with a major software vendor. That level of dedication needed to be recognized by someone."

And now it has. Today we have code reviews as part of many a DevOps process that should – we hope – mean that Brad's naming conventions will never again see the light of day. Or do you have a dark secret? A bit of code that revealed where your mind was wandering? Confess all with an email to Who, Me? ®

Similar topics

Broader topics

Other stories you might like

  • An international incident or just some finger trouble at the console?
    All routers are equal, but some are more equal than others

    Who, Me? Welcome to an edition of Who, Me? where some configuration confusion left an entire nation cast adrift.

    Today's story is set in the early 2000s and comes from a reader Regomized as "Mikael" who was gainfully employed at a European ISP. The company had customers in multiple countries and Mikael's team was responsible for the international backbone.

    "Us senior network engineers were widely regarded as consummate professionals," he told us, before adding, "at least amongst ourselves."

    Continue reading
  • A discounting disaster averted at the expense of one's own employment
    I know what this process needs: Microsoft Access!

    Who, Me? A tale of discounts and process improvement via the magic of Excel, Access and a fair bit of electronic duct tape we imagine. Welcome to Who, Me?

    "James" is the Regomized reader of record today, and continues the theme of running the risk of doing a job just that little bit too well with an ancedote from the end of the last century involving his first job out of university, at a certain telecommunications giant.

    The job involved a process of calculating the discount received by big customers (the ones with multiple branches). "For the life of me I can't remember what the main DB was called," he told us, "but it was the old style green writing on a black screen that took forever to download the necessary data."

    Continue reading
  • In IT, no good deed ever goes unpunished
    When being helpful can mean being shown the door

    Who, Me? Going above and beyond in IT can sometimes lead to also going directly out of the door, as one Register reader found when discovering that sometimes efficiencies can be less than rewarding.

    A reader Regomised as "Will" told of us his days working at a now-defunct company that produced large telephone switches. In those days whenever a major software revision occurred, customers were expected to send in their configurations and Will's group would merge them into the latest and greatest. A new load would then be returned to the customers.

    It was not a fun process, not least because of constant hardware and software failures during the merge process. "When I first started, there was a constant grumble about how unreliable the machine used for the merging was," Will told us.

    Continue reading
  • An early crack at network management with an unfortunate logfile
    It's a backronym, right?

    Who, Me? Come with us on a journey back to the glory days of Visual Basic 6, misplaced enthusiasm and an unfortunate naming incident. Welcome to Who, Me?

    Today's tale comes from a reader Regomised as "Stephen", who was working in the IT department of a Royal Air Force base. "My duties were many," he told us, "from running daily backups of an ancient engineering system using (I kid you not) reel-to-reel tapes to swapping out misbehaving printers."

    This being the early 2000s, his boss loaded up our hero with more tasks. He could change printers and tapes, so Visual Basic (and its bedfellow, Access) should present no problem.

    Continue reading

Biting the hand that feeds IT © 1998–2022