
Ada Lovelace and the Fight over the First Programmer
Ada Lovelace's 1843 Note G is called the first computer program. Historians point out Babbage had written program-like sequences years earlier.
TL;DR: Ada Lovelace is often called the first computer programmer. In 1843 she published a set of notes on Charles Babbage's Analytical Engine, and the last of them, Note G, contains a step-by-step procedure for computing Bernoulli numbers that is often called the first computer program. Historians including Allan Bromley and Doron Swade point out that Babbage had already written program-like sequences for the same machine in the 1830s. The fork is between publishing and writing: Note G is a published, worked program for a general-purpose computer, although Luigi Menabrea's 1842 paper had already printed tables of operations for the same engine, and the first person to write any instruction sequence for such a machine is probably Babbage. The engine was never completed, so the program never ran on it, which is part of why the argument has lasted so long.
A translation that grew three times longer
Charles Babbage spent much of his life designing calculating machines he never finished. The most ambitious was the Analytical Engine, conceived in the 1830s. Unlike his earlier Difference Engine, which was built to compute one family of tables, the Analytical Engine was designed to follow instructions supplied on punched cards, borrowed from the Jacquard loom. It had a store for numbers and a mill for arithmetic, and it could repeat steps and choose between them. In modern terms, it was a general-purpose computer on paper.
In 1842 the Italian engineer Luigi Menabrea published a paper in French describing the machine, based on a series of seminars Babbage had given in Turin in 1840. Ada Lovelace, a mathematically trained aristocrat who had known Babbage for years, translated it into English. At Babbage's suggestion she added her own notes. They ended up roughly three times the length of the original paper and were published in 1843 under her initials, A.A.L.
The notes are labeled A to G. Most explain what the machine could do and how it differed from a calculator. Note G works through a complete example: a table setting out each operation the engine would perform, in order, to compute a Bernoulli number, with the variables each step used and changed. That table is the artifact often called the first computer program.
What makes the table more than a worked sum is its structure. It assigns numbers to named storage locations, sets out the order in which the mill should operate on them, and shows where a group of operations would be repeated rather than written out again. Those are the ingredients later programmers would recognize as variables, sequence and loops. The notes also explain that operation cards determine only the succession of operations, that separate cards direct which columns those operations draw on and write to, and that the same operations could be performed on different numerical values once those values were set on the machine. None of this was tested on a machine, because the machine did not exist, but the logic is laid out precisely enough that modern readers have traced it line by line.
The challenge from Babbage's own papers
The case against calling Lovelace the first programmer rests on work by historians who studied Babbage's papers, and some of them have also questioned her knowledge or background.
Allan Bromley, an Australian computer scientist who studied Babbage's manuscripts in detail, showed in the early 1980s that Babbage had written out sequences of operations for the Analytical Engine dated between 1837 and 1840. These were worked examples of the machine solving mathematical problems, laid out step by step. Doron Swade, who led the Science Museum project that built Babbage's Difference Engine No. 2, whose calculating section was finished in 1991, has made a similar argument: the procedures in Note G draw on a way of working that Babbage had already developed, and some of the program-like material predates Lovelace's involvement.
There is also a question of authorship within Note G. Babbage wrote in his 1864 autobiography that he had suggested several illustrations but that the selection was entirely hers. He added that so was the algebraic working out of the different problems, except for the Bernoulli numbers, which he had offered to do to save her the trouble; she sent that part back for an amendment, having detected a grave mistake he had made in the process. Correspondence between the two shows a genuine working partnership, with drafts moving back and forth. Exactly who contributed which step is not settled by the surviving papers.
The definitional fork: published or written
The dispute turns on what "first programmer" is supposed to mean.
If it means the first person to write down a sequence of instructions for a general-purpose computing machine, Babbage has the stronger claim. His 1830s sequences come first, and he designed the machine the instructions were for.
If it means the first person to publish a program for such a machine, the answer is less tidy. Lovelace's 1843 Note G is the example often called the first computer program, but Menabrea's 1842 paper had already printed tables of operations for the engine, with commentary. Note G is a longer worked example, and Bromley notes that its program requires a nested-loop structure. Babbage's sequences survive in his private papers, and Bromley points out that Lovelace's notes incorporate several of them; her table was printed, with commentary, for anyone to read.
There is a third reading that her defenders emphasize. Lovelace's notes did something Babbage's working papers did not: they described what a programmable machine could become. She argued that the engine might act on other things besides numbers, if objects were found whose mutual fundamental relations could be expressed by those of the abstract science of operations and which could also be adapted to the engine's operating notation and mechanism. She suggested it might one day compose elaborate music if the rules of harmony were expressed in its terms. She called her approach "poetical science", a phrase from her letters that captures her mix of imagination and rigor. On that reading, she was the first person to understand the program as a general idea rather than a calculation.
Recent scholarship has pushed back against both extremes. A 2017 study of her mathematical correspondence with Augustus De Morgan, by Christopher Hollings, Ursula Martin and Adrian Rice, concluded that by the beginning of 1842 she had acquired a solid grounding in several areas of what was then university-level mathematics, and it challenged earlier judgments impugning her competence to contribute to the 1843 paper. It does not erase the earlier Babbage sequences.
The first bug, arguably
Note G carries a footnote of its own in computing folklore. Readers who have traced the table step by step have found an error in one of the operations, in which two variables appear in the wrong order. If the engine had run the program exactly as printed, it would have produced a wrong result.
Whether the error began with Lovelace, Babbage or the printer is not clear from the printed table alone. It is still a fitting detail: the program in Note G was printed with an error in it.
A short timeline of the early programs
| Date | Milestone | What it established |
|---|---|---|
| 1830s | Babbage designs the Analytical Engine and writes worked operation sequences | A general-purpose machine on paper, with program-like examples in private notes |
| 1840 | Babbage lectures on the engine in Turin | The design reaches a wider scientific audience |
| 1842 | Menabrea publishes his paper in French | A published account of the engine's principles, with tables of operations |
| 1843 | Lovelace's translation with Notes A to G appears | A worked, explained Bernoulli program, in Note G |
| 1871 | Babbage dies with the engine unbuilt | The machine is never completed and the program never runs on it |
The table stops in the nineteenth century; later claims about the first programmers of electronic computers are separate stories.
Why the argument keeps going
The debate over Lovelace has lasted because both sides are partly right and because the stakes became symbolic. She is an emblem for women in computing, and challenges to her status are sometimes read as attacks on that symbolism, while celebrations of her are sometimes read as ignoring Babbage's documented work. The evidence supports neither caricature.
What the papers show is a collaboration in which Babbage built the machine in theory and wrote the earliest instruction sequences, and Lovelace published the worked, explained program of Note G and articulated what programmable machines might do. Calling one of them the first programmer depends on which of those achievements you think the title describes. The honest answer is that Babbage and Lovelace each have a claim to it in a different sense, and that none of the early programs for the engine was ever run by the machine it was written for.