The Invisible Thread

Margaret Hamilton · 1936–2026

The Invisible Thread.

The code that took humanity to the Moon, and much further.

The Invisible Thread.

Mare Tranquillitatis

Sea of Tranquility

Apollo 11 landed here, on 20 July 1969.

Apollo 11 landing site, 0.67° N, 23.47° E. Placed with NASA’s libration data for this exact view of the Moon.

Mare Tranquillitatis

Sea of Tranquility

Apollo 11 landed here, on 20 July 1969.

Apollo 11 landing site, 0.67° N, 23.47° E. Placed with NASA’s libration data for this exact view of the Moon.

A grey lunar plain under low sunlight, scattered with craters and thin rilles, curving to a dark horizon. A thruster of the Lunar Module is silhouetted in the corner.
The approach to the landing site in the southwestern Sea of Tranquility, photographed from the Lunar Module in lunar orbit, 20 July 1969. NASA, AS11-37-5437.

The Moon. NASA Scientific Visualization Studio, from Lunar Reconnaissance Orbiter data.

02 · We went to the Moon

In 1969, humanity reached the Moon.

The journey depended on something almost nobody could see.

Hover the drawing to name its parts

Earth, photographed from Apollo 11 on its way to the Moon, 17 July 1969. NASA, AS11-36-5355.

Earth as a small, bright sphere in black space, with Africa and Europe visible.. Apollo 11 · mission profile · not to scale.
Margaret Hamilton in 1969, smiling beside a stack of printed program listings as tall as she is.

MIT Instrumentation Laboratory, 1969. Beside her, listings of the Apollo flight software. Photograph: Draper Laboratory.

03 · Meet Margaret Hamilton

Meet Margaret Hamilton.

She led the teams behind Apollo’s onboard flight software.

The original caption

Detail: Margaret Hamilton smiling beside the top of the stack of bound listings.

“Here, Margaret is shown standing beside listings of the software developed by her and the team she was in charge of, the LM [lunar module] and CM [command module] on-board flight software team.”

Caption written for the MIT Instrumentation Laboratory’s promotional photograph, 1969, as recalled by Margaret Hamilton to MIT News (2016).

Meet Margaret Hamilton.

Every volume, printed listings of the flight software for the lunar module and the command module.

04 · A discipline without a name

Software was becoming essential.

It was still fighting to be taken seriously.

Hamilton began to call it by a name that set it beside every other kind of engineering:

Software Engineering.

Software Engineering.

Why the name mattered

“I began to use the term ‘software engineering’ to distinguish it from hardware and other kinds of engineering,” Hamilton recalled. “When I first started using this phrase, it was considered to be quite amusing.”

The name claimed for software the standing of an engineering discipline within the larger system, at a time when it was often treated as an afterthought to the hardware.

“Software eventually and necessarily gained the same respect as any other discipline.”

Quotes: Margaret Hamilton to El País (2018), as cited by MIT News (2026).

Real lines and files from Luminary 099, the Apollo 11 lunar module software. Grouping them under four headings is editorial.

05 · Code, woven into memory

Some of the software that took us to the Moon was woven by hand.

Thread the wire through the core, or around it.

Switch the cores one at a time, and the wire answers: 1 where it is threaded, 0 where it is not.

MIT Instrumentation Laboratory teams wrote the programs. At Raytheon, specialist workers, most of them women, wove them into rope.

Some of the software that took us to the Moon was woven by hand.
A ring-shaped magnetic core and a copper wire. When the wire passes through the ring it reads 1; when it goes around the ring it reads 0.to the sense amplifier

Through the core, the wire reads 1.

The wire reads 101100

Tap a core to rethread it.

A core rope memory module: a long frame packed with rows of tiny ferrite cores and woven copper wire.
Core rope memory module, Apollo Guidance Computer. Photograph: NASA.
The same module, drawn: illustration after the NASA photograph. Simplified, not to measure.

Conceptual illustration. In the Apollo ropes, up to 192 sense wires passed through or around each core; switching a core sent a pulse down every wire threaded through it.

06 · What if?

What if something goes wrong?

At the MIT simulator, Hamilton’s young daughter Lauren once started P01, the pre-launch program, in the middle of a simulated flight.

Five days into Apollo 8, astronaut Jim Lovell made the same slip. Mission Control talked the crew through restoring the guidance platform.

She prepared for mistakes others thought would never happen.

Per aspera, ad astra: Through hardships, to the stars

Simulated flight · coasting to the Moon

Mission timeline · conceptualOn the padLaunchCoast to the MoonLunar orbitP01 belongs hereP01Spacecraft, in flightOrientation reference?P01

Orientation known

P01 prepares a spacecraft standing on the pad. Started in flight, it can throw away the computer’s sense of orientation.

Conceptual reconstruction. Not the Apollo interface.

Try it

What the sources say

In Hamilton’s account, she wanted the software to guard against P01 being selected in flight. She was told that astronauts would not make such a mistake (“they were trained to be perfect”), and a note went into the documentation instead: do not select P01 during flight.

NASA’s Apollo 8 Flight Journal records the slip itself. At 106:27 into the mission, Lovell reported “a Program 01 and a ‘No Attitude’ light”; later he said, “It was my goof.” The guidance platform had to be realigned; Mission Control confirmed the state vector was good, and a navigation matrix that shared memory with P01 was reinitialised.

Where accounts differ

Some retellings say all navigation data was lost; the flight journal records the state vector as intact.

Accounts differ on whether the safeguard was forbidden or simply declined, and on Lauren’s exact age.

Sources: Apollo 8 Flight Journal, Day 5 (NASA); Hamilton’s accounts as quoted by Wired (2015) and others.

07 · The final descent

The final descent.

The software was about to face its greatest test.

Eagle in lunar orbit, photographed from Columbia after separation, 20 July 1969. NASA, AS11-44-6581.

Lunar module and surface: illustration after NASA documentation. No telemetry is shown.

08 · 1202

1202

Apollo 11 · Lunar descent · 20 July 1969

Program alarm · Executive overflow

1202: no free core set, so no room to start another job.

  1. Overflow detected
  2. Restart
  3. Essential jobs re-established
  4. Radar jobs not resumed

Calm. The computer ran its work as jobs, each held in one of seven core sets. A core set is a small block of memory a job needs while it runs.

The computer ran its work as jobs, each held in one of seven core sets.

A core set is a small block of memory a job needs while it runs.

Unneeded radar jobs kept arriving until every core set was taken.

With nowhere to put the next job, the computer raised alarm 1202.

It restarted, and brought back only what mattered.

Steering the descent and running the display resumed near where they had stopped.

The computer recovered by design. The decision to continue was human.

In Houston, guidance officer Steve Bales judged the alarm safe. CAPCOM Charlie Duke: “We’re Go on that alarm.”

Diagram of seven core sets. Calm: descent guidance and the crew display each hold one. Overload: radar jobs take every other core set and one more job has nowhere to go. Recovery: everything is cleared, and only guidance and display return. GO: a single path continues.Core sets · 7Descent guidanceCrew displayRadar jobsDescent guidanceCrew displayRadar jobsRadar jobsRadar jobsRadar jobsRadar jobsRadar jobs

Conceptual diagram. Job groups simplified; only the seven core sets are historical. No flight data shown.

How the recovery really worked

The Apollo Guidance Computer ran its work as jobs. Each job needed one of seven small blocks of memory called core sets; some also needed one of five larger work areas.

During the descent, misconfigured radar switches kept the computer scheduling rendezvous-radar jobs for data that wasn’t really there. They filled every core set. With nowhere to put the next job, the computer raised alarm 1202. A later 1201 meant the work areas had run out too.

The software was built for this. It restarted, re-established the essential programs near where they had stopped (steering the descent engine, running the display) and left the radar jobs behind. MIT had tested the restart extensively.

The design was the work of many people at the MIT Instrumentation Laboratory. The decision to continue belonged to Mission Control.

Source: Peter Adler, “Apollo 11 Program Alarms”, Apollo 11 Lunar Surface Journal, NASA.

A flat grey lunar plain scattered with small rocks, under a black sky, seen from the lunar module window.

09 · Touchdown

The Eagle has landed.

Neil Armstrong · 20 July 1969

The Eagle has landed.

The surface beside the landing site, seen from Eagle’s right-hand window. NASA, AS11-37-5458.

It was not the end of Margaret Hamilton’s story.

10A · Beyond the Moon

Luminary 099 · page 1107

NEXTCORECAFCOREINCADSLOCCTRCCSEXECTEM2TCFNOVAC3LXCHEXECTEM1CAQTCBAILOUT1# NO CORE SETS AVAILABLE.OCT1202
From the Apollo 11 lunar module software: the routine that raises alarm 1202 when no core set is free. Transcribed from the MIT Museum listing; public domain.

Her work didn’t end on the Moon.

In 1976 she founded Higher Order Software, built on error prevention and fault tolerance.

A decade later came Hamilton Technologies and its Universal Systems Language, a way of engineering complex systems that puts error prevention first.

“Her software architecture led to giant leaps for humankind.”
Presidential Medal of Freedom citation, 22 November 2016
Margaret Hamilton, smiling over her shoulder, reclines in a command-module seat and reaches up to the switch panel.
In an Apollo command-module mockup, Cambridge, Massachusetts, 1969.

10 · In memoriam

“There was no choice but to be pioneers.”

Margaret Hamilton, MIT News, 2009

Thank you, Margaret.

1936–2026