In 1944, Lt. Grace Hopper was ordered to report to Harvard University to work on the Mark I, the behemoth digital computer that had been conceived by Harvard’s Howard Aiken in 1937.

Photo courtesy of the Harvard University Archives

Science & Tech

Grace Hopper, computing pioneer

long read

While at Harvard, she deftly programmed Mark I, proving its versatility, author Walter Isaacson recounts

Walter Isaacson’s new book is “The Innovators: How a Group of Hackers, Geniuses and Geeks Created the Digital Revolution.” On Saturday, he’ll be at Harvard to deliver a 20-minute talk on computing pioneers like Grace Hopper, and then will moderate a panel about women in computing. The session, which will include Harvard Professor Margo Seltzer, Ruth Fong ’15, and Ana-Maria Constantin ’16, begins at noon at the School of Engineering and Applied Sciences, Northwest B103. Following is an excerpt about Hopper from his book.

The men who invented computers focused primarily on the hardware. But the women who became involved during World War II saw early on the importance of programming. They developed ways to code the instructions that told the hardware what operations to perform. In this software lay the magic formulas that could transform the machines in wondrous ways.

The most colorful programming pioneer was a gutsy and spirited, yet also charming and collegial, naval officer named Grace Hopper, who ended up working for Harvard’s Howard Aiken, designer of the Mark I computer, and then for Presper Eckert and John Mauchly, creators of the general-purpose electronic digital computer. Born Grace Brewster Murray in 1906, she was from a prosperous family on the Upper West Side of Manhattan. Her grandfather was a civil engineer who took her around New York on surveying trips, her mother was a mathematician, and her father was an insurance executive. She graduated from Vassar with a degree in math and physics, then went on to Yale, where in 1934 she earned her Ph.D. in math.

Her education wasn’t as unusual as you might think. She was the 11th woman to get a math doctorate from Yale, the first being in 1895. It was not all that uncommon for a woman, especially from a successful family, to get a doctorate in math in the 1930s. In fact, it was more common than it would be a generation later. The number of American women who got doctorates in math during the 1930s was 113, which was 15 percent of the total number of American math doctorates. During the decade of the 1950s, only 106 American women got math doctorates, which was a mere 4 percent of the total. (By the first decade of the 2000s, things had more than rebounded, and there were 1,600 women who got math doctorates, 30 percent of the total.)

After marrying a professor of comparative literature, Vincent Hopper, Grace joined the faculty of Vassar. Unlike most math professors, she insisted that her students be able to write well. In her probability course, she began with a lecture on one of her favorite mathematical formulas and asked her students to write an essay about it. These she would mark for clarity of writing and style. “I’d cover [an essay] up with ink, and I would get a rebellion that they were taking a math course not an English course,” she recalled. “Then I would explain, it was no use trying to learn math unless they could communicate it with other people.” Throughout her life, she excelled at being able to translate scientific problems — such as those involving trajectories, fluid flows, explosions, and weather patterns — into mathematical equations and then into ordinary English. This talent helped to make her a good programmer.

By 1940 Grace Hopper was bored. She had no children, her marriage was unexciting, and teaching math was not as fulfilling as she had hoped. She took a partial leave from Vassar to study with the noted mathematician Richard Courant at New York University, focusing on methods for solving partial differential equations using finite differences. She was still studying with Courant when the Japanese attacked Pearl Harbor in December 1941. America’s entry into World War II offered her a way to change her life. During the following 18 months, she quit Vassar, divorced her husband, and at age 36 joined the U.S. Navy. She was sent to the Naval Reserve Midshipmen’s School at Smith College in Massachusetts, and in June 1944 graduated first in her class as Lt. Grace Hopper.

She assumed that she would be assigned to a cryptography and code group, but to her surprise she was ordered to report to Harvard University to work on the Mark I, the behemoth digital computer with clunky electromechanical relays and a motorized turning shaft that had been conceived by Aiken in 1937. By the time Hopper was assigned to it, the machine had been commandeered by the Navy; Aiken was still running it, but as a commander in the Navy rather than as a member of the Harvard faculty.

When Hopper reported for duty in July 1944, Aiken gave her a copy of Charles Babbage’s memoirs and brought her to see the Mark I. “That is a computing machine,” he told her. Hopper just stared at it silently for a while. “There was this large mass of machinery out there making a lot of racket,” she remembered. “It was all bare, all open, and very noisy.” Realizing that she would need to understand it fully in order to run it properly, she spent nights analyzing the blueprints. Her strength came from her ability to know how to translate (as she had at Vassar) real-world problems into mathematical equations, and then to communicate those in commands that the machine would understand.

