Skip to content

Ada Lovelace and the Analytical Engine

Ada Lovelace and the Analytical Engine

The most famous line ever written about a computer, before computers, comes from a footnote. In September 1843, in the back pages of a small British scientific journal, a young woman signed A.A.L. published a translated paper about an unfinished machine, with seven notes attached that ran three times longer than the paper itself. The machine had never been built. The paper was a translation. The notes were the work. A century and three quarters later, we are still arguing about who deserves credit for what, and the argument is not pointless. It is a test of how we read the history of an idea before the idea had a machine to live in.

The popular version of this story, the postcard version, says that Ada Lovelace was the first programmer. It lets you skip most of the texture. A more careful version has to say that she was almost certainly not the first programmer, that Charles Babbage had written programs for his Analytical Engine in the late 1830s, that historians from Allan Bromley to Doron Swade have spent decades reconstructing what he actually did, and that even the program usually called the Lovelace program is something we should treat with measured respect. None of this makes her unimportant. If anything, the careful version makes her more important, because it points back to what the notes were actually doing, which is explaining what a general-purpose machine would mean if it existed. The postcard is true the way a thumbnail is true. It captures a silhouette. It misses the thing that mattered.

The thesis of this essay is straightforward. The most useful way to think about Ada Lovelace is as the person who saw a general-purpose machine where her mentor saw a calculator. The decisive claim in her 1843 notes is not that she wrote the first program. It is that the engine could act on things other than numbers, that it manipulates symbols according to rules, and that therefore the boundary of the machine is set by what we can write down, not by what it is made of. That single move is the transition from calculation to computation. Her objection, that the engine has no pretensions to originate anything, is the sharpest thing anyone wrote about machine intelligence before Alan Turing. And the historical record is genuinely contested. A responsible essay should say so, and should then explain why the argument about her is worth having even when the postcard version is wrong.

The machine that was never built

To understand the notes you have to understand the machine, and the honest first fact about the machine is that none of it ever ran in the way its inventor intended. Charles Babbage had been working on computing engines for over twenty years when Ada Lovelace met him, and the public story of those two decades is the difference between two machines that are easy to confuse. The first is the Difference Engine, which Charles Babbage began designing in 1822 and partially constructed in the 1830s with British government funding. A Difference Engine is a special-purpose calculator that computes by the method of finite differences, a numerical technique for successively approximating the values of polynomials and related functions using only addition, in fixed banks of digit columns. It is a tall brass tower with thousands of identical wheels and pinions, set up to do one pattern of arithmetic on whatever numbers are tabulated against its columns. It does not branch or conditionally choose. It does not run a program. It grinds the same table, again and again, by being the right shape.

The Analytical Engine, which Charles Babbage first set out in detail in a working note of 1837, is something different. It is a general-purpose machine, mechanical but programmable, divided architecturally into a mill, the part that does arithmetic, and a store, the part that holds numbers. Input and program are supplied on punched cards in the style of the Jacquard loom. The output, in his plan, could be punched cards again, a printed page, or a plotted curve. Crucially, the engine can branch: it can select one of two operations based on a sign in the working register. It can loop, by way of card sequences that reuse earlier cards in a chain. It can hold intermediate results in the store while the mill moves to the next operation. None of those abilities are exotic by the standards of a modern laptop. In the standards of 1837, they were an extraordinary claim about what brass and steel could be made to do.

Charles Babbage’s own description, in his 1864 Passages from the Life of a Philosopher, is that the Analytical Engine was not so much a machine as a metal continent full of possibilities. He wrote the memoir near the end of his life, looking back at decades of partial construction, redesign, dispute with his machinists, lapse of parliamentary funding, and a small private workshop in which he worked alone on parts he could not give anyone else to build because the plan kept changing underneath him. He had built individual pieces. He had tested small sections of the mill. He had not built a working whole. Almost everything we know about what the engine could have done we know because he described it on paper, because a handful of his plans survive, and because Ada Lovelace and others wrote about what a machine of this design should do. We are reading a description of a machine. We are not running the machine. That is the condition under which every claim is made.

