The Apollo 11 moon landing was one of the boldest milestones in human history.
Yet it almost didn’t happen. On July 20, 1969, three minutes
before Neil Armstrong and Buzz Aldrin stepped foot on the lunar surface, something went wrong.
The computer set off alarms warning of an emergency.
Error codes popped up on-screen. NASA faced a tough decision:
Should they continue or cancel the mission? Had the agency decided to abort,
it would have been a crushing blow for NASA, heart-breaking for the nation,
and would have created a window of opportunity for the Russians to get to the moon first.
In the end, the astronauts landed safely. Thanks to a young, brilliant software engineer.
Margaret Hamilton developed NASA’s in-flight software for Apollo.
She spent her entire career focused on anticipating problems and solving
them which saved the moon landing. Her penchant for detecting errors
came from an unexpected place. After an incident involving her young daughter.
Hamilton was born 33 years earlier, on August 17, 1936, in the small town of Paoli, Indiana.
She earned a degree in mathematics with a minor in philosophy from Earlham College.
She taught math at high school for a year before following her husband to Cambridge, Massachusetts
where he attended Harvard Law School. To support her husband’s studies,
she took a job at MIT to write software that could predict the weather.
Software engineering was not yet a field - people didn’t go to school to learn how to program.
Hamilton taught herself. She later wrote software to
detect enemy aircraft for the military and then planned to get a PhD in abstract mathematics.
But one day, her husband noticed a newspaper ad that a lab at MIT was looking for programmers
to help take people to the moon. NASA had contracted that lab to build the
onboard flight software for Apollo. Hamilton jumped at the
opportunity to join the team. She was the first programmer they
hired. A woman in a heavily male world. Hamilton began writing code for the
portable computer responsible for controlling the spacecraft.
The Apollo Guidance Computer engineered at MIT was a technological marvel
given computers back then were the size of rooms! One unit was aboard the command module Columbia
that took astronauts to and from Earth, the other was aboard Eagle, which landed on the moon.
At first, NASA executives assigned Hamilton low-level tasks since she
was one of the least experienced programmers. Her first assignment was to write code that
would kick in if the mission had to abort. The higher-ups were so sure this wouldn’t
happen that she named her program “Forget It” because she didn’t think any of the emergencies
she planned for would ever see the light of day. Her software needed to detect unexpected errors
quickly and recover from them in real-time. However, it was very difficult to do because
the software at the time could only process jobs in a predetermined order.
So, she developed what’s called “asynchronous programming”.
This allowed the computer to recognize error messages and ignore low-priority
tasks in favor of more important ones. So even if there were an error, the high-priority
tasks would continue to be performed. This is a photo of her beside a stack of
printed code that’s nearly as tall as her. She had insisted on adding more code as a
safeguard to prevent a crash from happening after an incident with her young daughter.
She brought her four-year-old to work one day, and Lauren played astronaut and started
hitting the keys which crashed the system during a simulation of a mission to the moon.
Her daughter had selected a program that was meant to be used pre-launch which caused the
computer to lose its navigation data. Hamilton thought to herself:
“...my God – this could inadvertently happen in a real mission” as she told the Guardian.
And if that happened, the crew could be lost in space.
So, she asked her bosses for permission to add more fail safes.
At first, they refused. It was more software to debug and work with.
Plus, they didn’t think an astronaut would make that kind of mistake.
But that mistake happened on the very next mission.
During Apollo 8, the first manned mission orbiting the moon,
experienced astronaut Jim Lovell said: “Uh, oh. I think I just did something wrong.”
He had accidentally pushed the wrong button which started the pre-launch program and created havoc.
Hamilton and her coders spent nine hours painstakingly troubleshooting the problem
and fortunately, managed to send new navigation data to the spacecraft,
guiding the astronauts back home safely. After that nightmare, Hamilton’s higher-ups
let her put more safeguards into the software. By this time, she had worked her way up from a
junior engineer to lead software design for the Apollo program.
Everyone realized Hamilton’s ability to detect errors and recover from them.
The team got the greatest scare during the Apollo 11 mission.
Just as Armstrong and Aldrin were about to land on the lunar surface,
the computer started flashing error codes. Hamilton was standing in the monitoring room
at MIT when she saw what was happening. They later discovered that a radar
switch was in the wrong position and took up processing power, overloading the computer.
The moon mission was at risk of being aborted. However, NASA trusted Hamilton’s system.
They believed it was well-designed and could come to the rescue.
And it did. Her code prioritized the most important
tasks and allowed the mission to stay on track. The software worked perfectly and both
astronauts landed safely on the moon. It was a moment that hit Hamilton hard.
She recalled saying: “My God. Look what happened. We did it. It worked. It was exciting.”
Hamilton popularized the term “software engineering”.
At the time, software was not taken as seriously as other disciplines in engineering.
She helped launch an industry that is now changing human history.
Margaret Heafield Hamilton
In 2017, President Barack Obama awarded Hamilton the United States’ highest civilian award,
the Presidential Medal of Freedom. President Obama said:
“Our astronauts didn’t have much time, but thankfully they had Margaret Hamilton.”
It’s thanks to curious minds that we’re able to venture out into the solar system.
If you love learning and want to invest in yourself by picking up new skills, my sponsor
Skillshare is the perfect place to start. Skillshare is an online learning community
with thousands of inspiring classes. From video editing to photography
to graphic design, you can find classes that match your interests.
I personally found Polymatter’s Making an Animated Video class particularly helpful, it gave me great
tips on, for example, how to choose the right colors to create the best designs.
All the classes are broken down into short sections, there are no ads or tests.
The first 1,000 people to use my link which is in the description will get
a one-month FREE trial of Skillshare Premium. Thanks for watching. For Newsthink, I’m Cindy Pom.