“I learned languages of oceanography, of this whole business of minesweeping, of detonators, of proximity fuses, of biomedical stuff,” she explained. “We had to learn their vocabularies in order to be able to run their problems. I could switch my vocabulary and speak highly technical for the programmers, and then tell the same things to the managers a few hours later but with a totally different vocabulary.” Innovation requires articulation.

Because of her ability to communicate precisely, Aiken assigned her to write what was to become the world’s first computer programming manual. “You are going to write a book,” he said one day, standing next to her desk.

“I can’t write a book,” she replied. “I’ve never written one.” “Well, you’re in the Navy now,” he declared. “You are going to write one.”
The result was a 500-page book that was both a history of the Mark I and a guide to programming it. The first chapter described earlier calculating machines, with an emphasis on those built by Pascal, Gottfried Leibniz, and Charles Babbage. The frontispiece was a picture of the portion of Babbage’s Difference Engine that Aiken had mounted in his office, and Hopper began with an epigram from Babbage. She understood, as had 19th century mathematician and computing pioneer Ada Lovelace, that Babbage’s Analytical Engine had a special quality, one that she and Aiken believed would distinguish the Harvard Mark I from other computers of the time. Like Babbage’s unbuilt machine, Aiken’s Mark I, which received its marching orders via a punch tape, could be reprogrammed with new instructions.

Every evening Hopper read to Aiken the pages she had written that day, which helped her to learn a simple trick of good writers: “He pointed out that if you stumble when you try to read it aloud, you’d better fix that sentence. Every day I had to read five pages of what I had written.” Her sentences became simple, crisp, and clear. With their strong partnership, Hopper and Aiken became the modern counterparts, a century later, of Lovelace and Babbage. The more she learned about Ada Lovelace, the more Hopper identified with her. “She wrote the first loop,” Hopper said. “I will never forget. None of us ever will.”

Hopper’s historical sections focused on personalities. In doing so, her book emphasized the role of individuals. In contrast, shortly after Hopper’s book was completed, the executives at IBM commissioned their own history of the Mark I that gave primary credit to the IBM teams in Endicott, N.Y., who had constructed the machine. “IBM interests were best served by replacing individual history with organizational history,” the historian Kurt Beyer wrote in a study of Hopper. “The locus of technological innovation, according to IBM, was the corporation. The myth of the lone radical inventor working in the laboratory or basement was replaced by the reality of teams of faceless organizational engineers contributing incremental advancements.” In the IBM version of history, the Mark I contained a long list of small innovations, such as the ratchet-type counter and the double-decked card feed, that IBM’s book attributed to a bevy of little-known engineers who worked collaboratively in Endicott.

Howard Aiken (from left), Lt. Grace Hopper, and Ensign Campbell. Because of Hopper’s ability to communicate precisely, Aiken assigned her to write what was to become the world’s first computer programming manual. HUPSF Computers/Harvard University Archives

The difference between Hopper’s version of history and IBM’s ran deeper than a dispute over who should get the most credit. It showed fundamentally contrasting outlooks on the history of innovation. Some studies of technology and science emphasize, as Hopper did, the role of creative inventors who make innovative leaps. Other studies emphasize the role of teams and institutions, such as the collaborative work done at Bell Labs and IBM’s Endicott facility. This latter approach tries to show that what may seem like creative leaps — the Eureka moment — are actually the result of an evolutionary process that occurs when ideas, concepts, technologies, and engineering methods ripen together. Neither way of looking at technological advance is, on its own, completely satisfying. Most of the great innovations of the digital age sprang from an interplay of creative individuals with teams that knew how to implement their ideas.

Hopper’s partner in operating the Mark I was Richard Bloch, a Harvard math major who had played flute in the university’s prank-loving band and served a tour of duty in the Navy. Ensign Bloch began working for Aiken three months before Hopper arrived, and he took her under his wing. “I remember sitting down, long into the night, going over how this machine worked, how to program this thing,” he said. He and Hopper alternated 12-hour shifts tending to the demands of the machine and its equally temperamental commander, Aiken. “Sometimes he would show up at 4 in the morning,” Bloch said, “and his comment was ‘are we making numbers?’ He was very nervous when the machine stopped.”

Hopper’s approach to programming was very systematic. She broke down every physics problem or mathematical equation into small arithmetic steps. “You simply step by step told the computer what to do,” she explained. “Get this number and add it to that number and put the answer there. Now pick up this number and multiply it by this number and put it there.” When the program was punched into a tape and the moment came to test it, the Mark I crew, as a joke that became a ritual, would pull out a prayer rug, face east, and pray that their work would prove acceptable.