There is a second condition that follows from this. To describe a machine that does not exist, you have to commit on paper to what it can do. The Jacquard loom comparison, which both Charles Babbage and Ada Lovelace leaned on heavily, is not a flourish; it is the source of the framing. A Jacquard loom reads a chain of punched cards and weaves a pattern; the chain is the program, the woven cloth is the output, and the loom is the interpreter. Charles Babbage had toured the Jacquard workshops in Lyon years before his Analytical Engine plan and studied the cards as a way of encoding arbitrary rules. The loan of that idea is what makes the engine a general machine rather than a curve-tracing engine, and it is why punched-card processing is in the ancestry of every computer language that has ever used a tape, a deck, or a file as input.

Why does this matter for the essay about Ada Lovelace? Because the notes she wrote have to be read as the description of a design, not the report of an experiment. When she writes about the engine acting on other things besides numbers, she is not recording an observation. She is making a claim about what the design makes possible. When she writes about composing music by way of a chain of operations analogous to weaving, she is not reporting a session at a console. She is saying that the design supports a kind of operation, given suitable encoding of the symbols, that no one had ever made a machine support before. To read her fairly you have to hold on to the design-not-experiment distinction. Many of the popular arguments, both the celebratory ones and the corrective ones, slide past it without noticing. They treat her writing as though it were a logbook. It is not. It is a forecast.

Who Ada was and how she got there

The history she came from shaped how she was steered. She was born Augusta Ada Byron on 10 December 1815, the only legitimate child of the poet Lord Byron and his wife Anne Isabella Milbanke, whom her parents called Annabella and who later in life styled herself simply as Lady Noel Byron. Her parents had separated when she was five weeks old. Her father left England in April 1816 and never returned. He died in Greece in 1824, when Ada was eight, and he had very little direct role in her upbringing. Her mother, who had a serious interest in mathematics herself and who studied astronomy with Mary Fairfax Somerville as a teacher, decided that Ada would be protected from the dangerous, poetic tendencies her mother attributed to her father’s side of the family by being drilled in the rigorous subjects. Mathematics first. Logic next. Anything that demanded settled answers rather than beautiful fancies.

That program of education was unusual for the time. From early childhood she was tutored in arithmetic, then in geometry, then in calculus, and then in the harder parts of mechanics and astronomy. Mary Somerville, who was to become her friend and her bridge into Charles Babbage’s circle, was a mathematician and polymath of genuine distinction. Somerville translated Laplace’s Mechanique Celeste into English; her translation was the version of celestial mechanics most working British scientists used for a generation. When Ada met Somerville in 1831 or 1832, the meeting was not between an amateur and a dilettante but between a teenager already deeply read in mathematical subjects and one of the most respected mathematicians in Britain. Charles Babbage first met Ada Lovelace on 5 June 1833, when Somerville brought her to one of his gatherings in London. She was seventeen. He was forty-two.

What followed was a working relationship of nine years, off and on, in which Ada studied everything Charles Babbage could show her and a great deal he could not, because he had not yet worked it all out himself. She corresponded with him in the language of working mathematicians, not as a disciple or a tourist but as a serious student. The account of her as the Enchantress of Numbers, by which nickname Babbage addressed her in his letters, is not a piece of Victorian flattery. It is a record of how he saw her work. The letters discuss specific problems, including the long-running dispute over the size of the computation tables he was trying to compile, the complications of indexing in his notations, and the separate intellectual question of whether the engine could really be made arbitrary in its operation. This is the period that gives the 1843 notes their authority. They are the work of someone who had been working alongside the inventor for almost a decade.

In June 1835 Ada married William King, a member of the aristocracy and a decade her senior. He was created first Earl of Lovelace in 1838, and Ada accordingly became Countess of Lovelace, the title by which she is known to history. The marriage did not interrupt the intellectual work. Her husband was supportive, and the earl’s London and country houses gave her the space and the social position to continue as a working scholar. She had three children, in 1836, 1839 and 1841, of whom only the last two survived to adulthood; she died on 27 November 1852, at the age of thirty-six. The biography matters here only as background. It is worth saying so explicitly because the most common deflection from the work is the search for biographical triumph or tragedy. Her life was hard. Her life was short. The work survives it, and the work is what this essay is about.

