| Ivars Peterson's MathTrek |
July 8, 1996
When the EDSAC made its computational debut at the Cambridge Mathematical Laboratory of Cambridge University in May 1949, it was the first stored-program computer to become operational.
That summer, Maurice V. Wilkes, who headed the laboratory and had led the effort to build the EDSAC, decided that the machine was ready for a more complicated task than calculating the squares of numbers or determining primes. He set out to write a program to solve the Airy equation. This differential equation describes, among other things, how radio waves travel in the atmosphere and how rainbows form.
Very few paper-tape programs survive from the early days of computing, and those that do almost invariably represent the final, refined result, polished for posterity. But Wilkes happened to save a tape showing one of his first efforts to program the Airy equation, and he stuffed it into a drawer, where it rested, forgotten, for three decades.
Wilkes rediscovered this short, fragile paper strip in 1980 while clearing out his drawers and cupboards shortly before his retirement from what had become the Computer Laboratory. He sent a photocopy of the tape to Martin Campbell-Kelly, a specialist in the history of computing, based at the University of Warwick in England.
Campbell-Kelly undertook the demanding task of deciphering the tape and reconstructing the program that its perforations represented. It afforded a revealing snapshot of a work in progress.
"The most striking feature of the Airy program is the large number of errors that it contains," Campbell-Kelly noted in a 1992 article in the IEEE Annals of the History of Computing, in which he described his reconstruction of Wilkes' program.
Altogether, there were about 20 mistakes of various kinds among the 126 lines that made up the program. "By any standard, this is a large number of errors in a relatively short program," he remarked. "However, Wilkes is one of the giants of computing, so we can assume that there was more to this than meets the eye."
Several of the errors appeared to be punching mistakes. For example, what should have been a U showed up as a V, perhaps because the clerk misread the program manuscript. In several other instances, it looked as if Wilkes had written some instructions in a skeleton form, then had forgotten to write them out in full before giving the program to his keypunch operator.
In two instances, a pair of instructions had been reversed, so the program jumped to a new location when it should have continued directly to the next step in the sequence. There were also a few places where instructions were missing completely. For instance, there was no command to store the result of a particular, intermediate calculation for later use.
All this suggested that the program hadn't been checked carefully -- if at all -- in its manuscript form, and that no one had verified it after it was punched. Of course, when the program finally ran on the computer, its output was complete gibberish.
Fortunately, because Wilkes knew what the answers to the Airy equation should be, he had a way of checking the figures spewed out by the computer. He had to go back to his program again and again, painstakingly correcting the mistakes. Making a change in any one place often had wide-ranging repercussions. Adding a single, new instruction meant renumbering memory locations throughout the program -- an extremely tedious, exacting chore.
The final, correct results appeared in a paper published in Nature to illustrate the capabilities of the EDSAC.
Wilkes recalls in his memoirs, "By June 1949, people had begun to realize that it was not so easy to get a program right as had at one time appeared. I well remember when this realization first came on me with full force. The EDSAC was on the top floor of the building and the tape-punching and editing equipment one floor below.... I was trying to get working my first nontrivial program.... It was on one of my journeys between the EDSAC room and the punching equipment that ... the realization came over me with full force that a good part of the remainder of my life was going to be spent in finding errors in my own programs."
In an influential 1951 textbook on computer programming, Wilkes observed, "Experience has shown that such mistakes are much more difficult to avoid than might be expected. It is, in fact, rare for a program to work correctly the first time it is tried, and often several attempts must be made before all errors are eliminated. Since much machine time can be lost in this way, a major preoccupation of the EDSAC group at the present time is the development of techniques for avoiding errors, detecting them before the tape is put on the machine, and locating any which remain undetected with a minimum expenditure of machine time."
The EDSAC staff did all it could to reduce the incidence of program errors that unnecessarily tied up the machine, wasting its precious time. Programmers were urged to scan their programs before submitting them, to write programs in a logical, easy-to-follow manner, and to use units of code selected from libraries of well-tested programs for performing certain operations. They received extensive lists of "points to be checked" before submitting a program to a computer.
"It would be nice to think that early programmers heeded this advice, but it seems unlikely," Campbell-Kelly commented in his 1992 paper. "Like Wilkes, no doubt most of them learned the hard way."
Campbell-Kelly actually got a taste of such activity. When he set out to decipher Wilkes' fragile paper tape, he wrote a computer program -- a simulator -- that turned a modern Macintosh into a wonderfully faithful replica of the EDSAC.
"It is a commonplace observation that all the computing power of 40 years ago -- the rooms filled with glowing vacuum tubes, the tons of air conditioning, the squadrons of attending technicians -- will now fit comfortably on a corner of your desk or in your briefcase or even in your pocket," science writer Brian Hayes noted in a 1993 article describing his experience with the EDSAC simulator.
"But it is one thing to compare performance specifications, memory capacities, and program benchmarks," Hayes continued, "it is quite another actually to see one of the early giants of computing encompassed in the little plastic box of a Macintosh."
Debugging, of course, is also still with us -- a seemingly inescapable part of working with computers.
Campbell-Kelly, M. 1992. The Airy tape: An early chapter in the history of debugging. IEEE Annals of the History of Computing 14(No. 4):16-26.
______. 1980. Programming the EDSAC: Early programming activity at the University of Cambridge. IEEE Annals of the History of Computing 2(No. 1):7-36.
Hayes, B. 1993. The discovery of debugging. The Sciences 33(July-August):10-13.
Wheeler, D.J. 1992. The EDSAC programming systems. IEEE Annals of the History of Computing 14(No. 4):34-40.
Wheeler, J.M. 1992. Applications of the EDSAC. IEEE Annals of the History of Computing 14(No. 4):27-33.
Wilkes, M.V. 1949. Electronic calculating-machine development in Cambridge. Nature 164(Oct. 1):557-558.
______. 1985. Memoirs of a Computer Pioneer. Cambridge, Mass.: MIT Press.
Martin Campbell-Kelly has a home page at http://www.dcs.warwick.ac.uk/people/academic/Martin.Campbell-Kelly/. His EDSAC simulator can be found at http://www.dcs.warwick.ac.uk/~edsac/.
The University of Cambridge Computer Laboratory archive of EDSAC photos is available at http://www.cl.cam.ac.uk/Relics/archive_photos.html.
The EDSAC 99 meeting celebrated the 50th anniversary of EDSAC 1: http://www.cl.cam.ac.uk/UoCCL/misc/EDSAC99/.
Comments are welcome. Please send messages to Ivars Peterson at ipeterson@maa.org.