The image below is widely circulated on Facebook:

enter image description here

The caption says:

Margaret Hamilton, lead software engineer of the Apollo Project, stands next to the code she wrote by hand and that was used to take humanity to the moon. [1969]

Is it true that:

  1. The photo depicts Margaret Hamilton
  2. Margaret Hamilton was the lead software engineer of the Apollo Project
  3. Depicted is a print-out of the Apollo Project code
  4. Margaret Hamilton wrote the depicted code by hand
  5. Margaret Hamilton single-handedly wrote the code
  • 5
    related: skeptics.stackexchange.com/questions/28645/… – Sklivvz Jan 29 '16 at 13:22
  • 1
    @Sklivvz Related but closed... since I couldn't convince people to reopen it, I posted the question on Quora: quora.com/… – Franck Dernoncourt Jan 29 '16 at 14:42
  • Dunno about NASA, but when I cooped at Wright-Patterson AFB ca 1970 we wrote code out on coding forms and had it turned into punched cards by keypunch operators. Or we keypunched it ourselves. – Daniel R Hicks Jul 18 at 12:20

The photo depicts Margaret Hamilton

Yes, this is an official NASA picture of her:


Margaret Hamilton was the lead software engineer of the Apollo Project

Indeed, from the same source:

Margaret Hamilton, leader of the team that developed the flight software for the agency's Apollo missions [...]

Depicted is a print-out of the Apollo Project code

Yes, she says so herself in a Vox interview:

"In this picture, I am standing next to listings of the actual Apollo Guidance Computer (AGC) source code," Hamilton says in an email. "To clarify, there are no other kinds of printouts, like debugging printouts, or logs, or what have you, in the picture."

The source code is here (pdf scans) and there are about 11,000 pages, which is not inconsistent with what we see on in the picture: the paper is likely continuous stationery and 11,000 pages of that are 165cm tall, since a box of 2,000 is about 30cm (ref).

Margaret Hamilton wrote the depicted code by hand

It's unclear what it means:

  1. Is the code in the pile handwritten? No, it's printed with a typewriter or a daisy printer -- see the scans.

  2. Was it written by her in rope core memory? No, it was written in core rope memory by hand by a team according to her interview on Vox:

    The process of actually coding in the programs was laborious, as well. The guidance computer used something known as "core rope memory": wires were roped through metal cores in a particular way to store code in binary. "If the wire goes through the core, it represents a one," Hamilton explained in the documentary Moon Machines. "And around the core it represents a zero." The programs were woven together by hand in factories. And because the factory workers were mostly women, core rope memory became known by engineers as "LOL memory," LOL standing for "little old lady."

Margaret Hamilton single-handedly wrote the code

No. Vox says so, but doesn't cite the source:

It's just her and her code.

NASA contradicts this by saying that it was a whole team lead by her, which seems entirely more likely:

The Apollo flight software Ms. Hamilton and her team developed was truly a pioneering effort

| improve this answer | |
  • 7
    Paper thickness commenters: move to Skeptics Chat :-) – Sklivvz Jan 29 '16 at 14:09
  • 16
    Wow, this answer was great right up until the core rope memory nonsense. The code was shipped on rope memory, but it sure wasn't written that way. – Russell Borogove Jan 29 '16 at 17:05
  • 4
    No better. One simply does not "code" or "write" in core rope. The journalist is confused. – Russell Borogove Jan 29 '16 at 18:47
  • 27
    The answer as written badly conflates the composition of the program, ("coding" or "writing") which was done by a programming team led by Hamilton, with the construction of the physical hard-wired core-rope memories, which was done by a separate team of "little old ladies". It's like saying a novel was written by a print shop. – Russell Borogove Jan 29 '16 at 19:59
  • 12
    I can't express how strongly I disagree with that interpretation. – Russell Borogove Jan 29 '16 at 20:08

I've known Margaret for 20 years and when my son pointed this question out to me I emailed her and Ron Hackler (who I've also known for 20 years) to clarify some of this. They replied as follows:

