She barraged Babbage with letters, some of which verged on cheeky, even though he was twenty-four years her senior. In one, she described the solitaire game using twenty-six marbles, where the goal is to execute jumps so that only one marble remains. She had mastered it but was trying to derive a “mathematical formula . . . on which the solution depends, and which can be put into symbolic language.” Then she asked, “Am I too imaginative for you? I think not.”32
Her goal was to work with Babbage as his publicist and partner in trying to get support to build the Analytical Engine. “I am very anxious to talk to you,” she wrote in early 1841. “I will give you a hint on what. It strikes me that at some future time . . . my head may be made by you subservient to some of your purposes and plans. If so, if ever I could be worthy or capable of being used by you, my head will be yours.”33
A year later, a tailor-made opportunity presented itself.
LADY LOVELACE’S NOTES
In his quest to find support for his Analytical Engine, Babbage had accepted an invitation to address the Congress of Italian Scientists in Turin. Taking notes was a young military engineer, Captain Luigi Menabrea, who would later serve as prime minister of Italy. With Babbage’s help, Menabrea published a detailed description of the machine, in French, in October 1842.
One of Ada’s friends suggested that she produce a translation of Menabrea’s piece for Scientific Memoirs, a periodical devoted to scientific papers. This was her opportunity to serve Babbage and show her talents. When she finished, she informed Babbage, who was pleased but also somewhat surprised. “I asked why she had not herself written an original paper on a subject with which she was so intimately acquainted,” Babbage said.34 She replied that the thought had not occurred to her. Back then, women generally did not publish scientific papers.
Babbage suggested that she add some notes to Menabrea’s memoir, a project that she embraced with enthusiasm. She began working on a section she called “Notes by the Translator” that ended up totaling 19,136 words, more than twice the length of Menabrea’s original article. Signed “A.A.L.,” for Augusta Ada Lovelace, her “Notes” became more famous than the article and were destined to make her an iconic figure in the history of computing.35
As she worked on the notes at her country estate in Surrey in the summer of 1843, she and Babbage exchanged scores of letters, and in the fall they had numerous meetings after she moved back to her London home. A minor academic specialty and gender-charged debate has grown up around the issue of how much of the thinking was hers rather than his. In his memoirs, Babbage gives her much of the credit: “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.”36
In her “Notes,” Ada explored four concepts that would have historical resonance a century later when the computer was finally born. The first was that of a general-purpose machine, one that could not only perform a preset task but could be programmed and reprogrammed to do a limitless and changeable array of tasks. In other words, she envisioned the modern computer. This concept was at the core of her “Note A,” which emphasized the distinction between Babbage’s original Difference Engine and his proposed new Analytical Engine. “The particular function whose integral the Difference Engine was constructed to tabulate is Δ7ux = 0,” she began, explaining that its purpose was the computation of nautical tables. “The Analytical Engine, on the contrary, is not merely adapted for tabulating the results of one particular function and of no other, but for developing and tabulating any function whatever.”
This was done, she wrote, by “the introduction into it of the principle which Jacquard devised for regulating, by means of punched cards, the most complicated patterns in the fabrication of brocaded stuffs.” Even more than Babbage, Ada realized the significance of this. It meant that the machine could be like the type of computer we now take for granted: one that does not merely do a specific arithmetic task but can be a general-purpose machine. She explained:
The bounds of arithmetic were outstepped the moment the idea of applying cards had occurred. The Analytical Engine does not occupy common ground with mere “calculating machines.” It holds a position wholly its own. In enabling a 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.37
Those sentences are somewhat clotted, but they are worth reading carefully. They describe the essence of modern computers. And Ada enlivened the concept with poetic flourishes. “The Analytical Engine weaves algebraical patterns just as the Jacquard loom weaves flowers and leaves,” she wrote. When Babbage read “Note A,” he was thrilled and made no changes. “Pray do not alter it,” he said.38
Ada’s second noteworthy concept sprang from this description of a general-purpose machine. Its operations, she realized, did not need to be limited to math and numbers. Drawing on De Morgan’s extension of algebra into a formal logic, she noted that a machine such as the Analytical Engine could store, manipulate, process, and act upon anything that could be expressed in symbols: words and logic and music and anything else we might use symbols to convey.
To explain this idea, she carefully defined what a computer operation was: “It may be desirable to explain that by the word ‘operation,’ we mean any process which alters the mutual relation of two or more things, be this relation of what kind it may.” A computer operation, she noted, could alter the relationship not just between numbers but between any symbols that were logically related. “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.” The Analytical Engine could, in theory, even perform operations on musical notations: “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.” It was the ultimate Ada-like “poetical science” concept: an elaborate and scientific piece of music composed by a machine! Her father would have shuddered.
This insight would become the core concept of the digital age: any piece of content, data, or information—music, text, pictures, numbers, symbols, sounds, video—could be expressed in digital form and manipulated by machines. Even Babbage failed to see this fully; he focused on numbers. But Ada realized that the digits on the cogs could represent things other than mathematical quantities. Thus did she make the conceptual leap from machines that were mere calculators to ones that we now call computers. Doron Swade, a computer historian who specializes in studying Babbage’s engines, has declared this one of Ada’s historic legacies. “If we are looking and sifting history for that transition, then that transition was made explicitly by Ada in that 1843 paper,” he said.39
Ada’s third contribution, in her final “Note G,” was to figure out in step-by-step detail the workings of what we now call a computer program or algorithm. The example she used was a program to compute Bernoulli numbers,III an exceedingly complex infinite series that in various guises plays a role in number theory.
To show how the Analytical Engine could generate Bernoulli numbers, Ada described a sequence of operations and then made a chart showing how each would be coded into the machine. Along the way, she helped to devise the concepts of subroutines (a sequence of instructions that performs a specific task, such as computing a cosine or calculating compound interest, and can be dropped into larger programs as needed) and a recursive loop (a sequence of instructions that repeats itself).IV These were made possible by the punch-card mechanism. Seventy-five car
ds were needed to generate each number, she explained, and then the process became iterative as that number was fed back into the process to generate the next one. “It will be obvious that the very same seventy-five variable cards may be repeated for the computation of every succeeding number,” she wrote. She envisioned a library of commonly used subroutines, something that her intellectual heirs, including women such as Grace Hopper at Harvard and Kay McNulty and Jean Jennings at the University of Pennsylvania, would create a century later. In addition, because Babbage’s engine made it possible to jump back and forth within the sequence of instruction cards based on the interim results it had calculated, it laid the foundation for what we now call conditional branching, changing to a different path of instructions if certain conditions are met.
Babbage helped Ada with the Bernoulli calculations, but the letters show her deeply immersed in the details. “I am doggedly attacking and sifting to the very bottom all the ways of deducing the Bernoulli numbers,” she wrote in July, just weeks before her translation and notes were due at the printers. “I am in much dismay at having gotten so amazing a quagmire and botheration with these Numbers that I cannot possibly get the thing done today. . . . I am in a charming state of confusion.”40
When it got worked out, she added a contribution that was primarily her own: a table and diagram showing exactly how the algorithm would be fed into the computer, step by step, including two recursive loops. It was a numbered list of coding instructions that included destination registers, operations, and commentary—something that would be familiar to any C++ coder today. “I have worked incessantly and most successfully all day,” she wrote Babbage. “You will admire the Table and Diagram extremely. They have been made out with extreme care.” From all of the letters it is clear that she did the table herself; the only help came from her husband, who did not understand the math but was willing to methodically trace in ink what she had done in pencil. “Lord L is at this moment kindly inking it all over for me,” she wrote Babbage. “I had to do it in pencil.”41
It was mainly on the basis of this diagram, which accompanied the complex processes for generating Bernoulli numbers, that Ada has been accorded by her fans the accolade of “the world’s first computer programmer.” That is a bit hard to defend. Babbage had already devised, at least in theory, more than twenty explanations of processes that the machine might eventually perform. But none of these was published, and there was no clear description of the way to sequence the operations. Therefore, it is fair to say that the algorithm and detailed programming description for the generation of Bernoulli numbers was the first computer program ever to be published. And the initials at the end were those of Ada Lovelace.
* * *
There was one other significant concept that she introduced in her “Notes,” which harked back to the Frankenstein story produced by Mary Shelley after that weekend with Lord Byron. It raised what is still the most fascinating metaphysical topic involving computers, that of artificial intelligence: Can machines think?
Ada believed not. A machine such as Babbage’s could perform operations as instructed, she asserted, but it could not come up with ideas or intentions of its own. “The Analytical Engine has no pretensions whatever to originate anything,” she wrote in her “Notes.” “It can do whatever we know how to order it to perform. It can follow analysis; but it has no power of anticipating any analytical relations or truths.” A century later this assertion would be dubbed “Lady Lovelace’s Objection” by the computer pioneer Alan Turing (see chapter 3).
* * *
Ada wanted her work to be regarded as a serious scientific paper and not merely a public advocacy piece, so at the outset of her “Notes” she stated that she would “offer no opinion” on the government’s reluctance to continue funding Babbage’s endeavors. This did not please Babbage, who proceeded to write a screed attacking the government. He wanted Ada to include it in her “Notes,” without his name on it, as if it were her opinion. She refused. She did not want her work compromised.
Without informing her, Babbage sent his proposed appendage directly to Scientific Memoirs. The editors decided that it should appear separately and suggested that he “manfully” sign his name. Babbage was charming when he wished, but he could also be cranky, stubborn, and defiant, like most innovators. The proposed solution infuriated him, and he wrote Ada asking that she withdraw her work. Now it was her turn to become irate. Using a form of address typically used by male friends, “My Dear Babbage,” she wrote that “withdrawing the translation and Notes” would “be dishonorable and unjustifiable.” She concluded the letter, “Be assured that I am your best friend; but that I never can or will support you in acting on principles which I conceive to be not only wrong in themselves, but suicidal.”42
Babbage backed down and agreed to have his piece published separately in another periodical. That day Ada complained to her mother:
I have been harassed and pressed in a most perplexing manner by the conduct of Mr. Babbage. . . . I am sorry to come to the conclusion that he is one of the most impracticable, selfish, and intemperate persons one can have to do with. . . . I declared at once to Babbage that no power should induce me to lend myself to any of his quarrels or to become in any way his organ. . . . He was furious. I imperturbable and unmoved.43
Ada’s response to the dispute was a bizarre sixteen-page letter to Babbage, poured forth in a frenzy, that vividly displayed her moodiness, exultations, delusions, and passions. She cajoled and berated him, praised and denigrated him. At one point she contrasted their motives. “My own uncompromising principle is to endeavour to love truth and God before fame and glory,” she claimed. “Yours is to love truth and God; but to love fame, glory, honours yet more.” She proclaimed that she saw her own inevitable fame as being of an exalted nature: “I wish to add my might toward expounding and interpreting the Almighty and his laws. . . . I should feel it no small glory if I were able to be one of his most noted prophets.”44
Having laid that groundwork, she offered him a deal: they should forge a business and political partnership. She would apply her connections and persuasive pen to his endeavor to build his Analytical Engine if—and only if—he would let her have control over his business decisions. “I give you the first choice and offer of my services and my intellect,” she wrote. “Do not lightly reject them.” The letter read in parts like a venture capital term sheet or a prenuptial agreement, complete with the possibility of arbitrators. “You will undertake to abide wholly by the judgment of myself (or of any persons whom you may now please to name as referees, whenever we may differ) on all practical matters,” she declared. In return, she promised, she would “lay before you in the course of a year or two explicit and honorable propositions for executing your engine.”45
The letter would seem surprising were it not like so many others that she wrote. It was an example of how her grandiose ambitions sometimes got the best of her. Nevertheless, she deserves respect as a person who, rising above the expectations of her background and gender and defying plagues of family demons, dedicated herself diligently to complex mathematical feats that most of us never would or could attempt. (Bernoulli numbers alone would defeat many of us.) Her impressive mathematical labors and imaginative insights came in the midst of the drama of Medora Leigh and bouts of illness that would cause her to become dependent on opiates that amplified her mood swings. She explained at the end of her letter to Babbage, “My dear friend, if you knew what sad and direful experiences I have had, in ways of which you cannot be aware, you would feel that some weight is due to my feelings.” Then, after a quick detour to raise a small point about using the calculus of finite differences to compute Bernoulli numbers, she apologized that “this letter is sadly blotted” and plaintively asked, “I wonder if you will choose to retain the lady-fairy in your service or not.”46
Ada was convinced that Babbage would accept her offer to become entrepreneurial partners. “He has so strong an idea of the advanta
ge of having my pen as his servant that he will probably yield; though I demand very strong concessions,” she wrote her mother. “If he does consent to what I propose, I shall probably be enabled to keep him out of much hot water and to bring his engine to consummation.”47 Babbage, however, thought it wiser to decline. He went to see Ada and “refused all the conditions.”48 Although they never again collaborated on science, their relationship survived. “Babbage and I are I think more friends than ever,” she wrote her mother the next week.49 And Babbage agreed the next month to pay a visit to her country home, sending her a fond letter referring to her as “the Enchantress of Numbers” and “my dear and much admired Interpreter.”
That month, September 1843, her translation and “Notes” finally appeared in Scientific Memoirs. For a while she was able to bask in acclaim from friends and to hope that, like her mentor Mary Somerville, she would be taken seriously in scientific and literary circles. Publication made her finally feel like “a completely professional person,” she wrote to a lawyer. “I really have become as much tied to a profession as you are.”50
It was not to be. Babbage got no more funding for his machines; they were never built, and he died in poverty. As for Lady Lovelace, she never published another scientific paper. Instead her life spiraled downward, and she became addicted to gambling and opiates. She had an affair with a gambling partner who then blackmailed her, forcing her to pawn her family jewels. During the final year of her life, she fought an exceedingly painful battle with uterine cancer accompanied by constant hemorrhaging. When she died in 1852, at age thirty-six, she was buried, in accordance with one of her last requests, in a country grave next to the poet father she never knew, who had died at the same age.
The Innovators Page 4