Science

Ada Lovelace and the First Program

Byron's daughter wrote instructions for a computer that didn't exist — a century before computing began.

The most celebrated computer program of the nineteenth century was written for a machine that was never built, by a countess whose mother had drilled her in mathematics specifically to suppress any resemblance to her father. The father was Lord Byron, the scandalous celebrity poet; he separated from his wife when their daughter Augusta Ada was weeks old, left England forever soon after, and died in Greece when she was eight. Lady Byron, herself mathematically inclined — Byron had teasingly called her the "Princess of Parallelograms" — raised Ada on a strict diet of logic and numbers, hoping to starve out the dangerous Byronic imagination. It half worked: Ada became a mathematician, but she described her approach as "poetical science," and imagination turned out to be exactly her contribution.

In June 1833, aged seventeen, Ada was introduced at a London party to Charles Babbage, the irascible polymath then famous for his Difference Engine, a hulking mechanical calculator designed to compute mathematical tables. Ada was captivated by the demonstration piece in his drawing room, and a lasting intellectual friendship began. Her education continued under serious mentors, including the scientist Mary Somerville — one of the most respected scientific minds of the era — and the logician Augustus De Morgan, who tutored her by correspondence and rated her mathematical potential highly. In 1835 she married William King, who was soon elevated to Earl of Lovelace, making her Ada, Countess of Lovelace.

The Analytical Engine

By then Babbage had moved on to something far stranger than the Difference Engine: the Analytical Engine, a design for a general-purpose, programmable mechanical computer. It had, in modern terms, a memory (the "store"), a processor (the "mill"), and input via punched cards — an idea borrowed directly from the Jacquard loom, which used chains of punched cards to weave elaborate patterns in fabric. The British government, having sunk a fortune into the unfinished Difference Engine, declined to fund it, and the Analytical Engine existed only on paper.

In 1840 Babbage lectured about the machine in Turin, and a young Italian engineer, Luigi Menabrea — later a prime minister of Italy — wrote up the lectures in a French paper. Ada translated it into English, and when Babbage asked why she hadn't written an original piece, the answer became the Notes: her own commentary, published in 1843 under the initials A.A.L., which ran to roughly three times the length of the paper it accompanied.

The Notes, labelled A through G, are why she is remembered. Note G contains a detailed, step-by-step table of operations by which the Analytical Engine could compute the Bernoulli numbers — a notoriously fiddly sequence from number theory. That table is widely described as the first published computer program: an algorithm expressed as an ordered sequence of machine operations, complete with a loop-like repetition of steps. Historians debate how to divide credit — Babbage had sketched sequences of operations for the machine before, and he helped with the mathematics — but the published program, and the corrections she fought over with Babbage, appeared under her initials.

Seeing further than the inventor

Her deeper legacy is a conceptual leap that even Babbage, focused on number-crunching, did not make so clearly. Ada saw that the machine's real subject was not arithmetic but symbols. If relationships between musical pitches could be expressed in its notation, she wrote, the engine "might compose elaborate and scientific pieces of music of any degree of complexity or extent." Her most quoted line captures it: "The Analytical Engine weaves algebraical patterns just as the Jacquard-loom weaves flowers and leaves." She also issued a famous caution — the engine could only do "whatever we know how to order it to perform," originating nothing itself. A century later Alan Turing took that claim seriously enough to name it "Lady Lovelace's objection" and argue against it in his landmark 1950 paper on machine intelligence.

Her later life was short and troubled: chronic illness, opium prescribed as medicine, and gambling losses on horses. She died of cancer in 1852 at thirty-six — the same age at which her father had died — and at her request was buried beside Byron, the parent she never knew, at Hucknall in Nottinghamshire. Recognition came slowly, then emphatically. In 1980 the US Department of Defense named its new programming language Ada; the language's military standard number, MIL-STD-1815, is her birth year. The second Tuesday of every October is now marked as Ada Lovelace Day, celebrating women in science and technology.

Quiz nuggets

  • Ada Lovelace was the daughter of the poet Lord Byron, who left when she was weeks old.
  • Her 1843 Notes on the Analytical Engine included a method for computing Bernoulli numbers — often called the first published computer program.
  • Babbage's Analytical Engine took its punched-card input idea from the Jacquard weaving loom.
  • Turing dubbed her claim that machines originate nothing "Lady Lovelace's objection" in 1950.
  • The Ada programming language (1980) carries the standard number MIL-STD-1815, her birth year.

Written from public sources and not individually checked — worth confirming before you stake a pint on it.