‘No one knows what almost awful energy and power lies yet undeveloped in that wiry little system of mine.’ The letter meandered, its words most likely buffeted with opium and wine1. The author had been trying to explain her intellect: ‘That brain of mine is something more than merely mortal; as time will show.’
Yet it wasn’t the only ‘wiry little system’ that she would leave behind as a legacy. As well writing letters, mathematician Ada Lovelace had been working on a new creation, which in time would yield enormous power.
It was July 1843, and Lovelace was nearing the end of a project that had taken her months. Her focus was a machine that had fascinated her for a decade, built by the man she’d sent that meandering letter to. In the early 1820s, mathematician Charles Babbage had designed a ‘Difference Engine’ to calculate tables of useful geometrical values, the sort needed by engineers and navigators2. Lovelace had seen a prototype of the machine in 1833, but despite spending £17,000 (equivalent to over £1m today), Babbage failed to produce a working machine, and the British government eventually withdrew their financial support.
Even so, Babbage’s ambitions only grew. Rather than pursuing his Difference Engine, which was akin to a specialist calculator, he turned his attention to an ‘Analytical Engine’, which would be able to perform a far wider range of computational tasks, In 1842, the mathematician Luigi Menabrea – who would later become Italian Prime Minister – wrote an article outlining the possibilities that such a machine would inspire. First, it would be accurate, reducing the risk of human error in pen-and-paper calculations. Second, it would be fast. If someone gave the machine two numbers, each with twenty digits, Babbage had claimed it would take less than three minutes to multiply them together. But crucially, Menabrea suggested the Analytical Machine would bring intellectual freedom, removing the computational barriers that blocked many research questions. He argued it ‘would mark a glorious epoch in the history of the sciences’.
It was this Italian article that had inspired Lovelace’s big project in 1843. After reading Menabrea’s overview, she wanted to translate the ideas into English. When Babbage found out, he was wondered she hadn’t written an original piece, given her long interest in the machine. At Babbage’s suggestion, she therefore added some footnotes of her own to the translation. Within these notes, she would introduce the first threads of an even deeper idea.
To show how machines could follow instructions, Menabrea had used the example of automated ‘Jacquard-looms’, patented by the weaver Joseph Marie Jacquard. The loom was controlled by cards punched with a series of holes, allowing it to weave specific pre-designed patterns. In her notes, Lovelace focused on a particular creation, which had been completed a few years earlier: ‘There is in existence a beautiful woven portrait of Jacquard, in the fabrication of which 24,000 cards were required.’


Lovelace pointed out that computers would be most effective if instructions could be summarized in a more concise format. As she noted:
‘It is obvious that this mechanical improvement is especially applicable wherever cycles occur in the mathematical operations, and that, in preparing data for calculations by the engine, it is desirable to arrange the order and combination of the processes with a view to obtain them as much as possible symmetrically and in cycle.’
Modern software developers refer to such cycles as ‘loops’. If a computer can run the same series of instructions repeatedly in a loop, it saves having to write out the same code again and again.
To illustrate the power of repeated instructions, Lovelace gave a simple example showing that three cycle-based punch cards could do the job of three hundred without. In situations involving even more repetition, she noted that a handful of well-designed cards could take the place of thousands or potentially millions of cards containing simplistic instructions. She also explained how a machine could handle more complex instructions, involving ‘cycles of cycles’. But Lovelace hadn’t just pointed out a potential source of efficiency. By specifying the set of instructions required, she’d written the world’s first computer algorithm.
Lovelace was in awe of the possibilities, yet at the same time cautious. She argued it would take time to understand the power of computing machines. As she put it:
‘In considering any new subject, there is frequently a tendency, first, to overrate what we find to be already interesting or remarkable and, secondly, by a sort of natural reaction, to undervalue the true state of the case.’
Babbage’s Analytical Engine would never make it into reality, which meant Lovelace’s work would remain hypothetical for many more decades. But eventually that would change, and the energy and power of computation was no longer left undeveloped in the wiry little system of one person’s mind.
If you want to read more about the role of computation in science, from mathematical proof to modern AI, you might be interested in my new book Proof: The Uncertain Science of Certainty, available to pre-order now.
Letter to Charles Babbage on 5th July, 1843. Background on drug use: James CL & Morrill DE. The Real Ada, Countess of Lovelace. ACM Sigsoft notes, 1983.
Babbage HP. Babbage’s Calculating Engines, Cambridge University Press, 2010
Babbage and Lovelace were honored guests of Lord and Lady Rosse at the unveiling of the giant telescope that came to be called Leviathan. Their signatures are on page one of the guestbook. My signature is on page 100 and something. Seeing their writing sent a thrill through my body.
Human mind! This is an interesting history. Thank you for sharing Adam!