\chapter{The Faces of Computing: \\Ada Lovelace}

Computer science is strongly allied with mathematics, and while the face of both of those fields is often a white male face, many women and minorities have contributed to both mathematics and computer science over the years. I suspect that my experience is anomalous here, because while my high school computer teacher was a white man, the single computer course I took in college was taught by a white woman. And when I later got involved in WordPress theme and plugin development, I worked with men and women (mostly men, but a fair number of women) from all over the world. 

\setlength{\intextsep}{0pt}%
\begin{wrapfigure}[16]{r}{0.35\textwidth}
\centering
\includegraphics[width=0.35\textwidth]{lovelace}
\caption{Detail of Margaret Sarah Carpenter's portrait of Ada Lovelace}
\end{wrapfigure}

Ada Lovelace, otherwise known as Augusta Ada King, Countess of Lovelace, was the first woman to make significant contributions to both fields. 

Lovelace was the child of the English poet Lord Byron\footnote{Who was ``mad, bad, and dangerous to know'' according to his mistriss Lady Caroline Lamb.} and reformer Anne Isabella Milbanke. This period in English history is especially fascinating to me, as Lord Byron was in a social circle that included the poet Percy Bysshe Shelley and his wife Mary Shelley (who was the daughter of Mary Wollstonecraft, an early feminist and advocate of women's rights, and William Godwin, who had many not-so-nice things to say about aristocracy), in addition to his wife and daughter. This circle would eventually lead to the production of \textit{Dracula} by Bram Stoker, \textit{Frankenstein, or the Modern Prometheus} by Mary Shelley, the modern computer algorithm and by extension, the modern computer industry, a progressive view toward education, and many, many great horror films (not to mention quite a few bad, but delightful, ones).

While much as been written about Ada's father Lord Byron, her mother Lady Byron (i.e., Anne Isabella Noel Byron, 11th Baroness Wentworth and Baroness Byron) was an interesting personality herself. She was an education reformer and philanthropist, in addtion to being an abolitionist. She established the Ealing Grove School, the first industrial school in England. At this school, academic subjects were combined with three hours of gardening each day, and corporal punishment was not allowed. (By contrast, corporal punishment in elementary school was still a thing when I was a student in the 1970s.) 

Ada showed an early interest in mathematics, and her mother encouraged this in an effort to ward off the development of what she perceived as Lord Byron's insanity.\footnote{This was, after all, an age which did not have a good understanding of mental illness. We are doing better in this regard, but we still have quite a way to go.} At the age of eighteen, she began a long working relationship and friendship with Charles Babbage, the British mathematician. At the time, Babbage used to host a ``Saturday night soirée'' which was often attended by the cultural elite, including Charles Dickens, Michael Faraday (an early pioneer in the study of electromagnetism), Henry Fox Talbot (a photography pioneer who invented the calotype process, an early precursor to modern wet photography), and Charles Wheatstone (who was a pioneer in the study of electricity, invented the English concertina, and also invented the Playfair cypher, which was the first cipher to encrypt pairs of letters, rather than individual letters). 

That's a pretty impressive crowd to hang out with on Saturday nights.

It was at one of these soirées that Babbage introduced his ``Difference Engine'' which was a mechanical computing device that was designed to tabulate logarithms and trigonometric functions by evaluting finite differences to approximate polynomials. Although this device was never fully built, it led Babbage to realize that a much more general design, the ``Analytical Engine'', which incorporated an arithmetic logic unit (i.e., a circuit that performs arithmetic on integer binary numbers), integrated memory, and control flow in the form of conditional branching (i.e., \texttt{if-then-else} and loops (i.e., \texttt{for-next}).

Let's take note of a couple of things about Babbage's Analytical Engine. First, it was never built (Babbage had a lot of disagreements with his chief engineer and had difficulty funding its development,\footnote{By 1842, the British government had already given him £17,000—the modern day equivalent of almost £1,700,000—to fund the development of his Difference Engine, which was only partially built and then abandoned when he moved on to the Analystical Engine.} so it was an entirely theoretical construct. Second, it was considered to be the world's first Turing complete computer, which is pretty impressive for a 19th century device.

What it means for a computer to be Turing complete is complex (and therefore, the subject of much controversy) but it basically boils down to its capabilities. A Turing complete device means that you can program it to find any answer, provided you have unlimited runtime and memory/\footnote{Because no computer has unlimited runtime or memory, no device is \textit{truly} Turing complete—as Captain Barbossa said, it's more of a guideline than a rule.} Your computer is Turing complete, whereas your calculator and kitchen timer are not. The Difference Engine was not Turing complete because its intended output (and what the British government wanted and was willing to give Babbage so much money for) was tables of logarithms and trigonometric functions and as a result its initial numerical constants consisted of polynomial differences set physically, but that was all that it could produce. The Analytical Engine had the same basic structure as modern computer design, albeit in a larger, clunkier fashion.

Because it was Turing complete meant that it had a \textit{lot} of potential, and Ada Lovelace was the first person to figure out a way to tap that potential. Despite her close association to Babbage, it was a somewhat indirect path to unleashing that potential. In 1840, Babbage gave a seminar about the Analytical Engine at the University of Turin. This seminar was transcribed into French by a young Italian engineer (and future prime minister of Italy) named Luigi Menabrea. A couple of years later, Charles Wheatstone (remember him?) commissioned Lovelace to translate Menabrea's paper into English, which she did, adding seven notes (labeled A-G). The notes were three times longer than the actual translation, so she not only translated Babbage's seminar, she also greatly expanded the understanding of how the Analytical Engine could be used for practical purposes.

Of these seven notes, the last—Note G—is perhaps the most significant in the history of computers, because it describes, in complete detail, how to use the Analytical Engine to calculate a sequence of Bernoulli numbers. I am not a mathematician, so I had to look this up (because I initially confused these with the Fibonacci sequence), and \textit{Wolfram Mathworld} describes them as 

\begin{quote}
The Bernoulli numbers $B_n$ are a sequence of signed rational numbers that can be defined by the exponential generating function


\[
	\frac{x}{e^x-1} \equiv \sum_{n=0}^{\infty}\frac{B_nx^n}{n!} 	
\]

These numbers arise in the series expansions of trigonometric functions, and are extremely important in number theory and analysis.\footnote{See \kref{https://mathworld.wolfram.com/BernoulliNumber.html}{https://mathworld.wolfram.com/BernoulliNumber.html}}
\end{quote}

That is not something I understand and therefore cannot do on a calculator or with a spreadsheet, which leads me to appreciate Ada Lovelace's abilities all the more because she had neither of these.

Many scientists of the time did not understand the Analytical Engine and most of them showed little interest it it.\footnotemark{} Were it not for the interest of a young Italian engineer and the efforts of Ada Lovelace, his work might be unknown to this day. To be certain, Babbage's personal notes contained programs for the engine, but because Lovelace's work was published, Note G is considered to be the first published computer program. % Keep with next paragraph

\footnotetext{I mentioned earlier that Babbage had disagreements with his chief engineer. (If I learned anything from \textit{Star Trek} it's that you shouldn't argue with your chief engineer. Science does not care about your military tactics.) He also expressed a distaste for the common people, campaiging in his later life to make street musicians and hoop-rolling (a popular game for boys at the time that dates back to ancient Greece) and tip-cat (a probable early precursor or analog to both cricket and baseball)  illegal, and once actually counted all the broken panes of glass in a factory, noting that of the 464 panes, 14 were caused by ``drunken men, women or boys''. (Seriously, who does this?) He also railed against his detractors in later life, so he was either just bitter or he was a difficult person to get along with (or possibly both). Despite his Saturday night soirées, he does \textit{not} seem fun at parties. (See \textit{Nineteenth-Century Science: An Anthology} edited by A.S. Weber and published by Broadview Press in 2000 for the few details that exist.)}

I am constantly astounded by the depth and breadth of Lovelace's vision here. First, she was asked to translate (nothing more) a seminar on a device that hadn't been built yet, and then went on to also imagine practical use for that device and then describe the exact process to do that. She also allowed her notes to be published, albeit under the initials ``AAL'' because it's unlikely the vast majority of the scientific community of the time would have taken anything published by a woman seriously at the time, although I'm sure it wasn't difficult for anyone in the scientific community at the time to have found out who ``AAL'' actually was.\footnote{Scientists tend to be pragmatic, so accepting the work of a female mathematician would not necessarily have been a personal issue. But science does not operate in a vacuum, so \textit{publically} acknowledging the work of a female mathematician is not something they were able to do. This is an issue we continue to struggle with to this day, leading to the work of women and minorities being ignored or worse, credited to white men who contributed little if anything to it, other than pointing it out. Or putting their name on it and claiming it as their own.}

Even Babbage didn't seem to be aware of the potential of the Analytical Engine. ``I don't think you have even half my foreboding and my ability to see all sorts of eventualities'', she wrote to Babbage. Reflecting her mother's preoccupation with mental health and her own interests in phrenology and mesmerism (which are now considered to be non-scientific, but which were very much on the minds of scientists of the time), she added ``The Analytical Engine 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, and which should be also susceptible of adaptations to the action of the operating notation and mechanism of the engine''.\footnote{See \kref{https://www.dpma.de/english/our_office/publications/ingeniouswomen/adalovelace/index.html}{https://www.dpma.de/english/our\_office/publications/ingeniouswomen/ad\\alovelace/index.html}.} In other words, Babbage saw the Analytical Engine as a device for crunching numbers, but Lovelace saw it as something capable of much more.

Sadly, Ada Lovelace passed away at the age of 36 from cervical cancer. What our world would look like had she not died so young and if the Analytical Engine had been built and she continued to develop programs for it is something we will never know.

Fortunately, her contributions \textit{are} acknowledged today. In the latter part of the twentieth century the United States Department of Defense developed a programming language called, naturally, ``Ada'' which was designed to develop very large software systems. The British Computer Society awards an annual Lovelace Medal to individuals who have made outstanding contributions to the understanding or advancement of computing, which is the top award in computing in the United Kingdom. The Association for Women in Computing also presents an annual Ada Lovelace Award, which is given to individuals who have either outstanding scientific or technical achievements or have given extraordinary service to the computing community on behalf of women in computing. And of course, there is Ada Lovelace Day, which is celebrated on the second Tuesday of October and is an international celebration of the achievements of women in science, technology, engineering and maths.

Despite the current state of the world, I hope we reach a point when everybody's contribution, regardless of race or sex (or \textit{whatever}), can be appreciated and celebrated.