Modal Title
Tech Life

Fifty-Year-Old Apollo 11 Source Code Gets a Fresh Review on GitHub

Jul 24th, 2016 6:49am by
Featued image for: Fifty-Year-Old Apollo 11 Source Code Gets a Fresh Review on GitHub

Earlier this month a former NASA intern finally created a GitHub repository for the 50-year-old assembly code that took America to the moon. But the most interesting part may have been our modern-day reactions.

“Code that my mom wrote 50 years ago just went up on GitHub,” tweeted programmer Lin Clark, later identifying her mother as “a programmer on the project” (but not lead software designer Margaret Hamilton). And soon GitHub users were submitting newly-discovered “issues” for the 50-year-old code — most of them playful jokes — while enjoying another good laugh at some of the comments that had been left behind by NASA’s programmers in the 1960s.

Back in the 1960s, MIT’s Instrumentation Laboratory had been tasked with developing software for flying the Apollo 11 spacecraft — and “They came up with a new way to store computer programs, called ‘rope memory,’ and created a special version of the assembly programming language,” according to an article on Quartz. The thousands of lines of assembly code were finally typed out in 2003 by an MIT researcher to create a simulation of the Apollo Guidance Computer.

But it wasn’t until this month that former NASA intern Chris Garry took another small step for man — uploading the code into its commemorative repository on GitHub.

The repository designates the code as public domain, and there’re even tips on how to compile the source code (if you’re planning your own mission to the moon — or just creating your own simulator). It’s already drawing a lot of interest, and on Twitter, Lin Clark responded to a small flurry of questions about her mother’s work on the Apollo project.

And eventually someone asked the all-important question:  “Can we run this in a container?”

“I so want to sit down with her and have her walk me through it,” she wrote, following up later with an announcement that there was no chance of an inter-generational code scrum. “I just called my mom to ask her, and she laughed and said she can’t remember any of it.” In a later tweet, Clark adds, “which I can see…I forget code I wrote [five] years ago.” Although the next day, Clark tweeted that “she doesn’t remember enough of it, but maybe with some time she’ll change her mind.” And she also shared a cautionary tale about what finally happened to at least some of her mother’s code.

“My mom actually made a Christmas wreath from the discarded punch cards. I should get a picture.”

Programmers will be Programmers

GitHub’s Tim Pease seems to have been one of the first to tweet about the code repository. But within two weeks, the repository had been starred as a favorite by 20,134 GitHub users — and forked more than 2,900 times. When Pease shared its URL on that fateful Friday after the 4th of July, he’d also accompanied it with a screenshot showing that GitHub users were already submitting new issues. “Programmers will be programmers,” he joked — and by the end of the month, 82 different issues had been opened — and also closed.

Appollo-GitHub

“Houston we have a merge conflict,” joked one reply on Twitter. But the repository’s biggest issue seemed to be movie buffs who watched too much science fiction. “Extension pack for picking up Matt Damon,” read one issue — an apparent reference to the co-star (not to mention the plot) of the movie Apollo 13.

And another issue seemed to have come from the same film, warning that “A customer has had a fairly serious problem with stirring the cryogenic tanks with a circuit fault present.” One issue reached back even further, complaining “Cannot open pod bay doors” — the very problems astronauts experienced with their HAL automated system in 2001: A Space Odyssey. A subsequent comment added that “users mods” were not being fully supported, complaining that the malfunctioning HAL unit was only giving out cryptic error messages, like “I’m afraid” and “My mind is going.”

Verbs and nouns for Apollo navigation

Of course, most of the actual pull requests seemed to be legitimate attempts to improve the formatting on this historic NASA code. But there were also numerous issues filed about the need to re-write the code in a modern-day language — for example, Rust, Go, Node.js, or even AWS, because “clouds are closer [to] space than the launch platform… you can save lot of money on fuel!” Or perhaps PHP — so that then it could be run with Apache.

This last comment provoked 17 comments, most suggesting the code should instead be converted into some other modern language — perhaps Scala, or C++, or Swift, or Java, or an obscure programming language named Whitespace.

Someone even suggested the code be re-written in the world’s most popular language — Chinese. And eventually, someone asked the all-important question:  “Can we run this in a container?”

Hey, what about C or Ruby, or JavaScript with React? But eventually, someone pointed out the problem with all these of proposals, responding to a user suggesting the code be re-written in Python.

“…this repo only holds code for the Rocket and all of the properties that define how it would work. Rewriting (converting) this is pointless unless there is an environment that holds the properties of aerodynamics, the atmosphere, etc. Actual rocket/atmospheric/physics science.”

Nothing’s Temporary

In fact the user interface’s language “was based in two-digits numeric codes used to represent Verbs (that is actions) and Nouns (that is the object of an action)…” explained one page at iBiblio.org. A quick scan of the list shows verbs like “display octal” and “display decimal”, as well as “monitor octal” and “please perform.”

The nouns are a little harder to decipher — but one appears to be “L celest body unit vec[.xxxxx]” — a stark reminder of the era when video terminals were considered futuristic. “The Verb and Noun keys were used to set the Verb/Noun combination of interest, and telling the computer to accept it by pressing the Enter key (e.g., a typical sequence could have been: Verb 16 Noun 65 Enter). The Clear key was used to correct user typing errors, while the Reset key was used to cancel error warnings from the computer…”

NASA Temporary code fix for Apollo project

But if “programmers will be programmers,” the same was also true for NASA’s original coders from the 1960s. On Twitter, web developer Kent Dodds took note of a comment left behind in the original source code for the Apollo project, which described one line of the 50-year-old code as being “temporary.”

“Nothing’s temporary,” he joked — and his message was re-tweeted over 1,100 times — and “favorited” another 1,200. Meanwhile, Reddit users began sharing another comment which bore the same message.

After 50 years, a screenshot of this comment suddenly found a new popularity in 2016, drawing 3,658 upvotes on Reddit’s form for “ProgrammerHumor,” and another 257 on the site’s forum for”Space.”

“Typical software development pattern. :)” joked one Reddit user.

Feature Image: NASA Apollo flight software designer Margaret Hamilton, from NASA.

Group Created with Sketch.
THE NEW STACK UPDATE A newsletter digest of the week’s most important stories & analyses.