The Story of Mel
This was posted to Usenet by its author, Ed Nather <nather@astro.as.utexas.edu>, on May 21, 1983.
Real Programmers write in FORTRAN.
Lite beer, hand calculators02, and "user-friendly" software03
but back in the Good Old Days,04
when the term "software" sounded funny
and Real Computers05 were made out of drums and vacuum tubes,
Real Programmers wrote in machine code.
Not FORTRAN. Not RATFOR. Not, even, assembly language.
Lest a whole new generation of programmers
grow up in ignorance of this glorious past,
I feel duty-bound to describe,
as best I can through the generation gap,
I first met Mel when I went to work for Royal McBee Computer Corp.,07
a now-defunct subsidiary of the typewriter company.08
The firm manufactured the LGP-30,
a small, cheap (by the standards of the day)
and had just started to manufacture
the RPC-4000, a much-improved,
bigger, better, faster — drum-memory computer.
and weren't here to stay, anyway.
I had been hired to write a FORTRAN compiler
the most popular computer program the company owned.
and played blackjack with potential customers11
Its effect was always dramatic.12
The LGP-30 booth was packed at every show,13
and the IBM salesmen stood around
the blackjack program for the RPC-4000.15
The new computer had a one-plus-one
in which each machine instruction,
in addition to the operation code
and the address of the needed operand,
had a second address that indicated where, on the revolving drum,
because he could optimize his code:
that is, locate instructions on the drum
so that just as one finished its job,
the next would be just arriving at the "read head"
and available for immediate execution.
It was a long time before I understood that remark.
Since Mel knew the numerical value
and assigned his own drum addresses,
every instruction he wrote could also be considered
He could pick up an earlier "add" instruction, say,
I compared Mel's hand-optimized programs
with the same code massaged by the optimizing assembler program,
That was because the "top-down" method of program design
and Mel wouldn't have used it anyway.
He wrote the innermost parts of his program loops first,
so they would get first choice
of the optimum address locations on the drum.
The optimizing assembler wasn't smart enough to do it that way.
Mel never wrote time-delay loops, either,
even when the balky Flexowriter
required a delay between output characters to work right.18
He just located instructions on the drum
so each successive one was just past the read head
the drum had to execute another complete revolution
to find the next instruction.19
He coined an unforgettable term for this procedure.
Although "optimum" is an absolute term,
like "unique", it became common verbal practice
"not quite optimum" or "less optimum"
After he finished the blackjack program
("Even the initializer is optimized",
he got a Change Request from the sales department.
The program used an elegant (optimized)
to shuffle the "cards" and deal from the "deck",
and some of the salesmen felt it was too fair,
since sometimes the customers lost.
They wanted Mel to modify the program
He felt this was patently dishonest,
and that it impinged on his personal integrity as a programmer,
The Head Salesman talked to Mel,
as did the Big Boss and, at the boss's urging,
Mel finally gave in and wrote the code,
but he got the test backwards,
and, when the sense switch was turned on,
the program would cheat, winning every time.
After Mel had left the company for greener pa$ture$,
the Big Boss asked me to look at the code
and see if I could find the test and reverse it.
I have often felt that programming is an art form,
whose real value can only be appreciated
by another versed in the same arcane art;
there are lovely gems and brilliant coups
hidden from human view and admiration, sometimes forever,
by the very nature of the process.
You can learn a lot about an individual
Perhaps my greatest shock came
when I found an innocent loop that had no test in it.
Common sense said it had to be a closed loop,
where the program would circle, forever, endlessly.
Program control passed right through it, however,
The RPC-4000 computer had a really modern facility
It allowed the programmer to write a program loop
that used an indexed instruction inside;
the number in the index register
was added to the address of that instruction,
to the next datum in a series.
Instead, he would pull the instruction into a machine register,
He would then execute the modified instruction
the loop was written so this additional execution time
just as this instruction finished,
The vital clue came when I noticed
the bit that lay between the address
and the operation code in the instruction word,
He had located the data he was working on
the largest locations the instructions could address24 —
so, after the last datum was handled,
incrementing the instruction address
The carry would add one26 to the
operation code, changing it to the next one in the instruction set: