Stories by Lamplight: The Software That Caught the Alarms
Cambridge, Massachusetts, in the late 1960s was full of people racing the moon, and few of them worked in rooms quieter than Margaret Hamilton’s. Margaret, born in Paoli, Indiana, in 1936, had taught herself programming on weather and air-defense projects at MIT, and by 1965 she directed the team at the Instrumentation Laboratory writing the flight software for Apollo — some 145,000 lines of code, woven in part by hand into core-rope memory by the women of Raytheon, for a guidance computer with less memory than a modern greeting card. The software could not be patched from the ground. It had to be right, and it had to forgive.
That second part — the forgiving — Margaret learned in part from her own small daughter. Lauren Hamilton spent childhood weekends in the laboratory while her mother worked, and one day, playing in a simulator, she selected a prelaunch program in the middle of a simulated flight and crashed the mission. It was exactly the sort of honest mistake a tired astronaut might someday make. Margaret argued that the software must catch such errors, announce them plainly, and protect the mission from them. She was told, more than once, that astronauts would not make such mistakes. She built the protections anyway, and she fought to have her discipline called what she insisted it was: software engineering.
On July 20, 1969, with Apollo 11 sinking toward the Sea of Tranquility and the whole world listening, her creed met its test. Minutes into the descent, the guidance computer began flashing program alarms — 1201, then 1202 — codes almost no one had ever seen outside training. A rendezvous radar switch set in the wrong position was flooding the little computer with work it did not need, more tasks than it could carry. In Houston, hearts stopped. On the ground and in the capsule alike, everything depended on what the software did next.
It did what Margaret Hamilton had built it to do. The computer shed its lesser tasks, kept the essential ones, restarted itself cleanly around the overload, and flew. And in Houston, a young flight controller named Jack Garman recognized those alarm codes from a simulation training run — he had written them down, by hand, on a cheat sheet he kept at his console — and was able to say, with calm certainty, that the alarms could be trusted and the landing could continue. “Go,” came the word, again and again, through alarm after alarm, all the way down to the dust.
The Eagle landed with seconds of fuel to spare, and two men stood on the moon while a third kept the lonely vigil above them. The photographs from that week show rockets and footprints, but the landing also rested on invisible faithfulness: a mother who planned for human error because she loved the humans, a team that wrote and rewrote until the code could be trusted, and a young engineer whose careful notebook turned panic into recognition at the one moment it mattered.
There is something deeply reassuring in remembering that the moon landing was not carried by perfection. It was carried by preparation for imperfection — by people who assumed mistakes would come and built mercy into the machine ahead of time. It is not a bad pattern for a household, a church, or a life: expect the alarms, decide beforehand what truly matters, and let the lesser tasks fall away so the essential ones can land safely.
For the wider story of that extraordinary summer in the heavens, you might also love Moonshot Summer. And the tale told just before this one, Get the Girl’, tells how John Glenn would not fly until Katherine Johnson had checked the numbers by hand.
Thank you for settling in by lamplight. Come back soon — another story is always warming on the hearth, and all of them live together on the Stories by Lamplight page.