in reply to Reactionary Coding—One-Shot Programs
Similarly, we sometimes run programs for days on end, only to discover a small bug in output. We'll fix the bugs, no question, but we don't want to lose the CPU time. If a small script can fix the output, we want it! (However, as tilly points out above, you can only do this if you've a backup; perl -pi.bk -e ... is invaluable here). The "patch" code will never run again, as the bugs in the program have been fixed -- it only exists to correct a single output file!
This is bioinformatics: some of our files are >1GB in size, so text editors are not an option; it's either sed, awk or Perl.
In both cases, you want to write code iteratively (the first 5 versions never work), run it once, and throw it away.
Of course, I always hide away a copy of the script in my home directory; I never know when I'll want to steal some stuff from an old script.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Reactionary Coding?One-Shot Programs
by John M. Dlugosz (Monsignor) on Jun 18, 2001 at 01:50 UTC |