The Story of Mel
In 1983 Ed Nather, an astronomer at the University of Texas, posted a short piece to Usenet about a programmer he had once worked with. It was a reply to “Real Programmers Don't Use Pascal”, a tongue-in-cheek essay then going round, and it set out to describe what a real programmer had actually been like. The programmer was Mel Kaye, and the piece is known as The Story of Mel.
It is short, and it is best read in the original. Nather's text is still under copyright, so we don't reproduce it here: read it at catb.org (The Jargon File). What follows is a summary, and it gives away less than the story does.
The story
Mel worked for Royal McBee, the company that sold the LGP-30. He wrote his programs directly in machine code. When the company provided an optimizing assembler that placed instructions on the drum automatically, Mel would not use it: he could place them better himself. His programs were fast, and they were very hard for anyone else to follow.
The story turns on a blackjack program Mel wrote. The sales department wanted a switch that would let the customer win. Mel disapproved, and the way he dealt with the request is one of the story's better jokes. After Mel left the company, the narrator was given the job of changing the program. He found a loop with no test to end it, and yet the program did not loop forever. Working out why took him two weeks. We will leave the explanation to Nather, except to say that it depends on knowing the machine more completely than most people would think possible.
A note on the machine
Mel was an LGP-30 programmer, and the story is usually filed under the LGP-30. The program at its centre, however, is the version Mel wrote for the LGP-30's successor, the RPC-4000. That machine was also built around a drum, but it had an index register, and the index register is what the famous loop depends on. The story says this plainly. It is easy to miss on a first reading.
Its place in history
The Story of Mel became part of the Jargon File, the long-running dictionary of hacker slang and folklore, and through it part of the printed New Hacker's Dictionary. It has been reposted, reformatted, annotated and argued about ever since. More than forty years on it still turns up wherever programmers talk about their craft.
Part of the reason is that it reads differently to different people. To some it is a joke about an eccentric colleague. To some it is a lament for a kind of skill the field no longer needs. To others it is a warning: Mel's code was nearly impossible for anyone else to change, and the narrator's two weeks are exactly the cost that modern practice exists to avoid. All three readings are fair, and the story does not choose between them.
What nobody disputes is that it is true in outline. Mel was a real programmer at a real company, and the machines he wrote for were real. That is what gives it weight. It is not a parable about what programming might be like. It is a report of what it was like, for a while, on a particular kind of machine.
Why it matters here
Most readers finish the story amused and move on. Some are left with a question instead: what would it actually be like to write code like that? Not to copy Mel's tricks, but to work on a machine where the position of every instruction on a spinning drum decided how fast the program ran, and where you had to know the hardware completely to get anything done well.
That question is hard to answer from books. The machines are gone, apart from a few in museums, and the manuals describe the rules but not what it is like to play by them. Answering it properly takes a working machine, or a faithful emulation of one: correct instruction set, correct drum timing, and a way to watch what the program is doing as the drum turns.
That is where this site came from. The story made drum machines interesting, and the interest turned into an emulator. The emulator turned into the LGP-30 IDE, where you can try for yourself. If you want the background first, the Magnetic Drum page explains how the drum worked and why programming it was the puzzle it was.