Ada Lovelace

A beautiful woman is a beautiful woman, but a beautiful woman with a brain is absolutely lethal combination.
Prabal Gurung

Ada Lovelace (1815-1852)
Ada Lovelace (1815-1852)

People love legends, even in the world of computers. And Ada Lovelace is the perfect person for such a legend—she was a beautiful, intelligent, and rich young (she died only 36 y.o.) lady, who had the chance to be in the right place at the right time and reflected some of the light of one of the greatest persons in the world of computers—Charles Babbage.

What is Ada’s place in computer science? Some people used to call her the World’s First Computer Programmer, and even the Founder of Scientific Computing. In 1980, the U.S. Department of Defense settled on (in honor of Lady Lovelace) the name Ada for a new standardized computer language. The truth is somewhat different.

Foreseeing almost a century of the modern general-purpose programmable computer, in the 1830s Charles Babbage designed his Analytical Engine. He was not a diligent writer, however, especially concerning documentation of his ideas (actually he was a rather careless and impractical man, which will end in some friction developed between Ada Lovelace and him during their later mutual work), thus we know little of Babbage’s programming ideas.

In August 1840, Babbage visited Turin in Italy and gave a series of seminars on the Analytical Engine at the Academy of Sciences. One of the listeners—the Italian engineer and professor Federico Luigi Menabrea (1809-1896), who later on will become the Prime Minister of Italy, wrote up the lectures, modified with ideas from the discussions, in the paper Notions sur la Machine Analytique de M. Charles Babbage, which was published in French in Bibliothèque Universelle de Genève in October 1842. This paper was the first extensive publication on computers and programming in the world.

Ada first met Charles Babbage in June 1833, through their mutual friend Mary Somerville. Later that month, Babbage invited her to see the prototype for his Differential Engine. Soon Babbage became something like a mentor of the young lady (and vice versa, as Ada was an extraordinary celebrity, and later as the wife of a prominent aristocrat, she was in a position to act as patron to Babbage and his engines, though she never, in fact, did so), and helped Ada to begin mathematical studies with the great mathematician Augustus de Morgan in 1840 at the University of London. Babbage was impressed by Lovelace’s intellect and writing skills. He called her The Enchantress of Numbers and in 1843 he wrote:
Forget this world and all its troubles and if
possible its multitudinous Charlatans—every thing
in short but the Enchantress of Numbers.

After the publication in 1842 of the paper of Menabrea, Babbage was asked to write a paper for two British scientific journals (The Ladies Diary and Taylor’s Scientific Memoirs). Thus he decided to ask Ada Lovelace to translate Menabrea’s article into English but to append extensive notes to the translation, prepared under Babbage’s close guidance. These deal with the familiar modern ideas of the flow of control in programs, particularly the formulation of simple loops and nested loops controlled by counters. However, the paper (see Sketch of The Analytical Engine) and notes carefully and deliberately skirt around any discussion of details of the means by which these are to be implemented, yet it was written for a journal audience.

Babbage wrote the following on the subject, in his book Passages from the Life of a Philosopher:
I then suggested that she add some notes to Menabrea’s memoir, an idea which was immediately adopted. We discussed together the various illustrations that might be introduced: I suggested several, but the selection was entirely her own. So also was the algebraic working out of the different problems, except, indeed, that relating to the numbers of Bernoulli, which I had offered to do to save Lady Lovelace the trouble. This she sent back to me for an amendment, having detected a grave mistake which I had made in the process.

Babbage considered this paper a complete summary of the mathematical aspects of the machine, proving that the whole of the development and operations of Analysis are now capable of being executed by machinery.

Diagram of an algorithm for the Analytical Engine for the computation of Bernoulli numbers, from “Sketch of The Analytical Engine Invented by Charles Babbage” by Luigi Menabrea with notes by Ada Lovelace.
Diagram of an algorithm for the Analytical Engine for the computation of Bernoulli numbers, from “Sketch of The Analytical Engine Invented by Charles Babbage” by Luigi Menabrea with notes by Ada Lovelace.

Ada also expanded upon Babbage’s general views of the Analytical Engine as a symbol-manipulating device rather than a mere processor of numbers. She brought to the project a fine sense of style that resulted in the frequently quoted analogy, “We may say most aptly that the Analytical Engine weaves algebraic patterns just as the Jacquard-loom weaves flowers and leaves.” She suggested that it “might act upon other things besides number, were objects found whose mutual fundamental relations could be expressed by those of the abstract science of operations… Supposing, for instance, that the fundamental relations of pitched sounds in the science of harmony and of musical composition were susceptible to such expression and adaptations, the engine might compose elaborate and scientific pieces of music of any degree of complexity or extent… Many persons who are not conversant with mathematical studies, imagine that because the business of the engine is to give its results in numerical notation, the nature of its processes must consequently be arithmetical and numerical, rather than algebraic and analytical. This is an error. The engine can arrange and combine its numerical quantities exactly as if they were letters or any other general symbols; and in fact, it might bring out its results in algebraic notation, were provisions made accordingly”.

So, what about Ada’s title the world’s first programmer? Well, this is nonsense! Babbage was, if programmer is the right term at all. After Babbage came his mathematical assistant, his eldest son—Benjamin Herschel, then Menabrea, and possibly Babbage’s two younger sons. Ada was probably the fifth or sixth in this row. Moreover, all she did was to rework some calculations Babbage had carried out years earlier. It is out of the question, however, that Ada was Babbage’s fairy lady—interpreter, adviser, collaborator, and confidante, supporting his work financially, intellectually, and emotionally. As such her achievement was certainly remarkable.