A Tale of Three Bugs

Today has been extremely productive. But to be sure, much of that productivity would be less obvious from a distance. Here’s a few examples all developers could relate to.

The Might-As-Well-Refactor Bug

I had the end credits in a “Scene” on its own in Unity, which is all well and good, but it turns out that my third party sound manager doesn’t play well with multiple scenes. Sure, I could set it up so it was persistent across scenes with a bit more coding, but instead I decided I might as well tailor the credits in the main scene anyway.

This required some refactoring of the original credits objects and the code that supported it. All in all, I think I ended up redoing about half the work I originally built. But the credits are much, much better now.

The Less-Is-More-Anyway Bug

The Video Settings page has three options, “No Video Capture”, “Buffer One Level At A Time” and “Buffer The Last 5 Minutes”. The bug was with the final choice, but ultimately it became obvious that almost no one would use it anyway, so I just subtracted the option altogether — which makes the page look better and easier anyway.

The You-Lie-Computer!!! Bug

Every single programmer deals with this, I don’t care what they say. It’s the bug that you keep rereading the same lines of code over and over and over again certain that you’re reading it properly and that everything is in order. You feel so confident that the computer is just flat wrong or maybe the application you’re building it with has a true bug in it. Sure… that’s it…

But years of experience tells us time and again that the fault lies with us, the programmer, 99.99% of the time. And most of these times it is something so small and innocuous, we can’t believe our ability to overlook it.

That was my last bug of the evening. The last level on Normal Mode wasn’t recording to disk properly and it turned out the culprit was just an extra character in one of the functions. It took an hour and a half to track that little sucker down.

Okay, computer, you win this time…