On Sun, 30 May 2021, Chris Angelico wrote:

(Plus, there's not always an opportunity to use a debug harness. Sometimes
you just have to put your prints into production and let it run for two
weeks in the hope that the bug will show itself.)

ChrisA,

Please excuse my long-winded description of a FORTRAN IV bug in an lake
ecosystem energy model I wrote at the University of Illinois in the early
1970s. It is an example of what you wrote above.

The program fill two boxes of 80-column Hollerith cards punched on an IBM
29 (if I correctly recall the model) keypuch machine. The output was written
on green-barred wide paper on a line printer.

Each time I ran the model it would produce one of four different, but wrong,
answers for one variable. I closely examined the 1.5" thick fan-folded line
printer output many times. I never saw the error, even with diagnostic stubs
added. When I took the output to the computer center they looked at it for a
week and couldn't find the error, either.

Shortly after that, when I again examined the code, line-by-line, I saw the
error: a line that should have read
FOR I=1 to N
actually read
FOR I=I to N

All of us saw the uppercase I as a 1 because a) that's what we expected to
see and b) line printer output on green-barred paper was not that clear,
even with fresh ribbons.

That lesson has stuck with me ever since.

Regards,

Rich

--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to