Menabrea, Taylor’s Scientific Memoirs, and Notes A to G

The paper that Ada Lovelace is famous for did not start as her paper. It started as a French transcription of an Italian talk that an engineer named Luigi Federico Menabrea had given at a scientific gathering in Turin in 1842. Menabrea was a mathematician and a future prime minister of Italy; he had seen the Analytical Engine in Charles Babbage’s rooms and was commissioned to write up a public account of what he had been shown. He did a thorough job. His paper, Exposition des principes de la machine analytique de M. Charles Babbage, which appeared in the Bibliotheque universelle de Geneve in 1842, ran about twenty pages of dense French exposition covering the engine’s architecture, the operations of the mill and store, the punched card flow, and the kinds of computation the engine could in principle handle. It was the best short description of the engine in any language, and it was the immediate cause of the English translation that followed.

Charles Babbage wanted an English version of Menabrea’s paper, and he had a specific reason. He had been frustrated for years by being unable to interest British scientific readers in what he was building. Menabrea had managed to put a coherent summary into French. A good English translation, with the right British author’s name attached, would reach the audience Charles Babbage wanted to reach. He asked his friend Charles Wheatstone, who had handled scientific translations before, to find a translator. Wheatstone’s suggestion, by the family account and the family tradition, was Ada Lovelace. Ada had been working on her own ideas about the engine for some time, including a set of tables she had drafted for computing Bernoulli numbers; she had been corresponding with Charles Babbage about exactly the territory the notes would later cover. She was the right person for the job in 1843 because she had spent the previous decade reading everything on the topic that was not yet in print.

The translation, with Ada Lovelace’s notes, appeared in the September 1843 issue of Scientific Memoirs, a London journal that published selected translations of important continental papers. It was published under the initials A.A.L., in keeping with the journal’s practice of concealing authorship behind a veil. It is the reason we can no longer tell the joke that she tried to keep her authorship quiet. She did not; the journal did, for her. The volume, edited by Richard Taylor, ran to roughly forty pages, of which the Menabrea text is around fourteen pages and the seven signed notes take up roughly three times as much space. That ratio, more than any other single fact, is the case for the seriousness of her contribution. A routine translation does not run six times the length of the original. A translation with sustained commentary, with new examples, with a separate program, and with a sustained argument about the limits of the machine, runs that length because the commentary is doing something the original was not.

The seven notes were signed A through G, ranging from layout and notation to the theoretical limits of the machine. Note A lays out the conceptual foundations, including the distinction between the mechanical aspect and the analytical or logical aspect of the subject. That separation is the most durable move she made. The mechanical aspect is the cogs, the levers, the stores, the punched cards in their physical form. The analytical aspect is the abstract account of what those parts compute, the rules they follow, the operations they can compose, and the criteria by which we say a machine is doing what we mean rather than what the lever physically does. Note B discusses the cost of construction. Note C discusses notation. Note D goes through specific mathematical examples. Notes E, F and G are increasingly technical: a discussion of sample programs, a derivation of a result about the limits of predictability of the machine in a particular case, and the famous Bernoulli number computation that has been called the first published program.

The note often called the first program is the program in Note G for computing Bernoulli numbers by way of the Analytical Engine. The program uses a recursive formulation, expresses it in the working notation Ada Lovelace had developed with Charles Babbage for the engine, and lays out the pattern of cards and operations the machine would have followed if it had been built. Note that conditional, because we are still inside the design-not-experiment condition. The program is on paper, not punched, and is not run. What matters is whether Ada Lovelace worked it out from scratch or transcribed a program Charles Babbage had already worked out himself. That is contested. She says, in the note, that she derived the program from her own thinking about the recurrence relations, working alongside her translation of the relevant parts of Menabrea. Charles Babbage, in later life, said that he had worked out the same recurrence earlier and could not recall whether he had shown her his notes. The point is undecidable on the available evidence.

