Neomano
ES
← Back to home
History·Science & Tech·Curiosities··5 min read

Ada Lovelace and the First Program Never Run

In 1843 Ada Lovelace wrote history's first algorithm for a machine that was never built. This is the story of the first computer program, a century early.

Ada Lovelace and the First Program Never Run

Some programs fail, some crash, and some take forever to finish. But the first program in history met a stranger fate than any of them: it was never run. Not because of a bug, but because the computer it was written for was never built. It was drafted, in mathematical notation and on paper, by an Englishwoman named Ada Lovelace, almost a century before the first machine capable of running it existed.

The poet's daughter raised as a mathematician

Augusta Ada King, Countess of Lovelace, was born in London on 10 December 1815. She was the only legitimate child of the poet Lord Byron, the great romantic star of his age, and of the amateur mathematician Anne Isabella Milbanke. The marriage was brief: Byron left home when Ada was barely a month old and died when she was eight. Ada never knew him.

Her mother, fearful that the girl might inherit her father's «poetic» and turbulent temperament, deliberately raised her on mathematics and science, an unusual choice for a woman of the British aristocracy in the 19th century. In a way the plan backfired: Ada became a brilliant mathematician, but she never stopped looking at numbers with a poet's eye. She christened her own method «poetical science».

The machine Charles Babbage dreamed up

In 1833, aged seventeen, Ada met the mathematician and inventor Charles Babbage at a London soirée. Babbage showed her a working section of his Difference Engine, a huge brass mechanism designed to calculate mathematical tables without errors, and Ada was captivated. But what would truly change history was Babbage's next project: the Analytical Engine.

The Analytical Engine, conceived from 1837 onward, was no mere calculator. On paper, it was a general-purpose computer: it had a computing unit (which Babbage called «the mill»), a memory («the store»), and it was programmed using punched cards, borrowed from the Jacquard looms that wove complex patterns into silk. In principle it could solve any problem that could be expressed as a sequence of operations. But it was so ambitious and so expensive that it was never finished. Babbage died in 1871 without seeing his masterpiece run.

A translated article that became something far bigger

This is where Ada comes in. In 1842 the Italian engineer Luigi Menabrea published a paper in French describing the Analytical Engine, based on lectures Babbage had given in Turin. Ada, fluent in both French and mathematics, offered to translate it into English. Babbage then suggested she add some notes of her own.

What happened next is one of the loveliest paradoxes in the history of science: the translator's notes ended up being more than twice as long as the original article. Published in 1843 and signed only with her initials, «A.A.L.», those seven notes —labelled A through G— contain the ideas for which we remember Ada Lovelace today.

Note G: the first algorithm

The most famous is the last, Note G. In it, Ada worked out step by step the procedure the Analytical Engine would have to follow to calculate the Bernoulli numbers, a sequence of rational numbers that turns up everywhere in mathematics. This was no ordinary calculation: the Bernoulli numbers are defined recursively —each one builds on the previous ones— which requires looping through operations and storing intermediate results. Exactly the kind of task for which a computer is irreplaceable.

Ada laid it all out in an orderly table of operations: what to compute, in what order, which variables to read, and where to store each partial result. In modern terms, she had written a complete program, loop logic and all. That is why Note G is regarded as the first algorithm meant to be run by a machine, and Ada as the first programmer in history. As with the word «algorithm» itself, the idea is far older than the technology that now carries it.

The vision that ran a century ahead

But Ada's contribution goes beyond a table of calculations. In her notes she grasped something Babbage had not stressed: that the machine was not just for handling numbers. If other things —musical notes, letters, symbols— could be represented by rules and relationships, the machine could manipulate them too. She wrote that the engine might one day compose musical pieces of any complexity. That is, almost word for word, the idea of general-purpose computing that underpins everything digital: an entire world of sound, text and image reduced to operations on symbols.

At the same time, she was remarkably clear-eyed about the machine's limits. In a much-quoted line she warned that «the Analytical Engine has no pretensions whatever to originate anything. It can do whatever we know how to order it to perform». In other words: the machine does not think for itself, it only executes what it is told. That debate over whether a machine can truly «create» is still open today, in the middle of the age of artificial intelligence.

A legacy that took a century to make sense

Ada Lovelace died very young, on 27 November 1852, aged just 36, of cancer. She did not live to see a single one of her ideas running on a real machine. Her notes remained for decades a mathematical curiosity, almost forgotten, until the 20th century —when real computers finally existed— when the pioneers of computing rediscovered them and understood how far ahead that 19th-century woman had seen.

Today her name is everywhere: the Ada programming language, created for the U.S. Department of Defense, bears her name; and every second Tuesday of October, Ada Lovelace Day honors women in science and technology. Like the other milestones that shaped the history of computing, her never-run program reminds us that the idea often arrives long before the machine that can make it real.

References

  1. “Ada Lovelace”, Wikipedia: biography (1815–1852), her mathematical education, the translation of Menabrea's paper and the authorship of the 1843 notes. en.wikipedia.org
  2. “Note G”, Wikipedia: description of the algorithm to calculate the Bernoulli numbers on the Analytical Engine and why it is considered the first program. en.wikipedia.org
  3. “Ada Lovelace”, Computer History Museum: her 1833 meeting with Babbage, the Analytical Engine and the Jacquard punched cards. computerhistory.org
  4. “Ada Lovelace”, Encyclopædia Britannica: a summary of her life, her «poetical science» and her vision of a machine able to manipulate symbols beyond numbers. britannica.com

Enjoy the stories behind technology? Continue with the origin of the word “algorithm” and the first computer virus, or browse the whole science & tech section.

ShareCopied!

You may also like

Comments

Sign in with GitHub to comment.
Advertising

From the author · News · AI · Audio

MiPais.com The world's news, as audio, on a 3D globe

Visit MiPais.com