Late at night Bloch would sometimes fiddle with the hardware circuits of the Mark I, which would cause problems for the software programs Hopper had written. She had a piss-and-vinegar personality salted with the language of a midshipman, and the ensuing tongue-lashings she gave to the lanky and calmly amused Bloch were a precursor of the mix of confrontation and camaraderie that was to develop between hardware and software engineers. “Every time I got a program running, he’d get in there at night and change the circuits in the computer, and the next morning the program would not run,” she lamented. “What’s more, he was home asleep and couldn’t tell me what he had done.” As Bloch put it, “all hell broke loose” on such occasions. “Aiken didn’t look at these things with great humor.”

Such episodes gave Hopper the reputation of being irreverent. That she was. But she also had a software hacker’s ability to combine irreverence with a collaborative spirit. This pirate crew camaraderie — something Hopper shared with subsequent generations of coders — actually liberated rather than restrained her. As Beyer wrote, “It was Hopper’s collaborative abilities rather than her rebellious nature that created the space for her independent thought and action.”

In fact, it was the calm Bloch rather than the spunky Hopper who had the more contentious relationship with Commander Aiken. “Dick was always getting in trouble,” Hopper claimed. “I would try to explain to him that Aiken was just like a computer. He’s wired a certain way, and if you are going to work with him you must realize how he is wired.” Aiken, who initially balked at having a woman on his officer corps, soon made Hopper not only his primary programmer but his top deputy. Years later he would recall fondly the contributions she made to the birth of computer programming. “Grace was a good man,” he declared.

Among the programming practices that Hopper perfected at Harvard was the subroutine, those chunks of code for specific tasks that are stored once but can be called upon when needed at different points in the main program. “A subroutine is a clearly defined, easily symbolized, often repeated program,” she wrote. “Harvard’s Mark I contained subroutines for sine x, log10 x, and 10x, each called for by a single operational code.” It was a concept that Ada Lovelace had originally described in her “Notes” on the Analytical Engine. Hopper collected a growing library of these subroutines. She also developed, while programming the Mark I, the concept of a compiler, which would eventually facilitate writing the same program for multiple machines by creating a process for translating source code into the machine language used by different computer processors.

In addition, her crew helped to popularize the terms bug and debugging. The Mark II version of the Harvard computer was in a building without window screens. One night the machine conked out, and the crew began looking for the problem. They found a moth with a wingspan of four inches that had gotten smashed in one of the electromechanical relays. It was retrieved and pasted into the log book with Scotch tape. “Panel F (moth) in relay,” the entry noted. “First actual case of bug being found.” From then on, they referred to ferreting out glitches as “debugging the machine.”

By 1945, thanks largely to Hopper, the Harvard Mark I was the world’s most easily programmable big computer. It could switch tasks simply by getting new instructions via punched paper tape rather than requiring a reconfiguration of its hardware or cables. However, this distinction was largely unnoticed, both then and in history, because the Mark I (and even its 1947 successor, the Mark II) used slow and clackety electromechanical relays rather than electronic components such as vacuum tubes. “By the time anybody knew anything about her,” Hopper said of the Mark II, “she was a dead duck, and everybody was going electronic.”

Computer innovators, like other pioneers, can find themselves left behind if they get stuck in their ways. The same traits that make them inventive, such as stubbornness and focus, can make them resistant to change when new ideas come along. Steve Jobs was famously stubborn and focused, yet he dazzled and baffled colleagues by suddenly changing his mind when he realized he needed to think different. Aiken lacked that agility. He was not nimble enough to pirouette. He had a naval commander’s instinct for centralized authority, so his crew was not as freewheeling as the Mauchly-Eckert team at Penn. Aiken also placed a premium on reliability rather than speed. So he clung to the use of time-tested and dependable electromechanical relays even after it became clear to the people at Penn and Bletchley Park that vacuum tubes were the wave of the future. His Mark I could execute only about three commands per second, while the ENIAC being built at Penn would execute five thousand commands in that time.

When he went to Penn to see ENIAC and attend some lectures, “Aiken was absorbed in his own way of doing things,” a report on the meeting noted, “and does not appear to have been aware of the significance of the new electronic machines.” The same was true of Hopper when she visited ENIAC in 1945. It seemed to her that the Mark I was superior because it was easily programmable. With ENIAC, she said, “you plugged the pieces and essentially you built a special computer for each job, and we were used to the concept of programming and controlling the computer by our program.” The time it took to reprogram ENIAC, which could be a whole day, wiped out the advantage it had in processing speed, unless it was doing the same task over and over.

But unlike Aiken, Hopper was open-minded enough that she soon changed her outlook.

Advances were being made that year in ways to reprogram ENIAC more quickly. And the people in the forefront of that programming revolution, to Hopper’s delight, were women.

Author Walter Isaacson’s new book is “The Innovators: How a Group of Hackers, Geniuses and Geeks Created the Digital Revolution.” Rose Lincoln/Harvard Staff Photographer

Walter Isaacson also has written biographies of Steve Jobs, Albert Einstein, and Benjamin Franklin. He is a Harvard Overseer.