The notes were and are a piece of conceptual exposition first and a piece of programming second. The argument of Note A is that the engine, because it operates on symbols according to rules rather than on numbers according to arithmetic, is not limited to numerical work. A music composer, to use the example she returns to several times, can encode a sequence of pitches, durations and intensities as symbolic relationships and let the engine produce the relationship between them in the same way that a Jacquard loom produces the relationship between warp and weft in a weave of a flower. The loom does not know what a flower is; the Jacquard chain encodes the pattern and the loom executes it. The engine does not know what a melody is; the chain of cards encodes the pattern and the engine executes it. The boundary of the loom is set by what the loom can weave, not by what we can imagine. The boundary of the Analytical Engine, by analogy, is set by what we can encode.

What she claimed, and what is hers

The single most quoted claim in Note A is that the Analytical Engine weaves algebraic patterns just as the Jacquard loom weaves flowers and leaves. The full sentence runs longer and the context is more carefully argued than the postcard version suggests. The argument she is making is not that the engine can produce music. It is that there is no in-principle reason why it cannot. If we accept that a set of symbols representing pitch, duration and intensity can be encoded as numbers, and that the operations of the engine on those numbers correspond to the operations a composer wants between the symbols, then the engine can produce a particular melodic figure from the relationships in its inputs without ever having heard a note. Whether the music is any good, she explicitly says, is a separate question. She does not claim the engine produces good music. She claims it processes non-numerical structure. That distinction is the one we keep losing when we compress her claim into a slogan.

It is a striking claim. It is also a contestable claim, and the contest is worth mapping carefully. We can separate at least four distinct theses that get conflated in popular writing about Ada Lovelace. The first is the symbolic thesis, the broadest, that a general-purpose machine can act on things other than numbers. The second is the musical thesis, the application of the symbolic thesis to the specific case of a melody. The third is the programming thesis, that she wrote the first program. The fourth is the priority thesis, that she was first to articulate what later became a core principle of computing. The symbolic thesis is mostly uncontested. The musical thesis is uncategorically hers: no one we know of made that point before her. The programming thesis is contested, and the priority thesis is contested. Which of these she actually claimed has to be argued with care.

The programming thesis in particular deserves a careful walk through what we now know. Charles Babbage had been writing programs for the Analytical Engine since at least 1837, and possibly earlier; he left fragments of notes, schemes of cards, traces of working out specific recurrences, in his papers, and at least one routine he is known to have been working on is in documents that predate Ada Lovelace’s 1843 paper by several years. The historians who have reconstructed this in detail include Allan Bromley, whose work in the late 1980s identified and analysed a number of these fragments; Doron Swade, who curated the 1991 reconstruction of Difference Engine Number 2 at the Science Museum in London; Dorothy Stein, whose 1985 book Ada: A True and Visionary Scientist? argued that the standard romantic account did not survive the documentary record; Lily Linnaeus Kim, whose analyses of Babbage’s Bernoulli work identified multiple earlier schemes for the same computation; and Bruce Collier and Franklin Toole, who did similar work. Stephen Wolfram has published work that surveys these fragments and includes a search for earlier programs.

One specific historical episode, often cited in putting pressure on the priority thesis, is the analysis of Charles Babbage’s own working notes for computing Bernoulli numbers. Kim and others analysed his 1837 and 1838 schemes in the working notation; they identified that his earliest versions had flaws in the way they handled the recurrence, and that Charles Babbage had reworked the approach in later fragments without correcting all of the earlier ones. What this kind of analysis demonstrates is that Charles Babbage was doing detailed program design, in the same notation, several years before Ada Lovelace published the cleaned-up version of Note G. It does not demonstrate that she copied her program from his working notes. It demonstrates that the engineering problem was the same one, that the working language was shared, and that the shortest route to a working Bernoulli routine in this notation had a small number of plausible right answers. Both of them reached a working formulation. Neither of them has air-tight priority over the other.

