In 1842, the Italian mathematician Luigi Menabrea published a paper in French describing Charles Babbage's Analytical Engine — a machine that did not exist, drawn in correspondence and technical diagrams, never funded to completion. Someone needed to translate the paper into English. Ada Lovelace translated it, then rewrote it. The seven appendices she added, labeled A through G, are three times the length of the original. Note G, the last, 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. She was doing, for the first time in print, what we now call programming — for a machine that ran on steam and punched cards, that her collaborator never finished building, in a decade that had no word for what she was doing.
She 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, no romantic disorder, mathematics and logic and French. Lord Byron had abandoned the family when Ada was a month old. Anne's response was curriculum. It worked, in the wrong direction. Ada Lovelace grew up to describe her own thinking as poetical science — a phrase that would have horrified her mother — and to treat mathematics as something you could inhabit, not merely use. She met Babbage in 1833, at seventeen. Most visitors to his Difference Engine saw a curiosity. She saw a question: what else could it do?
Babbage later 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 — the evidence points to 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. The name was a decision.
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.