Out of range pointers

Henry Spencer henry at utzoo.uucp
Sun Oct 2 08:17:26 AEST 1988


In article <835 at proxftl.UUCP> bill at proxftl.UUCP (T. William Wells) writes:
>... I routinely write code that does not do *any* parameter
>validation.  And my debugged code almost never breaks in a way
>that would have been caught by parameter validation (or, for that
>matter, by most of the other tricks of the robust-is-god school),

Be careful... hubris tends to be followed by nemesis.  Implementing extra
checking has a nasty habit of catching errors that *weren't* caught by
normal debugging.  It often finds them even in "production" code.  Scary
but true.

The experience of preparing my regexp library for posting convinced me
that time spent in more paranoid testing is almost never wasted.  The code
was ready to go (I thought).  I did up a quick regression-test widget
so that other people could tell whether the thing was working on their
weird machine after being compiled by their weird compiler.  I ran it
on my machine and several of the test cases failed.  Oops.  I then spent
considerably more effort on building a fairly thorough set of test cases,
over 100 of them.  It paid off.  The thing *STILL* had a bug or two that
were found by others after I posted it, but it was much more solid than
when I *first* thought it was ready to post.
-- 
The meek can have the Earth;    |    Henry Spencer at U of Toronto Zoology
the rest of us have other plans.|uunet!attcan!utzoo!henry henry at zoo.toronto.edu



More information about the Comp.lang.c mailing list