The second Tuesday in October is Ada Lovelace Day, a day to celebrate and encourage the accomplishments of women in science, technology, and engineering. But who was Ada Lovelace? She wrote the first computer program and was the first to imagine that computers could be used for things other than actual numbers. And she did it in the 1840s, roughly a century before the electronic computers of the mid-20th century.
We may never know exactly what mathematician Charles Babbage expected in June of 1833, when his friend Mary Somerville (later the first female member of the Royal Astronomical Society) suggested that he should meet her teenage student, Ada Lovelace. At the time, Babbage was developing his idea of a mechanical calcualtor called the Difference Engine, which would automatically solve polynomial equations (you might remember polynomials from high school math classes; if x^2 + 12x + 8 = 72, can you solve for x? Babbage’s Difference Engine could have). Lovelace, whose mother had encouraged her interest in mathematics in the hopes of keeping her from following in the wild footsteps of her famous — or perhaps infamous, if you had the misfortune to have been married to him — father, the poet Lord Byron. Mathematical studies never quite distracted young Lovelace from her curiosity about her lost, near-legendary father, but by 1833 she had a sharp mind for math and logic, and the Difference Engine piqued her interest.
By the early 1840s, Lovelace was working alongside Babbage as he worked on his next project: the Analytical Engine, a mechanical calculator capable of solving a wider range of more complex problems than the original Difference Engine. And Lovelace, in fact, saw something in Babbage’s creation that the mathematician himself missed. Babbage saw the Analytical Engine purely as a tool for mathematical calculation, but Lovelace realized that with the right approach, the mechanical computer could be much more versatile than that:
“[The Analytical Engine] might act upon other things besides number, were objects found whose mutual fundamental relations could be expressed by those of the abstract science of operations, and which should be also susceptible of adaptations to the action of the operating notation and mechanism of the engine,” she wrote in 1842. In other words, Lovelace had just described, for the very first time, the idea of using numbers to represent other concepts — musical notes, letters, or anything else that could be quantified or assigned a variable — and then using a computer to make calculations about those variables.
For instance, if you could translate music into mathematical notation, Lovelace wrote, “The engine might compose elaborate and scientific pieces of music of any degree of complexity or extent.”
Babbage, despite being the father of the computer, didn’t see that aspect of its potential. Perhaps that’s not surprising; he was, first and foremost, a mathematician and engineer, so numbers would have been his logical focus. But Lovelace had a broader interest in the arts, poetry, and metaphysics, practicing what she described as “poetical science,” and it’s possible that that broader view may have led to her realization of how much you could do with a computer.
But she never got the chance to implement her ideas, mostly because Babbage never actually built his Analytical Engine. It would have been fascinating to see what she might have come up with, however, because she was also the first person to write a computer program: a set of rules for performing a calculation, written specifically to be followed by a computer. It’s a set of instructions for calculating a sequence of Bernoulli numbers (a set of numbers which play an important role in number theory) with the Analytical Engine, and if the machine had ever been built, it’s likely that Lovelace’s program would have run perfectly on it.
Lovelace tucked all that groundbreaking work away in a set of notes appended to Lovelace’s translation of an Italian paper about Babbage’s Analytical Engine. The paper had been written in response to one of Babbage’s presentations about his proposed computer, and Lovelace was translating it into English for him. She made her own notes along the way, and they ended up being more thorough than the original paper — proving that it has always been important to include detailed comments with your code. So one of the most important texts in the history of computer science is titled simply “Notes.”
Despite the vast potential she saw for computers in multiple fields, Lovelace considered and then firmly rejected the notion of artificial intelligence. “The Analytical engine has no pretensions whatever to originate anything,” she wrote. “It can do whatever we know how to order it to perform.” Today’s computer scientists haven’t yet proved her wrong, but time — and a new generation of engineers and programmers — will tell.