What is genuinely hers, on the documentary record, is the conceptual frame and the public exposition. She was the first person to lay out, in print, the case that a general-purpose machine acts on symbols rather than numbers. She was the first person to use the Jacquard loom analogy with the level of care she did, and to spell out what we would now call domain mapping in a published note on an analytical engine. She was one of a small number of people who could read Charles Babbage’s plan in 1843 and write coherently about it. None of those accomplishments require her to have been the first programmer. All of them are required to understand why she is worth reading anyway. The strongest claim in the modern literature, including the work of Doron Swade, is that her importance lies in her recognition of the engine as a general-purpose programmable device. That is a much smaller claim than the postcard, but a much more defensible one.

It is also worth noticing what she did not claim. She did not claim she had invented the machine. She did not claim she had invented the Jacquard chain or the method of finite differences or the architecture of the mill and the store. She did not claim she was the first to think of any one of those pieces, and the modesty of the notes, relative to the claims later made for them, is part of what makes them readable. Charles Babbage, by 1843, was already a divisive figure in British science, in part because of his decades-long disputes over funding, his quarrels with his machinists, and his tendency to treat his unfinished projects as proof of conspiracy against him. Ada Lovelace’s prose does not lean on his reputation or on his polemics. It depends on what the design will do if it is correctly understood. That corrective is part of the lasting achievement.

There is also a small historical correction to be made about Note G. The program for computing Bernoulli numbers does correspond, in its broad structure, to one of Charles Babbage’s working schemes. The particulars, however, are not identical, and the differences are revealing. The Lovelace program, as she herself emphasises, is set up as a recursive routine that calls itself in handling the recurrence at successive indices, using the mill and store as a working pair in a particular way. The list of operations in the program as published is detailed enough to be checked against the working notation she and Charles Babbage had developed together. A reasonable reading is that she wrote it herself in that notation, that she wrote it in collaboration rather than transcription, and that the program’s interest for us today is not as a first piece of code in history but as an unusually explicit formulation of what a general-purpose computer program is.

The objection, and the afterlives

The most quotable line in the notes is the objection. Ada Lovelace writes, in Note A, that the Analytical Engine has no pretensions whatever to originate anything; that it can do whatever we know how to order it to do; and that it can follow, can never overtake, the analytical work of the human species. The objection is principally a deflationary one: of a powerful machine, it says that the machine does not have ideas, and that the surprise in a machine that surprises us is in the rules rather than in the metal. The objection gets cited now as a remark on artificial intelligence before there was artificial intelligence. We rarely notice that in 1843 it was a remark on something specific: a correction of what Charles Babbage’s friends and Charles Babbage himself had been hinting in the public print about machine ingenuity. She was correcting the hype before the hype was fully heard.

Alan Turing picked up the objection in 1950, in his paper Computing Machinery and Intelligence, and named it. He called it Lady Lovelace’s Objection, and recorded it as the claim that a machine cannot originate or surprise us. Turing’s response to it, in the same paper, was to point out that machines do surprise him. The objection has stayed current since for two reasons. The first is that it names a genuine problem in the field: when a machine does something we did not expect, are we surprised by the machine, or by what we have learned to see in the machine? The second is that, read closely, the objection is more precise than the modern debate allows. Ada Lovelace did not say machines cannot surprise us; she said machines do not originate anything, which is a stronger claim about the locus of the originality. Reading her as a forerunner of AI caution misses the precision of what she said. The analysis-of-computation reading finds what she said. Both readings are defensible. The second is closer to the source.

The downstream history is its own argument and worth running quickly. The United States Department of Defense, in the late 1970s, was looking for a single high-level programming language to standardise the embedded systems work in its arsenal. The growing complexity of software in aircraft, missiles, communications platforms, and command-and-control systems had become a serious problem, with much of the code in existing projects difficult to read, verify, and hand on between teams. A requirement for the new language was unusually strict: the code had to be readable by whoever had to maintain it later, the program was supposed to be self-documenting to a high degree, the language needed clear mathematical semantics, and the software was supposed to outlive the people who wrote it. The choice that came out of this search was the Ada programming language, designed by a team led by Jean Ichbiah, partly derived from earlier French work on high-level languages, and named after Ada Lovelace. The Department’s formal standard, MIL-STD-1815, took the year 1815, her birth year, as its number. The standard was adopted in 1980.

