Margaret Hamilton is not only one of the first software developers, but she also literally created the term “Software Engineering” to describe her work. The code she wrote successfully put humans on the moon for the first time.
The first software engineer: Margaret Hamilton
Margaret Hamilton was born on August 17, 1936, in Paoli, Indiana, United States. In the school, she loved the Mathematics most as “she liked deriving the answers because she didn’t want to memorize”.
She studied mathematics at the University of Michigan and in 1958 she received her undergraduate degree. She married shortly thereafter.
Her husband was pursuing a law degree at Harvard. In order to support him, she put her graduate school on hold and briefly taught high school mathematics and French. Then she got a job as a programmer at MIT (Massachusetts Institute of Technology) to develop software for predicting the weather and detecting the enemy planes.
It was this work that made her a candidate for a job opening from NASA that her husband spotted in a newspaper.
“We are looking for people to do programming to send men to the moon”
Hamilton recalls: “They (NASA) announced that they were looking for people to do programming to send men to the moon”.
By 1965, at the age of 28, Hamilton joined the Charles Stark Draper Laboratory at MIT, which at the time was working on the Apollo space mission. She was the first programmer NASA hired.
But, eventually, she would lead the team developing the onboard flight software, which included algorithms designed by various senior scientists for the Apollo command module, lunar lander, and the subsequent Skylab (the only space station the U.S. has operated exclusively).
It was like the “Wild West”
It was ten years before Microsoft. The field of computing was still very new. Computers were huge, often taking up entire rooms, if not an entire warehouse, and the work of programming was still developing.
Hamilton says “When I first got into it, nobody knew what it was that we were doing. It was like the Wild West. There was no course in it. They didn’t teach it.”
According to Wired, Apollo mission didn’t even mention the word software, MIT aeronautics professor David Mindell writes in his book Digital Apollo. “Software was not included in the schedule, and it was not included in the budget.”
But, the importance of software would become clear as the Apollo project progressed.
Hamilton’s was not an easy job. The responsibility was too great. Sometimes the pressure kept here up at night. Once, after a late-night party, she rushed back to the computer lab to correct a piece of code she’d suddenly realized was flawed. “I was always imagining headlines in the newspapers, and they would point back to how it happened, and it would point back to me.”
Astronauts never make mistakes – they were trained to be “perfect”
Margaret Hamilton says: “Mostly men were working there. They had somebody at home to take care of their kids. I had no choice.”
So she brings her daughter Lauren into work. She’d see her mother playing astronaut to test the software and doing the kinds of things the astronauts would do.
Hamilton’s daughter wanted to do it too: playing astronaut – and she did.
Then, one day, all of a sudden, everything came crashing on the simulator. After investigating what could be the cause, Hamilton realized that her daughter selected the pre-launch program called P01 during flight.
Hamilton recalls: “I said, oh my god, this is not good. We really need to put protection in there, because the astronaut really could do what she did by mistake.”
But NASA said “no”. They said, “astronauts never make mistakes – they trained to be ‘perfect'”.
But, as everybody knows, “whatever can go wrong, will go wrong”. Right around Christmas 1968, five days into the historic Apollo 8 flight (it was the first crewed spacecraft to leave low Earth orbit, reach the Moon, orbit it, and safely return), astronaut Jim Lovell inadvertently selected P01 during flight.
Luckily, Hamilton won the debate eventually. She programmed error-checking codes that allowed the Apollo 8 flight to successfully return to Earth, even when astronaut Jim Lovell aboard inadvertently deleted all the navigation data the onboard computer had been collecting (see notes 1).
The code of Margaret Hamilton eventually got humans to the moon
On July 16, 1969, NASA launched Apollo 11, the first crewed mission to the moon. Three minutes before landing, a crewmember set a switch in the wrong position, sending software into overload 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.
Margaret Hamilton recalls: “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!”
On Sunday, July 20, at 20:17:40 UTC, the Lunar Module named “Eagle” landed on the moon.
Neil Armstrong announced the landing with the words: “Houston, Tranquility Base here. The Eagle has landed.”
Margaret Hamilton invented the term “Software Engineering”
In a recent interview with the Spanish newspaper El País, Margaret Hamilton explains why she chose the term “software engineering ” to call her job:
“During the first days of Apollo Project, the software was treated as an adopted child and was not taken seriously as other engineering disciplines, such as hardware engineering, and was thought of as art and magic, not science. Knowing this, I fought to bring the software legitimacy so that it -and those building it- would be given its due respect, and thus I began to use the term ‘software engineering’ to distinguish it from hardware and other kinds of engineering, yet treat each type of engineering as part of the overall systems engineering process.”
“When I first started using this phrase, it was considered to be quite amusing. It was an ongoing joke for a long time. They liked to kid me about my radical ideas. Software eventually and necessarily gained the same respect as any other discipline.”
NASA soon realized that Hamilton’s “software engineering” would be the tool they needed to beat the Soviet Union in the race to the Moon.
The Presidential Medal of Freedom
In 2016, Margaret Hamilton received the highest civilian honor in the United States: The Presidential Medal of Freedom, for her work on Apollo program and the creation of the Universal Systems Language (USL, a modeling language and formal method for the specification and design of software and other complex systems).
1. Apollo 8 guidance computer incident
According to Wired and many other websites, she just added a note saying “Do not select P01 during flight”. Then, during the Apollo 8 flight, astronaut Jim Lovell inadvertently selected P01. After spending nine hours, Hamilton and the MIT coders came up with a fix, they uploaded new navigational data, and the mission (and the lives of the astronauts aboard) saved.
Lovell accidentally erased some of the computer’s memory, which caused the inertial measurement unit (IMU) to contain data indicating that the module was in the same relative orientation it had been in before lift-off; the IMU then fired the thrusters to “correct” the module’s attitude.
Once the crew realized why the computer had changed the module’s attitude, they realized that they would have to reenter data to tell the computer the module’s actual orientation. It took Lovell ten minutes to figure out the right numbers, using the thrusters to get the stars Rigel and Sirius aligned, and another 15 minutes to enter the corrected data into the computer. Sixteen months later, during the Apollo 13 mission, Lovell would have to perform a similar manual realignment under more critical conditions after the module’s IMU had to be turned off to conserve energy.
Orloff is the author of books titled “Apollo By The Numbers” and “Apollo: The Definitive Sourcebook”.
- Margaret Hamilton on Wikipedia
- “Her code got humans on the Moon – and invented software itself” on Wired
- Meet Margaret Hamilton, the scientist who gave us “software engineering” on the IEEE website
- “The code of Margaret Hamilton that got humans to the moon” on Vintage News
- “How Margaret Hamilton Programmed the Apollo 11 Moon Landing” on Intel IQ website
- Margaret Hamilton, the pioneer of programming that brought the Apollo to the Moon on El País website
- Apollo 8 on Wikipedia
- Apollo 11 on Wikipedia