18/08/2026
Happy Birthday!
Happy 90th birthday to Margaret Hamilton -- the software engineer who wrote the computer code that saved the Apollo 11 moon landing and who, in the process, invented the discipline of software engineering itself! The system that kept that landing from being aborted began, improbably, with her 4-year-old daughter crashing a simulated moon mission.
Margaret Hamilton's daughter, Lauren, came along to the MIT lab on nights and weekends while her mother wrote the software that would fly astronauts to the moon. "There wasn't a time when we weren't working," Hamilton said. Lauren liked to play astronaut, because she had watched her mother do it in simulations. One evening she started hitting keys, and the simulation began to run. Then she hit another, and everything fell apart -- she had selected a program meant to be run before launch, and the computer, which had almost no memory to spare, wiped the navigation data that was taking her to the moon.
Hamilton saw what it meant immediately. "I thought: my God -- this could inadvertently happen in a real mission." She proposed a change to the software that would stop a prelaunch program from being selected in flight. Her superiors at MIT and NASA told her not to bother. The astronauts were too well trained to make a mistake like that.
On the very next mission, Apollo 8, an astronaut made exactly that mistake -- wiping the navigation data midway to the moon, just as Lauren had. Hamilton called it the Lauren bug. "It created much havoc and required the mission to be reconfigured," she said. "After that, they let me put the program change in, all right."
Hamilton was born in Paoli, Indiana, in 1936, earned a degree in mathematics with a minor in philosophy from Earlham College, and went to MIT in 1959 to support her family while her husband attended Harvard Law. She learned to program in the lab of Edward Lorenz, the meteorologist who would become the father of chaos theory, because there was nowhere else to learn it. "Computer science and software engineering were not yet disciplines," she said. "Instead, programmers learned on the job."
In 1964 her husband spotted a newspaper advertisement: the MIT Instrumentation Laboratory was looking for people to write the software to send a man to the moon. "I was attracted both by the sheer idea and the fact that it had never been done before," Hamilton said. "I was the first programmer to join and the first woman they hired."
She was gradually promoted until she was directing the team -- eventually about a hundred people -- that wrote the onboard flight software for both Apollo spacecraft. When she was given the job, one of the senior men told her he had no doubt she could do it but worried the men under her might rebel. "Well," she said, "they didn't."
Almost nobody thought the software mattered. It was not in the original schedule; it was not in the budget. "Software during the early days of this project was treated like a stepchild," Hamilton later wrote, "and it was regarded as an art and as magic, not a science." Out of what she called desperation, she started calling what she did software engineering -- a phrase invented to make a point.
"It was out of desperation I came up with the term, to say: 'Hey, we're engineering too.' It was an ongoing joke for a long time." The joke ended in a meeting, when one of the laboratory's most respected hardware men stood up and said she was right.
Then came July 20, 1969. Three minutes above the Sea of Tranquility, with two men aboard a vehicle that had never landed anywhere, the Apollo Guidance Computer began throwing alarms -- 1202, then 1201, five of them in four minutes -- because a rendezvous radar switch had been left in the wrong position and the machine was drowning in work it had no time to finish. On virtually any other computer of that decade, this was the end of the story: a freeze, a crash, a mission aborted.
Hamilton stood watching in the monitoring room at MIT while her software did what she had built it to do, which was to decide what mattered. It recognized the overload, discarded the low-priority jobs, restarted itself in a controlled and orderly way, and held onto the tasks that were flying the spacecraft. "It quickly became clear the software was not only informing everyone that there was a hardware-related problem," she said, "but was compensating for it."
In Houston a 26-year-old guidance officer named Steve Bales had a few seconds to call an abort, and because the computer was visibly managing itself, he called go. Neil Armstrong flew Eagle past a field of boulders and set it down with about twenty-five seconds of fuel remaining.
"If the computer hadn't recognized this problem and taken recovery action," Hamilton wrote two years afterward, "I doubt if Apollo 11 would have been the successful moon landing it was."
There is a famous photograph of her from that summer, standing beside a stack of Apollo source-code listings taller than she is. "We got carried away and grabbed all the Apollo listings in my office and created the tower," she said. "I was trying to find a way of keeping the stack up."
Hamilton's standards held. In all the crewed Apollo missions that followed, no software bug was ever known to have occurred.
Hamilton went unrecognized for decades. In 2016 President Barack Obama gave her the Presidential Medal of Freedom, calling her emblematic of "that generation of unsung women who helped send humankind into space," and a year later she appeared, as a LEGO figurine. Now ninety, she still argues that software should be designed at the start not to fail, rather than patched after it does -- a point the industry has mostly declined to take.
For young women who want to follow in her footsteps, she offers this advice: "Don't let fear get in the way, and don't be afraid to say 'I don't know' or 'I don't understand' -- no question is a dumb question. And don't always listen to the so-called experts."
----
To introduce this inspiring trailblazer to kids, we highly recommend the picture book "Margaret and the Moon" for ages 5 to 9 (https://www.amightygirl.com/margaret-and-the-moon) and the children's biography "Space Engineer and Scientist Margaret Hamilton" for ages 7 to 10 (https://www.amightygirl.com/margaret-hamilton)
She is also featured in a fun activity book about pioneering women in technology, which includes a variety of hands-on STEM projects: "Gutsy Girls Go for Science: Programmers" for ages 8 to 11 at https://www.amightygirl.com/gutsy-girls-programmers
For adult readers who want the wider story of the women who put Americans in space, "Rise of the Rocket Girls: The Women Who Propelled Us, from Missiles to the Moon to Mars" tells of the mathematicians recruited by the Jet Propulsion Laboratory in the 1940s and 50s at https://www.amightygirl.com/rise-of-the-rocket-girls
To inspire the space-loving Mighty Girls in your life, you can find more books about mighty women of space and space-themed toys in our blog post "Reach for the Stars!" at https://www.amightygirl.com/blog?p=16848