
The Woman Who Wrote the Code for the Moon: Margaret Hamilton, 1936-2026
On July 20, 1969, as the lunar module Eagle dropped toward the Sea of Tranquility, its onboard computer began flashing 1202, then 1201: the machine's task queue had overflowed, and new work had nowhere to go. MIT later said the overload was most likely triggered by a faulty hardware switch.
What kept the landing alive was the priority-driven design Hamilton's team had written into the software. When the computer ran short of capacity, it shed non-essential background jobs and protected the calculations the descent depended on. Mission Control in Houston chose to trust the software and let the landing proceed. Hamilton said afterward that she had known those alarms had no business firing at that moment.
Hamilton was less interested in whether a program worked under ideal conditions than in what it did when something went wrong. Her team designed priority displays that could interrupt ordinary readouts and push an urgent message in front of the crew. She also worried about a subtler failure: if an astronaut pressed a button during the instant the display was switching over, he might get an answer from the old screen. Her fix was almost homely — when you see a priority display, count to yourself before you act. Treating human error as a design assumption became her signature.
In the 1960s, software was treated as an appendage of hardware, and the people who wrote it were not counted as engineers. Hamilton began using the phrase "software engineering" to win the discipline, and the people building it, the same standing as hardware engineering. The term stuck, and became one of her best-known legacies.
Hamilton was born on Aug. 17, 1936, in Paoli, Indiana, and grew up mostly in Michigan's Upper Peninsula. She studied mathematics at the University of Michigan from 1955, then transferred to Earlham College, earning a bachelor's degree in mathematics with a minor in philosophy in 1958. She moved to Boston in 1959 while her husband studied law, and joined MIT that year, starting with weather-prediction software. In 1965 she moved to MIT's Instrumentation Laboratory as the first programmer hired for the Apollo project — and its first female programmer.
Accounts of her team's size diverge. The Boston Globe and the Seattle Times describe a 100-person team writing the onboard software. NPR reports that by 1968 she was assistant director in charge of the Command and Service Module software team, leading more than 100 engineers. MIT's own obituary gives a larger figure: more than 400 people worked on Apollo software under her leadership. The gap is a matter of scope — the core coders versus the whole software division.
NASA Administrator Jared Isaacman called her on X "a pioneer whose work helped make Apollo and humanity's first journeys to the moon possible." Olivier de Weck, the Apollo program professor at MIT, told the university's news office that calling her a pioneer, or ahead of her time, would be "a dramatic understatement." Jerry Wohletz, president and CEO of Draper, the laboratory that spun out of the Instrumentation Lab, said in a statement that she left an indelible mark. Her daughter, Lauren Hamilton, told the Associated Press that her mother went from being unknown to being known by everyone in her field, and was glad of the recognition — though she was reserved by nature.
After MIT, Hamilton pushed on the idea of keeping errors out of systems before they were built. In 1976 she co-founded Higher Order Software with Saydean Zeldin and served as CEO until 1984. In March 1986 she founded Hamilton Technologies in Cambridge, where she developed the Universal Systems Language and its 001 Tool Suite around a method she called "development before the fact" — modeling a system thoroughly before a line of code exists. She published more than 130 papers, and her work reached across space, defense, energy and communications.
In 2003 she received NASA's Exceptional Space Act Award. Paul Curto, the technologist who nominated her, told CNN he was surprised she had never been formally recognized for her groundbreaking work. On Nov. 22, 2016, Barack Obama awarded her the Presidential Medal of Freedom, with a citation saying she had defined new forms of software engineering. A Computer History Museum fellowship followed in 2017, an Intrepid Lifetime Achievement Award in 2019, and induction into the National Aviation Hall of Fame in 2022. In 2017 she also became a Lego minifigure in the "Women of NASA" set, posed beside that teetering stack of code.
In the lab she was nicknamed the "rope mother," for overseeing the process of weaving programs by hand into core memory — copper wire threaded through tiny magnetic rings, work done largely by women technicians. Decades later she became a symbol for women entering technology, and a name invoked whenever programmers argue that their craft deserves respect.
MIT announced that Hamilton died on Sept. 30 at a hospital in Cambridge, Massachusetts, at 90. No cause was disclosed. She is survived by her daughter, Lauren Hamilton; her son-in-law, Richard Selesnick; two grandsons; and four great-grandchildren. A memorial service will be held in the spring in Cambridge. The Apollo guidance software she signed off on has since been digitized line by line and published on GitHub.