"To clarify, Margaret was the Director of the Apollo on-board flight software (the Apollo Guidance Computer (AGC) software). http://www.nasa.gov/home/hqnews/2003/sep/HQ_03281_Hamilton_Honor.html That is, she was "in charge" of (responsible for) the Apollo on-board flight software and the AGC programmers ("software engineers") who designed and developed the Apollo on-board flight software. She also designed and wrote much of the Apollo on-board flight software, herself; especially in the area of designing/building AGC systems software where favorites of hers were in the areas of the operating system, man machine interface, reliability and error detection and recovery.

Margaret and her team at MIT coded all of the code by hand: that is, they wrote all of the AGC source code on AGC source coding paper, and then would give it to the "keypunchers" (key punch people) to copy (punch) the code from the coding paper onto cards from which listings (books/printouts) of the code could be made.

Yes, it is all code that Margaret is standing next to in the photo of her!!! It is AGC code (and NOT anything else)!"

They pointed out that there is a photo of some of the pages of Margaret's copy of the AGC code here: http://imgur.com/a/Dp23C along with some other supporting information provided by Margaret and Ron. As well, this code is all handwritten assembly code for the AGC - no compilers involved.

I'd add that Margaret and Ron are two of the most brilliant people I've had the privilege of knowing in my lifetime.

| improve this answer | |
  • Wow this is really cool! – ChrisR Jul 19 at 6:32

This question has been asked on Quora - here is Christopher Burke's answer:

I downloaded the source code this afternoon and ran some simple metrics on it, looking only at the ".agc" files which are the assembly language source.

  • 420,837 lines of source
  • Of these, 102,958 lines of comments ("#" in column 1) and 38,626 empty lines
  • 10,305 instances of " Page " indicating, roughly, the number of pages in the source listings

These old listings were printed on "green bar" continuous form paper about 3.6 mils thick, probably at 66 lines (max) per page. Here's a modern equivalent:

Enterprise Group Continuous Form Paper 14 78 x 11 18 Lb 12 Green BarWhite Pack Of 3000 Sheets by Office Depot & OfficeMax

10,305 pages of this stuff would be about 37 inches tall, fresh out of the box. It might expand some with use, annotation, constant flexing, and so on, and the binders are also relatively heavy. It's easy to account for maybe 42" of the stack that way. Old or alternate versions of some of the listings could make up the rest of the height.

A single team could certainly write that much assembler code. The code would likely be extremely efficient, since the system had very tight memory constraints.

As a crude benchmark, Paul Laughton wrote a 120 page DOS for the Apple II in assembler in 7 weeks. Apple II DOS source code. Scaling this up, a team of 12 could crank out more than 10,305 pages of high-quality code in a year.

Looking at Paul's line printer listing (there's a PDF on the linked site), you can get a good feel for how dense information is in this kind of code. There's a lot of whitespace: old-time assembler programmers, myself included, used pagination to isolate unrelated sections of code, as we were often reading these printouts and not the source code during hand-optimization.

| improve this answer | |
  • 3
    We have the actual scans of the pages, the count is off by about 10%. – Sklivvz Jan 29 '16 at 15:06
  • 2
    Yes but the answer itself contains references. – Franck Dernoncourt Jan 29 '16 at 15:10
  • 3
    Re "...often reading these printouts and not the source code...": I don't know about NASA, but in those days (and for a decade or so later), CRT/keyboard displays were not common. It was usual to input code on punch cards, and read the printouts. – jamesqf Jan 29 '16 at 18:47
  • 9
    -1: If this Quora answer was posted here it would deleted for original research; we have no reason to trust Christopher Burke's expertise or assumptions in his calculations, e.g. his decision to only look at .agc files and that therefore comments start with a '#' are demonstrably incorrect in the first page of the scan. – Oddthinking Jan 29 '16 at 23:14
  • 1
    @Oddthinking I think it's a decent approximation, and an explanation is better than a reference (no need to trust, only think/check). Regarding #, most comments start with '#', and we're mostly looking for SLOC upper bound anyway. – Franck Dernoncourt Jan 30 '16 at 15:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .