Throwback Thursday is a look back at some of the great minds in the history of computer science that have inspired Little Web Giants. This week’s story on Margaret Hamilton was put together by Paul.
Margaret Hamilton is a giant in the world of software engineering – she was actually one of the earliest proponents of the very term “software engineering”. Prior to the 1960s, programming was not considered an engineering discipline and when Hamilton “first started using this phrase, it was considered to be quite amusing.” Although most well-known for her work on NASA’s Apollo missions, she has contributed enormously to the broader field of software engineering.
Margaret Hamilton was born in 1936 in a small town called Paoli in Indiana. Straight out of secondary school she studied mathematics at the University of Michigan and then spent a few years as a teacher to support her husband who was completing his studies. Her move to MIT in 1960 was what allowed her genius to reveal itself. She first began by developing software for weather prediction in the meteorology department. A year later she was assigned to the Semi-Automated Ground Environment (SAGE) project, the system that governed NORAD’s response to a Soviet air attack.
Her gift for debugging emerges
All beginners at SAGE were routinely asked to debug a specific program that nobody had yet been able to comprehend or even get to run. Until Hamilton arrived, all had failed because not only was it extremely complex, but all the comments were in Greek and Latin. But, Hamilton recounted at a 2001 conference, “I actually got it to work. It even printed out its answers in Latin and Greek.” Moreover, she reflects on how this fit within her lifelong trajectory: “You can see the overriding theme here; I was and still am very interested in what causes errors and how to avoid them throughout. That was one of my very first experiences in this regard.”
Subsequent to her astounding performance on SAGE she began working for MIT on the Apollo space mission, and her fixation on errors soon came in handy again. Due to her being a “beginner” she was assigned what was thought to be the least important software for the next mission: software that would take control if the mission was aborted. It was expected that this was “never going to happen”, so she cheekily named her program ‘Forget it’. She described what happened when the mission was actually aborting: “So I had to come in for the emergency. I was called in, and I was the one who had all the answers to all of the questions in ‘Forget it’.”
Humans make mistakes…Margaret wants to fix them
Hamilton’s career seems to be marked by a repeated dependence on her passion for building safeguards for cases where things go wrong. In these extremely critical moments, she was repeatedly proven correct in her belief in the fallibility of humans. And she foresaw a lot of these moments and had built safety measures in advance – when permitted.
As time advanced Hamilton was put in charge of all on-board flight control software in the Apollo program. The pressure at this time was huge – people’s lives were in her hands. She recollects, “I was always imagining headlines in the newspapers, and they would point back to how it happened, and it would point back to me.” She recalls this as being a time when she was constantly pushing against a resistant command structure to “get permission to be able to put more error detection and recovery into the software”, but this was denied. When she raised concerns about astronauts making mistakes, she was “told that the astronauts would never make any mistakes, because they were trained never to make mistakes.”
Her doubts were well-founded as she recounted, “So we were very worried that what if the astronaut, during mid-course, would select pre-launch, for example? ‘Never would happen’, they said. ‘Never would happen’.” And then to a laughing audience she exclaimed, “It happened!” During Apollo 8, Jim Lovell accidentally selected pre-launch and it wiped all the navigation data up to that point. The spacecraft was rendered a giant hunk of metal floating in space without a flight path! Luckily Hamilton and her team came up with the bright idea of uploading new navigation data, and they got the astronauts home alive.
To a modern software engineer, it seems unthinkable that a human user would be able to put a flying spacecraft into pre-launch mode and wipe all navigation data, but this was at a time when everyone learnt on the job and there was not a long history of best practices for system design and architecture. It is unthinkable to modern software engineers because of the work of pioneers like Hamilton.
Humans make mistakes…Margaret fixes them
Throughout the Apollo program, Hamilton’s greatest feat was to revolutionise software engineers’ approaches to analysing errors and preventing them in future. One notable event was in the infamous Apollo 11 mission, which first landed humans on the Moon. Three minutes prior to the spacecraft touching down, a faulty astronaut checklist document caused the computer to repeatedly instruct the crew to manually put the radar system switch in the wrong position, eating up valuable CPU time. Hamilton’s software overrode the erroneous command by clearing out the entire queue of processes and allowing only the highest priority processes to execute until the spacecraft had landed. “Without this software, it’s likely that the mission would have failed.” This anecdote is characteristic of Margaret Hamilton: An automatic safeguard stepped in to counteract a human error. But it also exemplifies two of her greatest innovations: asynchronous software and priority scheduling.
For her exemplary work on the Apollo missions, in September 2003 she was granted a NASA Exceptional Space Act Award. At the time, senior technologist for NASA’s Inventions and Contributions Board Dr. Paul Curto nominated Hamilton, saying he was “surprised to discover she was never formally recognised for her groundbreaking work.” He listed her contributions as the aforementioned “asynchronous software” and “priority scheduling,” as well as “end-to-end testing, and man-in-the-loop decision capability, [which] became the foundation for ultra-reliable software design.”
From her experiences in MIT and the Apollo program, Hamilton had gradually developed a theory called ‘Higher Order Software’ with six categories of error prevention. From 1976 through to 1984 she explored this further with her company Higher Order Software, which developed a product ‘USE.IT’ that was used in a number of government projects. It wasn’t without its critics – infamous computer scientist Edsger W. Dijkstra wrote a scathing critique of the company and its founders’ work.
Hamilton’s obsession with reliability and error elimination continued with her founding Hamilton Technologies Inc. (HTI) in 1986. Her work in HTI continues to this day and involves a software development environment that disallows erroneous code by applying her development-before-the-fact philosophy. It is specifically geared toward safety-critical systems in which error-free operation is essential. Her clients include tech giants (IBM, Sun Microsystems, Hewlett Packard), academia and scientific bodies (CSIRO, MIT and numerous universities), and government and military bodies (NASA, NSA, U.S. DOD, Army, Navy, Air Force).
Margaret Hamilton’s legacy
Hamilton’s impact on history is massive. She helped get humanity to the Moon, broke new ground on safety systems engineering by prioritising critical processes and overriding erroneous states, and she is a powerful role model for encouraging women to go into STEM roles.
Certainly Hamilton’s most significant contribution is to error detection and recovery in safety-critical systems. In cases of human error and even lightning striking a shuttle causing a reboot of all electronic systems, her software would restart, clear its queue, or discard less important processes. She recognised that software didn’t just need to be a link in a chain – it could replace other links when they broke. This was a game-changer in the history of system design. Her creative leap meant that her software went above and beyond specification. It would actively take control when other systems made mistakes. This was a stroke of genius and could be seen as the conceptual predecessor to many other safety-critical systems in fields such as aeronautics, health, and automotive electronics.
In an interview for Futurism last month, she tried to convey the zeitgeist of the era: “There was no choice but to be pioneers. There was no school to attend or field to learn what today is known as ‘software engineering’ or ‘systems engineering.’ When answers could not be found, we had to invent them; we were designing things that had to work the first time…The greater the challenge, the more fun we had. And, yet, dedication and commitment were a given. There was no time to be a beginner. Learning was by being and doing, and a dramatic event would often dictate change.”
On the topic of women in STEM, which she is often asked about, she says some things were more difficult then and some are more difficult now: “We still do other things out of ignorance today, such as continuing to pay women lower salaries than men.” She also recalls a time when a woman on her team had to get her husband’s signature to receive a loan from the MIT credit union. Hamilton objected and the policy was changed. On reflection she notes, “I didn’t do it because of male versus female; I was very conscious of what was fair and what wasn’t fair.” It is important to understand that she was completely radical in an era when people around her would regularly say, “How can you leave your daughter?” But she would take her young daughter with her into the lab on evenings and weekends, writing code that would change history while her daughter slept.
If you want to learn more about the code produced by her team, it was published to Github in its entirety. If you want to see cool lego versions of the “Women of NASA”, check out Maia Weinstock’s fantastic Flickr account! (I emailed Maia and she had the following little nugget: “Incidentally, I gave a copy of the LEGO vignette to Margaret, who lives in my city, and she loved it”.)
In putting together this piece, I used a number of different resources. Thanks go to:
- Verne magazine for their interview with Margaret Hamilton in December 2014;
- the Dibner Institute for the History of Science and Technology and Caltech for their annotations of the Apollo Guidance Computer History Project;
- Robert McMillan for his profile on Margaret Hamilton for Wired in October 2015;
- KeriLynn Engel and Danika Kimball for granting me permission to cite their Amazing Women In History piece on Hamilton;
- NASA for honouring a legend;
- Jolene Creighton for allowing me to cite her wonderful interview with Margaret Hamilton for Futurism;
- Lily Rothman for her piece on Margaret Hamilton in Time Magazine;
- Keith Collins for documenting the painstaking work of Ron Burkey, Gary Neff, and Chris Garry; and
- Maia Weinstock for allowing me to use her Lego image.
Next week, Throwback Thursday will take a look at another visionary albeit from a far earlier era: Ada Lovelace, the first computer programmer.