Expect the Unexpected

She led the team behind Apollo's flight software, and argued for a decade that software is engineering. Margaret Hamilton died on 30 September 2026, at ninety. Most people know her from one photograph and one Moon landing. This episode traces her path from Edward Lorenz's weather models to the computer that kept Apollo 11 flying through a stream of alarms, and explains how that computer worked. It also separates the myths from the record, and follows the debate among programmers about what her legacy really is.

Key ideas

Transcript

A woman stands beside a tower of paper as tall as she is. Cambridge, Massachusetts, nineteen sixty-nine. The pages are printed listings of the software that would guide astronauts to the Moon and back. Her name was Margaret Hamilton.

She died on the thirtieth of September, twenty twenty-six, in Cambridge, at ninety. Her daughter Lauren confirmed it to the Associated Press. On Hacker News, her obituary rose to the top of the day.

She is remembered for one photograph and one landing. Her real legacy is an idea. Software will fail, so it must be built expecting failure, and keep working when the unexpected arrives.

It began with the weather. In nineteen fifty-nine, a young mathematics graduate programmed Edward Lorenz's weather models at MIT, on a small LGP-30 computer. Lorenz later thanked her in papers that helped found chaos theory.

The famous butterfly attractor was computed by Ellen Fetter, the successor Hamilton trained. Hamilton moved on to Lincoln Laboratory, writing software for the SAGE air-defence system. There, she first grew interested in reliability.

In nineteen sixty-five, her husband spotted an advert: MIT's Instrumentation Laboratory needed help to send man to the Moon. She became the first programmer it hired for Apollo. By nineteen sixty-eight, she led the command module software team.

The machine was tiny. The Apollo Guidance Computer had two thousand and forty-eight words of erasable memory and a clock of about two megahertz, built by Raytheon from some four thousand integrated circuits.

Its permanent program was woven by hand at Raytheon. A wire threaded through a magnetic core meant one. A wire passing around it meant zero. Once woven, the code could not be patched.

Inside, the software worked like a small kitchen with about seven places for jobs. Each job carried a priority, and the most important one always ran first. Hal Laning designed this scheduler, called the Executive.

Hamilton also knew how people break machines. By her own account, her young daughter Lauren crashed a simulator by selecting a pre-launch program mid-flight. Hamilton wanted a guard. Astronauts, she was told, would never do that.

December nineteen sixty-eight. On Apollo eight, Jim Lovell meant to select star zero one and selected program zero one instead. The navigation data shared memory with that program. It was overwritten and had to be rebuilt.

Then came the twentieth of July, nineteen sixty-nine. Eagle was descending toward the Sea of Tranquility when the keypad flashed an alarm. Twelve oh two. The computer was running out of places to put its jobs.

Don Eyles, who wrote the landing software, later traced the cause. The rendezvous radar, useless for landing, was set as the checklist required. A power mismatch made it spray false pulses that stole about thirteen percent of the computer's time.

The software did not freeze. It dropped everything, restarted in a fraction of a second, and picked up only what mattered: guidance, throttle, displays. Checkpoints written by the programmers told it where to resume.

In Houston, Steve Bales and Jack Garman had a handwritten list of which alarms were survivable if they did not recur too often. The machine reported what it was doing. The humans decided. Gene Kranz gave the go. Eagle landed.

That is the legend. The record is richer. The famous stack holds printed listings produced by her teams, not one woman's handwritten code. Historian Paul Ceruzzi stresses a collective effort: Laning's scheduler, Don Eyles on the descent, controllers in Houston, the Raytheon weavers.

Then there is the phrase software engineering. Colleagues found it amusing when Hamilton championed it. But Bertrand Meyer found it in print in nineteen sixty-six, in a letter by Anthony Oettinger. Who used it first remains disputed.

She kept chasing the idea, founding Higher Order Software in nineteen seventy-six and Hamilton Technologies a decade later. The first firm's promise of error-free software drew skepticism. Recognition came late: the Presidential Medal of Freedom in twenty sixteen, and a LEGO minifigure.

In the Hacker News thread, the old claim resurfaced. One commenter wrote that she coined the term. Another quoted her own words: "It was out of desperation… to say, hey, we're engineering too." Neither settles the history.

A sharper argument followed. One user credited her with inventing error handling. Another pushed back: what saved the landing was priority scheduling combined with restart protection. The second is closer to the record. Error handling is older than Apollo.

Some had met her. One recalled her talking about formalized control systems: "fascinating, but it went totally over my head." Others felt something lost. "Today I mostly do silly APIs," one wrote. The green fields, another wrote, seem to be vanishing.

Her lesson now runs through modern computing. Systems that shed low-priority work instead of crashing. Restarts into a known good state. Alarms that mean one specific thing. A user's mistake, seen once, treated as a bug in the system.

Go back to the photograph. The listings were the work of many hands. The conviction behind them, that software must expect the unexpected and deserves to be called engineering, was hers. Margaret Hamilton, nineteen thirty-six to twenty twenty-six.

