Gareth Wilson from Fog Creek interviewed me the other day for their series on the lives of developers; we talked about playing Dam Buster on the Commodore PET and typing in programs in WATCOM VI and all kinds of stuff. Thanks Gareth, I enjoyed it very much. You can read the interview here.
“In a more modern programming environment I would put this down to a copy-paste error where someone copied the first line, pasted it, intended to change all the X’s to Y’s, but got distracted after the first one. (Of course it is unlikely that the author of this program was using an editor that had copy-paste in 1982. They were just distracted when writing the code.)”
Actually, in the default editor of the Commodore 64 (the interactive mode available immediately after you turn the computer on) there was a trick to reuse the code of a recently typed line by moving the cursor to the old line and change its line number to a new number; then edit its code (that is when I suspect they made the mistake) and finally press enter. This way, the new line of code based on the old line will be “stored” in memory.
I had almost completely forgotten about that but of course you are right; I used that trick all the time. Wow, I have not activated those neurons in a long, long time. Thanks!