She was a beautiful woman from high British society. She could have respected the customs of the time and limit her existence to all sorts of social games. Fortunately, she managed to get beyond them, to lay the groundwork for something that radically changed human civilization. Ada Lovelace is the one who laid the foundations of computer science. I would like to tell you her tumultuous story.
Early years
We are at noon on December 10, 1815. In the building on Piccadilly Terrace No. 13, Lady Byron (Anne Isabella Noel Byron, 11th Baroness Wentworth and Baroness Byron, or, in short, Annabella) was in childbirth. Her husband, the great romantic poet George Gordon Noel Byron, the sixth Baron Byron, known to us as Lord Byron, was already drunk. Married for less than a year, the two spouses colored their days with endless quarrels.
At 1 p.m., Lady Byron gave birth to a baby girl named Ada Augusta. Her birth could have calmed the relations between the Byron spouses, often the newborns have the gift to relax tense family situations. It was not like that. Instead of jumping for joy immediately after giving birth, holding his little girl in his arms, Lord Byron exclaimed: “Oh! What an instrument of torture I have acquired in you!” The quarrels continued just as fiercely, and the situation became unbearable. In mid-January 1816, Lady Byron took her little girl and left for her parents’ home . Lord Byron never saw either of them again.
Forgive me, but I have to make a small comment. I was tempted to go into detail about the atmosphere of the Byron family during Ada’s birth. They are extremely spicy and would have added color to the text. I even wrote a few paragraphs, but I realized that these types of details are irrelevant to describe the evolution of the one who would become a main character in the development of computer science.
Ada’s mother always had a massive fear.
She was worried about her daughter inheriting her father’s character, which she considered negative. For Annabella, Lady Byron, it was all about education. Her principles were simple. Tenderness and joy are harmful to children. If something is difficult for the child, then it is good for him. If something is easy for the child, then it is bad. Annabella was very severe. For her good or bad behavior, Ada got appropriate vouchers from her teachers, on which rewards depended, such as books or paintings, and punishments as concrete as possible. The latter went to extremes. I don’t know if she was beaten, but Ada’s naughtiness was certainly punished, sometimes by locking her in the closet. One of his friends, the mathematician Woronzow Greig, noted that Ada “was scared of her mother, a fear that lasted until the day of her death.”
Ada Lovelace at the age of 7, portrait of Comte d’Orsay
Ada’s mother had a serious penchant for mathematics. When they were together, Lord Byron described her as his „princess of parallelograms”. I think that was why Annabella was dying for Ada to receive an intensive education in mathematics. I also think she was convinced that mathematics, by educating the rational part of the mind, would keep Ada away from the traps and temptations of the world. At the age of eight, she attended two hours of arithmetic every day!
At the age of 12, Ada became fascinated by mechanical engineering and tried to build articulated wings, which imitated those she observed after dissecting crows… She also wrote a richly illustrated “book” entitled Flyology. She also dreamed of steam planes… She read a lot, and her readings included math books. Her mother proudly wrote: “She read and learned a lot of Paisley’s geometry on her own, which she loves very much.”
At the age of 13, she got the measles. Due to complications, Ada remains bedridden for almost three years. The medicines of the time did not help her at all. Many of them were based on alcohol, opium and morphine… Don’t be surprised. One of them, laudanum, was composed of opium diluted in wine. It was prescribed as follows: 5 drops for babies up to five days old and 25 drops for 5 year olds!
Towards the end of 1832, Ada regained her health to a large extent. A relative describes her as sickly, fat, boring and yet pleasant. She was shy in society, but beneath this façade hid a very voluntary spirit. At 17, she finds a lover, a nice young man who helps her learn. Things have gone too far and Ada runs away from home to stay with her boyfriend. Fortunately, he is horrified by Ada’s gesture and urgently sends her back. Her mother, Anabbella, blames the hereditary inheritance, on the paternal line, for her gesture. No doubt, Ada has to find a husband.
Ada Lovelace at the age of 17, unknown author
Youth
I will try a short chronology, in which I will present only a few things that helped shape the revolution in which Ada Byron would participate.
In 1833, at a social event, she met Charles Babbage, who was developing a mechanical calculating machine. About the relationship between Babadge and Ada, I will talk in more detail later.
In 1835 he befriended Mary Somerville, a famous mathematician. Mary will often meet Ada to discuss math issues, will send her books to help her and problems to be solved.
On July 8, 1835, Ada married William, the 8th Baron King. Later, on the occasion of Queen Victoria’s coronation, William became Count of Lovelace and Ada became Ada, Countess of Lovelace.
In 1840 she began to study mathematics with Augustus De Morgan. Morgan was a pioneer in logic. He explained Ada that mathematical relations can be applied to something other than numbers.
Meeting Babbage
The meeting took place in June 1833. Babbage exhibited the prototype of his calculating machine at a social evening. He had described this “differential machine” as early as 1822, in a presentation entitled “Notes on the application of machinery to the computation of astronomical and mathematical tables”, at the Royal Astronomical Society. In 1823 he made a first prototype. It was an impressive car. Imagine some complicated gears, made up of vertical rods on which gears were lined up, with ten teeth numbered from 0 to 9.
The differential machine, reconstruction according to Babbage’s plans
Basically, Babbage’s machine could only perform additions, but with its help, calculations could be made that would have taken a long time for a human computer. The intricate gear deeply impressed Ada. „While others were looking at this wonderful instrument […] just as savages look at a rifle they see for the first time”, as Augustus De Morgan’s wife would note, „the wonderful Miss Byron, in spite of her youth, understood the way it works and managed to see the great beauty of the machine”.
Charles Babbage
The following year, 1834, several popular presentations of Babbage’s car were organized by Dionysius Lardner, a professor at University College, London. Ada attends and her enthusiasm increases. Her mother, Lady Byron, wrote to a friend that “Ada was very pleased with Dr. Lardner’s first lecture on Babbage’s car at the Institute of Mechanics.” Ada will try to take Babbage as her math teacher, but he refuses. He was too busy. At the beginning of 1841, Ada offered her services as a translator.
Analytical machine, partial reconstitution
Meanwhile, in 1840, Babbage held a series of lectures in Turin on his new calculating machine, called the “Analytical Engine”. This was an improved version of the previous one and I think we can say that we are dealing with a mechanical version of a first computer, as we know it today. The analytical machine had an input. Here were the punched cards (they were inspired by Jacquard’s cards for automatic weaving machines) in which instructions were stored (the control), a central unit of calculation (the mill), a memory storing the intermediate and final results (the store) and a… printer (the output). Unfortunately, Babbage’s new car was never completed…
A young engineer, Luigi Menabrea, is enthusiastic and, based on the notes taken during the conferences, writes a memoir in which he described in detail the analytical machine, accompanying it with Babbage’s drawings, and which will be published in French in 1842. Ada translates it immediately. At the beginning of 1843 the translation was ready for publication. Babbage disagrees. Now he knew Ada’s mathematical talent and reproached her for preferring a translation instead of trying to write by her own a description of the analytical machine she had come to know very well. Ada probably hadn’t even thought of such an idea. It was not in the spirit of the time for women to start publishing scientific articles. Babbage suggests her to attach a few remarks to the translation of Menabrea’s book. Ada enthusiastically embraces the idea and gets to work. In the end, her notes would contain 19,136 words, almost three times more than those in Menabrea’s memoir. These “translator’s notes”, in which the Italian’s memory was clarified and, in some places, corrected, would mark the dawn of computer science.
Translator’s notes
Ada’s notes are seven in number, from A to G. They are written in an English a little twisted for me, with sentences as long as a paragraph, but I will try to adapt them a little for you.
In note A, Ada makes some extremely deep considerations. Those who view mathematical science, not merely as a vast body of abstract and immutable truths, whose intrinsic beauty, symmetry and logical completeness, when regarded in their connexion together as a whole, entitle them to a prominent place in the interest of all profound and logical minds, but also the fact that this science constitutes the language through which alone we can adequately express the great facts of the natural world, and those unceasing changes, the visible and the invisible, the conscious and the unconscious […] those who thus think on mathematical truth as the instrument through which the weak mind of man can most effectually read his Creator’s works, will regard with especial interest all that can tend to facilitate the translation of its principles into explicit practical forms. […] The distinctive characteristic of the Analytical Engine, and the one that made it have vast possibilities in the field of abstract algebra, is the use of Jacquard cards, the most complicated patterns in the fabrication of brocaded stuffs. […] We may say that the Analytical Engine weaves algebraical patterns just as the Jacquard-loom weaves flowers and leaves.” Further: “The bounds of arithmetic were however outstepped the moment the idea of applying the cards had occurred; and the Analytical Engine is no longer a simple computing machine. It holds a position wholly its own. In enabling mechanism to combine together general symbols in successions of unlimited variety and extent, a uniting link is established between the operations of matter and the abstract mental processes of the most abstract branch of mathematical science.” In the same Note A, Ada emphasizes that the analytical machine can go beyond arithmetic calculations when we are dealing with “objects that have connections between them that can be expressed through relationships in the abstract science of operations can be adapted to be operated with the Analytical Machine. Supposing, for instance, that the fundamental relations of pitched sounds in the science of harmony and of musical composition were susceptible of such expression and adaptations, the engine might compose elaborate and scientific pieces of music of any degree of complexity or extent.” This vision of Ada, who saw beyond the numbers written on the gears of Babbage’s engine, is astonishing. She understood that they are more than mathematical notations, they can express almost anything, starting with musical notes. It took almost a century for science and technology to evolve long enough for Ada’s vision to become a reality.
I won’t talk about notes B, C, D, E and F. I will go straight to note G, which I think is extremely important. In it, Ada signs the birth certificate of computer science. Here, she proposes an algorithm for the calculations of “Bernoulli numbers”, which plays a very important role in what is number theory. I will not explain to you what they are, as I have not given detailed descriptions of Babbage’s engines. It would take up too much space, and I want to focus on the fabulous creation of Ada, Countess of Lovelace.
Calculating Bernoulli’s numbers is difficult to do with pencil and paper alone. The complication does not come from any hidden subtlety, but from the huge volume of calculations involved. It was natural for Ada, loving Babbage’s analytical machine, to find a way to use it. In this Note G, she presents a sequence of operations that can be used to calculate them. In Note A, Ada defined the term “operation” as “any process that alters the relationship between two or more things, regardless of the type of that relationship.” In modern terms we can say that Ada designed an algorithm, a computer program, in which the engine was put to execute successively a series of basic instructions to reach the desired result. In this algorithm Ada invents methods that would later be called subroutines (separate programs, with the help of which specific tasks can be performed, such as trigonometric functions and which are called from the main program and then return the results) and recursive cycles and loops (a series of repeating instructions). To calculate Bernoulli’s numbers, Ada needed 75 punched cards. Summarizing a longer sentence from Note G: “It will be obvious that the same variable cards can be repeated for the calculation of each successive number.” Ada’s algorithm never “ran” on Babbage’s analytical machine, which, in my great regret, was never completed. Later, with the help of modern computers, it was possible to test the algorithm proposed by Ada Lovelace, once it was translated into programming languages. It wasn’t a perfect one. A few “bugs” crept into it, but the algorithmic principles set forth by Ada Lovelace were to be the starting point for computer programming.
The diagram in Note G which illustrates Bernoulli’s number calculation algorithm
There is another interesting passage in this Note G. ”The Analytical Machine has no claim to create anything. It can do whatever we know to order it to do. An analytical process may follow; but it cannot anticipate any analytical relations or truths”, Ada wrote. Instead, Babbage’s engine had the gift of being “an extension of human power.” In the article “Computing machinery and intelligence”, published by Alan Turing in 1950, Ada’s statement would become “Lady Lovelace’s objection”. Turing rejected this objection by saying that a machine could be programmed to learn and thus acquire a kind of artificial intelligence. I am inclined to believe that modern times have proved Turing right.
After completing the Notes and a heated correspondence with Babbage, he decides to send them for publication in Scientific Memoirs. The editors suggested he sign with his name. Babbage, in his honor, angrily rejected this proposal. Finally, in September 1843, the translation of Menabrea’s Memoirs accompanied by Ada’s notes was to be published in Scientific Memoirs. They were signed not with her name, but only with the initials ALL.
The end
Ada, Lady of Lovelace, did not publish any other scientific work, and her life entered a downward slope. She was convinced that probability theory could help her bet on horse racing and lost her fortune. She became addicted to opiates. She also had an affair with a gambling partner. He shamelessly blackmailed her, and Ada was forced to sell her family’s jewelry to meet his demands. He died of ovarian cancer on November 27, 1852, at the age of almost 37. In her honor, in 1980, a programming language was named Ada.