I rule

I spend quite a chunk of my time hacking on VTK (the Visualization ToolKit), one of the better examples of open source.

I’m particularly proud of the fix I made today though, as it’s quite deep in the VTK object hierarchy. Shows you how much it can help to construct an isolated test case that breaks something before you start debugging. First I present the problem along with my test case (I ran into the problem whilst hacking on large GUI+VTK project) and then, after considerable amounts of Rooibos tea, the solution.

This one-liner fix represents an extremely hairy problem: it was hidden somewhere in the 1.2 MILLION lines of code that constitute VTK.