We've all been there: you're working on something important, your PC crashes, and you lose all your progress.
Such a failure was not an option during the Apollo missions, the first time ever that a computer was entrusted with handling flight control and life support systems -- and therefore the lives of the astronauts on board.
Despite an infamous false alarm during lunar descent that sent Commander Neil Armstrong's heart rate racing, it was a resounding success that laid the groundwork for everything from modern avionics to multitasking operating systems.
Here are some of the ways the Apollo Guidance Computer (AGC), millions of times less powerful than a 2019 smartphone, shaped the world we live in today:
- Microchip revolution -
Integrated circuits, or microchips, were a necessary part of the miniaturization process that allowed computers to be placed on board spacecraft, in contrast to the giant, power-hungry vacuum tube technology that came before.
The credit for their invention goes to Jack Kilby of Texas Instruments, and Robert Noyce, who co-founded Fairchild Semiconductor and later Intel in Mountain View, California.
But NASA and the Department of Defense -- which needed microchips to guide their Minuteman ballistic missiles pointed at the Soviet Union -- greatly accelerated their development by producing the demand that facilitated mass production.
"They had these incredible, absolutely insane requirements for reliability that nobody could possibly imagine," Frank O'Brien, a spaceflight historian and author of "The Apollo Guidance Computer: Architecture and Operation," told AFP.
In the early 1960s, the two agencies bought almost all the microchips made in the US, roughly a million all told, added O'Brien, forcing the makers to improve their designs and build circuits that lasted longer than their early life cycles of just a few hours.
- Multitasking -
Modern computers, such as the smartphone in your pocket, are generally capable of doing a myriad of tasks all at once: handling emails in one window, a GPS map in another, various social network apps, all the while ready for incoming calls and texts.
But in the early era of computers, we thought of them in a fundamentally different way.
"There wasn't a lot they were asked to do. They were asked to crunch numbers and replace humans who would do them on mechanical adding machines," said Seamus Tuohy, the principal director of space systems at Draper, which spun off from the MIT Instrumentation Laboratory that developed the Apollo Guidance Computer.
That all changed with Apollo Guidance Computer, a briefcase-sized machine that needed to juggle an array of vital tasks, from navigating the ship to running its oxygen generator, heaters and carbon dioxide scrubbers.
Instead of a computer operator giving a machine a set of calculations and leaving it for hours or even days to work out the answer -- all of this needed to be done in a time-sensitive fashion, with cut-offs, and the ability for users (astronauts) to give it commands in real time.
NASA felt it required an onboard computer to handle all these functions in case the Soviets tried to jam radio communications between ground control in Houston and US spaceships, and because Apollo was originally conceived to go deeper into the solar system.
All of this required a software "architecture," much of which was designed by engineer Hal Laning.
- Real-time input -
It also needed new ways for man to interact with machine that went beyond the punch-card programming of the time.
The engineers came up with three key ways: the switches that you still find in modern cockpits, a hand-controller that was connected to the world's first digital fly-by-wire system, and a "display and keyboard" unit, abbreviated DSKY (pronounced "dis-key").
The astronauts would input two-digit codes for verbs and nouns, to carry out commands like firing thrusters, or locking on to a particular star if the ship, which relied on an inertial guidance system to keep its pitch, roll and yaw stable, had begun to drift off course.
O'Brien used the metaphor of a tourist who visits the US and is hungry but doesn't know much English, and might say "Eat pizza" to convey the basic meaning.
- Passing the test -
Apollo 11's most tense moment came during the final minutes of its descent to the lunar surface, when the computer's alarm bells began ringing and making it seem as though it had crashed.
Such an event could well have been catastrophic, forcing the crew to abort their mission or even sending the vessel spiralling out of control to the surface.
Back in Houston, an engineer realized that while the machine was temporarily overloaded, its clever programming allowed it to automatically shed less important tasks and focus on landing.
"The way that computer handled the overload was a real breakthrough" said Paul Ceruzzi, a Smithsonian Institution scholar on aerospace electronics.
O'Brien noted that while the AGC was puny by modern computing standards, with a clock speed of 1 Mhz and a total of 38Kb of memory, such comparisons belied its true caliber.
"With that terribly small capacity, they were able to do all the amazing things that we now think of as completely normal," he said.