Featured · TodaySpace
Weaving the Moon Landing: Hamilton's Apollo Code
Three minutes before Apollo 11 touched down, the lunar module's computer started screaming alarms. The reason it didn't abort traces back to a woman at MIT who insisted on planning for exactly this.

Listen
Read by Finch · 9 min
Three Minutes to the Moon
Three minutes before the Eagle was due to touch down on the Sea of Tranquility, its computer started flashing an alarm nobody in Mission Control had drilled for: 1202. Buzz Aldrin and Neil Armstrong were descending toward the lunar surface on July 20, 1969, while Michael Collins orbited above in Columbia, and now the guidance computer was telling them something was wrong1.
The cause, as NASA's own account puts it, traced back to a faulty written operations script that had the crew leave a rendezvous radar switch on during descent, a switch that had no business being active at that moment1. The radar started feeding the computer a stream of extra work it did not need, right as the computer was busy with the actual job of landing a spacecraft. The result was that the Apollo Guidance Computer's processing queue backed up faster than it could clear it2,1.
What happened next was not luck. It was a specific decision baked into the software years earlier by Margaret Hamilton and her team at the MIT Instrumentation Laboratory: when overloaded, the computer should not crash or freeze. It should look at everything it was being asked to do, figure out what actually mattered for landing, and quietly drop the rest3,1.

So the computer restarted selected low-priority activity, preserved the guidance and engine-control functions that kept Eagle on its descent path, and kept going3,1. In Mission Control, the alarm was unfamiliar enough to cause a tense pause. MIT-trained guidance officer Steve Bales and his support team quickly concluded the computer was still doing its essential job despite the overload, and Bales told flight director Gene Kranz the landing could continue. Armstrong and Aldrin did not abort.
Eagle landed at 20:17:40 UTC on July 20, 1969. Hamilton, listening in from the Instrumentation Laboratory's monitoring room in Cambridge, later said it became clear in real time that "the software was not only informing everyone that there was a hardware-related problem, but that the software was compensating for it"3. The landing worked not because nothing went wrong, but because the system had been built to survive the thing going wrong.
A Computer the Size of a Suitcase, Wired by Hand
To understand why the alarm did not end the mission, it helps to know what kind of computer this actually was. NASA contracted MIT's Instrumentation Laboratory in 1961 to build Apollo's guidance and navigation system, years before anyone had settled on how software for a spacecraft should even work4. Hamilton joined in the mid-1960s, became the first woman hired as a programmer on the project, and eventually took over as director of its Software Engineering Division5,4.
Each Apollo mission carried two Apollo Guidance Computers, one in the command module and one in the lunar module, each weighing about 70 pounds5,6. By modern standards they were almost absurdly limited: the astronauts had access to roughly 72 kilobytes of memory total, a fraction of what a single photo takes up today3.
Most of that memory was not even electronic in the way we think of it now. The flight program lived in core-rope memory, where a wire routed through a tiny magnetic core represented one binary value and a wire routed around the core represented the other6,7. This meant the program was physically built into the hardware. Changing a line of code after manufacturing meant reweaving wire by hand, not pushing an update8,7.
That weaving happened at a Raytheon plant in Massachusetts, where workers, many of them women with backgrounds in the region's textile mills, threaded copper wire through arrays of ferrite cores smaller than grains of rice3,7. Hamilton called the role of overseeing this process being the "Rope Mother," spending long hours checking and documenting every step9. The workforce became known informally as the "LOLs," short for Little Old Ladies, a label Hamilton herself used but one that undersells the operation, which also included engineers, inspectors, and supervisors, and whose weavers were not uniformly elderly3,10.
Software That Expected to Fail Gracefully
Hamilton's central insight was that a spacecraft computer would, sooner or later, be asked to do more than it had time for, and the software needed a plan for that moment rather than a hope it would never arrive. Her team built an asynchronous, priority-based executive, so every job the computer could be asked to run had a rank, and higher-priority jobs could interrupt or bump lower ones2,1.
This wasn't just one trick. The system included error detection and recovery routines that could restart cleanly from a known-good state, and "priority displays" that could interrupt the astronauts' normal readouts to flag an emergency and hand them a go or no-go decision2,1. NASA later credited these concepts, asynchronous software, priority scheduling, end-to-end testing, and human-in-the-loop decision points, as the foundation of what became modern software engineering practice1.
Hamilton pushed her team to test not just the procedures astronauts were supposed to follow, but the mistakes they might make. A widely repeated story involves her young daughter Lauren, who once hit a sequence on a simulator that would have been dangerous mid-flight; Hamilton pushed to guard against that class of error afterward, though the available sources here don't pin down the exact technical fix or date [and this episode is told across multiple retrospectives without a precise primary record].
Hamilton also spent years arguing, sometimes against resistance, that writing spacecraft code deserved the same rigor as mechanical engineering, and used the phrase "software engineering" to make that case at a time when software was often treated as an afterthought to hardware4,11. She later said of the team's work under constant deadline pressure: "We had to find a way and we did. Looking back, we were the luckiest people in the world; there was no choice but to be pioneers"4.
Who Was in the Room
- Margaret Hamilton: Director of the Software Engineering Division at MIT's Instrumentation Laboratory; designed the priority-scheduling and fault-recovery software that kept Apollo 11's landing on track5,4,1.
- Steve Bales: Guidance officer in Mission Control during Apollo 11; judged the 1202 alarms survivable and advised continuing the landing.
- Gene Kranz: Apollo 11 flight director; authorized the crew to proceed after the guidance team's assessment.
- Neil Armstrong: Apollo 11 commander; flew Eagle's final approach and landed it manually in the last stretch.
- Edwin "Buzz" Aldrin: Lunar module pilot; monitored descent systems and the computer displays during the alarm.
- Michael Collins: Command module pilot; remained in lunar orbit aboard Columbia throughout the descent.
By the Numbers
- 1961: Year NASA contracted MIT's Instrumentation Laboratory to build Apollo's guidance system4.
- 1965: Year Hamilton became the first woman hired as a programmer on the Apollo project5.
- 70 pounds: Approximate weight of each Apollo Guidance Computer; two flew on every lunar mission5,6.
- 72 kilobytes: Total memory available to Apollo astronauts' onboard computers, across both modules3.
- 512 cores: Number of tiny magnetic cores in one described rope-memory module, each smaller than a grain of rice7.
- Three minutes: Roughly how long before touchdown the 1202 alarms began sounding on July 20, 19691.
- 20:17:40 UTC: Time of Eagle's landing in the Sea of Tranquility, July 20, 1969.
What's Solid and What's Fuzzy
Most tellings agree on the mechanics: a rendezvous radar switch left on by a faulty checklist overloaded the computer, and priority scheduling let it shed the excess load and keep landing-critical work running1,3. NASA's own history explicitly blames "a faulty written operations script" rather than crew error, which is worth noting since some popular retellings imply the astronauts simply forgot to flip a switch1.
One detail gets murkier the further you dig: some accounts, including testimony attributed to engineer Robert Wills of the National Museum of Computing, dispute the specific claim that the radar switch was left on by mistake, and instead connect the overload partly to Aldrin requesting an eighth simultaneous display program the system wasn't built to run concurrently2. The sources available here don't fully resolve which account is more complete; both agree the computer was overloaded, they differ on the precise mechanism.
The story about Hamilton's daughter Lauren accidentally triggering a dangerous simulator sequence, often cited as the reason certain safeguards exist, is widely repeated in profiles and retrospectives of Hamilton's career, but no source here supplies a primary record with an exact date or the specific code change that resulted. It should be treated as a well-attested anecdote rather than a precisely documented event.
The timing of Mission Control's decision to continue is also often dramatized as a matter of seconds. That's broadly consistent with the record, but exact phrasing and stopwatch figures vary between retellings, so specific quoted timings should be treated with some caution.
Timeline
- 1961NASA contracts MIT's Instrumentation Laboratory to develop Apollo's guidance and navigation system.
- 1965Margaret Hamilton joins the Apollo project, becoming its first female programmer.
- 1968Hamilton's team finalizes flight software, which is then hand-wired into core-rope memory at Raytheon.
- July 16, 1969Apollo 11 launches from Kennedy Space Center with Armstrong, Aldrin, and Collins aboard.
- July 20, 1969During lunar descent, the guidance computer throws repeated 1202 alarms about three minutes before touchdown.
- July 20, 1969Eagle lands in the Sea of Tranquility at 20:17:40 UTC after Mission Control opts not to abort.
Pictures






