The Woman Behind the Software That Took Us to the Moon




Last week, Margaret Hamilton celebrated her 80th birthday. Hamilton’s name may not be a familiar name to most, but Neil Armstrong and Buzz Aldrin would not have made it to the moon without the software created by Hamilton and her team to guide the Apollo 11. That spaceflight landed the first humans on the moon on July 20, 1969, just over 47 years ago. Reflecting on the incredible advances in computers and software over that period of time, it is an amazing feat – especially considering at the start of the Apollo program, computer science wasn’t even part of any college curriculum.

The Race to Space

In his May 1961 address to Congress, President John F. Kennedy stated, “Space is open to us now; and our eagerness to share its meaning is not governed by the efforts of others. We go into space because whatever mankind must undertake, free men must fully share.” President Kennedy challenged his country, “I believe that this nation should commit itself to achieving the goal, before this decade is out, of landing a man on the moon and returning him safely to the earth.” This set a dramatic and ambitious goal for NASA.

At first software wasn’t even included in the schedule or the budget for the Apollo mission, but it soon became clear that software would be central to its success. NASA approached Hamilton – a mathematician who was working at MIT on weather prediction software at the time – and she was chosen as director of Apollo Flight Computer Programming at MIT’s Draper lab to pioneer to the effort. Hamilton also coined the term “software engineering” which helped give the field the legitimacy enjoyed by other branches of engineering. 

2 MB of Software get us to the Moon

Margaret Hamilton and her colleagues developed the flight software for all of NASA’s Apollo missions, including the Apollo 11. Recently, this source code has been made available on GitHub, thanks to Chris Garry, a former NASA intern. Inconceivably, it took only about 2 MB of code to get us to the moon. Especially when you realize that today, for many smartphones, 16 MB is the bare minimum.   

At that time, computers still ran on punch cards, and once Hamilton’s team punched holes in the cards they were shipped off to a Raytheon facility where a group of seamstresses would thread copper wires through magnetic rings to literally hardwire the code – this was known as “core rope memory.” (A wire going through a core was a 1 and a wire going around the core was a 0.) Hamilton was known for her focus on software reliability and she tested and debugged even beyond what was deemed necessary for a space mission.

This paid off when just minutes before the lunar module Eagle landed, multiple error messages started appearing. The computer was tasked with doing unnecessary calculations when it needed to land the module on the surface of the moon. However, Apollo’s unique asynchronous processing let the computer prioritize activities – avoiding an error that could have aborted the mission.

Hamilton recollects her thoughts on the landing in an interview with TIME. “I remember thinking, Oh my God, it worked. I was so happy. But I was more happy about it working than the fact that we landed.” 

Working Side by Side

In an interview with Futurism, Hamilton reflects that there were always many more men than women programmers. However, this never seemed to bother her or hold her back. She recollects, “More than anything, we were dedicated to the missions and worked side by side to solve the challenging problems and to meet the critical deadlines. I was so involved in what we were doing, technically, that I was oblivious to the fact that I was outnumbered by men. We concentrated on our work much more than whether one was male or female. We were more likely to notice if someone was a first floor or second floor person, a hardware or software guy …”

Hamilton was also busy raising her young daughter, Lauren, during her work on the Apollo mission. She recounts, “I made sure to spend as much time as possible with my daughter by taking her to work with me during nights and weekends.” Hamilton did what she had to do out of necessity; nearly three decades later “Take our Daughters to Work Day” was established as a national program.

After NASA, Hamilton was the CEO of a company she co-founded called Higher Order Software (HOS); it built upon her ideas on error prevention and fault tolerance. She then went on to become the founder and CEO of Hamilton Technologies, Inc. (HTI) in 1986, a software company based in Cambridge, MA and developed around the Universal Systems Language.

Belated Accolades for Hamilton

It wasn’t until 2003 that Hamilton was granted a NASA Exceptional Space Act Award for her scientific and technical contributions. Dr. Paul Curto, who nominated her for the award said he “was surprised to realize she was never formally recognized for her groundbreaking work.” He stated, “Her concepts of asynchronous software, priority scheduling, end-to-end testing, and man-in-the-loop decision capability, such as priority displays, became the foundation for ultra-reliable software design.”

This year, Hamilton could be recognized in a way that brings her into the living rooms of kids whose grandparents may have watched the first lunar landing. It has been proposed that Hamilton and other pioneering Women of NASA, including Katherine Johnson, Sally Ride, Nancy Grace Roman and Mae Jemison, be cast as Lego figures. The project has nearly gained the 10,000 votes of support it needs for Lego to review the project as a first step in bringing it to reality.

She shares words of inspiration with this quote – one that is particularly relevant to young women interested in careers in STEM:
“Never let fear get in the way! Don’t be afraid to continue when things appear to be impossible, even when the so-called ‘experts’ say it is impossible. Don’t be afraid to stand alone, to be different, to be wrong, to make and admit mistakes, for only those who dare to fail greatly can ever achieve greatly.”

Image of Margaret Hamilton from the Smithsonian Learning Lab. It shows her pictured next to the thousands of lines of code she and her team wrote when she was director of Apollo Flight Computer Programming at MIT’s Draper lab.