News

Margaret Hamilton Dies at 90: The Woman Who Wrote the Code That Took Us to the Moon

The MIT computer scientist who led the team behind Apollo’s onboard flight software — and who gave her field its name — died September 30 in Cambridge. This Margaret Hamilton obituary traces her life, her code, and why her way of thinking about software is suddenly urgent again.

Advertisement
Margaret Hamilton in 1969 standing beside the stack of Apollo Guidance Computer source-code printouts produced by her MIT team
Margaret Hamilton in 1969 beside the printed listings of the Apollo Guidance Computer software her MIT team wrote and hand-checked, page by page. Every line of it had to be right: there was no patching a spacecraft on its way to the Moon. Photo: Draper Laboratory via Wikimedia Commons (public domain)

Margaret Hamilton Dies at 90: The Woman Who Wrote the Code That Took Us to the Moon

Margaret Hamilton dies at 90: Margaret Hamilton, the MIT computer scientist who directed the Software Engineering Division that wrote the onboard flight software for NASA’s Apollo program — and who coined the term “software engineering” to give her discipline its name — died on September 30 in Cambridge, Massachusetts. She was 90. MIT, her professional home from 1959 into the mid-1970s, announced her death on Wednesday, October 7.

Hamilton’s name belongs in the small company of people whose work quite literally carried human beings to another world. When Neil Armstrong and Buzz Aldrin descended toward the lunar surface on July 20, 1969, the computer guiding them began flashing alarms. It was Hamilton’s software — designed to expect the unexpected — that shed the less important tasks, kept the landing program alive, and let Mission Control say “go.” Without it, Apollo 11 might have been a story about turning back.

MIT announces her death

MIT News confirmed that Hamilton died on September 30. She is survived by her daughter, Lauren Hamilton; her son-in-law, Richard Selesnick; two grandsons; four great-grandchildren; and her siblings John, David, and Kathryn. A memorial service will take place in the spring in Cambridge, Massachusetts.

Tributes followed within hours of the announcement, from the space agency whose astronauts flew on her code to the computing world she helped name. NASA, Draper Laboratory — the independent descendant of the MIT Instrumentation Laboratory where she did the Apollo work — and a generation of engineers who grew up on the story of the 1202 alarm all marked her passing.

Margaret Hamilton cause of death: what MIT did and didn’t say

One question is already driving searches: what did Margaret Hamilton die of? The honest answer is that MIT’s announcement gave no cause of death, and none of the major obituaries — CNN, People, The Register — reported one either. She died in Cambridge at 90, and the family has so far kept the details private. Anything beyond that would be speculation, and this is one of those cases where the absence of a stated cause is itself the fact worth reporting.

From Paoli, Indiana, to the Moon

The Margaret Hamilton MIT story starts not with the Moon but with the weather. Margaret Elaine Heafield was born August 17, 1936, in Paoli, Indiana. She studied mathematics at the University of Michigan beginning in 1955, then transferred to Earlham College, earning a BA in mathematics with a minor in philosophy in 1958. A year later she moved to Boston with her husband while he pursued a law degree — and stumbled, almost by accident, into the machine age.

Who was Margaret Hamilton before Apollo?

Before the Moon, there was the weather. Hamilton’s first programming work came in MIT’s meteorology department, writing prediction software with professor Edward Lorenz — work on the LGP-30 and PDP-1 machines that would feed into Lorenz’s later publications on chaos theory. From there she moved to MIT’s Lincoln Laboratory in 1961, writing software for the SAGE air-defense system on the prototype AN/FSQ-7 computer, the machine the U.S. Air Force used to scan the skies for unfriendly aircraft. SAGE was the country’s first air-defense system and one of the great forcing functions of early digital computing. It was there that Hamilton first became obsessed with a question almost nobody was asking yet: how do you make software reliable?

In 1965 she was preparing for graduate school when her husband spotted a newspaper ad: MIT’s Instrumentation Laboratory was hiring people to develop software to “send man to the moon.” The lab had just won NASA’s contract — awarded in 1961 — to build the onboard flight software for Apollo. Intrigued, Hamilton applied. She was hired as the first programmer on the Apollo project at MIT, and the first woman programmer on the project. By 1968 she was assistant director in charge of the Command and Service Module software team, leading a division of roughly 100 engineers inside a program that, at its peak, had more than 400 people writing Apollo software.

Margaret Hamilton photographed in 1995, after leaving MIT to found two software companies
Margaret Hamilton in 1995. After Apollo she left MIT to found two software companies — Higher Order Software in 1976 and Hamilton Technologies in 1986 — and spent the rest of her career arguing that error prevention, not error fixing, is the heart of the discipline. Photo: Daphne Weld Nichols via Wikimedia Commons (CC BY-SA 3.0)

The alarms that saved Apollo 11

Every obituary of Hamilton will mention the 1202 alarm, and rightly so: it is the single most dramatic demonstration in history of what defensive software engineering can do. Moments before the Eagle was to touch down, the Apollo Guidance Computer began flashing 1202, then 1201 — the machine was overloaded, flooded with interrupts it hadn’t asked for, at the worst possible moment of the mission. The landing could have been aborted on the spot.

