Menu

Jesse, Learning in Anger

I’m using an open source library and it crashes in an unexpected way. The crash makes me grumpy because it prevents me from getting my real work done.

I don’t want anyone to face this indignity ever again! And so I proceed to report the bug to the library’s maintainers. Since I’m grumpy it’s not enough to say “your shit’s broke”. I have to make it crystal clear how and where it’s broken. I need to shame them for writing imperfect code.

So I attempt to write the simplest program that demonstrates this insidious bug. I start with my initial codebase with all of its moving parts. I attempt to remove distractions and unrelated features until all I’m left with is a trigger for the bug.

But as a side effect of isolating the bug I end up learning the internals of this library that I’d previously been treating as a black box. Studying this program in anger has the same effects as studying anything: I learn it.

I learn why their code is complicated. Over here it’s because in 2011 they had to workaround a bug in the Eclipse compiler. This other part is tricky for thread safety. There’s lots to learn as I splunk through trying to build my bug trigger.

And then – against my wishes – I learn that my bug isn’t really a bug at all! I’d assumed something I shouldn’t have and the library did what I told it to do.

So I delete the four paragraphs of text from the GitHub issues form and feel a little embarrassed.