The Story of Mel is an archetypical piece of
computer programming
Computer programming is the process of performing a particular computation (or more generally, accomplishing a specific computing result), usually by designing and building an executable computer program. Programming involves tasks such as ana ...
folklore. Its subject, Melvin Kaye,
[ is an exemplary " Real Programmer" whose subtle techniques fascinate his colleagues.
]
Story
Ed Nather's ''The Story of Mel'' details the extraordinary programming prowess of a former colleague of his, "Mel", at Royal McBee Computer Corporation. Although originally written in prose, Nather's story was modified by someone into a "free verse" form which has become widespread.
Little is known about Mel Kaye, beyond the fact that he was credited with doing the "bulk of the programming" on the 1959 ACT-1 compiler for the Royal McBee LGP-30
The LGP-30, standing for Librascope General Purpose and then Librascope General Precision, was an early off-the-shelf computer. It was manufactured by the Librascope company of Glendale, California (a division of General Precision Inc.), and so ...
computer. In Nather's story, Kaye is portrayed as being prone to avoiding optimizing assemblers in favor of crafting code to take advantage of hardware quirks, for example taking advantage of the rotation of the LGP-30
The LGP-30, standing for Librascope General Purpose and then Librascope General Precision, was an early off-the-shelf computer. It was manufactured by the Librascope company of Glendale, California (a division of General Precision Inc.), and so ...
's drum memory
Drum memory was a magnetic data storage device invented by Gustav Tauschek in 1932 in Austria. Drums were widely used in the 1950s and into the 1960s as computer memory.
For many early computers, drum memory formed the main working memory ...
to avoid writing delay loop
Delay (from Latin: dilatio) may refer to:
Arts, entertainment, and media
* ''Delay 1968'', a 1981 album by German experimental rock band Can
* '' The Delay'', a 2012 Uruguayan film
People
* B. H. DeLay (1891–1923), American aviator and ac ...
s into the code.
The story, as written by Nather, involved Kaye's work on rewriting a blackjack
Blackjack (formerly Black Jack and Vingt-Un) is a casino banking game. The most widely played casino banking game in the world, it uses decks of 52 cards and descends from a global family of casino banking games known as Twenty-One. This fami ...
program from the LGP-30 to a newer Royal McBee system, the RPC-4000; company sales executives had requested to modify the program so that they could flip a front panel switch and cause the program to lose (and the user to win). Kaye reluctantly acceded to the request, but to his own delight, he got the test
Test(s), testing, or TEST may refer to:
* Test (assessment), an educational assessment intended to measure the respondents' knowledge or other abilities
Arts and entertainment
* ''Test'' (2013 film), an American film
* ''Test'' (2014 film), ...
wrong, and the switch would instead cause the program to win every time (and the user to lose).
Subsequent to Kaye's departure, Nather was asked to fix the bug. While examining the code, he was puzzled to discover that it contained what appeared to be an infinite loop
In computer programming, an infinite loop (or endless loop) is a sequence of instructions that, as written, will continue endlessly, unless an external intervention occurs ("pull the plug"). It may be intentional.
Overview
This differs from:
* ...
, yet control did not remain inside the loop. Eventually he realized that Kaye was using self-modifying code
In computer science, self-modifying code (SMC) is code that alters its own instructions while it is executing – usually to reduce the instruction path length and improve performance or simply to reduce otherwise repetitively similar code, ...
to process elements of an array, and had coded the loop in such a way as to take advantage of an Integer overflow
In computer programming, an integer overflow occurs when an arithmetic operation attempts to create a numeric value that is outside of the range that can be represented with a given number of digits – either higher than the maximum or lower t ...
. Adding 1 to the address field of an instruction that referred to address ''x'' normally just changed the address to ''x''+1. But when ''x'' was already the highest possible address, not only did the address wrap around to 0, but a 1 was carried into the bit
The bit is the most basic unit of information in computing and digital communications. The name is a portmanteau of binary digit. The bit represents a logical state with one of two possible values. These values are most commonly represente ...
s from which the opcode
In computing, an opcode (abbreviated from operation code, also known as instruction machine code, instruction code, instruction syllable, instruction parcel or opstring) is the portion of a machine language instruction that specifies the operat ...
would be read—in this case changing the opcode to "jump to" so that the full instruction became "jump to address 0". This impressed Nather so much that, out of respect, he gave up the task and reported that he could not find the bug.
The early computers of IAS machine
The IAS machine was the first electronic computer built at the Institute for Advanced Study (IAS) in Princeton, New Jersey. It is sometimes called the von Neumann machine, since the paper describing its design was edited by John von Neumann, a ...
design had no index register. Using self-modifying code was necessary for array operations. The LGP-30 instruction did "replace the contents of the address portion of the word in memory location 2000 with the contents of the address portion of the word in the accumulator" to ease writing self-modifying code.
History
The essay was originally published in the Usenet
Usenet () is a worldwide distributed discussion system available on computers. It was developed from the general-purpose Unix-to-Unix Copy (UUCP) dial-up network architecture. Tom Truscott and Jim Ellis conceived the idea in 1979, and it was ...
news group
A Usenet newsgroup is a repository usually within the Usenet system, for messages posted from users in different locations using the Internet. They are discussion groups and are not devoted to publishing news. Newsgroups are technically distinct ...
"net.followup" on May 21, 1983, by utastro!nather (the UUCP
UUCP is an acronym of Unix-to-Unix Copy. The term generally refers to a suite of computer programs and protocols allowing remote execution of commands and transfer of files, email and netnews between computers.
A command named is one of the prog ...
email address of Ed Nather at the time).[
The Royal McBee computers were developed and manufactured by ]Librascope
Librascope was a Glendale, California, division of General Precision, Inc. (GPI). It was founded in 1937 by Lewis W. Imm to build and operate theater equipment, and acquired by General Precision in 1941. During World War II it worked on improvi ...
, and the documentation written for the blackjack
Blackjack (formerly Black Jack and Vingt-Un) is a casino banking game. The most widely played casino banking game in the world, it uses decks of 52 cards and descends from a global family of casino banking games known as Twenty-One. This fami ...
program was written by Mel Kaye of Librascope Inc. The August 1956 edition of ''The Librazette'', the Librascope newsletter, contains a story about training on the LGP-30, and mentions that some Librascope application engineers were transferred to the Royal McBee payroll. Among the engineers named is Mel Kaye.[
There is a photograph on the front page of that issue showing that first class of neophyte LGP-30 programmers and the instructors, including Mel Kaye.]
See also
* Real Programmers Don't Use Pascal
"Real Programmers Don't Use Pascal" (a parody of the bestselling 1982 tongue-in-cheek book on stereotypes about masculinity ''Real Men Don't Eat Quiche'') is an essay about computer programming written by Ed Post of Tektronix, Inc., and published i ...
References
Further reading
* (NB. A copy of the original prose version.)
* (A completely original copy of Ed Nather's Usenet post, with headers)
* (NB. Punctuation added/corrected for readability. Contains link to program tape of blackjack for LGP-30)
* (Mel Kaye's signature] on a coding sheet for the LGP-30.)
* (NB. Presumably the subject of the original story.)
* (NB. Detailed analysis of the story, explaining the technical details.)
** Contains even more technical details
*
* (A research on the origins of the story, its characters, Mel Kaye's biography, and hacker folklore in general)
*A reddito
found a computer of the type that Mel used
in his grandparents basement.
{{DEFAULTSORT:Story of Mel
Computer programming folklore
1983 essays