Hamilton has published over 130 papers, proceedings, and reports about the 60 projects and six major programs in which she has been involved.
On November 22, 2016, she was awarded the Presidential Medal of Freedom by U.S. President Barack Obama for her work leading the development of on-board flight software for NASA's Apollo Moon missions.
Margaret Heafield was born in Paoli, Indiana, to Kenneth Heafield and Ruth Esther Heafield (née Partington). After graduating from Hancock High School in 1954, she started out in mathematics at the University of Michigan in 1955 and subsequently earned a B.A. in mathematics with a minor in philosophy from Earlham College in 1958. She briefly taught high school mathematics and French upon graduation, in order to support her husband while he worked on his undergraduate degree at Harvard, with the ultimate goal of pursuing a graduate degree at a later time. She moved to Boston, Massachusetts, with the intention of doing graduate study in abstract mathematics at Brandeis University. She cites a female math professor as helping her desire to pursue abstract mathematics. She had other inspirations outside the technological world, including her father, the philosopher and poet, and her grandfather, a school headmaster and Quaker Minister. She says these men inspired her to a minor in philosophy. In 1960 she took an interim position at MIT to develop software for predicting weather on the LGP-30 and the PDP-1 computers (at Marvin Minsky's Project MAC) for professor Edward Norton Lorenz in the meteorology department. Hamilton wrote that at that time, computer science and software engineering were not yet disciplines; instead, programmers learned on the job with hands-on experience.
From 1961 to 1963, she worked on the SAGE Project at Lincoln Lab, where she was one of the programmers who wrote software for the first AN/FSQ-7 computer (the XD-1), to search for "unfriendly" aircraft; she also wrote software for the Air Force Cambridge Research Laboratories.
The SAGE Project was an extension of Project Whirlwind, started by MIT, to create a computer system that could predict weather systems and track their movements through simulators; SAGE was soon developed for military use in anti-aircraft air defense from potential Soviet attacks during the Cold War. For her part, Hamilton described her duties as such,
What they used to do when you came into this organization as a beginner, was to assign you this program which nobody was able to ever figure out or get to run. When I was the beginner they gave it to me as well. And what had happened was it was tricky programming, and the person who wrote it took delight in the fact that all of his comments were in Greek and Latin. So I was assigned this program and I actually got it to work. It even printed out its answers in Latin and Greek. I was the first one to get it to work.
It was her efforts on this project that made her a candidate for the position at NASA as the lead developer for Apollo flight software.
Hamilton then joined the Charles Stark Draper Laboratory at MIT, which at the time was working on the Apollo space mission. She eventually led a team credited with developing the software for Apollo and Skylab. Hamilton's team was responsible for developing in-flight software, which included algorithms designed by various senior scientists for the Apollo command module, lunar lander, and the subsequent Skylab. Another part of her team designed and developed the systems software which included the error detection and recovery software such as restarts and the Display Interface Routines (AKA the Priority Displays) which Hamilton designed and developed. She worked to gain hands-on experience during a time when computer science courses were uncommon and software engineering courses did not exist.
Her areas of expertise include systems design and software development, enterprise and process modelling, development paradigm, formal systems modeling languages, system-oriented objects for systems modelling and development, automated life-cycle environments, methods for maximizing software reliability and reuse, domain analysis, correctness by built-in language properties, open-architecture techniques for robust systems, full life-cycle automation, quality assurance, seamless integration, error detection and recovery techniques, man-machine interface systems, operating systems, end-to-end testing techniques, and life-cycle management techniques.
In one of the critical moments of the Apollo 11 mission, the Apollo Guidance Computer together with the on-board flight software averted an abort of the landing on the Moon. Three minutes before the Lunar lander reached the Moon's surface, several computer alarms were triggered. The computer was overloaded with interrupts caused by incorrectly phased power supplied to the lander's rendezvous radar. The program alarms indicated "executive overflows", meaning the guidance computer could not complete all of its tasks in real time and had to postpone some of them. The asynchronous executive designed by J. Halcombe Laning was used by Hamilton's team to develop asynchronous flight software:
Because of the flight software's system-software's error detection and recovery techniques that included its system-wide “kill and recompute” from a "safe place" restart approach to its snapshot and rollback techniques, the Display Interface Routines (AKA the priority displays) together with its man-in-the-loop capabilities were able to be created in order to have the capability to interrupt the astronauts' normal mission displays with priority displays of critical alarms in case of an emergency. This depended on our assigning a unique priority to every process in the software in order to ensure that all of its events would take place in the correct order and at the right time relative to everything else that was going on.
Hamilton's priority alarm displays interrupted the astronauts' normal displays to warn them that there was an emergency “giving the astronauts a go/no go decision (to land or not to land)”. Jack Garman, a NASA computer engineer in mission control, recognized the meaning of the errors that were presented to the astronauts by the priority displays and shouted, "Go, go!" And on they went. Dr. Paul Curto, senior technologist who nominated Hamilton for a NASA Space Act Award, called Hamilton's work "the foundation for ultra-reliable software design."
Hamilton wrote of the incident,
The computer (or rather the software in it) was smart enough to recognize that it was being asked to perform more tasks than it should be performing. It then sent out an alarm, which meant to the astronaut, I'm overloaded with more tasks than I should be doing at this time and I'm going to keep only the more important tasks; i.e., the ones needed for landing ... Actually, the computer was programmed to do more than recognize error conditions. A complete set of recovery programs was incorporated into the software. The software's action, in this case, was to eliminate lower priority tasks and re-establish the more important ones ... If the computer hadn't recognized this problem and taken recovery action, I doubt if Apollo 11 would have been the successful moon landing it was.
From 1976 through 1984, Hamilton was the CEO of a company she co-founded called Higher Order Software (HOS) to further develop ideas about error prevention and fault tolerance emerging from her experience at MIT. They created a product called USE.IT, based on the HOS methodology developed at MIT. It was successfully used in numerous government projects. One notable project was to formalize and implement the first computable IDEF, C-IDEF for the Air Force, based on HOS as its formal foundation.
One critical assessment contended that, apart from a few independent reviews, the HOS methodology generated little analysis except among consultants associated with the company. That evaluation, conducted by a consultant for the United States Navy asserted that "the HOS literature tends to advertise their ideas and products more than making a contribution in substance to the field of Computer Science." Edsgar Dijkstra described the USE.IT software as "mechanized aids for the application of obsolete techniques." A detailed analysis of the HOS theory and AXES language was used by Harel to develop a derived language for a more modern form of structured programming derived from HOS called the And/Or programming language from the viewpoint of and/or subgoals. Referring to Dijkstra's classic work on structured programming, Harel states: “As will become clear, the "layers" in which the program is arranged, these being in the heart of the idea of structured programming, correspond to the levels of the tree.” Harel goes on to show at that time how HOS and his derived And/Or programming language relates to mathematical logic, game theory and artificial intelligence. Others have used HOS to formalize the semantics of linguistic quantifiers and to formalize the design of reliable real-time embedded systems
Hamilton left the company, HOS, in 1985. In March 1986, she became the founder and CEO of Hamilton Technologies, Inc. in Cambridge, Massachusetts. The company was developed around the Universal Systems Language (USL) and its associated automated environment, the 001 Tool Suite, based on her paradigm of Development Before The Fact (DBTF) for systems design and software development.
Hamilton coined the term "software engineering" during the Apollo space mission days:
During this time at MIT, she wanted to give their software “legitimacy”, just like with other engineering disciplines, so that it (and those building it) would be given its due respect; and, as a result she made up the term “software engineering” to distinguish it from other kinds of engineering.
When Hamilton started using the term "software engineering", software engineering was not taken seriously compared to other engineering, nor was it regarded as a science. She began to use the term "software engineering" during the early Apollo missions in order to give software the legitimacy of other fields such as hardware engineering. Over time the term "software engineering" has gained the same respect as any other discipline. "At MIT she assisted in the creation of the core principles in computer programming as she worked with her colleagues in writing code for the world's first portable computer". Hamilton's innovations go beyond the feats of playing an important role in getting humans to the moon. Hamilton, along with many other female engineers alike, challenged the male dominated technology field of their time, to allow for women to enter in these STEM fields for many years to come.In 1986, she received the Augusta Ada Lovelace Award by the Association for Women in Computing. This award is given to individuals who have excelled in either (or both) of two areas: 1. Outstanding scientific and technical achievement and 2. Extraordinary service to the computing community through their accomplishments and contributions on behalf of women in computing.
In 2003, she was given the NASA Exceptional Space Act Award for scientific and technical contributions. The award included $37,200, the largest amount awarded to any individual in NASA's history.
In 2009, she received the Outstanding Alumni Award by Earlham College.
In 2016, she received the Presidential Medal of Freedom from Barack Obama, the highest civilian honor in the United States.
On April 28, 2017, she received the "Computer History Museum Fellow Award" that honors exceptional men and women whose ideas have changed the world.
She met her husband James Cox Hamilton while at Earlham College. They married in the late 1950s after Hamilton earned her bachelor's degree. They had a daughter together named Lauren, who subsequently married the billionaire, actor, dancer, and choreographer James Cox Chambers. During the weekends she would often take Lauren to the lab to spend time with her daughter and simultaneously "code away creating routines that would later be added to Apollo's command module computer". Margaret Hamilton and James Cox Hamilton eventually divorced.M. Hamilton (1994), "Inside Development Before the Fact," cover story, Special Editorial Supplement, 8ES-24ES. Electronic Design, Apr. 1994.
M. Hamilton (1994), "001: A Full Life Cycle Systems Engineering and Software Development Environment," cover story, Special Editorial Supplement, 22ES-30ES. Electronic Design, Jun. 1994.
M. Hamilton, Hackler, W. R.. (2004), Deeply Integrated Guidance Navigation Unit (DI-GNU) Common Software Architecture Principles (revised dec-29-04), DAAAE30-02-D-1020 and DAAB07-98-D-H502/0180, Picatinny Arsenal, NJ, 2003–2004.
M. Hamilton and W. R. Hackler (2007), "Universal Systems Language for Preventative Systems Engineering," Proc. 5th Ann. Conf. Systems Eng. Res. (CSER), Stevens Institute of Technology, Mar. 2007, paper #36.
M. Hamilton and W. R. Hackler (2007), "A Formal Universal Systems Semantics for SysML", 17th Annual International Symposium, INCOSE 2007, San Diego, CA, Jun. 2007.
M. Hamilton and W. R. Hackler (2008), "Universal Systems Language: Lessons Learned from Apollo", IEEE Computer, Dec. 2008.