It was on this day, July 20, in 1969, that the Apollo 11 astronauts reached the moon and Neil Armstrong took his famous small step. People celebrated the world over, though few were more relieved than Margaret Hamilton.

“I remember thinking, Oh my God, it worked,” the pioneering software engineer tells TIME. “I was so happy. But I was more happy about it working than about the fact that we landed.”

The “it” that worked was Apollo 11’s on-board flight software, which Hamilton, as part of the MIT team working with NASA, led the effort to build. There was no guarantee things would play out so smoothly. In fact, just before the lunar landing was supposed to happen, alarms went off indicating that there wasn’t enough room on the computer for the landing software to work effectively. Turns out a radar was sending unnecessary data to the computer, overloading it with superfluous information.

The work that Hamilton had done helped enable the computer to figure out which of the multiple processes it had to do was most important. “It got rid of the lesser priority jobs and kept the higher priority jobs, which included the landing functions,” she explains.

That fix gave NASA the confidence to go ahead with the historic moon landing.

Hamilton was later given NASA’s Exceptional Space Act Award for her work on those Apollo systems. (She’s also credited with coining the term “software engineering.”) That she was successful in the pre-women’s lib era in a field that remains tough for women to crack has helped revive interest in her career: Hamilton achieved a sort of Internet fame recently when the photo above made the rounds.

Hamilton says that she was so wrapped up in her work that she didn’t notice the gender problems of the time until Mad Men came around and seemed a little too familiar. (Even if gender wasn’t uppermost in her mind, she did advance that cause too: Hamilton recalls that a woman on her team was told by the MIT credit union that she couldn’t get a loan without her husband’s signature, though male applicants didn’t need spousal approval. Hamilton complained about the policy and had it changed. “It was the culture, but I won, and I was so happy,” she recalls. “I didn’t do it because of male versus female; I was very conscious of what was fair and what wasn’t fair.”)

Part of what had made Hamilton’s work so effective was that she tested everything so rigorously, in a simulator that could demonstrate the “system of systems” at work, and the relationship between the software, the hardware and the astronaut. “We couldn’t run something up to the moon,” she says. But they could run lots of tests on the ground. Analyzing the errors that came up during testing, Hamilton’s team found that nearly three-quarters of them were interface errors, like conflicts in timing or priority. Since the computer code was on cards, a software engineer might write code that told the computer how many cards to advance; if someone later added a card in the middle while working on the code, that number would be wrong. Hamilton realized that those problems were avoidable.

“We’ve been working on this ever since Apollo—or starting with Apollo, I should say,” she says. “I’ve been on a mission in its own right, working with this Universal Systems Language, which allows you to get things up front. It’s kind of like a root canal: you waited till the end, [but] there are things you could have done beforehand. It’s like preventative healthcare, but it’s preventative software.”

She founded Hamilton Technologies Inc. in 1986, where she has continued her work with Universal Systems Language.

In 1969, TIME’s special report on the moon landing included the optimistic prediction that Mars would be up next, and soon (“as early as 1982”). Software reliability may not have much romantic appeal, but Hamilton believes it is key to future exploration of the universe, including Mars. Which makes sense, since reliable software saves money. Testing is expensive, so it’s cheaper for NASA (and private space programs) if problems can be caught in advance, thus requiring fewer tests. And cutting down on costly tests means smaller budgets that are more likely to get approved.

Which is something Hamilton is keen to see happen. “I hope,” she says, “that we continue with exploration.”

Read TIME’s special issue from 1969 about the Apollo 11 moon landing: Man on the Moon

Get our History Newsletter. Put today's news in context and see highlights from the archives. Please enter a valid email address. Sign Up Now Check the box if you do not wish to receive promotional offers via email from TIME. You can unsubscribe at any time. By signing up you are agreeing to our Terms of Use and Privacy Policy . This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply. Thank you! For your security, we've sent a confirmation email to the address you entered. Click the link to confirm your subscription and begin receiving our newsletters. If you don't get the confirmation within 10 minutes, please check your spam folder.

Read next: The Smithsonian Needs Your Help to Display Neil Armstrong’s Spacesuit

Download TIME’s mobile app for iOS to have your world explained wherever you go

Write to Lily Rothman at lily.rothman@time.com.