As an old card thumper I recall the adventures of maintaining programs written by long gone predecessors who did not document. In at least one case management decided to save money by not giving the poor programmer time to write documentation.
Another trick from the old days is being sure three or four executables and slightly different copies of the source code are archived, so the first step in modifying is trying to figure out which source led to which executable. Worked on a big program with a team in the oil patch that developed and used what we called "FORTRAN M" for maintainable code. We enforced strict rules for variable names and built up the program from small modules developed top-down. We left stubs for features to be implemented at a later date. When we got data for a new type of information I added the new feature in an afternoon. By the time we switched from cards to video terminals we had a full file cabinet of source code. We had to devise new rules to protect the master code when we switched out from cards. The leader published a paper on the coding policy, back at the end of the 1970s. I would add a few lessons learned from experience. When it seems necessary to resort to a bit of assembler for an oft-used function that is not efficient enough in a higher level language, first code it in the language, test, then write the assembler version. So when someday someone has to adapt the program to new hardware and a new assembler language, it is easy to convert. FORTRAN is still used in number crunching applications. Its big weakness was not defining a minimal variable storage unit, since it came out when everybody doing scientific computing used a machine with 36 bit words carrying 8 significant decimal digits in the mantissa. When the IBM 360 and such with a 32 bit binary coded hexadecimal word, suddenly single precision was often inadequate and the principle of all variable storage being the same could not be continued. Unlike most later languages, code in FORTRAN can be made easy to read, with a few simple added rule. Thanks, Joey, for a delightful tour of memory lane. Choppy At 07:08 PM 10/1/07, Joey Kelly wrote: >I've been trying to slog through this for 2 days now, laughing all the way: >http://freeworld.thc.org/root/phun/unmaintain.html