Sources
- Margaret HamiltonNASA
- Margaret Hamilton (software engineer)Wikipedia
- Margaret Hamilton Led the NASA Software Team That Landed Astronauts on the MoonSmithsonian Magazine · 2019
- Margaret Hamilton - NASA ScienceNASA · 2019
- The Woman Whose Software Guided the Apollo Missions Has DiedThe New York Times
- Apollo Guidance ComputerWikipedia
- In 1968, the engineers building the Apollo Guidance Computer ...spacedaily.com
- The Story of the Apollo Guidance Computer, Part 2universetoday.com
- The "Rope Mother" Margaret Hamiltonairandspace.si.edu
- Core memory weavers and Navajo women made the ...sciencenews.org
- 2017 CHM Fellow Margaret Hamiltoncomputerhistory.org
Researched and written by Lorelet from the sources above. It cites as it goes, but it can still get things wrong, so check the sources for anything that matters.
Report a problem
More featured lorelets
See allToday · Sports
The Perfect Game Nobody Saw Coming
A journeyman pitcher with a losing record and a reputation for late nights found a baseball in his shoe one October morning and threw the only perfec…
Today · Technology
Captain Midnight: The Night a Dish Dealer Hijacked HBO
A broke satellite dealer in Ocala, Florida, pointed a 30-foot dish at a communications satellite and bumped HBO off the air for a protest message, ex…
Oct 7 · History
Operation Breakthrough: When the Cold War Thawed for Three Whales
In October 1988, a hunter's chance discovery near Point Barrow turned into a 20-day international scramble that put Soviet icebreakers, Greenpeace vo…