But Hamilton’s team had built priority-driven software: when the computer ran out of capacity, it shed background tasks and protected the mission-critical ones. Houston trusted the software, told the astronauts to proceed, and two men walked on the Moon. The fault, investigators later found, lay in a hardware switch setting — the rendezvous radar had been left in the wrong position — but the software had been designed for a world in which exactly that kind of thing happens.

Hamilton had learned the lesson the hard way, and the lesson had a name: Lauren. Her young daughter had once crashed the command-module simulator by triggering a pre-launch program, P01, mid-flight — an input no trained astronaut was supposed to make. Hamilton proposed a software guard against it and was overruled: astronauts would never make that mistake. Then, on Apollo 8 in 1968, Jim Lovell made exactly that mistake, wiping the in-flight navigation data. Her fix went into the program after that. She called the practice defensive programming — software that anticipates errors and fixes them on its own — and she spent the next fifty years insisting the industry treat it as the job, not a luxury.

There is a smaller story, recounted in The Register’s obituary from Computer History Museum interviews, that captures her method even better. Early in the program she wrote an abort routine — colleagues reportedly called it the “Forget It” program — for a failure case nobody expected to need. On an unmanned test flight, the failure happened, the program ran, and the mission was saved. She became, in the telling, an overnight expert in a contingency she had insisted on preparing for. It is the whole of her philosophy in miniature: the unknown is not an excuse; it is the specification.

“Software engineering”: the phrase she had to invent

In the mid-1960s, nobody called what Hamilton did “engineering.” Hardware was engineering; software was closer to clerical work in the institutional imagination, something typed up after the real decisions were made. Hamilton began calling her field software engineering anyway — deliberately, as she later explained, to give it the same legitimacy as any other discipline and to treat software as part of the overall systems-engineering process. People laughed. For years, she said, the phrase was an ongoing joke at her expense.

She kept using it. Today the term names a global profession of tens of millions of people, and the joke is on the laughers. It is no exaggeration to call her the software engineering founder — not of a company, but of the field itself. But the deeper point of her campaign is easy to miss: she wasn’t after a title. She was after accountability. Calling it engineering meant the work had to meet engineering standards — rigor, testing, proof — at a time when the industry treated code as craft and hoped for the best. Every modern practice that treats software failure as a preventable defect rather than an act of God descends, in some measure, from that insistence.

The honors caught up eventually. In 2016 President Barack Obama awarded the Presidential Medal of Freedom to the Apollo 11 software engineer — a rare national honor for a computer scientist — with a citation noting that her software architecture “led to giant leaps for humankind, writing the code that helped America set foot on the moon.” She also received NASA’s Exceptional Space Act Award, became a Computer History Museum Fellow, and was inducted into the National Aviation Hall of Fame. In 2015 the entire Apollo Guidance Computer codebase was published on GitHub — where programmers today can still read the Margaret Hamilton Apollo software listing that begins, in effect, with her name on it — and in 2017 she became an official Lego minifigure.

President Barack Obama presents the Presidential Medal of Freedom to Margaret Hamilton in the White House East Room, November 22, 2016
President Barack Obama presents the Presidential Medal of Freedom to Margaret Hamilton in the White House East Room on November 22, 2016. Obama called her a symbol of “that generation of unsung women who helped send humankind into space.” Photo: Official White House Photo by Lawrence Jackson via Wikimedia Commons (public domain)

Why this matters

Hamilton’s death matters for a reason that has nothing to do with nostalgia. We are living through the exact crisis her career was a warning about. The software running the modern world — the systems routing aircraft, clearing payments, dosing patients, and now writing code themselves — is vastly more complex than the Apollo stack and, by her standards, far less disciplined about failure. The industry’s dominant religion for two decades has been “move fast and break things”: ship, patch, apologize, repeat. Hamilton’s religion was the opposite: assume the breakage, design for it, and make the system survive what you failed to imagine.

That is why her obituaries are landing differently than most. She is not just being remembered as a heroine of the space age; she is being read as a prophet of the software age’s unfinished business. The 1202 alarm is the founding parable of a discipline the industry keeps promising to adopt and keeps postponing: software that degrades gracefully instead of collapsing, systems whose designers take responsibility for the unknown unknowns. As Olivier de Weck, MIT’s Apollo Program Professor, put it: “To say Margaret Hamilton was a pioneer — to say she was ahead of her time — would be a dramatic understatement. She was a software engineer at a time when that field was in its infancy.” Sixty years later, the field is an adult. The question her death poses is whether it has grown up.

There is a second, quieter significance. Hamilton became, late in life, the most visible icon for women in computing — the famous photograph, the medal, the Lego figure. Her prominence arrived decades after the work, which tells its own story about who gets remembered and when. Her death closes the era of firsthand Apollo memory: the people who actually wrote the Moon landing are leaving us, and what remains is the code, the documentation, and the discipline — if we choose to keep it.

