We’ve all heard of the phrase “An elephant in the room”, when there’s a glaring issue staring everyone in the face that no one wants to address. We’re faced with these elephants fairly often, in any job, in any place of employment, even at home or with friends. It’s not uncommon that we experience the exasperation at the prominent pachyderm on a regular basis. But even more common than trying to find a polite way to address the elephant, we find ourselves challenged by “A Fly in the Room.” It’s small issue, something that doesn’t always draw attention, but during times can be a source of unequaled annoyance. As you might imagine it’s much easier to get a fly in the room than an elephant, which might explain why we deal with them quite so often.
For me, I had a particularly maddening fly not long ago. In programming everything counts. There’s not much room for error and you often find yourself staring at code for hours trying to find the semi-colon or comma out of place. There’s no way around it. It will happen to you, it will drive you mad, and you will feel an unbridled joy upon finding the issue and resolving it. Even after hours of starting at a flickering screen. I had the pleasure of experiencing an issue with a small registry script I was creating. The effort was to optimize some virtual clients that would be running over the network. There was a guide and lucky me, they had even prepared an entire list of code that you could theoretically copy and paste and be done with. I thought it was too good to be true, turns out? It was.
While some small changes needed to take place, the code looked completely usable. I quickly went about turning it into a registry script and running it on a test machine. After a cheery message informing me that it completed successfully, I gave it a restart and was looking forward to seeing the new and improved virtual machine. Low and behold upon logging back in I noticed that none of the effects had taken place. I spent the next few hours making small tweaks to the file, trying it different ways and fighting up and down to get it to co-operate to no avail. Finally in frustration I sent the file to a co-worker and explained my issues. After talking for a short bit he spent around ten minutes and found the problem.
The problem was that the quotation marks weren’t the same quotation marks that notepad would have used on its own. (Blown up, the quotation marks on the left were the ones brought over from the document, the ones on the right were quotation marks as Notepad wanted). It saw them as quotation marks, but not quotation marks at the same time. Meaning while everything looked correct and said it succeeded, it did nothing of the sort. After my co-worker began to manually type the code in he happened to notice the discrepancy in the format. Sure enough a few quick changes later and the file ran without a hitch.
So what did I learn? I learned that you can’t trust snippets of code to magically work; I learned that a program like Notepad++ or Crimson Editor can help save hours of heartache and frustration. I learned that most programmers go through a problem like that or very similar to that which teaches them these lessons. And most of all I learned that no matter how annoying, you’ve got to make sure that you squish that “Fly in the Room”.
Nice post. - matthall 12 years ago