Technology · Tech History

Ada Lovelace

In 1843 Byron’s daughter published the first program for a computer, and in the same pages she wrote down the first serious doubt that such a machine could ever think.

Watercolour of a young woman in a lavender silk dress and a black lace shawl, flowers in her dark hair, holding a closed gold fan in a white-gloved hand and looking back over her shoulder.
Ada, Countess of Lovelace, in a watercolour attributed to Alfred Edward Chalon, about 1840. Source: Wikimedia Commons, where the author and licence terms for this file are recorded.

Chalon painted her around 1840 in lavender silk and black lace, a gold fan held shut in a gloved hand, glancing back over her shoulder as though someone across the room had just said her name. She was about twenty-four. Three years later she published a long set of notes on a machine that existed only in drawings, and in them she did two things nobody had yet done in print. She set out, operation by operation, a procedure for that machine to follow, and she stated plainly what such a machine would never do. The procedure is why she is called the first programmer. The statement is why her name still comes up whenever anyone argues about artificial intelligence, and it is the part worth carrying to dinner.

Augusta Ada Byron was born in London on 10 December 1815, the only legitimate child of Lord Byron and Annabella Milbanke, who left the poet within weeks and raised her daughter on mathematics. On 5 June 1833, at seventeen, Ada went with her mother to one of Charles Babbage’s Saturday evening parties and soon afterwards saw a working section of his Difference Engine, a brass calculator for printing mathematical tables. Babbage had already begun on something larger. His Analytical Engine, designed from 1834, would hold numbers in a store, work on them in a mill, and take its orders from punched cards borrowed from the silk loom Joseph-Marie Jacquard had built in Lyon. In today’s words those are memory, a processor and a program.

Babbage explained the design in public only once, at Turin in 1840. An engineer in the room, Luigi Menabrea, wrote it up in French for a Geneva journal in October 1842, and Charles Wheatstone asked Ada to put it into English. Babbage suggested she add notes of her own. She wrote seven, lettered A to G and about three times the length of the article, and in August 1843 the whole appeared in Taylor’s Scientific Memoirs, the notes signed only with her initials. Three passages carry her argument.

ReadA. A. L., 1843 · tap the dotted words for a gloss

Note A, on the cardsThe distinctive characteristic of the Analytical Engine, and that which has rendered it possible to endow mechanism with such extensive faculties as bid fair to make this engine the executive right-hand of abstract algebra, is the introduction into it of the principle which Jacquard devised for regulating, by means of punched cards, the most complicated patterns in the fabrication of . … We may say most aptly, that the Analytical Engine weaves algebraical patterns just as the weaves flowers and leaves.

Note A, on what else it might workSupposing, for instance, that the fundamental relations of pitched sounds in the science of harmony and of musical composition were such expression and adaptations, the engine might compose elaborate and scientific pieces of music of any degree of complexity or extent.

Note G, on its limitsThe Analytical Engine has no pretensions whatever to originate anything. It can do whatever we know how to order it to perform. It can follow ; but it has no power of anticipating any analytical relations or truths. Its is to assist us in making available what we are already acquainted with.

Notes by the translator to Menabrea, Sketch of the Analytical Engine, Taylor’s Scientific Memoirs, vol. 3, 1843

The middle passage is the leap. Babbage thought of his engine as a calculator, and she saw that anything whose relations could be written as symbols, musical notes among them, could be worked by the same cards. Every machine that now edits a photograph or drafts an email runs on that observation.

Note G ends with a worked example. She took the Bernoulli numbers, a sequence that turns up in sums of powers and is tedious to compute by hand, and laid out how the engine would produce the one she labelled B7 from those before it. Each row of her table names the columns of the store that feed the mill and the column that receives the answer. Two features make it a program in the modern sense. A block of operations repeats, which she called a cycle and we call a loop, and one column, V10, “decides which of two courses the succeeding processes are to follow” by testing the value of n, which is a conditional branch. The table also carries a bug: in operation 4 a division is written the wrong way round, so the engine would have returned the wrong number had anyone ever built it to try.

A large printed table with numbered rows of operations, columns headed by variable names, and algebraic expressions showing the values held at each step.
The diagram from Note G for computing the Bernoulli numbers, 1843: one operation to a row, the variables of the store across the top. Source: Wikimedia Commons, where the author and licence terms for this file are recorded.

How much of this was hers is an old quarrel. Babbage’s papers hold several dozen sample programs drawn up between 1837 and 1840, which the historian Allan Bromley catalogued, so hers is the first published program and his are older. In his memoir of 1864 Babbage wrote that he had offered to work out the Bernoulli algebra “to save Lady Lovelace the trouble,” and that she sent it back having found “a grave mistake which I had made in the process.” Doron Swade, who led the Science Museum’s build of Babbage’s second Difference Engine, credits her with publishing the program and doubts she wrote it. None of Babbage’s notebooks, though, makes the case for what the machine meant, and that case is hers.

A brass and iron mechanism in a glass case: vertical columns of stacked toothed wheels between pillars, with a row of cams and levers along a shaft at the base.
Babbage’s trial model of part of the Analytical Engine’s mill, still unfinished at his death in 1871. No complete engine was ever built. Science Museum, London. Photograph by Daderot. Source: Wikimedia Commons, where the author and licence terms for this file are recorded.

Alan Turing read her a century later. In “Computing Machinery and Intelligence,” published in the journal Mind in 1950, he gave her sentence a section of its own, “Lady Lovelace’s Objection,” and answered it from experience: “Machines take me by surprise with great frequency.” The argument has barely moved since. A large language model learns from what people have written and then does what it is asked, which sounds like her; it also turns out sentences nobody wrote and finds patterns nobody specified, which sounds like him. Surprise alone settles nothing, since a long sum can surprise you too. Her version is useful because it can be tested: did the machine anticipate a truth that nobody fed it? That question can be put to any answer on a screen.

  1. Could I have ordered it? Would a precise enough request have specified this result in advance?
  2. Is it rearrangement? Is every part already in what the machine was given or trained on, put in a new order?
  3. Did it anticipate? Does it hold a relation or fact that neither you nor its sources had, and can you confirm it somewhere outside the machine?

Most answers stop at the second question, and an answer that seems to reach the third has to be checked before it counts. Try it this week. Take one reply from a chatbot that impressed you, a plan or a paragraph or a few lines of code, and write a sentence against each of the three questions. Then open the 1843 notes themselves, free online, and read Note G to the end, where she lays the B7 computation out row by row.

She died on 27 November 1852, at thirty-six, and was buried beside her father at Hucknall. In 1980 the United States Department of Defense named its programming language Ada and numbered the standard MIL-STD-1815, for the year of her birth, and the second Tuesday of October is now Ada Lovelace Day. If machines come up at dinner, you have a line ready: the first person to publish a computer program also published the first argument that computers cannot think, and in 183 years nobody has settled it.