Your browser is not supported. For the best experience, you should upgrade to a modern browser with improved speed and security.

The Computer Scientist Who Saved the Moon Landing

The Apollo 11 moon landing nearly ended in failure -- until Margaret Hamilton's flight software saved the day.

In this iconic photograph, pioneering computer scientist Margaret Hamilton stands next to the computer code that she and her team wrote to guide the Apollo spacecraft to the moon! Hamilton was the lead software designer for NASA’s Apollo program, and her forward thinking saved the 1969 Apollo 11 mission when the flight software she designed prevented a last-minute abort of the famous landing which brought the first humans to the Moon. Over the course of her career, Hamilton developed the concepts of asynchronous software, priority scheduling, and Human-in-the-loop decision capability, which became the foundation of modern software design. She also fought for programming to be given the respect it deserved, coining the term "software engineering" ; after all, as her work showed, software could make the difference between failure and a groundbreaking success.

Hamilton was a  self-taught programmer, and she first became involved in the space program in 1965 when she became Director of the Software Engineering Division of the MIT Instrumentation Laboratory. The lab was developing the on-board flight software for the Apollo space program that NASA wanted to use to help navigate and land on the Moon. As an article in Wired Magazine explains, “the lunar landing was one of the first times that software was ever entrusted with such a mission-critical, real-time task. And the application development work for that feat was placed in the hands of Margaret Hamilton."

Her work paid off when an unexpected problem cropped up as Apollo 11 tried to land on the moon. Three minutes before landing, alarms sounded when the computer became overwhelmed with data from an unnecessary radar system that had been accidentally triggered by the crew. Fortunately, Hamilton had not only programmed the computer to recognize such an error, but she also ensured that the software’s priority scheduling could complete high priority tasks — like preparing for landing — by ignoring lower priority ones. Writing about the event in 1971, Hamilton said, “If the computer hadn't recognized this problem and taken recovery action, I doubt if Apollo 11 would have been the successful moon landing it was.”

Following the success of Apollo 11, Hamilton worked on many of the subsequent Apollo missions. In 1986, she founded Hamilton Technologies with the aim of expanding on Universal System Language developed for NASA in order to make software more reliable, cheaper, and faster to develop. Hamilton also played a major role in making software engineering the respected field that it is today. In a recent interview, the now 82-year-old Hamilton, explained why she began calling herself a “software engineer”: “Software during the early days of this project was treated like a stepchild and not taken as seriously as other engineering disciplines, such as hardware engineering; and it was regarded as an art and as magic, not a science... I fought to bring the software legitimacy so that it (and those building it) would be given its due respect.”

For many years, Hamilton's name was little known, but in recent years the general public has begun to appreciate just how much this trailblazer's work changed our world. Hamilton was awarded the Presidential Medal of Freedom by President Barack Obama in 2016 for her contributions to Apollo 11's successful moon landing; as he presented her with the medal, he said, "Our astronauts didn't have much time, but thankfully they had Margaret Hamilton." Hamilton also appeared in the fan-designed LEGO Women of NASA set which released in 2017. Hamilton still speaks fondly of a time when software was unexplored new territory: "There was no choice but to be pioneers; no time to be beginners," she says. "Looking back, we were the luckiest people in the world."

Resources About Margaret Hamilton

LEGO Women of NASA: Space Heroes

LEGO Women of NASA: Space Heroes

Written by: Hannah Dolan
Recommended Age: 4 - 6

Meet the women of the LEGO Ideas Women of NASA set in this early reader perfect for kids to try reading on their own! Kids will learn about Jemison, the first African American women to travel in space; Sally Ride, who inspired future scientists after her career as an astronaut; Margaret Hamilton, who created computer software for the Apollo mission; and Nancy Grace Roman, the astronomer and "mother" of the giant Hubble Telescope. All of the illustrations feature photography from the LEGO set, making this book perfect for young fans who want to learn more about their new heroes!

Margaret and the Moon: How Margaret Hamilton Saved the First Lunar Landing

Margaret and the Moon: How Margaret Hamilton Saved the First Lunar Landing

Written by: Dean Robbins
Illustrated by: Lucy Knisley
Recommended Age: 5 - 9

Margaret Hamilton loved numbers, and to her, the best part of math was when it could solve a problem in the real world! Her love of math introduced her to computers, and then to a job at NASA, where they were planning a mission to the moon — and computers were going to be a part of it. Hamilton hand-wrote the code for the Apollo missions, and when a last-minute problem cropped up as Apollo 11 prepared for a lunar landing, it was Hamilton's forward-thinking code that saved the day! This lively look at a computer pioneer is a great way to show young readers that math really can take you to the stars.

Space Engineer and Scientist Margaret Hamilton

Space Engineer and Scientist Margaret Hamilton

Written by: Domenica Di Piazza
Recommended Age: 7 - 10

As a girl, Margaret Hamilton loved math and science, and that piqued her curiosity about computers; they were powerful new tools, but to use them, you had to learn how to make them work. Hamilton taught herself how to code, and quickly discovered how a good computer program could make life easier — or protect people from making mistakes. As the lead programmer for the NASA's Apollo guidance programs, she not only created programs that could lead a spacecraft to the moon and back, but also ensured that, when things went wrong, the mission would still be a success. This book celebrates Hamilton's passion for computers and the lasting impact of this groundbreaking programmer.

Galaxy Girls: 50 Amazing Stories of Women in Space

Galaxy Girls: 50 Amazing Stories of Women in Space

Written by: Libby Jackson
Recommended Age: 7 - 12

This gorgeously illustrated collected biography honors inspirational women who helped fuel some of the greatest achievements in space exploration from the nineteenth century to today! Galaxy Girls pays tribute to fifty pioneering women past and present, from mathematicians — including Margaret Hamilton — to engineers to test pilots to astronauts. Each capsule biography is paired with a striking full-page original artwork from the students of the London College of Communication. Perfect for inspiring the space leaders of tomorrow, this stunning book gives this band of heroic sisters and their remarkable and often little known scientific achievements long overdue recognition.

LEGO Women of NASA Building Kit

LEGO Women of NASA Building Kit

Manufacturer: LEGO
Recommended Age: 10 and up

Build a tribute to some of the ground-breaking women who took American into space with this much-anticipated set from LEGO Ideas! This fan-designed set features astronomer Nancy Grace Roman; computer scientist Margaret Hamilton; astronaut and physicist Sally Ride; and astronaut, physician and engineer Mae Jemison, each as part of a vignette depicting their role with NASA. It's a wonderful way to inspire the women in STEM of future generations!

You May Also Like

Help keep A Mighty Girl growing in the years ahead!

If you discover books or other resources via this post that you would like to purchase, please use the "Buy at Amazon" and other links found on every A Mighty Girl product page. By doing so, at no added cost to you, you help to support the site and allow us to continue providing you with wonderful girl-empowering resources. We appreciate your support!