In 1842, the Italian mathematician Luigi Menabrea published a paper in French describing Charles Babbage's Analytical Engine. The machine did not exist, and has only been drawn in correspondence and technical diagrams. The British government had already walked away that same year after giving Babbage £17,000 for the earlier Difference Engine — the largest scientific grant in British history at the time. The Analytical Engine will never be publicly funded. Lovelace had no grant, no position, no institution. She was doing translation work. Someone needed to translate the paper into English. Ada Lovelace translated it, and in the process, rewrote it. Note G, the last of the seven appendices she added,, contains the first published algorithm designed for execution by a machine.
Babbage had described what the Engine could do in principle. Lovelace specified what it would actually do, step by step. Named variables. Sequenced operations. A loop that repeated until a condition was met. A stop. She counted how many times each operation would execute. She caught an error in Babbage's own earlier calculation.
Mathematics logic and French: Ada Lovelace had been educated for precisely this, against every convention of the time. Her mother, Anne Milbanke, had designed her curriculum with deliberate severity: no verse in the house and no romantic disorder. Lord Byron, his father, had abandoned the family when Ada was a month old. Ada was always a asick child and was spending entire days in the world of mathematics.
Her mother's curriculum ultimately bear fruits, but in the wrong direction. Ada Lovelace grew up to describe her own thinking as poetical science — a phrase her mother would have read as a diagnosis of exactly the contamination she was trying to prevent. In 1833, at the age of 17, she met Babbage who was already imagine complex mathematical machines for decades. Most visitors to his Difference Engine saw a curiosity. She saw a question: what else could it do?
Later on, Babbage claimed he had written Note G himself and that she had merely transcribed it. Modern scholarship, reading the letters carefully, disagrees. The handwriting, the corrections, the sequence of drafts — all evidence points to Ada Lovelace. She died in 1852 at thirty-six, of uterine cancer, the same age as Byron. Her work was not rediscovered until 1953, when B.V. Bowden republished it, as the first real machines were already running.
The ideas she had specified — variables, operations, loops, conditionals — had been independently reinvented and implemented in the intervening century without anyone knowing she had been there first. The programming language named after her, Ada, was commissioned by the U.S. Department of Defense in 1980 — the largest software procurement in history at the time, intended to consolidate hundreds of incompatible languages running across US military systems.
Before the first operation, Lovelace assigns names to memory. Each V is a column in the Engine's store — a slot that holds a number and can be overwritten. V₁ and V₂ are constants; V₃ holds the current index; the rest will hold intermediate values. Naming memory before using it is so fundamental that we no longer notice it. Every variable in every program written since inherits this idea.
Each operation takes one or two inputs, performs an arithmetic step, and writes the result to a named variable. The arrow is assignment — the variable on the right becomes the result of what is on the left. After Op. 3, V₄ no longer holds what it held before: it holds a ratio. The machine has moved from one state to the next. This is what computation is: a sequence of state changes, written down in advance.
The algorithm reaches back and uses Bernoulli numbers already computed — B₀ and B₁ — as inputs to the next calculation. Each new Bernoulli number is defined in terms of all the ones before it. Lovelace understood that the Engine could store previous results and use them again. She described this as the machine's ability to eat its own output — a strange, self-referential power that sets the Analytical Engine apart from every calculator before it.
The same sequence of operations recurs, each time with a smaller index and a fresh set of known Bernoulli values. Lovelace noted this explicitly in the diagram: the barrel of the Engine (its control mechanism) would need to rotate through the same cycle multiple times. She counted the rotations. She worked out how many times each operation would execute before the result was complete. She was reasoning, for the first time in print, about what we now call a loop.
The algorithm branches. If there are more terms to compute, it loops back. If the count has reached zero, it performs the final calculation and stops. This is the conditional — the machine takes different paths depending on intermediate results. Lovelace did not have the word for it. She drew arrows. The arrows carried the same logic that every if-statement in every program since then has carried: go here if true, go there if false.