Margaret Hamilton, the computer scientist who led the Apollo Guidance Computer software team at MIT and coined the term “software engineering,” died September 30, 2026, at age 90. MIT announced her passing on October 7. She was 32 years old when her software saved Apollo 11.
The Code That Saved Apollo 11
Three minutes before Neil Armstrong and Buzz Aldrin touched down on the Moon on July 20, 1969, the Apollo Guidance Computer began flashing 1202 alarms. Aldrin had requested altitude data — triggering the eighth simultaneous process on a system designed for seven, while a stuck rendezvous radar switch flooded the computer with extra data. The machine was overloaded. Mission Control had seconds to decide whether to abort.
It did not crash. Hamilton had built the system to handle exactly this scenario. Her asynchronous executive — software that assigned every running process a priority number — automatically shed the non-critical background tasks and kept the landing software alive. Armstrong landed with fewer than 30 seconds of fuel to spare. “If the computer hadn’t recognized this problem and taken recovery action,” Hamilton said, “I doubt if Apollo 11 would have been the successful Moon landing it was.” Management had called her priority-scheduling system overkill. She built it anyway.
The asynchronous executive was not a lucky accident. Hamilton’s team designed the Apollo Guidance Computer software with graceful degradation as a core requirement: when resources ran out, the system should fail safely, not catastrophically. This was real-time defensive programming on 4KB of RAM, written under conditions that would make most modern production incidents look trivial.
She Named Software Engineering — and Had to Fight for It
In the mid-1960s, software was not considered engineering. It was treated as an afterthought to hardware — instructions that programmers typed while real engineers built circuits. Hamilton introduced the term “software engineering” to force the discipline onto equal footing. “When I first came up with the term,” she said, “no one had heard of it before.” Colleagues at NASA initially laughed. Over the following decade, the term became standard across the industry — and eventually the name of an entire academic field.
She went further than naming. Hamilton founded MIT’s Software Engineering Division, led a team of more than 400 engineers, and later co-founded Hamilton Technologies to develop formal error-prevention methods. Her Presidential Medal of Freedom citation from 2016 reads: “Hamilton defined new forms of software engineering and helped launch an industry that would forever change human history.”
Defensive Programming Was Born From a Four-Year-Old
During Apollo 8 preparations, Hamilton’s daughter Lauren — four years old at the time — sat down at a simulator console and accidentally activated a pre-launch program. Hamilton proposed adding safeguards to prevent the same error in the real system. NASA management refused: astronauts, they insisted, would never make that mistake. Then astronaut Jim Lovell triggered the exact same error during Apollo 8, mid-mission. Recovery procedures followed. Defensive programming stopped being optional.
The incident captures Hamilton’s core philosophy: systems fail in ways their designers did not anticipate, and software must be built to survive those failures gracefully. This is not a principle that ages out.
Hamilton’s Principles in the Age of AI-Generated Code
In 2026, AI coding tools generate code faster than engineers can review it. The Stack Overflow 2026 Developer Survey found that 46% of developers do not trust AI code accuracy — up from 31% in 2024. The gap is real: AI-generated code frequently skips error handling, input validation, and recovery logic. These are not edge cases. They are exactly the safeguards Hamilton mandated for a spacecraft landing on the Moon.
Hamilton designed for failure. She assumed astronauts would make mistakes, sensors would give bad data, and processors would overload. Her software was built to recover from all of it. The current trend of shipping AI-generated code and fixing bugs later runs on the opposite assumption. Hamilton spent her career demonstrating — under the harshest possible conditions — why that is the wrong order.
Key Takeaways
- Margaret Hamilton died September 30, 2026, at age 90; MIT announced her passing October 7
- Her priority-scheduling system saved Apollo 11 three minutes before landing by shedding non-critical tasks under overload — management had called it overkill
- She coined “software engineering” in the 1960s and had to fight to get the discipline taken seriously as engineering, not just programming
- Defensive programming — designing for human error and unexpected system states — emerged directly from her Apollo work
- Her principles remain the correct response to AI-generated code that skips error handling: assume failure, design for recovery