Transcripción

Una mujer junto a una torre de papel de su altura. Cambridge, Massachusetts, mil novecientos sesenta y nueve. Es el software que llevaría al hombre a la Luna y de vuelta. Era Margaret Hamilton.

Murió el treinta de septiembre de dos mil veintiséis en Cambridge, con noventa años. Su hija Lauren lo confirmó a Associated Press. Su necrológica encabezó Hacker News.

Se la recuerda por una foto y un alunizaje. Su legado es una idea: el software fallará, así que debe diseñarse para ello y resistir lo inesperado.

En mil novecientos cincuenta y nueve, una matemática programaba en el MIT los modelos meteorológicos de Edward Lorenz, en un LGP-30. Él se lo agradeció en artículos clave de la teoría del caos.

El famoso atractor de la mariposa lo calculó Ellen Fetter, su sucesora y discípula. Hamilton pasó al Laboratorio Lincoln, a programar el sistema antiaéreo SAGE. Allí se interesó por la fiabilidad.

En mil novecientos sesenta y cinco, su marido vio que el MIT buscaba ayuda para ir a la Luna. Fue su primera programadora para el Apolo; tres años después, dirigía el software del módulo de mando.

El ordenador del Apolo era diminuto: dos mil cuarenta y ocho palabras de memoria borrable y unos dos megahercios. Raytheon lo montó con unos cuatro mil chips.

Su programa fijo se tejía a mano en Raytheon. Hilo que cruzaba el núcleo: uno. Hilo que lo rodeaba: cero. Una vez tejido, no admitía parches.

Por dentro, el software era una cocina con unos siete fogones. Cada tarea tenía su prioridad, y la más importante iba primero. Hal Laning diseñó este planificador: el Ejecutivo.

Hamilton conocía el factor humano. Según ella, su hija Lauren colgó un simulador al elegir en pleno vuelo un programa de prelanzamiento. Pidió protegerlo. Los astronautas, le dijeron, jamás harían eso.

Diciembre de mil novecientos sesenta y ocho. Apolo ocho. Jim Lovell iba a elegir la estrella cero uno y eligió el programa cero uno. Borró los datos de navegación, que hubo que rehacer.

Veinte de julio de mil novecientos sesenta y nueve. El Eagle bajaba al mar de la Tranquilidad y el teclado parpadeó: alarma doce cero dos. No quedaban fogones.

Don Eyles, autor del software de descenso, halló la causa. El radar de encuentro, inútil para alunizar, estaba configurado según el protocolo. Un desfase eléctrico generaba pulsos falsos que robaban un trece por ciento del procesador.

El software no se colgó. Lo soltó todo, se reinició al instante y retomó solo lo esencial: guiado, empuje, pantallas. Puntos de control de los programadores le decían dónde seguir.

En Houston, Steve Bales y Jack Garman tenían una lista manuscrita de las alarmas tolerables si no se repetían demasiado. La máquina informaba de lo que hacía. Los humanos decidían. Gene Kranz dio luz verde. El Eagle alunizó.

Esa es la leyenda. La realidad es más rica. Esa pila son listados de sus equipos, no código manuscrito de una sola mujer. El historiador Paul Ceruzzi destaca la obra colectiva: Laning, Eyles, los controladores de Houston, las tejedoras de Raytheon.

«Ingeniería del software»: sus colegas sonreían cuando Hamilton defendía la expresión. Pero Bertrand Meyer la halló en una carta de Anthony Oettinger de mil novecientos sesenta y seis. Su origen sigue en disputa.

Fundó Higher Order Software en mil novecientos setenta y seis, y luego Hamilton Technologies. Prometer software sin errores despertó recelos. El reconocimiento llegó tarde: la Medalla Presidencial de la Libertad en dos mil dieciséis y una minifigura de LEGO.

En Hacker News reapareció la vieja tesis. Uno escribió que ella acuñó el término. Otro citó sus palabras: «Fue por desesperación… para decir: oye, también hacemos ingeniería». Ninguno zanja la cuestión.

Hubo más polémica. Uno le atribuyó inventar la gestión de errores. Otro replicó: lo que salvó el alunizaje fueron las prioridades y los reinicios protegidos. El segundo acierta más: la gestión de errores es anterior al Apolo.

Algunos la conocieron. Uno recordaba sus charlas sobre control formalizado: «Fascinante, pero no me enteré de nada». Otros sintieron una pérdida: «Hoy casi solo hago APIs tontas». Los campos vírgenes parecen esfumarse.

Su lección impregna hoy la informática. Sistemas que no se caen: sueltan lo secundario. Reinicios a un estado seguro. Alarmas inequívocas. Un error humano, visto una vez, tratado como fallo del sistema.

En la foto, listados de muchas manos. Pero la convicción era suya: prever lo inesperado y llamarlo ingeniería. Margaret Hamilton, mil novecientos treinta y seis, dos mil veintiséis.

Sources

Markdown version