Countess Ada Lovelace, a day in October that honors her memory and celebrates Women in science, and a gentle enquiry into her contribution towards software programming.

Casually ask any software developer you know – who was the world’s first software programmer and you are likely to get an instantaneous response (unless the person you are speaking to is bereft of any curiosity), that it is Ada Lovelace, the lady who documented the instructions to perform an algorithm on a machine that her friend and collaborator Charles Babbage had built. If you probe them further, they may also tell you that there is a software language named after Lady Ada, and a select few among those to whom you have been speaking ( depending on how aware they are of the industry) may also in a studied tone inform you that Ada is the officially endorsed language of the US DOD (Department of Defense) and nearly 80% of its projects still get written in ADA. Lastly, In case the software developer you are conversing with has literary inclinations, he or she may further educate you that Ada was the daughter of Lord Byron, the maverick poet, and Annabella, a mathematician. So much about Lady Ada Lovelace is part of the public consciousness. In modern times, since 2009, the second Tuesday of October each year has been celebrated as Lady Ada Lovelace Day, a countess who lived in the eighteenth century and is widely accepted as the world’s first software programmer, a claim that may not be factually true, but there is no doubt that she was the first person to poetically evangelize the steps to write code or a software program among the educated citizens of her time. We will get to that story later. Ada Lovelace Day came into being through a British civil action pledge initiated by the renowned technology blogger Suw Charman-Anderson, whose aim in drafting such a pledge was to recognize the role of women in science. A wonderful idea and important too. The pledge quickly gathered traction, and before long, the idea was endorsed and adopted by nations across the globe.

Only a few children would have had such an interesting entry into this world as Ada did. On the eve of her birth, when her mother was in labor, her father Lord Byron sat in the room below and threw empty bottles on the ceiling lamenting ” Oh! what an implement of torture have I acquired in you”. Not that Byron had anything against Ada and Annabelle, but he was just not a family man. The responsibilities of a parent were not for him. He was, after all, England’s most celebrated poet, a champion of the romantic movement, an eccentric genius, a womanizer who allegedly had an incestuous relationship with his half-sister, and what’s more – a homosexual too, at least there were strong rumors that he was gay, an unpardonable crime in Elizabethan England. Ada’s parents lived together only for a total of eleven months before Byron disappeared from their lives forever. Annabelle was happy that he was gone, she didn’t want even the shadow of Byron, especially his bursts of madness and poetic sensibilities, to fall upon Ada’s life. What she had endured was enough; her daughter would grow up differently with a logical bent of mind. The young child Ada never saw her father in flesh. Ada was eight years old when Byron’s body was brought back to London after his death with full honors amidst an outpouring of public grief, but the event didn’t touch Ada in any manner or trigger a realization that she was the daughter of one of the celebrated men in England. That realization came much later, and when she got to know her heritage, it pushed her into doing what she would eventually become known for.

Annabelle couldn’t do much with her daughter either. She thrust mathematics at the young girl as an antidote to any madness she may have inherited from her father’s side, as a salvation from bad genes. But Ada showed every sign that something of the Byronic tendencies was present in her. She was temperamental, had frequent fits of hysteria (even occasional blindness and paralysis due to this), and even more frequent bouts of melancholy. Her fragile health and nerves were always a cause of worry for her mother. It was quite clear at a young age that Ada didn’t possess the focused thinking mathematics required or what her mother thought she could inculcate in the girl, and this inability to do maths would haunt Ada till the very end, even when she collaborated with Babbage on the work that would eventually enshrine her name in history. Annabelle was, obviously, oblivious of her daughter’s weaknesses interests, or talents. To cool her passions and tame her mind, she insisted Ada work through the six books of Euclid’s geometry, which can be a daunting task to even the best of minds. Not surprisingly, it didn’t go well. Such acts of parental interference from an ambitious and overzealous mother only managed to alienate the daughter and drive her away from any serious intellectual inclinations she may have had. But there were many things Ada did have in her favor: She was pretty, extremely well-read, flirtatious, ambitious, had a deep interest in mechanical appliances and scientific ideas behind them, and was a consummate conversationalist with a notable flair for words ( not hard to guess where that could have come from). As she matured suitors piled on, and it was during a party in her first official London season, that she met Charles Babbage. An encounter that would prove pivotal for both of them.