The afterlives that did not involve code run further back into the culture. The British Computer Society established the Lovelace Medal in 1998 as one of its principal honours. Ada Lovelace Day was founded in the United Kingdom in 2009 as a day to celebrate the contributions of women in science and technology; it is observed internationally now, with events and writing tied to the second Tuesday of October. In the United States, the Association for Women in Computing had earlier honoured the same tradition with the Augusta Ada Lovelace Award. These afterlives are part of what makes the argument hard to have cleanly. They have skewed the popular conversation toward a romantic version of her contribution that no careful historian would defend.

Two other pieces of the afterlives are worth keeping in view. In 2015, the bicentenary of her birth, the United Kingdom had its first formal national recognition of Ada Lovelace as a public intellectual figure, with policy statements, museum exhibitions, the Royal Mint issuing commemorative coinage, and academic and popular writing bringing the contested parts of her story into wider view. The bicentenary had the unusual effect of being more honest than the centennial had been; scholars who have worked on the surviving papers in the last thirty years had had a generation to refine the story, and the bicentenary forced the public version to absorb at least some of that work. New public recognition, including a plaque refurbishment and a statue in central London, accompanied the year. Each piece is, in itself, a small defence of the argument that it matters, on a question-by-question basis, where the line is drawn between what she actually did and what the popular version claims for her.

Anything that follows this essay has to be drawn carefully between work and myth. The work is her recognition, in print, of the Analytical Engine as a general-purpose machine that acts on symbols rather than on numbers. That recognition carries a specific content: it tells the reader that the bounds of the machine are set by what we can express in its notation, rather than by what its parts physically do. It tells the reader that the Jacquard chain is, in principle, a general convention for symbol-input. The myth is the first-programmer postcard, which places her in 1843 as the founder of an industry that did not exist, leaning on work that we now know was done by Charles Babbage three to six years before. Both the work and the myth are now part of her afterlife. The argument is worth having because the work is genuinely there, and the myth is genuinely mistaken, and the two are easy to confuse.

The argument is worth having for a separate reason too. It is a test case in how we read the history of a field that did not exist when its foundational documents were written. Computing, as a discipline, takes itself to have started with Charles Babbage and Ada Lovelace, with Alan Turing in the 1930s and 1940s, and with the First Generation of electronic computers in the 1940s and 1950s. The first of those starts, the one in which Ada Lovelace’s notes appear, is also the one in which there is no computing community to receive the founding documents; there is only a handful of readers, most of whom lost interest in 1844. Reading the documents well, under that constraint, requires more care than any of the later starts. The reader has to reconstruct what each founding figure was reacting to, what they could assume in their audience, and what they had to spell out. That kind of careful reading is exactly what the postcard version refuses to do.

References

  1. Ada Lovelace - Wikipedia
  2. Analytical Engine - Wikipedia
  3. Charles Babbage - Wikipedia
  4. Difference Engine - Wikipedia
  5. Bernoulli Number - Wikipedia
  6. Luigi Menabrea - Wikipedia
  7. Punched Card - Wikipedia
  8. Scientific Memoirs - Wikipedia
  9. Ada Programming Language - Wikipedia
  10. Alan Turing - Wikipedia
  11. Doron Swade - Wikipedia
  12. Menabrea’s Article - Wikipedia
  13. Ada Lovelace Biography - O’Connor, John J. and Robertson, Edmund F., MacTutor History of Mathematics Archive, University of St Andrews
  14. Sketch of the Analytical Engine, with notes by the translator - Menabrea, Luigi Federico, and Lovelace, Ada, Scientific Memoirs vol. 3, London, 1843