Ten years ago, in July of 2016, I ran into a story in an engineering magazine on the computer hardware and software used to help Apollo 11 become the first time people from Earth laid foot on the moon. Buried in that post is an introduction to someone who appears to have been the software creator behind the Apollo Guidance Computer, and much of the Apollo software, a young woman named Margaret Hamilton.
Margaret Hamilton passed away last week at the age of 90. Ars Technica runs a biography of Hamilton today. Much of it resonated with me.
Margaret Hamilton, who coined the term “software engineering” and led the development of onboard flight software for NASA’s Apollo program in the 1960s, died last week at the age of 90. A recipient of the Presidential Medal of Freedom in 2016, Hamilton was also immortalized as a LEGO minifig the following year—part of the “Women of NASA” set that also included astronauts Mae Jemison and Sally Ride.
“To say Margaret Hamilton was a pioneer—to say she was ahead of her time—would be a dramatic understatement. She was a software engineer at a time when that field was in its infancy, and she not only developed advanced code herself but also led a team in using that nascent technology to develop one of the most complex systems humanity had ever achieved,” said Olivier de Weck, interim head of the MIT Department of Aeronautics and Astronautics. “The Apollo program still stands as one of our greatest testaments to the power of collaboration, ingenuity, and engineering, and Hamilton was a fundamental contributor to that program’s success.”
After graduating from Earlham College in 1958 with a degree in mathematics and a minor in philosophy. She married for the first time to James Hamilton, also in 1958. The plan was for her to work until he finished his law degree, after which he would support her through graduate school to earn a PhD in mathematics.
At this point, she ended up working for MIT Mathematician Edward Lorenz. If you've ever been around fluid mechanics, you're probably familiar with the term "Lorenz Equations" - he was trying to construct a mathematical model of the weather using a set of differential equations representing changes in temperature, pressure, wind velocity, and the like. You'll know that he discovered a problem with sensitivity, now widely referred to as "sensitive dependence on initial conditions," and considered a major impact of chaos theory.
You’ve probably heard the famous story of how Lorenz kept a continuous simulation running on his LGP-30 computer, and of that fateful 1961 day when he realized that even small differences in starting values could lead to very different outcomes—a sensitivity to initial conditions that is a hallmark of chaos theory, along with strange attractors. You might not have known that it was Hamilton who was responsible for programming the LGP-30.
Computers were still pretty unusual things for scientists to work on. To borrow from that linked article:
(About the Royal McBee LGP-30.) This “desk” computer — it was the size of a desk — weighed some 800 pounds and sounded like a passing propeller plane. It was so loud that it even got its own office on the fifth floor in Building 24, a drab structure near the center of the Massachusetts Institute of Technology.
There really weren't things like compilers they could have bought to take typed input and compile it into computer code. They had to invent that.
Computers were still a novelty at the time, and neither Lorenz nor Hamilton had any programming knowledge; they taught themselves. Per a 2019 Quanta article, Lorenz was amused by her unusual methods: For instance, she once bypassed the “clunky debugging process” by rolling the paper tape down the hallway and editing the binary code by hand with a pencil. “I’d poke holes for ones, and I’d cover up with Scotch tape the others,” she recalled. Hamilton moved to another project in 1961, but not before training her replacement: a recent math graduate from Mount Holyoke named Ellen Fetter. Lorenz acknowledged the contributions of both women in his papers.
...
By 1965, Hamilton was all set to go to graduate school as planned when her husband spotted a newspaper ad saying that MIT’s Instrumentation Lab needed people to develop onboard guidance computer software for NASA’s Apollo program. She was the first programmer hired, and the first woman, working on six lunar landing missions from 1969 to 1972. At the time, binary code was stored using copper wires wound around cores. A “1” was a wire passing through a core, and a “0” was a wire bypassing the core. New England textile workers were hired to weave them together into long ropes, earning Hamilton the moniker “rope mother,” since she was responsible for those ropes.
Can you envision editing your code for a critical piece of software like that? A wire through or bypassing a toroid core?
There's more to the story just in that Ars Article, and I'm sure more if I looked around a bit more. For example, at one point, Hamilton would routinely bring her daughter Lauren to the lab on nights and weekends. One time, the kid was playing around at a computer that was running software and entered something on a keyboard that crashed the system. While nobody was advocating for putting this sort of "idiot proofing" into the software for the Apollo missions, she could see it as a possibility with astronauts floating around in zero G with little control of their position. She asked NASA higher-ups if she could add a safeguard to prevent this from happening on an actual mission, but those higher-ups didn’t take it seriously.
Until astronaut Jim Lovell actually made an error like that during the Apollo 8 mission, the first to orbit the Moon, causing all the navigational data to vanish. Hamilton was called in to retrieve the data, jokingly referring to this as the “Lauren bug.”
Hamilton in 1969, standing next to listings of the Apollo guidance software
she and her MIT team produced. Image credit: NASA
By 1968 Hamilton was "assistant director in charge" of the Command and Service module software. She thought it would be a good addition to incorporate a failsafe into the system software’s “priority display” interface routines, should the onboard guidance computer become overloaded with more tasks than it could handle in real time.
That’s exactly what happened on the historic Apollo 11 mission in 1969. As the Eagle lunar module approached the Moon, Buzz Aldrin entered the codes to display altitude and other relevant data on the screen. The onboard computer started flashing alarms, forcing Mission Control to consider aborting the landing. Hamilton’s fail-safe meant that the computer was prioritizing essential tasks and canceling nonessential ones, and the alarm was to let astronauts know that this was happening. Thanks to Hamilton’s foresight, Eagle still safely landed on the Sea of Tranquility.
After the Apollo program, Margaret Hamilton worked in the same basic place, then called Draper Lab, until 1976. She went on to found two companies, Higher Order Software in 1976 and Hamilton Technologies in 1985. Its main product is the Universal Systems Language (USL) for developing complex software systems that prioritized error prevention and defensive programming.
RIP Margaret Hamilton. Not everyone gets to say they left the world a better place than they found it. Many try. You achieved it.


















