The Invisible Brush
Nicole was designing the goal net for her World Cup stadium. To concentrate on the net itself, she commented out the rest of the scene. Everything looked perfect.
When she restored the full program, however, something strange happened. The poles supporting the net had become much thicker than expected.
The code looked correct.
The picture did not.
The cylinders were created with cylinder(radius, height), so naturally Nicole assumed the radius controlled their thickness.
She reduced the radius.
Nothing changed.
Instead of assuming the computer was wrong, she reached a more interesting conclusion:
If changing the obvious variable changes nothing, then something else must also be influencing the result.
That single thought transformed debugging into investigation.
Nicole continued experimenting until she discovered the hidden culprit.
Earlier in the program, another drawing function had called strokeWeight(). That graphics state quietly remained active, affecting every object drawn afterwardâincluding the goal posts.
The bug wasn't inside the cylinders at all.
It was hiding in the program's memory of previous drawing commands.
Wrapping that earlier code inside push() and pop() isolated the drawing state, and the poles immediately appeared with the correct thickness.
The invisible brush had finally been found.
Programming is not only about telling the computer what to draw.
It is also about understanding what the computer remembers.
Some commands leave footprints that continue influencing everything that follows. Great programmers learn to look for these invisible effects instead of only examining the object that appears wrong.
Even more importantly, Nicole documented her entire investigationâfrom hypothesis, to experiments, to discovery, to solution. She wasn't simply fixing a bug; she was preserving a way of thinking that others can learn from.
A mysterious visual bug can become a lesson about how graphics engines remember state.
Careful experimentation, eliminating assumptions, and documenting each step reveal hidden causes that cannot be seen directly.
The most valuable skill in programming is not memorizing functionsâit's learning to search for invisible mechanisms beneath visible behavior.