Babbage was a maverick himself. He liked to build things. The Industrial Revolution was beginning to take root and Babbage believed that inventing a calculating machine ( Difference Machine) could help engineers and navigators in multiple ways. He was, of course, not the first to think of such an idea. Pascal in 1642, and Leibnitz in 1673 had already built such appliances, and the French academy, after the 1789 revolution, had already thought of an efficient way to divide complex calculations into micro pieces on the lines that Adam Smith, the English economist had advised in the immensely influential book “The Wealth of nations” ( division of labor). Babbage’s Difference machine merely continued the tradition pioneered by his predecessors. What differentiated Babbage’s effort was his insatiable appetite for innovation. He kept tweaking his baby, trying out various refinements to the Difference machine without ever delivering a work-ready machine for anybody’s use. The patience of the government which was funding these experiments, ran out. Nearly fifteen thousand pounds were already invested and nothing to show for it. Funding was stopped. It didn’t matter though, by then Babbage himself was on to another idea.

What Babbage did next was truly revolutionary. In a fit of insight and innovation, he envisioned a broader machine capable of processing any set of instructions provided there was a store ( memory), mill ( processor), and input mechanism in the machine. As long as instructions fed into the machine were encoded in symbols that the machine could process, it didn’t matter what those instructions were, the machine should be able to process it. This was a mind-bending idea, the idea that instructions passed on to an underlying machine can be independent of the machine that will process them – software vs hardware. A machine built on this principle can not merely work as a mathematical calculator but can process any set of instructions fed into it, provided the machine can decipher the symbols. In short, what Babbage wanted to build was a general-purpose machine or an Analytical engine as Babbage christened it. There are two keys to the working of this machine: how inputs are encoded and the input mechanism itself. It is a well-known fact that Babbage borrowed the idea for both these elements from Joseph Marie-Jacquard, the Frenchman, and the inventor of the automatic loom. The beauty of Jacquard’s loom was that a weaver with an artistic eye could conceive wonderful patterns, punch holes in cards, and give them to the weaver – who then can bring those patterns out on cloth. By changing the punching cards( the instructions in other words), the loom could produce different patterns – an idea that is central to the evolution of modern-day computers.

Between 1836 and 1840, when Babagge was feverishly working on the Analytical machine, he met Countess Ada Lovelace at a ball. Ada was around twenty-seven years old, married by then to the Earl of Lovelace, had mothered three children, and was in search of something big and challenging to channel her energies. At this time, she was fully conscious of her Father’s literary heritage. After finally having been allowed to see a full-length portrait of her father, exposed to his ecstatic poetry, and understanding the complex nature of his genius, she was convinced, against the will of her mother, that it was her duty to cleanse and redeem his genius, clear the Byronic name, by bringing forth to the world some great truths and principles. She was unsure, however, of what form or shape those truths or principles were to be, but she knew she could find them in the world of science and maths. But the problem was that Ada wasn’t very good at mathematics, even though she tried hard to master the subject. One must remember that she was a self-studied mathematician. No formal education, except a series of epistolary tutoring in math by a French tutor, Augustus De Morgan. Sixty-three letters were exchanged between the two, and in one of them, Ada expresses her feeling of helplessness at her inability to solve even simple mathematical equations. In a poetic vein, she described her predicament of solving algebraic exercises as elusive as “Fairies and sprites”. In other words, she struggled with mathematics, even though she tried very hard to master it. Her letters to Augustus de Morgan now remain for public view in the science museum at Kensington. They are beautifully written, no doubt, but there is nothing in those letters to inspire confidence that she was breezing through mathematical problems.

