Issue #63: Space,  Vidéothèque,  Women

Margaret Hamilton

On Sunday, July 20th, 1969, at precisely 20:14:19 UTC, just a mere three minutes before touchdown, the voice of Edwin Eugene Aldrin Jr. confirmed the “Go for landing” order received from Mission Control together with a phrase nobody wanted to hear at that moment: “Program alarm – 1201.”

A lot has been written about the Apollo Guidance Computer, its technical characteristics, and the true nature of alarms 1201 and 1202. On this occasion, we feel the urge to highlight Margaret Hamilton‘s monumental contributions to the history of the 20th century: not just the assembly language code that, at the heist of the first manned Lunar landing, produced one of the most dramatic error codes ever logged in the history of software engineering, but her groundbreaking idea of transforming mere programming into, precisely, software engineering.

Her assembly code was the one that, printed out, represented a stack of paper as high as Ms Hamilton herself, as shown in that iconic photograph that you most probably have seen somewhere by now. She was responsible for it, as explained by David G. Hoag in a 1976 report titled “The history of Apollo onboard guidance, navigation, and control”:

Much of the detailed code of these programs was written by a team of specialists led by Margaret Hamilton. The task assignments to these individuals included, in addition to writing the code, the testing to certify that the program element met requirements. Overall testing of the assembled collection of program elements necessarily took the use of considerable human and machine resources. The programs had to be as near error-free as possible and any anomalies had to be understood and recorded for possible affect on the mission. Actually, no program errors were ever uncovered during the missions.

And software engineering it was, once again, thanks to Ms Hamilton, who rightfully treated her craft with the respect and seriousness it deserved, thus coining the expression “software engineering” at a time when software did not enjoy a single iota of respect from the computer industry.

Ms Hamilton, after having worked with Edward Lorenz in weather prediction programs, and having ground her programming teeth in aircraft detection algorithms for the SAGE project, came up with simple heuristics to craft better code. Among them, adding comments to her code. Shocking. I know, right? She tells the story herself in this 2017 interview, conducted by the renowned software journalist David C. Brock (prolific author of articles for the IEEE Spectrum magazine, by the way) and published by the Computer History Museum.

They thought that was so funny that I put comments beside the code. “Why do you put comments beside the code when you can just read the code?” (…)

And that’s why I started to do it. Because I thought, “I could forget my own code, because I’ve been tricky. Now I’m going to trick myself,” right.

Or, you know, good old code reviews:

And somebody else would say, “I used the augekugel method. ” And I thought, “I never heard of the augekugel method. I got to find out what this is. I can’t let them know I don’t know the thing that they keep talking about all the time.” But I couldn’t find out what it was. So finally, I said, “What is this augekugel method that you all talk about using when you solve problems?” Turns out it means eyeballing in German. Scanning, going through the listing, you know, understanding what’s going on. (…) I learned if you don’t know, ask. Ask questions. Don’t be afraid to ask a dumb question. There is not a dumb question. What’s important is to learn what you need to learn.

Another useful task in her software engineering belt was to always hope for the best and plan for the worst:

So I checked it out to see what was happening, and my daughter had selected the pre-launch program when it was in flight (…) And so I came back and told people about it (…) and it was like it kept worrying me and I kept saying, “We’ve gotta put a fix in there so that if anybody tries to select P01 during flight, if the astronaut makes a mistake, it’s gonna say, no, you can’t do that. You’ve selected P01 during flight.” (…) And the powers that be (…) didn’t want to put that in because they were worried about extra code, and the astronauts would “never, ever make a mistake,” quote, unquote. (…)

Well, wouldn’t you know, after I was able to get that in (…) they did it. They selected P01 during flight, and that was the Apollo 8.

Her obsession with handling all possible situations during one of the most critical moments in space exploration had no limits:

So what I wanted to do was to interrupt the astronauts to tell them there’s an emergency (…) the problem was he’s got his normal display and now you put up a priority display. Which one is he answering, you see? And so I came up with the idea of counting to five before he answers.

And this is how we reach the 1201 program alarm mentioned earlier:

So, anyway, now we go to Apollo 11 and it’s time to land, okay? And so I’m standing in the SCAMA room again and they’re going through all the things you go through for landing, and all of the sudden guess what comes up: 1201 and 1202 priority displays telling them there’s an emergency. This is just before they land. And here were the things that I had wanted to do was to warn the astronaut when there’s an emergency, and 1201 and 1202 means that there were too many things going on in the computer. One was to do with the tasks, too many tasks trying to get scheduled, and the other was too many jobs based on priority getting scheduled. (…)

And Jack Garman (…) made the decision to go because he knew right away what the 1201 and 1202 alarms were.

Through it all, software engineering was born, in a great example of allyship.

But we were the programmers, and we were kind of like second-class citizens. (…) I kept noticing patterns between the different kinds of engineering that were very similar. (…) I said, “Why don’t we call this one the hardware engineering part and this the software engineering part?” (…) So, anyway, the engineers thought it was funny. “There’s Margaret again with her software engineering,” you know. (…) and one of the hardware gurus stood up in a big meeting (…) “This is engineering, what you people are doing, just as much as the stuff we’re doing,” meaning the hardware. He said, “She’s trying to formalize it and I think it should become formalized,” and everybody respected this hardware guy.

Many thanks to David C. Brock and the Computer History Museum for this interview of Margaret Hamilton. The final result is a precious video, chosen as this month’s Vidéothèque choice, including a full transcript. Complement this interview with Ms Hamilton’s participation at the first conference of the Apollo Guidance Computer History Project in 2001; her letter to the editor of Datamation in 1971 to correct some misconceptions about the nature of the 1201 and 1202 errors; her presentation at ICSE 2018; and her articles “Universal Systems Language: Lessons Learned from Apollo”, published in IEEE Computer in December 2008, and “What the Errors Tell Us”, featured in the September 2018 edition of IEEE Software.

Cover snapshot chosen by the author.

Donate using Liberapay

Adrian Kosmaczewski is a published writer, a trainer, and a conference speaker, with 27 years of experience in the software industry. He holds a Master's degree in Information Technology from the University of Liverpool.