Modal Title
Culture / Software Development

Margaret Hamilton Recalls Her Life as a Programming Pioneer

The pioneering software engineer who helped send men to the moon recalls her decades of innovation in a newly published video conversation.
Mar 20th, 2022 6:00am by
Featued image for: Margaret Hamilton Recalls Her Life as a Programming Pioneer
Featured image by Wikimedia.

In the early 1960s, Margaret Hamilton began her career as a pioneering programmer and systems designer. And when NASA launched a series of missions that led to the first astronauts on the moon, Hamilton was director of the Software Engineering Division at the Massachusetts Institute of Technology’s Instrumentation Laboratory, developing the mission’s onboard flight software.

That project included writing  40,000 lines of code for the moon-landing lunar module, and its “mothership,” the orbiting craft carrying the command and service modules.

And that was just the beginning of a career in computer science that has lasted more than half a century — and still continues.

Yet despite these achievements, Hamilton “rarely gives interviews or speaks publicly about herself,” writes David C. Brock, a technology historian and curator/director at the Software History Center of Silicon Valley’s Computer History Museum.

So it was with extra excitement that — in April 2017 — Brock headed to Boston to capture an oral history with her. In an email this week to The New Stack, he calls the opportunity “an incredible privilege,” noting Hamilton’s historic significance for a “deep involvement of some of the most important contexts and projects in the first decades of computing in the United States.”

This week that interview has finally been published online — including video of his conversation with the then 81-year-old pioneer.

But that interview also catches glimpses of what it was like to be another kind of pioneer — a woman in a field that was predominantly male.

Hamilton remembered being the only woman in her college physics class — “And at the time, I think the professor thought women should not be taking physics because he  … well, you have to know the times.”

She added, “That was the only time somebody in college questioned that that might not be something I would be able to make use of.”

But Hamilton remained undeterred: “I just said, ‘Because I want to take it,’ you know.”

Historic Projects and Getting Credit

In the early 1960s, Hamilton had planned to pursue a graduate degree in mathematics, but while her husband attended law school, Hamilton supported the family by taking a job with MIT professor Edward N. Lorenz.

Lorenz later became known as one of the founders of chaos theory. “It is Lorenz who popularized the notion of the ‘butterfly effect'” notes Brock’s blog post, “the concept that a small difference can yield a huge change within certain systems, like the flap of a seagull’s wing causing a storm, or the flutter of a butterfly’s wing determining the path of a tornado.”

Hamilton programmed meteorological simulations for the professor, which in the interview she describes as “one of the best things I ever did … I hadn’t really been near a computer before.”

To take her place programming the simulations, Hamilton hired Ellen Fetter, who had recently graduated from Mount Holyoke with a degree in math. Yet while today they’d be listed as co-authors, both programmers are rarely mentioned when telling the history of chaos theory.

Hamilton recalled how one of her male colleagues  had once asked her how she could take a programming job “when you have a baby at home?”

“I said, ‘Well, you know, you have to do what’s right for you, and I have to do what’s right for me.’ He said, ‘Oh, OK.'”

“This is an all-too-common story in the histories of science and technology,” noted Jennifer Light, the department head for MIT’s Science, Technology and Society program, in a 2019 interview with the science magazine Quanta.

In Brock’s interview, Hamilton said that she was given credit by Lorenz himself: “Later on, years later, like maybe five years ago, I realized in one of his well-known papers, he thanked me for all the programming. I never knew he did that. That really meant the world to me.”

Learning More at MIT

Working on Lorenz’s project brought Hamilton an unusual amount of experience with some of the world’s earliest computers. And soon she found higher-paying work at MIT’s Lincoln Lab (funded by the Department of Defense), which was facing a shortage of programmers. (Hamilton worked on a program that tried to distinguish the sound of enemy aircraft in radar readings.)

When she was asked to travel for a course on the instructions for the computer the lab was using, Hamilton replied that she had to stay behind to care for her young daughter. “But I’ll make a deal,” she told her managers. “I’ll learn as much if not more than all the people who took the course … You’ll see.

“So everybody went to the course. I don’t remember, it’s six to eight weeks, and I stayed back by myself … And by the time they got back, I had done the majority of the work that needed to be done!”

Lincoln Lab was staffed mostly by men, but included women, too. Looking back, that was unusual, given the attitudes at the time. Hamilton recalled how one of her male colleagues had once asked her how she could take a programming job “when you have a baby at home?”

“I said, ‘Well, you know, you have to do what’s right for you, and I have to do what’s right for me.’ He said, ‘Oh, OK.'”

When she saw a news report that MIT’s Instrumentation Lab won a contract to work on NASA’s Apollo project, her thought was, “I guess I should delay graduate school again because I’d like to work on this program that puts all these men on the moon.”

No ‘Dumb’ Questions at NASA

Apollo was a rich experience filled with many life lessons. (“I learned if you don’t know, ask. Ask questions. Don’t be afraid to ask a dumb question. There is not a dumb question. What’s important is to learn what you need to learn.”)

For the whole team, she said, failure was a great teacher: “The way we got smarter was to make a mistake and learn from it, acknowledge it, and say, ‘That’s not gonna happen again.'”

All the Apollo project’s code had to be extensively pre-tested in simulations, and Hamilton worked with an assortment of engineers and “hardware people” — who she recalled had been unfamiliar with the word “software.”

Hamilton confirmed that Apollo’s planners hadn’t allotted enough time for the work of creating their software. “That’s the case on any software project,” she added with a laugh.

Both hardware and software features looked identical in the simulations, so there was a real need to distinguish them. And yet the programmers, she said, “were kind of like second-class citizens … We’d take the stuff and we’d ‘make it run,’ right?” So she recalled skepticism when she’d proposed naming the two areas hardware engineering and software engineering.

And then, one fateful day, “One of the hardware gurus stood up in a big meeting saying, ‘You know, Margaret’s right. This is …’ — almost makes me have tears right here — ‘This is engineering, what you people are doing, just as much as the stuff we’re doing,’ meaning the hardware. He said, ‘She’s trying to formalize it and I think it should become formalized,’ and everybody respected this hardware guy. ”

To this day, Hamilton is credited with coining the term software engineering. But she was always aware of the tremendous responsibility the programmers’ work carried.

“If it didn’t work a person’s life was at stake, if not over,” she said. “That was always uppermost in my mind and probably many others as well.”

Hamilton confirmed that Apollo’s planners hadn’t allotted enough time for the work of creating their software. (“That’s the case on any software project,” she added with a laugh.) But that wasn’t the only time she’d faced an internally-created challenge.

Hamilton had brought her daughter, Lauren in when she had to work nights and weekends. Once, once her daughter managed to crash a mission simulator, which ultimately led to a critical lesson. “I can’t ignore this because this could happen in a real mission,” Hamilton said.

At NASA, Hamilton was always aware of the tremendous responsibility the programmers’ work carried: “If it didn’t work a person’s life was at stake, if not over.”

Selecting the pre-launch program later in the mission meant the erasable memory was being shared — but Hamilton’s higher-ups were worried about adding any extra code, and instead addressed the unlikely scenario with a kind of note in the manual.

And then sure enough, on the Apollo 8 mission — the first crewed spacecraft to leave earth’s orbit — that very scenario occurred, Hamilton told Brock.

Hamilton recalled being back in her lab at Cambridge when the incident occurred. “I said, ‘It’s the Lauren bug. I know it’s the Lauren bug …’ ”

The astronauts were fine. “They just had to put back the data,” Hamilton told Brock, “and it took a while.” But after that flight, she received permission from NASA to add in the additional code.

After Apollo 11, Decades of Innovation

In 2003, NASA’s Inventions and Contributions Board recognized Hamilton’s contributions (which laid the foundation for the guidance of future NASA space programs like Skylab and even the Space Shuttle).

“Her concepts of asynchronous software, priority scheduling, software reuse, and man-in-the-loop decision capability such as priority displays, became the foundation for ultra-reliable software design,” the citation read.

“No software bug was ever found on any manned space flight Apollo mission.”

NASA computer scientist Margaret Hamilton standing next to a stack of books containing calculations she made for Apollo 11. The stack is as tall as she is.

Margaret Hamilton in 1969, standing next to a stack of calculations she and her team made for the Apollo project. (Photo by NASA)

In fact, during Hamilton’s work on the Apollo program, “She and colleagues did a careful study of the software errors that had arisen,” Brock noted in his blog post, “scrutinizing and categorizing them according to cause.”

Brock added in an email this week that while Hamilton is best known for her work on the Apollo Guidance Computer, “I was particularly pleased that in her oral history she was able to present the work that has been her focus since the end of the Apollo program. This is her work on creating methods to create software, and other kinds of systems, that avoid errors and ensure reliability by design.”

Brock calls them “less well-known efforts that have occupied her for the last 50 years and actively today.”

Or, as he put it in the blog post, “Avoiding these errors by circumnavigating their causes became the focus of her career forever after. She founded two companies to pursue this work, leading the development of new formal methods and languages for creating error-free and reliable software and systems.

“She continues this work at the time of this writing.”


Group Created with Sketch.
THE NEW STACK UPDATE A newsletter digest of the week’s most important stories & analyses.