You might not expect a computer revolution to take place in 1830s London, but one very nearly did.
The steam-powered revolution was well underway in England, and amidst the squalor of filth and overcrowding in the capital city, the landscape had utterly transformed over the past couple of decades.
At the start of the 19th century, London was more medieval than modern, where guilds ran things in the overcrowded city, which was badly in need of renovation. Two million Londoners lived in a city capable of supporting maybe a third that many.
Now, gears were turning and steel was clanging all the time, creating a constant symphony of steam power. Charles Babbage watched all these gears turning, ultimately doing the work of a human body, and wondered if it might also be possible to create a machine that could do the work of the human mind.
He wasn’t the first person to wonder this. In fact, some 1800 years earlier, the first known analog computer was created—but the Antikythera Mechanism wasn’t found until decades after Babbage’s death.
Babbage began with his Difference Engine, a machine he designed to create mathematical tables. These were references used everywhere before the age of computers to calculate where the stars would be (how to get home), sort of like a very crude version of a GPS, and for all sorts of engineering tasks that involved precision manufacturing—including the machine Babbage wanted to build.
The only problem was that the tables weren’t accurate. Human beings did all the math, so they made lots of mistakes. The math wasn’t incredibly complex, but there were more than enough steps to produce the occasional error. Imagine being out at sea and being off by a few hundred nautical miles, and that gives you an idea of the scope of the problem.
Babbage’s gear-based computing machine would calculate the tables flawlessly, all the way down the columns and across the rows, like an early version of Excel. He set about to have it built by a team of engineers—this was no small project, costing around £17,000—comparable to $3.5 million today, mainly paid for by the government.
Unfortunately for this potential alternative history timeline, Babbage wasn’t able to complete his Difference Engine during his lifetime. Budget creep was the final nail in the coffin, but Babbage’s own perfectionism (the very thing that likely drew him to start building in the first place) contributed to frequent rebuilding, and the existing precision manufacturing available wasn’t really all that precise.
Now, this machine wasn’t a true all-purpose computer like the tens of billions of smartphones, laptops, and desktops out there in the world today. Instead, it was much more narrow in scope, specifically designed to solve this specific type of problem.
Enter Ada Lovelace.
Ada was incredibly precocious—very smart from an early age, plus exposed to some of the best education available in London at the time. By the time she met Babbage, his Difference Engine project was on the decline, languishing in tough engineering challenges and budgetary considerations.
Nevertheless, this 17 year old daughter of Lord Byron was impressed with the much older man’s intellectual capacity and enthusiasm to try something bold and very different. The two met at a party, where Babbage showed Ada a crude, small working model of the Difference Engine.
This rough model was more than enough raw material to start Ada going down a path that would lead to her being considered the first ever computer programmer.
Babbage was impressed with Ada’s ability to understand the way the Difference Engine worked. He encouraged her to study advanced mathematics, and Ada took his advice to heart, ultimately deepening her understanding of math and logic under the study of Augusus De Morgan, a leading thinker of the era.
While Ada was away, she kept her correspondence with Babbage up. They discussed a new idea Babbage was calling the Analytical Engine. Babbage had the idea that he could build something that could do much, much more than just fill in tables with correct mathematical calculations.
His new Engine would be able to perform nearly any mathematical calculation, and Babbage saw a bright future in number crunching. He certainly wasn’t wrong.
Babbage had recently traveled to Turin in Italy, where he lectured about his idea in front of a receptive and curious audience. One of the participants was none other than Luigi Federico Menabrea, an eventual Prime Minister of Italy and current rising math star.
Menabrea wrote a paper (in French), describing how the Analytical Engine might work. Ada was fluent in French, so when a mutual friend of Babbage’s and Ada’s handed her the paper and asked her to translate it into English, she was quite eager to assist.
I’m sure she did a fine job of translating, but the important thing to know is that she made a ton of notes on Menabrea’s observations. By the time she was done expanding on these ideas, her notes were three times as long as the original paper.
In order to keep track of the notes, Ada used a lettering system. A was about the capabilities of the system itself, and notes B, C, D, E, and F go through various different ways a calculation could be performed. These first six notes were helpful and clarifying, but it was Note G that was truly earth-shattering.
In this note, Ada Lovelace broke down exactly how to get the Analytical Engine to compute Bernoulli numbers, which would prove to be a great test for any system due to the need for lots of recurring steps.
Step-by-step, Ada described exactly how the machine would be able to execute these calculations automatically. If you hear about a recursive loop in computing, you have Ada to thank for this concept.
This was the first computer program—an algorithm designed specifically for a programmable machine. Now, that’s impressive enough, but Ada saw even further.
She realized that numbers were not the only thing that could be manipulated by this system. You could manipulate symbols, including letters and words. One day, maybe you could even generate art or music.
The Difference Engine was the subject of a SF novel by that name by William Gibson and Bruce Sterling.
We're only now starting to understand how pivotal Ada's work was; her gender and her relation to Byron prejudiced a lot of people before then.
"One day, maybe you could even generate art or music."
Come on, man, that sounds like pure sorcery. There's no way mere algorithms will ever be able to pull off something like that!