Margaret Hamilton: Maybe Software Engineering IS Rocket Science…

7 min readAug 26, 2021
Image published for The Mother Mag made by Dixie Leota

Upon approaching the final stages of my learning in software engineering here in the Flatiron school of NYC, it dawned on me that I’ve never really taken the time to dive into the origins of software engineering and what historical achievements that came into fruition from it. These days, I found myself in a good spot in the school program where I can afford to let loose and indulge in more Youtube videos than spending time studying (the opposite is not true I swear!). To my pleasant surprise, without having to look further than one search result, I became aware that software engineering had its roots in Nasa! Safe to say that these roots weren’t meant to keep us humans rooted to the ground for too long as it led us to lifting off of the Earth and up towards the moon!

What an honor we owe to Margaret Hamilton as one of our remarkable minds and pioneers of technology in human history. She is credited for being the lead programmer for teams that was responsible for designing and developing a software that became essential for flight to the moon. She pushed for ideas whereas others doubted their use and had she not challenged those doubts, the historic moon landing would’ve been but a dream for several more years if not impossible. Her direct connection to the Apollo 11’s success might make a few of us think that what she out to create with her team might be rocket science. In the very loose sense of the word I would like to say yes that it is rocket science. You have rockets, you have fuel, computers to turn the rocket on, and the software that lives in the computers as the brain that tells the rocket how and where to fly. Discounting the combined effort between the astronauts and Nasa’s mission control to ensure the best path en route to the moon, one can argue that all of the rocket sciency stuff happens in the fabric of the flight software installed onboard.

While housing very complex code, the Apollo Guidance Computer (AGC) was small and compact.

Rocket science is a myriad of multiple disciplines that come together to make space exploration possible. Physics that are not bound to earth like classical newton mechanics are critical: general relativity, how solar wind or cosmic radiation might affect trajectories or damage hardware and the rocket, observation of orbits that offer the best time frames for launch and so forth. We also cannot forget the reliability of mathematics that are calculated in real time during space flight to ensure the smoothest journey possible to the moon or any celestial body in space. Software engineering and computer programming are just big parts of a bigger whole and was and is quintessential for both the livelihood of the astronauts in space, communications, processes of decision-making and problem solving, but I digress. What made Ms. Hamilton’s design brilliant was not about how much rocket science was put into creating the code but about how much code was developed that was sparked by the what ifs. Being inquisitive and accounting for every “what ifs” are what embodies any engineering and what makes an engineer the most effective in my opinion.

Code printouts were just as tall as Margaret.

Upon taking the job from Nasa working in MIT’s Instrumentation Laboratory by 1965, Margaret Hamilton appeared to not have been taken seriously in some respects. One, when she first coined the term software engineering and naming her team division after this term some around her took it as a joke. She is one of the very few women that worked for Nasa, let alone in the divisions she worked with. Margaret was also different from her colleagues because she is a mother to her daughter, Lauren. Though it is not clear whether or not Margaret received some doubt or resentment because she is a woman and that she is a mother, the Apollo guidance software would most likely have been incomplete had she been a different person.

Margaret and her daughter, Lauren

Her husband Paul was still studying law at Harvard at the time and she had nobody that she knew that could take care of her daughter when her husband was busy. Margaret had no choice but to take her daughter to work with her. Margaret would be working tirelessly on the code while Lauren would be busy playing astronaut, and they would both be sometimes playing together with the flight simulators that were already robust and operational. The flight simulators were both the testing grounds for Margaret and a playground for Lauren. Based on her Margaret’s account of her story, testing on the simulators wouldn’t produce errors that were catastrophic for a live run. It’s implied that the code was tested in a clear cut and dry manner just to observe functionality on developing parts. There were probably a lot of fail-safes to begin with. It is engineering after all, and there should be at least 99% confidence and almost no room for error when it comes to making anything that people’s lives depend on. Though, it is Lauren that gave her mother a breakthrough in the project. While playing with the simulators one day, Lauren had crashed the program which basically sums up a disaster if the same event were to be replicated during the actual flight to the moon. Margaret Hamilton quickly realized that human errors may be the determining factor that would make the AGC a complete computer. It only made sense to her that any mistakes that the on flight crew members make en route might render the computer software useless and it would be confused with what instructions it’s receiving from the crew. I’m sure this sounds very familiar to many of you. Margaret knew she had to talk to the heads of the department to implement more code and logic to prevent similar failures made by her daughter. MIT initially was reluctant to heed Margaret’s advice and their reason for reluctance was that they were confident that the astronaut won’t make the same errors because they are trained never to make mistakes.

Apollo 11’s successful moon landing in 1969

Initially, Nasa was reluctant to heed Margaret’s advice and their reason for reluctance was that they believed the astronauts were trained to never make mistakes. Margaret challenged that notion that the Apollo 11 crew members’ live flight to the moon will be as impeccable as their training intended it to be. Space voyage and exploration is still quite new at the time, no one would’ve known entirely all the possible scenarios that could happen. Too many things were at stake to not account for human errors, so eventually MIT Nasa was won over by Margaret. The Apollo Guidance Computer then became the astronauts’ best ally instead of their worst enemy just three minutes away from making touchdown on the moon’s surface.

The AGC had worked just expected when the Apollo crew members had kept a switch in the wrong position by mistake. Through carrying out asynchronous functions and tasks, flight module was able to prioritize select operations and focus all the computing resources into those processes. Apollo 11 was given emergency signals and bought the crew time to analyze and decide what to do next. The flight module ultimately gave the Apollo 11 only two options, either to land or to abort and return home. Just think about how amazing that is, the AGC was still able to determine that a landing was still possible, whereas had the new logic not been implemented, the mission would’ve been aborted immediately because of a crashed computer. So, combined with the knowledge in piloting and navigation and the AGC’s calculating prowess, the Apollo 11 successfully landed on the moon that year in 1969. By the year 2016, Margaret Hamilton received The Presidential Medal of Freedom for her historical contribution to Apollo and the invention of the Universal Systems Language (USL).

Margaret Hamilton presently

Margaret and her code has become something iconic in the fields of science. What’s even more surprising is how far we’ve come in developing computers and technology. As illustrated in a snapshot of Margaret posing next to a stack of papers, computer code back then was written out on papers. This code that was used on the AGC was then processed through machines to be printed out as cards replaced with new code that can be digested by computers. Looking presently, to think that your smartphone now have more computing power per cubic inch than the hardware used to send men to the moon in 1969 is unfathomable.

Even if you haven’t learned anything from reading this blog, I want you all to take in some pride in what you’re doing as software developers. We often carry out our lives trying to garner a stable career and or pursue our passions not knowing the capabilities and contributions that are possible. Sometimes we need to find a little bit of time during our busy lives to glimpse into the past to allow for us to be propelled into the future. And who knows maybe one of you could launch a rocket or two into the heavens from the comfort of your couch. And if you don’t plan on or aren’t making a living related to software engineering, then why not look into the origins of your field of expertise? You might discover extraordinary things that can inspire or teach. That was something I wished I did more of as a child instead of dismissing the tidbits of facts and history that were footnoted in almost every textbook I was given. And it is with great pleasure to be sharing this with you all.