A debugging story.
Neil Cerutti
neilc at norwich.edu
Mon Mar 19 10:33:25 EDT 2012
I just spent two hours debugging a crucial, though fairly simple,
program.
As part of the processing of an admissions report, I use difflib
to compare two csv files. I compare the current
file with one from the immediate past. The file changes over time
as new students are accepted, and current students change major
and so forth. I next comb through the generated diff to find the
actually changed fields, keeping a log of critical changes.
I found I had not accounted for field names changing between runs
of the admissions report, as recently happened when something had
to be added to the report.
I finally got it working and tested, and then was horrified when
a slip of my finger caused me to have to revert to a previous
version of the file from rcs. Two hours of work, down the
bit-bucket!
My horror abated when I found I was able to make the necessary
changes again in roughly 30 seconds.
This message brought to you by the Debugging is Mostly
Comprehending Old Code and Testing Council.
--
Neil Cerutti
More information about the Python-list
mailing list