Margaret Hamilton – The Woman who put Man on the Moon

Who is Margaret Hamilton?

Margaret Hamilton in 1969 standing next to the code she wrote by hand that landed the first men on the moon

Margaret Hamilton (born August 17, 1936, aged 83) is a pioneer of modern computer science. Her work on the Apollo 11 mission not only landed humans on the moon, but invented our modern concept of software. If that weren’t enough of a legacy, Margaret Hamilton is also credited with coining the phrase ‘software engineering’.


Hamilton graduated in 1958 with a degree in mathematics from Earlham College, Indiana. She got married soon after, her husband had a degree in chemistry. They had a daughter together, and when her husband decided to pursue a law degree at Harvard, she found herself a job to support the family. If this sounds like an unusual family set-up for 1950s America, it was. Hamilton said, ‘I was also fortunate to have a very modern husband, especially for that time. There were some men who understood equality’.

The job she found was at MIT, working as an assistant to Edward Norton Lorenz in the meteorology department. He’d advertised for maths majors. She was tasked with programming a weather detection system. It was here that she learned about computer science, and how to code. At that time, computer science courses were rare, and software programming courses did not exist. Students of these relatively new disciplines learned by working on the job.

Not Many Women Around

What was also rare at MIT was women. The percentage of female students there in 1959 was around 1%. The first woman to graduate from MIT did so in 1873, however the proportion of female students remained extremely low. It reached a high of 6% in 1895 and did not reach that percentage again until 1969. These numbers were similar amongst all elite universities in America at the time. MIT did not officially commit to educating women in significant numbers, not to mention providing them with basic facilities like dormitories and toilets, until 1960. Throughout the 60s and 70s the number of female university students at MIT, and in America in general, began to rise dramatically. The percentage of female students at MIT today is around 45%. Hamilton was of course not studying at MIT, she was working there, even more of a reason why looking at these numbers gives one an idea of just how unusual her position really was back in 1959.

Her plan had been to wait until her husband had finished his law degree and then go and get herself a masters degree in abstract mathematics. In the mid 1960s however, she heard that NASA were looking for programmers to write software for their moon missions. Her plans changed. Her interest had been sparked, she applied for the job and abandoned the idea of further study. She was the first programmer, and the first woman, hired for the Apollo missions.

‘[On] the Apollo project I started off with mostly engineers, and I don’t remember there, well, there weren’t, for a long time, any other women, as I recall’.

The Apollo Missions and Coining the Term ‘Software Engineer’

She was mostly left to her own devices at first, hardware engineers were thought to be important – remember software engineers didn’t exist yet – and her work was largely ignored by her colleagues and superiors. Hamilton says of her being hired by NASA for the space missions: ‘At the beginning, nobody thought software was that big a deal’. The leading hardware engineers at NASA had completely underestimated the importance of programming, and Hamilton’s work was often dismissed.

‘It was out of desperation I came up with the term, to say: “Hey, we’re engineering too.” It was an ongoing joke for a long time. Then one day in a meeting, one of the most respected hardware gurus explained to everyone that he agreed with me. The process of building software should also be considered an engineering discipline, just like with hardware. It was a memorable moment’. NASA had begun to realise just how important the software was going to be for the space missions, that they would be relying on it heavily. I can’t help but wonder, if NASA had realised the importance of Hamilton’s job earlier on, whether that job would have been entrusted to a woman.

‘Forget It’

The most pivotal moment of Hamilton’s career was having written the code that recognised and rectified a user error on Apollo 11 minutes before the astronauts actually landed on the moon. Because she’d gone into such excruciating detail to detect possible errors, disaster was averted and the mission was successful. The reason she did this so successfully has an interesting history which begins with her work on earlier missions.

Hamilton has told the story of one of the earlier unmanned missions, where her work was specifically related to error detection. It was considered so unimportant, the project was officially named ‘Forget It’. It was considered redundant work because a mistake was ‘never going to happen’ because the astronauts were ‘too well trained’. When the astronauts inevitably did make a mistake, Hamilton, the ‘Forget It’ expert, was called in to fix the problem. The attitude toward her work began to change. The project grew and Hamilton was soon to be leading a team of 100 programmers.

The Child Who Showed the Way

In a later mission, Hamilton tells of how her daughter, who could only have been six or seven at the time, paved the way for further error detection to be written into the software. She told the story to The Guardian in 2019:

‘[My] young daughter, Lauren […] was with me when I was doing a simulation of a mission to the moon […] She started hitting keys and all of a sudden, the simulation started. Then she pressed other keys and the simulation crashed. She had selected a program which was supposed to be run prior to launch – when she was already “on the way” to the moon. The computer had so little space, it had wiped the navigation data taking her to the moon. I thought: my God – this could inadvertently happen in a real mission. I suggested a program change to prevent a pre-launch program being selected during flight. But the higher-ups at MIT and Nasa said the astronauts were too well trained to make such a mistake. Midcourse on the very next mission – Apollo 8 – one of the astronauts on board accidentally did exactly what Lauren had done. The Lauren bug! It created much havoc and required the mission to be reconfigured. After that, they let me put the program change in, all right.’

Accolades and Legacy

NASA honoured her with the Exceptional Space Act Award in 2003, and in 2016, President Barack Obama awarded her the Presidential Medal of Freedom. He noted: ‘Our astronauts didn’t have much time. But thankfully, they had Margaret Hamilton’. She has even been made into a Lego figurine, perhaps the greatest distinction of all! She’s one of only a few women who were afforded the privilege in Lego’s recent NASA series.

In that famous photograph, Hamilton stands next to the code she wrote, by hand, which took men to the moon. It towers taller than her. The Astronaut Neil Armstrong is world famous for being the first man on the moon, but he would never have landed had it not been for the woman who wrote the code.


Brown, Alexander. 2002. History of recent science and technology. Apollo Guidance Computer History Project – First conference – July 27, 2001., 08 December 2002. [last viewed 16th of May 2020].

Corbyn, Zoë. 2019. The Guardian. Interview – Margaret Hamilton: ‘They worried that the men might rebel. They didn’t’., 13 Jul 2019. [last viewed 16th of May 2020].

Gray, Robert M. 2017. Stanford University. Coeducation at MIT: 1950s–60s + Epilog: The Enduring Bottleneck of Women Engineering Faculty., 29 October 2017. [last viewed 16th of May 2020].

Obama, Barack. 2016. The White House – President Barack Obama. Remarks by the President at Presentation of the Presidential Medal of Freedom., 22 November 2016. [last viewed 16th of May 2020].

Leave a Reply