Depicted is a print-out of the Apollo Project code

"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:

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

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."

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 BorogoveJan 29 '16 at 17:05

4

No better. One simply does not "code" or "write" in core rope. The journalist is confused.
– Russell BorogoveJan 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 BorogoveJan 29 '16 at 19:59

12

I can't express how strongly I disagree with that interpretation.
– Russell BorogoveJan 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.

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.

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.
– jamesqfJan 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 DernoncourtJan 30 '16 at 15:36