Mountain Biking Helps Squash Bugs 82
Dr.Milius writes "Henning Brauer of the OpenBSD project recently made an interesting post to the openbsd-tech mailing list about how a mountain bike ride helped him relate two baffling bugs in their new BGP and NTP daemons. It turns out they were both off-by-one errors that were easy to fix but notoriously difficult to spot. Always great when the experts show us how it's done."
This is news? (Score:5, Informative)
I, for example, will often go grab a Coke, talk to people, etc, and somewhere along the line, by _not_ focussing so hard on the problem, I come up with the answer.
Re:not difficult to spot at all (Score:5, Informative)
As for not using C, I've read that Theo de Raadt likes the compiler and language that is used in Plan 9 [bell-labs.com]. Can't use it due to license problems, though.
Re:not difficult to spot at all (Score:4, Informative)
Re:not difficult to spot at all (Score:3, Informative)
There are debugging tools out there which reliably find these bugs in C/C++ and FORTRAN. For example:
purify (not free)
valgrind (free)
Tools such as these help to find problems, while avoiding the inefficiency of array bounds checking on each access.
Re:not difficult to spot at all (Score:2, Informative)
Re:not difficult to spot at all (Score:2, Informative)
No debugging tools there, if any tools at all.
Re:not difficult to spot at all (Score:2, Informative)
Yes! (Score:3, Informative)
Yes! This can make tweaking your overall algorithm or approach so much easier as well, if these wrapper functions are there, and well defined in their actions. You can never have *too short* a function!