My friend Betty Toole just published the book she's been working on for years: Ada, The Enchantress of Numbers (Strawberry Press, P.O. Box 452, Sausalito, CA 94966). Although it sounds like a biography, it is in fact a selection from the letters of Ada Lovelace, and from her description of the Analytical Engine, the first computer ever designed.
This is basic research material rather than an entertaining story, although the story is there. So on the assumption that many DDJ readers won't get around to reading it, I'll tell you what I got out of it (and out of the ancillary research it inspired).
In 1834, at the age of 41, Charles Babbage was a bright light in the English scientific community. His Saturday soirees were attended by scientists such as Michael Faraday and the eccentric electrical experimenter Andrew Crosse, as well as the Duke of Wellington and Charles Dickens. The least notable attendee may have been a medical-school dropout whose family despaired of the long hours he spent wandering in the fields -- young Charles Darwin.
While still a student at Cambridge, Babbage formed the Analytical Society with two friends, George Peacock and John Herschel. Their ambitious goal was to break the 100-year stranglehold of Newton's notation on English algebra. A proper notation, they knew, would make it easier to separate real abstract mathematics from mere computation. They were successful: Modern algebra uses notation more in line with Leibnitz's than with Newton's. Herschel, the son of the leading astronomer of his time, followed in his father's footsteps and later became president of the Royal Astronomical Society. Peacock continued in mathematics and wrote an influential text on abstract algebra. By training, Babbage was also a mathematician, but he became an inventor.
It was an age of invention.
Technically, it was pre-Victorian England, an era when Romantic poets confronted the industrial revolution. A generation before, the Luddites had protested industrialization, and in his maiden speech before Parliament, Lord Byron had sounded an alarm over the dangers of technology. Charles Dickens, one of Babbage's friends, wrote satires on factory conditions.
It was a world about to change, and aware of it. Most of the trappings of modern civilization did not yet exist: People still rode in buggies, read by gaslight, and communicated by letter. But railroad tracks were being laid, Faraday had built the first electric generator, and telegraph lines would be strung from London to outlying districts within the decade. Another Analytical Society friend of Babbage's, William Whewell, coined the word "scientist" in this same decade.
In this age of science and invention, Babbage turned to invention. Some of his inventions were process innovations: He demonstrated mathematically that postage should not be based on the distance a letter travels, and he created the first actuarial table. Other inventions were mechanical devices: an ophthalmoscope and two devices symbolic of the way the world was going -- the speedometer and the locomotive cowcatcher. He was highly thought of and thought highly of himself and his ideas. Although impatient with fundraising, he managed to get funding for a mathematical invention, the Difference Engine.
The Difference Engine was essentially a calculator. It was not the first: Blaise Pascal had built that 200 years earlier, and Leibnitz built one 31 years after Pascal. Leibnitz had also championed the binary system, and it was his algebraic notation that the Analytical Society persuaded English mathematicians to adopt.
But the Difference Engine was a step beyond these early calculators. Pascal's was an adding machine; Leibnitz's also had the power to multiply and divide. The Difference Engine performed these basic operations, but could also compute powers of numbers and roots of quadratic equations. And it was intended to be a practical device. It was about the size of a high-end workstation today: It fit comfortably on or under a workbench. Babbage had also given thought to throughput, and proudly demonstrated that a calculation could be performed every nine seconds.
Then in 1834, Babbage abandoned the Difference Engine for a more ambitious project: the Analytical Engine. If the Difference Engine was a calculator, the Analytical Engine was a computer. It could be controlled by input instructions on punched cards and fed data on other punched cards; store the results of calculations to be used in further calculations; and produce output in three forms: type mold, printed text, or punched cards. The punched cards were an idea Babbage got from the Jacquard loom, which had been in use in England since 1804. The Jacquard loom allowed the design of fabric to be entered on its cards, and was regarded at the time as one of the marvels of the industrial revolution.
The Analytical Engine was much more marvelous than the loom, but it had a defect. It didn't exist. It was just a plan, eventually spread across thousands of pages of diagrams, designs, explanations, and examples. Babbage's voluminous notes demonstrate to those who can wade through them that he understood precisely how to construct a digital computer. But he had no working model or even a set of engineering plans he could turn over to technicians to execute. He needed someone to transform his notes and ideas into something others could work from, and he needed funding to build the machine.
It was a teenage girl who proved to be the key to both.
Augusta Ada Byron, later Lady Lovelace, was born to the titled class of English society. She was also, not incidentally, the daughter of a poet and a mathematician.
Although titled and monied, her father, George Gordon, Lord Byron, was not your typical patrician gentleman. Like his ancestors Foul Weather Jack, the Wicked Lord, and Mad Jack (Byron's father), he had a wild streak. He was enormously popular. (The only contemporary analogy is with rock musicians, and it's not a bad one.) But not with everyone: For reasons uncertain and probably meaningful only to Victorian minds, he became unpopular with his wife, and they separated soon after the birth of their only daughter, who always went by her middle name, Ada. Byron left the country, to spend most of the rest of his life in Greece and Italy.
Ada was raised by her mother, a brilliant if uptight mathematician. (One frank friend described her as an "icicle.") Lady Byron saw to it that Ada got an excellent if eccentric education, rather heavy on mathematics. Ada showed unmistakable signs of genius early on. Her earliest letters, starting at age five, mix adult diction and grammar with childish concerns and, occasionally, spelling errors.
Ada died at age 36, after bearing and raising three children and honoring the time-consuming social obligations of her station in society. Throughout her childhood and adult life, she was often incapacitated by illness. All of this left little time for what she earnestly considered her profession.
Usually she considered that profession mathematics. With 100 years of hindsight, Ada is seen as the first person to spell out the working and uses of the digital computer in a language an average educated reader could understand. That would make her the first documentation writer, and that's probably technically correct. But she is sometimes referred to as "the first programmer," and while that's a distortion of the facts, it's a distortion worth entertaining tentatively for the insight it gives into a recurring question about the nature of programming.
In the week after her 19th birthday, Ada's mother took her to visit Charles Babbage, the eccentric genius whom Ada had met at a party some months earlier. It wasn't their first visit; Babbage had entertained Ada in earlier visits with his Difference Engine, which she much preferred to the mechanical doll he tried to show her. On this occasion, though, Babbage was afire with a new idea about a different kind of machine, a device that would "foresee [and] act on that foresight." The notion was not two months old and perhaps not too well thought out. In any case, Lady Byron, no mean mathematician, later dismissed Babbage's talk as "unsound and paradoxical." She approved of Babbage's mechanical devices, but thought his metaphysical bent a bad influence on her daughter. Ada listened to Babbage and envisioned a new world.
For a time, Ada was distracted by marriage and three quick pregnancies. But she was soon back at her studies. In the 1800s women did not go to university, but some, like Ada and her mother before her, got a good, if idiosyncratic, education by studying independently. Ada asked Babbage to recommend a mathematics tutor, and he recommended August De Morgan. De Morgan, who had studied under Babbage's friend Peacock, helped to establish the foundations of abstract algebra, both by his own efforts and by encouraging a young mathematician, George Boole, to go further. His tutoring relationship with Ada was highly informal: Ada wrote to him when she got stuck, and was otherwise on her own.
Meanwhile, an Italian engineer named Menabrea heard Babbage lecture on the Analytical Engine and published a paper on it in French in a Swiss journal. Babbage mentioned the piece to Ada, who immediately translated it into English and sent it off to Babbage. He encouraged her to write more, and she set out to revise and write notes to the translation. These notes turned out to be longer than the article itself.
The translation and the notes are Ada's contribution to the understanding of the digital computer. Nothing more. What she accomplished was no mean feat: Babbage's papers on the Analytical Engine had grown to thousands of pages. But that feat is all she is remembered for, all she accomplished of historical and scientific importance.
It was enough.
Ada not only described the workings of the machine, she also applied her considerable imagination to figuring out what could be done with it.
Not the least important of Ada's contributions was her improvement on Menabrea's notation. In her notes, Ada discussed the importance of a good abstract notation, which of course was the lesson that the Analytical Society taught English mathematics. It was also arguably the basis of De Morgan's enduring work and the basis for understanding what a computer really does.
She pointed out the importance of distinguishing the symbol for the function from the symbol for the result of the application of the function. This distinction made, she was able to follow one of its implications: that the Analytical Engine could produce as output not only numbers but also symbols. These symbols could then be used to control the operation of the machine. In other words, she realized without having today's terminology to express it that a program can produce another program as output.
I write imprecisely but not, I hope, misleadingly when I write of "programming" the Analytical Engine. Although one did not write programs in a sense we'd understand today, the Analytical Engine was programmable. Ada wrote a program, for example, to compute the Bernoulli numbers. Writing such programs involved specifying the order in which operation and variable cards were to be fed into the machine.
In this sense, Babbage also wrote programs for the Analytical Engine, so he could be called the first programmer. But Babbage's programs were selected by the inventor to demonstrate the operation of his invention. Ada approached the writing of programs with this goal as well, but she also brought to it some more-applied thinking, asking what real-world problems could be solved by the computer and what it was good for. Because she so earnestly wanted a profession, perhaps we can think of Ada Lovelace as the first professional programmer.
Toole asked Ada programmer Rick Gross to annotate Ada's notes, connecting them with current thinking in programming practice and methodologies. As explained by Gross, Ada foresaw many of today's software concepts:
This much of the story has been told elsewhere; in fact I drew on several sources in sketching this story of the Analytical Engine and the contributions of Ada Lovelace. But Toole's book, because it is largely Ada's words, offers an insight into the mind of the first professional programmer.
There are questions that recur because they are so trivial that we keep forgetting the answers. But some questions recur because they are profound, and there is more to learn from asking them than from any answer we can make.
Here's one question that keeps coming up in programming magazines and software development conferences. Is programming a science or an art? A lot of people today are laboring to see programming become an engineering discipline. Others argue that, however noble that quest may be, it's futile. Programming, they say, is a craft or an art.
No doubt both views are right. It even seems that programming, more than any other human endeavor that springs immediately to mind, is a blend of rigor and art, science and poetry.
Rigor and art, science and poetry: Human thought was being fiercely tugged at by these conflicting urges during Ada's short life. And Ada's life is a self-conscious archetype of this conflict and the synthesis that can grow out of it.
You couldn't ask for a purer symbol of the wild, untrammeled spirit of art than the mad, bad, Romantic poet Lord Byron. And you couldn't ask for a better example of the actuarial mindset than the rigid mathematician Lady Byron. Although Ada's father is better known to history than her mother, Lady Byron was immortalized, albeit in grotesque caricature, in Lord Byron's satirical Don Juan. In this poem she appears as Donna Inez, whose "thoughts were a theorem, her words a problem."
Not many children have to deal with this kind of public conflict between their parents. But although Ada accepted the public view that her father was a bad person, she fully expected and wanted to show both aspects of her ancestry: She wrote of wanting to create a poetical science or a scientific poetry. And she did embody both her parents' distinct geniuses. Being highly intelligent, perceptive, and self-analytical, she was conscious of the fact, almost to the point of obsession. Her letters are full of the kinds of questions any reflective programmer entertains sometimes, questions about the relationship between art and science. But with Ada art and science had names: Father and Mother.
Science was still coming into existence in Ada's time, and in her letters we see the relationship of science and art analyzed by a first-rate intellect who, because of her own unique heritage and circumstances, was incapable of ignoring the matter. Writing to her mother, she asked, "You will not concede me philosophical poetry. Invert the order! Will you give me poetical philosophy, poetical science?" In that wish, she may still be ahead of her time.
Copyright © 1992, Dr. Dobb's JournalThe Analytical Society
Society Woman
Ada Meets Babbage
Ada's Insights
The Mind of a Programmer