From the Coalface - 2 - Work as hard as you can to be as lazy as you can
- by TATWORTH
On one project, the standard build involved building the database from scratch producing a build log that was about 100,000 lines long. Manually paging throught this log took hours and it was very easy to miss any errors.
The solution was to write a filter that read the log file and output a summary file with each output line pepended with the line number in the original file. Sucessive iterations eliminated more noise lines. Diagnostic displays required escaping. The final output was just a few hundred lines long and the errors were easy to spot.
The filter program took less time to to write than one manual pass reading the log file. The utility digested the log file in about 1 second. Now database build errors could be identified quickly instead of after hours of manual examination or lengthy system testing.
A few minutes consideration of the task led to a tremendous improvement in quality.