Who wins, who loses, what the skeptics say

Women in computing win — again. Every retelling of Hamilton’s story puts a young woman at the center of the hardest engineering problem of the 20th century, in an era when computing was being actively rebranded as men’s work. Her visibility has been a recruiting engine for decades; her death will put the story in front of another generation.

The “software craftsmanship” movement gains a patron saint. The engineers arguing for formal methods, exhaustive testing, and error-prevention-first design — often dismissed as slow or old-fashioned — can now point to the ultimate case study: the most safety-critical software ever written, which worked.

The open-source world wins. The 2015 GitHub publication of the Apollo code turned her work into a living textbook. Expect a new wave of readers tracing the priority scheduler line by line this week.

Who loses? The heroic-lone-genius framing — and it deserves to. The skeptics have a fair point here: Hamilton led a division of roughly 100 engineers inside a 400-person software effort, inside a 400,000-person program. The 1202 save was a team achievement built on years of other people’s testing, and the “unsung woman” narrative sits oddly beside a Presidential Medal of Freedom, a Lego minifigure, and a million internet memes. None of that diminishes her — leadership is also a contribution, and she was genuinely first to insist on the discipline — but the honest version of the story is collective. The best tribute to Hamilton is not to mythologize her but to do what she did: credit the system, document the work, and design for the failure modes of hero-worship too.

The critics’ other caution: that we remember the romance of Apollo and forget the method. It is easy to share the photograph of the printout stack; it is harder to adopt the practice the stack represents — hand-checking, exhaustive review, designing for the unknown. If her death produces a week of memes and no change in how software gets built, the skeptics will have been right.

What the numbers actually say

~100. The engineers in Hamilton’s Software Engineering Division — the team that designed the onboard flight software for Apollo’s command and lunar modules — inside a program that swelled past 400 software people by 1968.

~145,000. The approximate lines of source in the Apollo Guidance Computer programs — written largely by hand, read and hand-checked line by line, then woven into core-rope memory by factory workers threading copper wire through magnetic cores. A modern smartphone app can ship more code in a month; the difference is that Hamilton’s code could not be patched, rolled back, or hot-fixed. It had to be right before it flew.

72KB. The fixed memory the Apollo computer carried — about a million times less storage than a modern 64-gigabyte phone, per the Smithsonian’s comparison. The priority scheduler that saved Apollo 11 existed because there was no room for waste: every byte had a job, and the software had to decide, in real time, which jobs mattered most.

Thousands of pages. The printed listings in the famous 1969 photograph stand taller than Hamilton herself — the Colossus program for the command module and the Luminary program for the lunar module, plus documentation. Every page was debugged by eyeball: programmers read the listings as if they were the computer, tracing execution by hand.

130+. Her publications across a career that ran from weather forecasting to lunar landings to founding two companies — Higher Order Software in 1976 and Hamilton Technologies in 1986, whose Universal Systems Language carried her error-prevention philosophy into industry.

90. Her age at death — a life that spanned from the Depression-era Midwest to the AI era, from roomsized computers with no screens to software that writes software.

What happens next: Artemis, AI, and the discipline she built

Artemis inherits her checklist. NASA’s Artemis program is working to return astronauts to the lunar surface, this time to stay — and its flight software teams work in the direct lineage of Hamilton’s methods: exhaustive simulation, fault tolerance, and the assumption that the vehicle must survive surprises. The engineers writing Artemis code grew up on the 1202 story. Expect her name to be invoked, explicitly, as the program moves toward crewed landings.

The AI era needs her more than the space age did. This is the forward-looking bet of her legacy. The systems now being deployed — autonomous vehicles, medical AI, AI-written infrastructure code — fail in ways their designers did not anticipate, exactly the condition Hamilton designed for. Her doctrine has a name for this: “handling the unknown.” The industry’s current approach to AI safety — train, test on the expected cases, ship, and patch the surprises — is the precise opposite of defensive programming. As AI systems take on safety-critical roles, the Hamilton question gets sharper: what is our priority scheduler? What does the system shed when it overloads, and does it protect the landing?

The discipline gets its reckoning. Software engineering is now one of the world’s largest professions, and its failure modes are civilizational — grid outages, grounded fleets, breached hospitals. Hamilton spent her career arguing that preventing errors beats fixing them, and that the profession should be engineered like one. Her death is likely to revive that argument at exactly the moment the stakes make it unavoidable. The memorial service in Cambridge next spring will gather the people who knew her; the real memorial will be written in code reviews, test suites, and design documents — wherever engineers choose, this week, to design for the failure they haven’t imagined yet.

She once said her team were the luckiest people in the world, because they had no choice but to be pioneers. The luck ran out on September 30. The choice hasn’t.

Related coverage

Sources

Signal Post News · Published October 8, 2026Back to all stories
Topics#News#MargaretHamilton#Moon

Disclosure: Signal Post News may earn a commission from qualifying purchases made through links on this page, at no extra cost to you. Learn more.

Advertisement
← Back to Signal Post News