cat posts/2026-10-12-margaret-hamilton-and-software-engineering.md
Margaret Hamilton and software engineering
The story about Margaret Hamilton I’ve told the most, mostly to engineers who say a user would never do something, is the one about her daughter.
Lauren was a small child, playing in the simulator at MIT, and she managed to select the pre-launch program, P01, in the middle of a simulated flight, which crashed it. Hamilton wanted to add a check so the software would refuse to do that during a mission. She was told it wasn’t needed, because astronauts were trained and wouldn’t make that mistake. Then on Apollo 8, Jim Lovell made that mistake, wiping navigation data in flight, and her team on the ground worked out how to get it back.
She died on 30 September, at 90, in a hospital in Cambridge, Massachusetts, and the news came out last week.
She studied mathematics at Earlham College, finished in 1958, and went to MIT in 1959, first to work on weather prediction software. The plan, as she told it, was to go on to graduate school in math, and the software job was supposed to be a stopgap. By the mid-1960s she was at MIT’s Instrumentation Laboratory, which had the contract for the Apollo guidance computer, and she ended up leading the team that wrote the onboard flight software. I also have a math degree and drifted into software expecting it to be temporary, which is about where the resemblance ends, but I’ve always noticed it.
She’s usually credited with coining “software engineering”, or at least with insisting on it at a time when it got laughed at. Who said it first is hard to prove, and NATO used it for the title of its 1968 conference. What I’m sure of is why she wanted it. In the early ’60s, the software was what the hardware people let you do at the end, and the people writing it weren’t treated as engineers. Calling it engineering was a claim that this was a discipline, with its own rigor, that deserved the same respect as the hardware it ran on. I’ve had “engineer” in my job title for most of my career and never once thought about who had to argue for it.
The moment everyone remembers is the Apollo 11 landing. A few minutes before touchdown, the computer started raising 1202 and 1201 alarms. It was overloaded, because a problem with the rendezvous radar’s interface was stealing processor time it should never have needed. The flight software was designed for that. It dropped the lower-priority work, restarted, kept the jobs that mattered for landing running, and told the crew it was doing so. Mission control called “go”, and Armstrong and Aldrin landed. A system that knows what matters most, and degrades to that when things go wrong, is something we still put in design docs as a goal, and most of us still don’t build one.
There’s a photo from 1969 of her standing next to a stack of printed listings of the code that’s as tall as she is. After Apollo she founded Higher Order Software in the ’70s and Hamilton Technologies in the ’80s, and spent much of the rest of her career on how to design systems that can’t get into states they shouldn’t, which is the P01 lesson turned into a research program. She received the Presidential Medal of Freedom in 2016.
These days the operator pressing the wrong button in the systems I work on is quite often an agent, and the P01 story has a new audience: people who tell me the agent would never pick that tool.