by jacquesm · 16y ago · 0 comments
So now, if I can afford it I really want to know where things went wrong. Usually that means a longer time-to-fix but what's fixed that way usually stays fixed. The 'band-aid' type fixes tend to lead to subtler problems that are harder to fix later on.
If it breaks, let it please break now and in as spectacular a fashion, without any band-aids, that way we can stay away from the kind of bugs that only happen during full moon and Eastern wind.
Which reminds me, I really should have a look at the guts of some software that currently runs in a wrapper script because it crashes once every 3 months or so without any apparent cause.
Edit: Wrong Steve and wrong book -- it's a running example in "Writing Solid Code" by Steve Maguire.
In the software I wrote about above I suspect a very subtle resource leak.
A nice example of such a leak is for instance forgetting to close an opened file descriptor if some other rare error condition occurs elsewhere in the code (not that that's it, but that's how you can get to the point where something will run for months on end without crashing and then suddenly it does).
File descriptor leaks can be relatively easily traced using lsof by the way (one of the step-child utilities that really should be in every coders toolbox, right next to gprof and make).