LinuxWorld.com: Open source programmers stink at error handling
Oct 26, 2001, 10:55 (12 Talkback[s])
(Other stories by Nicholas Petreley)
Re-Imagining Linux Platforms to Meet the Needs of Cloud Service Providers
"Nothing could be a better segue into the topic I had
planned for this week. I'm thinking about starting a group called
OLUG, the Obsessive Linux User Group. Although I know enough about
psychology to know I don't meet the qualifications of a person with
full-fledged OCD (Obsessive-Compulsive Disorder), I confess that I
went back and rewrote my PHP code to use objects instead of arrays
even there was no technical justification for doing so.
Certain things bring out the OCD in me. Warning messages, for
example. It doesn't matter if my programs seem to work perfectly.
If a compiler issues warnings when I compile my code, I feel
compelled to fix the code to get rid of the warnings even if I know
the code works fine. Likewise, if my program generates warnings or
error messages at run time, I feel driven to look for the reasons
and get rid of them.
Now I don't want you to get the wrong impression. My PHP and C++
code stand as testimony to the fact that my programming practices
don't even come within light years of perfection. But just because
I do not live up to the standards I am about to demand isn't going
to stop me from demanding them. It's my right as a columnist. Those
who can, do. Those who can't, write columns.
I'll be blunt. Open source programmers need to stop being so
darned lazy about error handling. That obviously doesn't include
all open source programmers. You know who you are."