The short answer is: Ada Lovelace can reasonably be described as the author of the first published computer program in a modern sense, but not as the first person to write any program for the Analytical Engine. The distinction matters because the surviving documents show two things at once. In 1843, Lovelace’s Note G publicly presented a detailed sequence of operations for calculating Bernoulli numbers on the machine designed by Charles Babbage. But Babbage’s archive preserves dozens of earlier program “traces” produced between 1836 and 1840.
That is why the sentence “Ada Lovelace was the first programmer” works as historical shorthand but becomes misleading when treated as an unqualified fact. The real story is more interesting: Lovelace published an exceptionally complete explanation of how a general-purpose machine could carry out a sequence of operations, while Babbage had already been writing and testing procedures for the same architecture on paper. The authorship of the Bernoulli-number routine was collaborative as well, rather than the isolated creation of either one of them.
What Note G was
In 1842, Italian engineer Luigi Federico Menabrea published a French description of the Analytical Engine after attending Babbage’s presentations in Turin. Ada Lovelace translated the paper into English and, at Babbage’s suggestion, added a series of her own notes, labeled A through G. The translation and notes appeared in 1843 in volume 3 of Scientific Memoirs. The original publication can be consulted in digital editions at Project Gutenberg and Fourmilab.
The last of those notes, Note G, uses Bernoulli numbers as an example complicated enough to demonstrate the Analytical Engine’s capabilities. The text does not merely present a formula. It describes which values would be stored in the machine’s columns, which operations would be performed, the order in which intermediate results would be reused, and how the procedure could continue successively to obtain further Bernoulli numbers.
Note G itself explains that its diagram and table show the successive changes in the machine’s columns during the calculation. It also states that after obtaining one Bernoulli number, the machine could reuse it as data for the next one. This level of detail is why Note G is so often called “the first computer program.”
What Note G proves — and what it does not prove
Note G is direct evidence that Lovelace published, in 1843, a highly detailed operational specification for a general-purpose machine that still existed mainly on paper. It displays a way of thinking close to what we now call programming: separating data, working variables, results, operation sequence, and repetition.
But Note G does not prove that nobody before Lovelace had written programmable instructions for the Analytical Engine. The Babbage Papers at the Science Museum Group catalogue 27 sets of notations, dated from 1836 to 15 August 1840, which the museum describes as program “walk throughs” or “traces” for the Analytical Engine. Those documents predate Lovelace’s publication by several years.
The archive includes, for example, a notation dated 23 December 1837 for determining a variable from three simultaneous equations. The document is attributed to Charles Babbage and belongs to the Analytical Engine calculation series. So if the question is “who first wrote any sequence of operations for this machine?”, the surviving papers favor Babbage, not Lovelace.
Why is Note G still called the first published program?
Because “program” is an anachronistic word applied to nineteenth-century documents, and different historians use different criteria. Some of Babbage’s earlier sequences are short, experimental, or framed as traces of how the machine would operate. Note G, by contrast, was published, is extensive, connects operations to variables and intermediate results, and presents an iterative procedure for a non-trivial mathematical task.
There is a second complication: Menabrea’s own paper, published in French in 1842, already contained operation tables for examples such as solving equations. The Science Museum catalogue notes that nearly all examples discussed in the Menabrea/Lovelace paper derive from earlier Babbage notations. If any operational table counts as a “published program,” then even the phrase “first published program” must be used carefully.
| Claim | What the documentation supports |
|---|---|
| “Ada was the first person to write a program for the Analytical Engine.” | No. Babbage’s papers preserve programs or program traces from 1836–1840. |
| “Note G is the first published computer program.” | It is a defensible formulation, but it depends on the definition of program. It is one of the earliest published examples that is both extensive and sophisticated. |
| “Ada created the Bernoulli-number calculation entirely on her own.” | No. The documentation points to collaboration with Babbage. |
| “Ada merely translated Menabrea.” | Also no. Her notes are much longer than the translation and contain her own analysis of the Analytical Engine. |
Who wrote the Bernoulli-number routine?
The answer most faithful to the sources is: Lovelace and Babbage contributed in different ways. In Passages from the Life of a Philosopher, published in 1864, Babbage recalled that he suggested several possible examples for the notes, but that Lovelace made the selection. He also said that the algebraic working out of the problems was hers with one exception: the Bernoulli-number calculation, which he offered to work out to save her the trouble. According to Babbage himself, Lovelace sent that calculation back for correction after detecting “a grave mistake” in the process. The passage is available in the digital edition of Passages from the Life of a Philosopher.
That account blocks two opposite simplifications. It is incorrect to say Babbage had no role in the Bernoulli routine: he explicitly said he had done its algebraic working. But it is also weak to conclude that Lovelace merely copied somebody else’s work. Note G organizes the calculation into a detailed representation of the machine’s execution, and Babbage credited the choice and development of the notes to her while also recording that she found an error in his process.
Computing historian Thomas J. Misa summarizes the issue well in Charles Babbage, Ada Lovelace, and the Bernoulli Numbers: credit between the two is not a zero-sum game. There are definitional problems in calling Lovelace the “first programmer,” but there is evidence for crediting her with an elemental sequence of instructions — that is, an algorithm — for calculating the Bernoulli series.
Is Note G a program or only an execution trace?
This is one of the technical points in the controversy. In modern computing, a program is usually a specification of instructions that can run on different data, while an execution trace records the sequence of states produced in a particular run. The large table in Note G has much in common with a trace: it shows what happens to the variables step by step when the machine calculates a specific case.
But reducing Note G to only that also misses part of the document. The surrounding text explains how the machine could calculate Bernoulli numbers successively, reusing earlier results and repeating the procedure for later values. The table is therefore a concrete representation of one execution, while the explanation describes a general computational rule. This is why contemporary studies disagree more about the label than about the document’s significance.
What Babbage had already programmed
The material preserved by the Science Museum shows that Babbage did not wait for the machine to be built before thinking about software. His notebooks and notation sheets explore extended calculations, equation solving, and methods for controlling the sequence of Analytical Engine operations. The museum describes the 27 sets as examples of how arithmetic micro-operations could be combined into larger calculations.
Those documents also help explain why the debate cannot be reduced to “who had the idea first.” Babbage was the architect of the machine and naturally developed methods for making it operate. Lovelace entered the project later and transformed part of that knowledge into a published, systematic, and conceptually ambitious exposition. Each person’s work provides context for the other’s.
Lovelace’s contribution is larger than the title “first programmer”
Making all of Lovelace’s importance depend on the question “was she first?” obscures the most visionary part of her notes. In Note A, she distinguishes the Analytical Engine from a mere calculator and observes that the machine might act upon things other than numbers if the relationships among those objects could be expressed through symbols and rules. As an example, she imagines musical relations being encoded so that the machine could produce compositions.
This passage matters because it treats the machine as a general manipulator of representations, not merely an apparatus for producing numerical tables. In another famous formulation, Lovelace compares the Analytical Engine to the Jacquard loom: just as the loom weaves flowers and leaves by following punched cards, the machine could “weave algebraical patterns.”
She was also cautious about the machine’s limits. At the opening of Note G, she wrote that the Analytical Engine had no claim to “originate” anything on its own and would do whatever we knew how to order it to perform. Centuries later, this passage still appears in discussions of automation and artificial intelligence, although its original context was a mechanical calculating machine, not machine-learning systems.
Verdict: was Ada Lovelace the first programmer?
If “first programmer” means the earliest person for whom we have records of writing any program for the Analytical Engine, the safest answer is no: Babbage left earlier notations. If it means the author of the first major published example of programming for a general-purpose machine, the title is defensible and explains why it became established.
The most precise conclusion is that Ada Lovelace was one of the intellectual founders of programming: in 1843 she published a detailed explanation of how the Analytical Engine could execute an algorithm for Bernoulli numbers, collaborated closely with Babbage, and articulated a view of computing that went beyond arithmetic. Babbage, for his part, had already produced programs and execution traces years earlier. The documentary history does not require a single hero; it shows programming emerging from the interaction of machine design, notation, mathematics, and explanation.
Main sources
- Menabrea/Lovelace, Sketch of the Analytical Engine, including Notes A–G (1843).
- Science Museum Group, “Notations of calculations for the Analytical Engine”.
- Science Museum Group, Babbage notation dated 23 December 1837.
- Charles Babbage, Passages from the Life of a Philosopher (1864).
- Thomas J. Misa, “Charles Babbage, Ada Lovelace, and the Bernoulli Numbers”.





