Grace Murray Hopper arrived at Harvard’s Cruft Laboratory in 1944 as a Navy lieutenant, junior grade, with a PhD in mathematics and almost no idea what she was about to see. Howard Aiken, the professor running the place, pointed at a 51-foot-long, eight-foot-tall assembly of shafts, relays, and rotating counters and told her she was now its third programmer. The machine was called the Automatic Sequence Controlled Calculator. Most people called it the Harvard Mark I.

It clattered. That is the word every operator used. Five tons of rotating shafts driven by a single four-horsepower motor, 765,000 components, 500 miles of wire, and rows of electromechanical relays that snapped open and shut like an immense roomful of typewriters. It could do three additions or subtractions per second. A multiplication took six seconds. A division took more than fifteen seconds. A logarithm or a trigonometric function could keep the machine clattering for more than a minute.

And in 1944, John von Neumann walked into the room with a problem from Los Alamos.

The machine that ran on paper tape and brass shafts

IBM had built the Mark I in Endicott, New York, using Aiken’s design and money put up by Thomas J. Watson Sr. The Navy added funding when the war made the calculations urgent. The completed machine was shipped to Cambridge in early 1944 and formally dedicated by Harvard on August 7, 1944, as the first large-scale programmable computer built in the United States.

Numbers entered the machine through 60 panels of 24 dial switches, each panel holding a single 23-digit constant. Instructions came in on a perforated paper tape, three inches wide, that the machine read one row at a time and refused to read backwards. If you wanted a loop, you literally glued the ends of the tape together to form a physical ring. If you wanted a subroutine, you spliced in another loop. The program lived in the room as a tangle of paper.

Output came out on IBM electric typewriters or on standard punched cards. The whole thing was about as fast as a moderately determined human with a desk calculator, except it would keep going without coffee, sleep, or argument, hour after hour, day after day.

Harvard Mark I computer
Photo by Oussama Bergaoui on Pexels

Hopper, Bloch, and Campbell on a three-shift rotation

Hopper joined two other officers, Richard Bloch and Robert Campbell, as the machine’s full-time programming staff. The Mark I had been classified for war work almost the moment it powered up. Once von Neumann arrived with the implosion problem, the room was running calculations for what Harvard’s own history of the machine identifies as work on the atomic bomb. Specifically, the differential equations describing the shock wave that would compress a plutonium core into criticality.

The problem was that the machine could not stop. Setting up a calculation meant threading the tape, dialing in the constants, verifying the relays. It could take a day. Once it was running, switching off meant losing the run. So the programmers worked in shifts and the machine ran around the clock. Hopper, who had been a mathematics professor at Vassar before the Navy commissioned her, took the third shift more often than anyone, partly because she had no children to go home to, partly because she found that the quiet hours after midnight were when she could think.

She kept a cot. She slept in the Cruft basement next to the machine, fully clothed, and woke when the relays stopped clicking, because a silent Mark I meant something was wrong.

The Manhattan Project calculation

Von Neumann’s problem was the implosion lens. To detonate a plutonium bomb you had to crush the core symmetrically inward from every direction at once, and to do that you had to know exactly how the shock waves from shaped explosive charges would meet and reinforce. The mathematics was a system of partial differential equations with no closed-form solution. The only way to get an answer was to chew through it numerically, step by step, in increments small enough that the errors would not blow up the result.

The Mark I chewed for months. Edmund Berkeley, a Navy reservist who worked on the machine, later recorded that the staff nicknamed it “Bessie” after the Bessel functions it kept solving. These are the special functions that appear whenever you have something circular or cylindrical, like a shock wave expanding out from a detonator. Hiroshima followed in August 1945, about a year after the calculations began.

Three additions a second. A modern smartphone does roughly three billion. The Mark I’s entire memory, expressed as the 72 constants you could dial into the switch banks, would fit in a fraction of the space taken by a single emoji on the device in your pocket.

Working a brain at 3 a.m.

The night shifts mattered because the machine made mistakes. A relay would stick. A tape would tear. A counter would drift by a single digit and every subsequent step would be wrong. Finding the error meant reading the typed output, reconstructing what the machine had been doing at that moment, and tracing the fault back through the relay banks. It is exactly the kind of work that sleep deprivation destroys.

