avatar

A: What was the wonkiest bug you encountered so far?

There were so many odd bugs over the time, it is hard to say. Some of them were just strange and caused a big facepalm at the end, many mere logic errors and some few actually funny. The latter are the best bugs to have. Our funniest or wonkiest bug probably was this:

dancedance

A code-error caused an abort, which prevented the animations to stop and loop at the right time, since it never reached that part of the code. So here are most of our animations in one glorious dance.

Let me talk about bugs for a bit, since they are what I spend 70% of my time with.
There are a number of different bugs, amusingly compiled into a list on Wikipedia (Though I prefer this revision). There are four kinds of bugs listed, which cover most, if not all, bugs you ever encounter.

The best in the bunch is the bohrbug, since it is usually just a code-error and your compiler will tell you where your problem is. Alternatively it is a wrong behaviour somewhere that doesn’t change. The last part of that makes it relatively easy to fix: Things you can reliably reproduce can be found where exactly they come from and thus be fixed. The bohrbug is also the most common bug, but not what you spend most of your time bugfixing on.

Sadly, also somewhat common is the mandelbug, a bug which can’t be traced to wrong code but rather to faulty logic. Fixing it sometimes seems easy at first glance, but just cause a whole slew of other bugs. Often you cannot reliably reproduce a mandelbug, making it even harder to fix. This is where usually you just start outputting everything, in the hopes of finding some inconsistency. Other than that, there is no sure way of fixing those.

Rather rarer are the Heisenbug and Schrödinbug. The latter appearing shortly before being done with the code, when you read it again and finding parts that just don’t seem right. And suddenly, there is a wrong behaviour nobody has noticed before. Luckily, you already know where the bug came from, since that is how you found it.
The Heisenbug can often be avoided altogether, by making your Debug values not change anything. This gets harder when testing for performance issues, because all outputs and Debug calculations have an impact that cannot be avoided. One thing to watch out for is to never leave Debug stuff in your Code (which should be common sense, but you tend to forget about it).

Using a bunch of puns to describe bugs is a bit of a glorification, because bugfixing usually is  just mashing your head against the keyboard for half an hour and then changing a word or two in the right place. Sadly it is rather rare to have a funny bug like our dancing characters.

So, to answer Robin’s question: Probably the dancing characters, though I still wonder why ActionScript3 occasionally rounded 1/1 to -0.

This entry was posted in Ask Klonk anything, Code and tagged , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload CAPTCHA.