Margaret Hamilton, the pioneering software engineer whose work was critical to the success of NASA’s Apollo missions, has died at the age of 90. Her development and leadership in creating the onboard guidance computer software helped navigate astronauts safely to the Moon and back, solidifying her legacy in computer science and space exploration.

Born in 1936 in Paoli, Indiana, Hamilton studied mathematics at the University of Michigan and Earlham College before joining the Massachusetts Institute of Technology (MIT) in 1959. At MIT, she initially worked in meteorology, supporting Edward Lorenz’s research that contributed to the foundation of chaos theory. By 1961, she had moved to a team developing software for the first computerized U.S. air defense system and joined the Apollo program in 1965 at MIT’s Instrumentation Lab, which held a NASA contract.

Hamilton rose to lead the team responsible for programming the Apollo guidance computer, the critical system used by astronauts to navigate during lunar missions. Notably, during the Apollo 8 mission in 1968—the first manned orbit of the Moon—she helped resolve a navigation data crisis caused by a computer error. This fault, dubbed the “Lauren bug” after her four-year-old daughter accidentally triggered it while playing with a flight simulator in Hamilton’s lab, was later attributed to astronauts inadvertently activating a non-flight program. Hamilton guided NASA controllers through correcting the problem and advocated for preventive software measures, although NASA initially hesitated to adopt changes due to concerns about adding extra code and an assumption that astronauts would not make mistakes.

Hamilton’s most famous contribution came during the Apollo 11 mission in July 1969. Minutes before the first Moon landing, the onboard computer issued alarms (1201 and 1202), signaling potential program overloads that could have jeopardized the descent. Thanks to Hamilton and her team’s design, the software was able to prioritize critical tasks and shed less essential processes, enabling NASA controllers to trust the system and proceed with the landing. This decision allowed Neil Armstrong and Buzz Aldrin to safely touch down in the Eagle lunar module.

Throughout her career, Hamilton emphasized the importance of software engineering as a discipline equal to hardware development. At a time when programmers were often considered "second-class citizens," she proactively promoted the recognition of software engineering as a critical and complex field. In the years following the Apollo missions, she founded Higher Order Software in 1976 and Hamilton Technologies in 1986, companies focused on computer systems with an emphasis on error prevention.

Olivier de Weck, Apollo programme professor of astronautics at MIT, described Hamilton as a visionary who led one of the most complex technological undertakings humanity had achieved. He highlighted her career’s dedication to “preventing errors” and “handling the unknown,” qualities that established foundational principles in software engineering still relevant today.

Hamilton’s work continues to influence modern computing and aerospace engineering, reflecting a legacy of innovation, leadership, and resilience in the face of unprecedented challenges in space exploration.