Research on cognitive performance and sleep deprivation describes the pattern that any night-shift programmer would recognise: slowed reaction times, increased lapses of attention, and reduced accuracy on tasks requiring sustained vigilance. As sleep pressure builds, the prefrontal networks that handle working memory and inhibitory control get less efficient. The circadian dip in the small hours of the morning makes it worse.

Hopper’s response was coffee. The Cruft team drank it constantly, brewed on a hotplate near the machine. Recent work at the Yong Loo Lin School of Medicine at the National University of Singapore, published in Neuropsychopharmacology, has looked at how caffeine restores memory deficits caused by sleep loss, finding that it acts on a specific pathway in the hippocampal CA2 region rather than simply jolting the whole brain awake. The 1944 operators did not know any of this. They drank the coffee because it worked.

Grace Hopper Navy uniform
Photo by Mikhail Nilov on Pexels

The bug, the log, and the language

Two years later, after the war ended and the machine was running calculations for whoever could pay for them, Hopper and her colleagues were working on the Mark II at Harvard when the machine stopped. They opened it up, traced the fault, and pulled a moth out of relay number 70 in panel F. Someone, probably Hopper, possibly Bill Burke, taped the moth into the operations logbook on September 9, 1947, with the annotation “First actual case of bug being found.” The page is now in the Smithsonian’s National Museum of American History.

The word “bug” for a hardware fault was decades older than that. Edison used it in 1878. But the moth made the word stick to software, because the people who found it were the ones who would go on to write the languages everyone else would use. Hopper invented the first compiler in 1952. She led the team that produced FLOW-MATIC. She became the principal technical adviser to the committee that designed COBOL in 1959. By the time she retired from the Navy in 1986, at the rank of rear admiral, she was 79 years old and had been programming for 42 years.

What the cot was actually for

The cot in the Cruft basement was not romantic. The machine ran hot. The room smelled of oil and ozone from the relays. The clatter was loud enough that operators sometimes used hand signals across the floor. Sleeping near it was practical: if the noise pattern changed, you woke up, and a few minutes of inspection could save a calculation that had been running for two days.

The era of programmers physically living next to their machines did not end quickly. It moved through the ENIAC women at the Moore School in Philadelphia, through the operators of IBM 704s and 7090s in the 1950s and 1960s, through the graduate students who slept on couches next to PDP-10s in the 1970s. Silicon Canals has written about how Ray Tomlinson sent the first ARPANET email between two PDP-10s in a Cambridge office in 1971, picking the @ sign off a Teletype keyboard. That room was a quarter mile from where Hopper had slept on her cot 27 years earlier.

The deeper continuity is older still. When Samuel Morse tapped out “What hath God wrought” on 38 miles of copper wire in 1844, the operators on his line had to stay awake to receive. A century later, the operators at Cruft were doing the same thing, watching a machine instead of a key.

What the Mark I left behind

The Mark I was decommissioned in 1959. Most of it was scrapped. A section roughly eight feet wide, containing the input panels with their rows of dial switches, a stretch of the calculating registers, and one of the output typewriters, was preserved and moved through three locations at Harvard before being installed in 2021 in the new Science and Engineering Complex in Allston.

Hopper died in 1992. She is buried at Arlington National Cemetery. The Navy commissioned a guided-missile destroyer, the USS Hopper, in 1997. It is one of two Navy ships named for women from outside the founding era.

Run the numbers and the gap is almost incomprehensible. The Mark I executed three additions per second, or roughly 259,200 per 24-hour day. A modern laptop processor sustains around 10 billion floating-point operations per second, which means it performs the Mark I’s entire daily output in about 26 microseconds. The 72 constants stored in the switch banks held 1,656 decimal digits, or roughly 700 bytes. A single 4K video frame is about 25 megabytes, some 35,000 times that. The four-horsepower motor that drove the 51-foot calculating line consumed about 3 kilowatts; a smartphone charger draws under 20 watts and outpaces it by nine orders of magnitude. The implosion calculations that ran for roughly a year on the Mark I, from setup through Nagasaki on August 9, 1945, would now complete, by the most generous estimate of their total operation count, in well under a second.