How can I help?

By Paul Murphy, author of The Unix Guide to Defenestration

So what's dumber than volunteering to help a user? how about not documenting what you do because it's just a one time effort?

I maintain that one of the advantages of working with Unix is that you get to deal with a better class of user - after all, the PC experts are too busy hassling the help desk to bother you. This particular user is a case in point and when she asked for a little help processing some news releases I thought nothing of it.

At the time, early 2000 or so, she had a text file containing about 800 SEC filings about two thirds of which she wanted pretty printed as separate documents --in duplex with two pages to a side. Since we had a 32 page per minute QMS postscript printer in her work area this didn't strike me as likely to be a real killer and even her follow-up request that I produce an Excel loadable file with five or six pieces of critical information - like title, date, company, and subject, drawn from each one didn't trigger the usual warning bells.

To do it I wrote a couple of little scripts to take the main file apart, determine whether each contained document met her print criteria, build her Excel file and call a2ps to create printable postscript files for each recovered document..

This masterpiece ran slowly but I didn't care since it did produce the files she wanted.

Two weeks ago retribution arrived: in the form of 516 files containing a cumulative 117,862 SEC filings of which roughly ten percent qualified for printing and enumeration. Could I please repeat the previous job?

There's no code that's harder to hack than your own throw-aways. For example, the (carefully preserved but totally undocumented) source directory for the first job contains such masterpieces of self documenting clarity as:

% cat awk.ok
{
print "sed 's/(stdin)/("$0")/' "$0" >tmp; mv tmp "$0;
}

uhuh.

So please learn from my mistakes: document those one time jobs -even something as simple as a script that calls each step in the right order can be sufficient- because sooner or later they'll come back to haunt you.