Margaret Hamilton by @SebastianNavasF

Margaret Hamilton — Coding to the Moon

On July 20 of 1969, just as the Apollo 11 astronauts were about to land on the moon, something unexpected happened that stopped the heartbeats of the entire crew at Mission Control in Houston. The mission could have been aborted but thanks to Margaret Hamilton and her code to prevent user-errors, the landing was safe and three minutes later a human placed their feet on the moon for the first time in history.

Hamilton spent long hours at MIT’s Apollo project from NASA, leading the Software Engineering Division responsible for the unmanned missions on-board flight software. Often on nights and weekends, she took her daughter Lauren to work and she would see Margaret use the simulator’s display-and-keyboard unit (DSKY) to test the software. One day, wanting to play astronaut, Lauren crashed the simulator and Margaret realized it was because she had selected the pre-launch program PO1 during “flight”. She instantly started to worry about the debug session her daughter had adventured and asked herself “What if the astronaut did what she just did?”.

Apollo display-and-keyboard unit (DSKY)

Hamilton started telling to the people at MIT that maybe they should think of putting some change in the code if the astronauts accidentally choose PO1, but they told her that astronauts were well-trained never to make a mistake so they wouldn’t need that. “Everyone said, ‘That would never happen’”, she remembers. But this same thing happened with the preceeding flight Apollo 8, so management at NASA at last agreed to include a user-error check in the code for all future flights. Margaret even added a program note that said “Do not select PO1 during flight”.

Expect the Unexpected

That day the normal mission sequences were interrupted by priority displays of 1201 and 1202 alarms warning there was an emergency of “executive overflow”, giving the astronauts a go/no go decision (to land or not to land). What happened was that the Rendezvous Radar system switch had been manually set to the wrong position and because the computer did not have enough time to do the request it started overflowing and triggered the alarms.

“It quickly became clear that the software was not only informing everyone that there was a hardware-related problem, but that the software was compensating for it.”

Colossus 2A

First page of the Colossus 2A — Margaret Hamilton Colossus Programming Leader

The assembly code for the Command Module’s (CM) Apollo Guidance Computer (AGC) that Margaret Hamilton and her team wrote is public and open. Up to present day, no bug has ever been found on any onboard flight software Apollo mission for Hamilton was extremely detailed; as she said, “There was no second chance”.

Software Engineering

Humans today are expected to be fully integrated to the software systems, but that wasn’t always the case. Hamilton definitely built the blocks for modern software engineering, a term she coined, while moving from “complete freedom to bureaucratic overkill”.

For instance, with roots on Apollo missions Margaret’s categorization of interference errors led to a system of control that set the foundations of the Universal Systems Language (USL) and Development Before the Fact (DBTF) paradigm. Traditionally, software design approach is more about fixing, testing for errors once it is already running, but Hamilton USL’s development-before-the-fact philosophy seeked to be preventive, virtually eliminating errors before they arrise.

“We learnt that systems are asynchronous, distributed and event driven in nature. This should be reflected in the language to define them and the tools to build them, characterizing natural behaviour in terms of real-time execution semantics.”

Women of NASA on LEGO Ideas — Margaret Hamilton and her code to the moon.

Advent Calendar — Help us make it a book!

From December 1st until December 24th we plan to release one article each day, highlighting the life of one of the many women that have made today’s computing industry as amazing as it is: From early compilers to computer games, from chip design to distributed systems, we will revisit the lives of these pioneers.

Each article will come with an amazing illustration by @SebastianNavasF.

If you want to see these series to become a book with expanded articles and even more illustrations by Sebastián, then subscribe to our newsletter below.

Credits

References

A Computer of One’s Own

Pioneers of the Computing Age

Florencia Grattarola

Written by

Uruguayan PhD student in Evolution & Ecology in the UK. flograttarola.com

A Computer of One’s Own

Pioneers of the Computing Age

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade