Margaret Hamilton has died. She was 90.
She led the team at MIT that wrote the flight software for the Apollo missions to the Moon. Her daughter, Lauren, told the Associated Press that she died on September 30 in a hospital in Cambridge, Massachusetts.
You will see her called the mother of software engineering this week. You may see the famous photo of her as a young woman, standing beside a stack of printed code as tall as she was.
But the story that tells you who she really was is smaller than that. It starts with a four-year-old girl playing on a machine she was not supposed to touch. And it ends with a fix that Margaret Hamilton was told nobody would ever need.
Who Was Margaret Hamilton?
Margaret Hamilton was born in Paoli, Indiana, in 1936. She studied mathematics, with a minor in philosophy, and earned her degree from Earlham College in 1958.
She did not set out to go to the Moon. She moved to Boston in 1959 while her husband studied law. Her first job at MIT was writing weather prediction software. Then she wrote code for an air defense project.
In 1965, according to MIT, her husband spotted a newspaper ad. MIT’s Instrumentation Lab was hiring for Apollo. She joined, and became the first programmer on the project there, and its first woman programmer. By 1968 she was leading the team writing the software for the crewed flights.
It was a strange job, because nobody really knew what software was yet. In her own words, from an MIT interview in 2009: “Because software was a mystery, a black box, upper management gave us total freedom and trust.”
She also said she started calling her work “software engineering,” to give it the same respect as other kinds of engineering. At first, she said, people found the term amusing. Nobody is laughing at it now.
The Day a Four-Year-Old Crashed the Moon Program
Hamilton sometimes brought her daughter, Lauren, to work with her. Lauren was four.
One day Lauren was playing on the simulator for the Apollo command module, the part of the spacecraft the crew lives in. While the simulator was “in flight,” she pressed keys that started a program called P01.
P01 was the pre-launch program. It was only meant to run while the rocket was still sitting on the ground. Running it in the middle of a flight wiped out what the computer knew about where it was. The simulator crashed.
Most people would have laughed and moved on. A child pressed the wrong button. Children do that.
Hamilton saw something else. If a four-year-old could do it, so could a grown-up. Not because the grown-up was careless, but because people are people. Tired hands press the wrong key. Every one of us has sent a message to the wrong person, or locked the keys in the car.
Overruled: “The Astronauts Won’t Make That Mistake”
Hamilton proposed a change to the software. It would protect the computer if someone ran P01 during a flight.
She was overruled. According to MIT, the reasoning was that the astronauts were too well trained to make that mistake. They were the best pilots in the world. They would never press the wrong button.
So instead of a fix in the code, she was allowed to add a warning to the documentation. In plain terms: a note that said, don’t do this.
Hold on to that detail, because it is the one most tributes skip. A note and a guard sound similar. They are opposites. A note asks a person to be perfect. A guard expects that one day they won’t be, and makes room for it.
Apollo 8: The Mistake Happened Anyway
In December 1968, Apollo 8 became the first crewed mission to travel to the Moon and circle it.
During the flight, the astronaut Jim Lovell accidentally started P01. Exactly the mistake Hamilton had warned about. Exactly the mistake she had been told a trained astronaut would never make.
The navigation data vanished from the computer, far from home.
Hamilton’s team was called in to help sort it out, and the crew came home safely. After that, her change was put into the software.
Notice what did not happen. Nobody’s story ends with Lovell being disgraced. He was one of the best astronauts NASA had, and he still pressed the wrong key. That was the whole point. The mistake was never a sign that Lovell was bad at his job. It was a sign that he was human, which Hamilton had understood from the start.
If this reminds you of another engineering story, it should. The real meaning of Murphy’s Law was never “life is cursed.” It was a warning to design for the mistake before it arrives.
Apollo 11: The Rescue That Was Already Written
On Apollo 8, the fix came after the fall. On Apollo 11, it was already there.
In July 1969, moments before the lunar module Eagle touched down on the Moon, the computer started flashing an alarm: 1202.
According to MIT, a hardware switch problem was flooding the computer with work it did not need to do. It was overloaded at the worst possible moment, with the crew only minutes from the surface. Nobody in that room had time to write new code.
They did not need to. Hamilton’s team had built the software to set priorities. When the computer was overloaded, it dropped the less important background jobs and kept the jobs that mattered most for landing. Mission control trusted that design, and let the landing go ahead.
That is the quiet genius of it. The most important work happened years before anyone needed it. Someone had sat at a desk and asked, “What if this goes wrong?” and then written the answer down, in advance, for people she would never meet in that moment.
Hamilton later put it simply: “There was no second chance.” So she built one in.
Hamilton received the Presidential Medal of Freedom in 2016. In the 1970s and 80s she founded two companies built around the same idea she had carried since that day in the simulator: prevent errors, and plan for the ones you cannot prevent.
Designing for the Mistake Before It Happens
There is a reason this story lands harder than most obituaries.
Most of us live as if we are expected to be the trained astronaut. We are not allowed to press the wrong button. When we do, we hide it. We feel like the mistake says something terrible about who we are.
Margaret Hamilton thought about mistakes in a completely different way. To her, a mistake was not proof that you were broken. It was a certainty to plan for. And she did not plan for it by scolding people in advance. She planned for it by building the way back before anyone needed it.
There is a very old idea, much older than computers, that the rescue was ready before the first fall. That whoever made us was never counting on us to be flawless, and built the way home in from the start. Hamilton would probably have called it good engineering. Plenty of people across the ages have called it grace.
A small way to use this today
- Find your “they’ll never make that mistake.” Where are you relying on yourself or someone else to simply never slip?
- Swap one note for one guard. Instead of telling yourself “don’t forget,” set the alarm, leave the bag by the door, or write the number down where you will see it.
- Write the recovery step before you need it. Who will you call if things go wrong? Decide now, while you are calm.
- Go easy on the person who pressed the wrong key. Including when that person is you.
A good place to start:
The Beginner’s Guide to Feeling God’s Presence Every Day
A short free video guide and companion PDF for noticing that you are not alone in the ordinary moments, including the ones where you got it wrong.
Free.
The Last Detail
One more thing, and it is easy to miss.
The person who told the world that Margaret Hamilton had died was her daughter, Lauren. The same Lauren who, at four years old, crashed the Moon simulator and showed her mother the mistake nobody else would admit could happen.
Margaret Hamilton did not treat that moment as a child making a mess. She treated it as a gift. A small person had shown her where the system was fragile, and she spent the rest of her career making sure that when people slipped, there was something there to catch them.
It is worth remembering the next time you press the wrong key. Somewhere, someone may already have written your way back.
If you love stories about space and what it does to people, you might also like this piece on the overview effect and what astronauts see from space.
Discussion Question
Hamilton was told the astronauts were too well trained to make the mistake she feared. Do you think organizations today still trust “people won’t make that mistake” too much, or have we finally learned to design for human error? Tell us what you think in the comments.
Share This
“A four-year-old crashed the Apollo simulator. Her mom, Margaret Hamilton, said: if a child can do it, an astronaut can too. She was overruled. Then it happened on Apollo 8. https://bgodinspired.com/index.php/bgodinspired-news/margaret-hamilton-apollo-fix/”
“A note asks people to be perfect. A guard expects they won’t be. Margaret Hamilton, who just died at 90, built the second kind, and it helped land Apollo 11. https://bgodinspired.com/index.php/bgodinspired-news/margaret-hamilton-apollo-fix/”
“The best Apollo story this week isn’t the Moon landing. It’s the fix Margaret Hamilton was told nobody would ever need. https://bgodinspired.com/index.php/bgodinspired-news/margaret-hamilton-apollo-fix/”
Questions About Margaret Hamilton (Q&A)
Who was Margaret Hamilton?
Margaret Hamilton was an American computer scientist who led the MIT Instrumentation Lab team that wrote the onboard flight software for NASA’s crewed Apollo missions. She was born in Paoli, Indiana, in 1936, received the Presidential Medal of Freedom in 2016, and died on September 30, 2026, at age 90.
When did Margaret Hamilton die?
Margaret Hamilton died on September 30, 2026, in a hospital in Cambridge, Massachusetts, at age 90. Her daughter, Lauren Hamilton, confirmed the death to the Associated Press. The news was widely reported in early October 2026.
What was the P01 mistake on Apollo 8?
P01 was the Apollo computer’s pre-launch program, meant to run only before liftoff. In 1968 Margaret Hamilton’s four-year-old daughter crashed the command module simulator by starting P01 mid-flight, and Hamilton proposed a software guard against it. She was overruled because astronauts were considered too well trained to make that mistake. On Apollo 8, astronaut Jim Lovell accidentally started P01 in flight, the navigation data disappeared, Hamilton’s team was called in to help, and her change was then added to the software.
What was the 1202 alarm on Apollo 11?
The 1202 alarm went off on the Apollo 11 lunar module computer moments before the Moon landing in July 1969. A hardware switch problem was overloading the computer with unnecessary work. The software Margaret Hamilton’s team built was designed to drop lower-priority tasks and keep the landing-critical ones running, so mission control allowed the landing to continue.
Did Margaret Hamilton invent the term software engineering?
Margaret Hamilton said that she began using the term “software engineering” to distinguish software work from hardware and other kinds of engineering, and to give it equal legitimacy. That is her own account; sources describe it as her coining or popularizing the term rather than settling who used the phrase first.