Want to fly a spacecraft to the moon? Here’s your computer code

Of all the amazing images from the moonshot days, this one to me is still the most enduring.

Photo: NASA

It’s Margaret Hamilton, then just a kid, like so many of the brilliant minds that figured out how to do things the world didn’t know how to do. She was responsible for the software on the Apollo program. That big stack is the printed-out code written by the MIT Instrumentation Laboratory in the mid-1960s.

The code has been available in an obscure way for a few years but now it’s been uploaded to GitHub, a code-sharing site, by former NASA intern Chris Garry. Programmers are having a field day looking at the scrapbook of computers past, Quartz says. It’s almost as if the original coders knew that someday we’d be looking at their work from tiny computers held in our hands, computers with the power that would have filled several rooms back in the day.

Within hours, coders began dissecting the software, particularly looking at the code comments the AGC’s original programmers had written. In programming, comments are plain-English descriptions of what task is being performed at a given point. But as the always-sharp joke detectives in Reddit’s r/ProgrammerHumor section found, many of the comments in the AGC code go beyond boring explanations of the software itself. They’re full of light-hearted jokes and messages, and very 1960s references.

One of the source code files, for example, is called BURN_BABY_BURN–MASTER_IGNITION_ROUTINE, and the opening comments explain why:

Credit: Reddit

burnbaby

About 900 lines into that subroutine, a reader can see the playfulness of the original programming team come through, in the first and last comments in this block of code:

Credit: Reddit

Here’s the code from the computer routine for lunar module braking as the LEM (lunar lander) approached the surface of the moon.

Source: GitHub