Monthly Archives: October 2008

Bugs can be code styling errors

I just found this while debugging an issue:

[sourcecode language=”cpp”]
if ( isConfigured() )
if ( isAllowed() )
doTask();
else
noConfigurationIssue();
[/sourcecode]

I can’t tell you how many times I looked at that before I saw where the problem was. My brain was so used to following styling hints to see control of flow that it didn’t notice that the actual true flow was different from the visual flow. @*&^!