Sometimes, great events are triggered by simple coincidences. The intersection of Ada and Babbage’s interests amply illustrates this phenomenon. In 1842, Babbage was requested as a guest of honor to give a public presentation of his Analytical machine, in fact, the only one he ever gave. The location was Turin, Italy. Among the guests that day, sat a young military engineer who would one day go on to become the Italian Prime minister. Captain Luigi Manabrea was enthralled by Babbage’s presentation, took copious notes during the talk, and later published it in Italian under the title ” Sketch of the Analytical Engine”. Knowing Ada’s interest in contributing to science and scientific ideas, a friend suggested that she should perhaps attempt a translation of the paper into English for publication in a British journal. Ada instinctively liked the idea. Here was an opportunity to bring forth an original scientific idea to the world. She approached Babbage with the proposal, and he readily accepted her offer. It is unthinkable at that age that a woman should write a scientific paper, but for Ada, that was the least of her concerns. She was enterprising, good with words, and believed deep inside that she had the acumen to translate Manabrea’s paper for the English reader. It is that audacity that we commend today after two centuries. For Babbage, it was a stroke of good luck that someone like Ada, with a Byronic family pedigree, should evangelize his work. He was a shrewd man. He knew if Ada’s paper circulated well, his project could reach the ears and eyes of those who matter, even at the highest circles in the Land, and that meant more money for his work.

Ada immersed herself in the translation. She corresponded prodigiously with Babage to seek clarifications, share comments, and validate what she had written. Babbage was more than willing to offer any assistance she needed. He supplied her with the diagrams and formulas that fueled his machine. But the language in which the descriptions were couched were entirely hers. Ada’s poetic imagination and the desire to elevate the subject matter into something beautiful and divine was evident in each paragraph. Immortal sentences such as ” The Analytical machine weaves algebraic patterns just as the Jacquard-looms weaves flowers and leaves”, left the readers breathless and awe-struck. Could a machine really do that? Ada illustrated her statements with several programs that machines could execute, but all of them were supplied by Babbage, and her role was to select, organize, and present them well. The fame on which Ada’s contribution rests lies in the computation of Bernoulli’s numbers, a specific sequence of numbers, discovered by Jacob Bernoulli in the eighteenth century that helped in building navigational tables. Babbage shared the equation with Ada to generate the Bernoulli sequence, and she ran into severe difficulties in breaking down the algebraic expressions into simpler units. Once again, her shaky mathematical foundations became a severe impediment to her enterprise. In one of her letters, she writes with obvious pain:” I am in much dismay at having got into so amazing a quagmire and botheration about these numbers”. Babbage tried his best to indicate solutions, but he quickly found that it would be easier to share the solution with Ada ” to save her the trouble” ( as he wrote in his autobiography, conveniently published after Ada’s death). The fact however remains, that the solution Ada presented in her paper closely resembles the solution given to her by Babbage, including the tables and diagrams he had drawn up. Once Ada finished the draft, she requested her husband Lord Lovelace to make a clean copy. The paper was published in August 1943. It is the pseudo-code that she documented for generating the Bernoulli sequence, that is today celebrated as the first attempt at writing a software program. Since the steps were found in Ada Lovelace’s paper, posterity has been justifying the claim that Ada Lovelace was the world’s first programmer. It depends on how one looks at it.

The paper Ada wrote was twice as long as the original, and one of the most interesting things about it, apart from the language, is the number of general and philosophical principles she derived from the workings of the machine. She rightly inferred that Babbage’s machine could transcend numerical calculations and could be operated on any type of symbols. She was bold enough to write that the Analytical machine is capable of creating” elaborate and scientific pieces of music of any degree of complexity or extent”. She poetically exclaimed how this machine is an example of the bridge between mind and matter, with symbolic instructions fed into the system, and the concrete outcomes coming out of it. In one of the boldest and most daring assertions in the paper, she proclaimed that: ” The Analytical Engine has no pretensions whatever to originate anything. It can do whatever we know how to order it to perform”. A century later, in 1950, Alan Turing challenged this statement and posited that thinking in all forms can indeed be mechanized. In his seminal paper ” Can Machines Think?” Turing labels Lady Ada’s claim that machines cannot do any original thinking as ” Lady Ada’s objection” and goes on to refute it, laying the seeds for what would later be rechristened as AI. Turing theoretically demonstrated that it is possible for Machines to alter instructions given to them based on the sequence of processing. Lady Ada hadn’t considered this possibility.

There are many serious critics who believe that the ideas Ada sketched in her paper were not really her own. She borrowed heavily from her correspondence with Babbage. Be that as it may, what Lady Ada brought to the paper was style, wonder, passion, and a facile manner of expression that made the working of the Analytical machine accessible to a wider audience – both lay and scientific. The fact that Turing referred to her observation is enough indication of the influence the paper had on the scientific community. Babbage was happy to let Ada take the credit. It helped his cause to evangelize his idea through Ada without any censure or critique attached to him. Most of the biographies of Lady Ada celebrated her Byronic heritage and glamorized her contributions without paying attention to the provenance of her scientific and mathematical observations. Her First biographer, Doris Langley Moore described Ada in glowing terms: “enquiring, speculating, arguing, filling pages with equations, problems, solutions, algebraic formulae, like a magician’s cabalistic symbols”. Later biographers were more circumspect. Dorothy Stein’s “Ada, A Life and Legacy” and Sadie Plant’s wonderful book ” Zeros + Ones” treat Ada’s contribution with more caution and objectivity without getting carried away by her literary heritage and questionable attempts to fit facts into the story of her incandescent life.

No matter whether Lady Ada’s paper was original or not, the fact that we remember and celebrate her work after two centuries owes a great deal to the paper she translated in 1842 and sprinkled with her insightful annotations and notes. How a software program is written has remained unchanged since her description of the solution to Bernoulli numbers. She may not have conceived the solutions herself, but the way she laid them down on paper in simple and easy steps with succinct explanations became the blueprint for future generations of software programmers. That is a great achievement in itself. History has a curious habit of romanticizing its heroes and heroines, especially the scientific variety. We like our discoveries and inventions to be pinned down to a single moment, the “Eureka” moment as we call it. Such a narrative gives us a secret hope that flashes of inspiration can come to anyone, even if one is mediocre or lacking in effort. It is a very consoling narrative and absolves people from making an effort. But the reality is different. Nothing creative ever happens without the toil and effort of many people before the event, and eventually, when a breakthrough erupts through an individual, it is more a synthesis of all the work that has happened in the past transformed through the extra effort of that person. That is the meaning behind Sir Newton’s famous words ” Standing on the shoulder of giants”. Lady Ada’s paper synthesized and articulated the work of many individuals ( Babbage himself heavily borrowed from his predecessors) whose contributions had laid the groundwork for building a machine that could execute operations based on an independent set of institutions. There is nothing to suggest in her correspondence and papers that she discovered anything new. I don’t quite buy the idea that she was the world’s first programmer, but I certainly acknowledge that she was the first to express how programming can be done. In both art and science, we need geniuses, and we need people who can evangelize the work of those geniuses: Darwin had his Huxley, Johnson his Boswell, and Babbage and Jacquard-loom had Countess Ada Lovelace.

A fit epilogue to this essay can be an extract from one of Lady Ada’s letters to Charles Babbage. In this passage you can see the frenzy of her passion and the commitment of the young countess to achieve something immortal:

“…This brain of mine is something more than merely mortal; as time will show… Before ten years are over, the Devil’s in it if I have not sucked out some of the life-blood from the mysteries of this universe, in a way that no purely mortal lips or brain could do. I am doggedly attacking & sifting to the very bottom, all the ways of deducing Bernoulli’s numbers. I am grappling with this idea and connecting it to others…”

We salute such a spirit every October.

2 comments

  1. For nearly a month, I’ve been eagerly anticipating something intellectually stimulating. My thirst for knowledge was finally quenched by this article! I’ll admit, I didn’t have much prior knowledge about Ada, but the pace and enthusiasm with which I devoured this piece speaks volumes about its thought-provoking content.

Leave a Reply

Your email address will not be published. Required fields are marked *