Home » Ada Lovelace Wrote the First Computer Program
Ada Lovelace Wrote the First Computer Program
Researched by Thomas DeMichelePublished - October 13, 2015 Last Updated - September 7, 2018
Was Ada Lovelace the First Computer Programer? Who Wrote the First Computer Program?
British mathematician Ada Lovelace can be considered the mother of computer programing, as she wrote the first complex algorithm meant to be carried out by a machine. However, it is a myth that Ada Lovelace wrote “the first computer program” or was “the first computer programmer,” that title belongs to “the father of the Computer” Charles Babbage (who himself built off the work of Pascal, Leibnitz, and Müller, just as Turing would build of all their work later to help create the first digital computers).
Calculating Ada: the Countess of Computing. A clip from a documentary by the BBC which accounts for Ada’s actual role in computing as well as the research of Doron Swade a computer historian whose focus is Babbage, and who showed that Babbage technically wrote the first computer program.
FACT: The ancient Greek device, the Antikythera mechanism (circa 200 – 100 BC), is generally considered to be the world’s oldest known mechanical analog computer. The history of non-digital computing stretches back far beyond Lovelace and Babbage, but modern computing starts with them… on-paper at least.
All three also worked with others including Babbage’s assistants and a group of Italians, who history doesn’t always name.
“I confirm that the manuscript evidence clearly shows that Babbage wrote ‘programs’ for his Analytical Engine in 1836-7 i.e. 6-7 years before the publication of Lovelace’s article in 1843. There are about 24 of such ‘programs’ and they have the identical features of the Lovelace’s famous ‘program’”. – Computer historian Doron Swade reflecting on his studying of Babbage’s code, as quoted in the article Ada Lovelace: Original and Visionary, but No Programmer.
TIP: It would be years before anyone built a working Babbage machine or could test the code, but today we can confirm Ada’s complex code was flawless and can accurately calculate Bernoulli Numbers, and likewise Babbage’s machines work in practice (although we can’t always say the same for his code).
Addressing the Ada Lovelace Myth
Today it is common to claim that Ada was “the first programmer”, or “Ada wrote the first line of code” due to the complexity of her code, the accessibility of her code over Babbage’s own code (her code is famous and featured in an image below, his is “confirmed by manuscript evidence”), and almost most importantly her vision of the the Engine as more than just a fancy calculator.
However, the fact that she didn’t actually write the first code means those who claim her as “the first computer programmer” are offering an overly simple account of the otherwise very important and interesting story of Ada, Countess of Lovelace, Daughter of Lord Byron, mother of computer programming and “poetical science“, and one of the first to state that a computer could be used to do more than just crunch numbers (she mused on the idea that it could create anything we know how to order it to preform from music to art).
TIP: A hundred years later when Alan Turing asked “can machines think?” he didn’t cite Babbage (although he does discuss him in the paper), he instead cited “Lady Lovelace’s Objection”. Her objection represents the bridge between Babbage’s view of his machines as a “high-powered calculators” and Turing’s view of them as being able to “think”, as she postulated that they could be used for much more than just mathematics, but was limited to doing “whatever we know how to order it to perform”.
Can a computer program think? Can machines think. Turing would say yes, Ada had assumed the answer was no.
Comparing the Programs of Lovelace and Babbage
As noted above, Ada Lovelace wrote one of the first computer programs in 1842, but her mentor Charles Babbage wrote the first program in 1836. Let’s compare these programs.
Ada’s program is a set of notes on Luigi Federico Menabrea’s “Sketch of the Analytical Engine Invented by Charles Babbage, Esq.”, showing how Charles Babbage’s theoretical Analytical Engine could calculate Bernoulli numbers using punch cards (see the image below).
Due to the supposed simplicity of Babbage’s notes (produced between 1836 and 1837), and the confirmable complexity and of Lovelace’s Bernoulli number program contained in Note G of her Notes (produced between 1842 and 1843), Lovelace is often regarded as the first computer programmer, and thus the internet is filled with headlines like, “In 1842, Ada Lovelace Wrote the World’s First Computer Program“.
The problem is of course, that this version of the story omits Babbage’s programs written years before Ada’s similar, but more complex, program.
FACT: Charles Babbage can be considered to be the “father of the computer” due to his work in early theoretical and real computers. Babbage, sometimes with the help of protege Lovelace, is credited with inventing the first mechanical computer (Difference Engine 1822),”the first general-purpose computer” (Analytical Engine 1837), and originating the concept of the programmable computer. We can see why a story that downplays Charles is just as troublesome as one that downplays Ada when we take a good look at the accomplishments of the dynamic duo.
FACT: Between 1842 and 1843, Ada translated an article by Italian military engineer Luigi Menabrea (whom also deserves a nod) on Babbage’s Engine, which she supplemented with an elaborate set of notes, simply called Notes. These notes contain what many consider to be the first computer program, an algorithm designed to be carried out by a machine. Lovelace then did what no one else would for years, she speculated that “computers” could be used for more than just calculations, examining how individuals and society relate to technology as a collaborative tool (what she called “poetical science”). While her title of “first computer programmer” is debated, her title of “computer visionary”, “poetical scientist”, and early programmer is not.
The First Complex Computer Program: Ada’s Note G. Program
Ada Lovelace wrote one of the first executable computer programs for Charles Babbage’s machine (see examples of Babbage’s earlier work here). Ada’s program on Note G., the one claimed to be the “first computer program”, looks like this:
Ada Lovelace’s notes. Considered by some to be the first computer program ever written. A computation engine for Bernoulli Numbers. Note G.
FACT: The first analog computer is from around 200 BC, it is called the Antikythera Mechanism. Facts like this are useful to remember when trying to nitpick the story of computer firsts in the 1800’s. There were also mechanical calculators long before Babbage’s machines. Pascal made one in 1642, and we now know there was even one in antiquity.
The Story of Ada and Babbage: The History of the First Computer Program
Ada Byron was a longtime friend of Cambridge mathematics professor Charles Babbage.
Babbage invented the Difference Engine in 1822 (based on an idea by J. H. Müller written down in 1786). The Difference Engine was a theoretical mechanical computer designed to automatically produce error free tables of numbers (something that was historically difficult to do). 
Although it would be built in 1985, the Difference Engine was never built by Babbage in his time.
By 1834 Babbage switched his focus to a new project, the Analytical Engine.
The Analytical Engine is today considered “the first general purpose computer”. The Analytical Engine was designed to use punch cards for input and output (just like computers would 100 years later). 
The above said, Babbage was never able to build his Analytical Engine either. He was, however, able to give speeches on how it would work in theory.
In 1842 Ada annotated a speech, by her now long time friend Charles Babbage, about the Analytical Engine.
Ada was ambitious and wanted to show how the machine could calculate more conceptual things like Bernoulli numbers (Babbage had thought of the machine as more of a super-powered calculator). Her notes ended up being longer than Babbage’s speech, and the final notes included, among other things, (in Section G) a detailed method for calculating a sequence of Bernoulli numbers.
It was proved nearly 100 years later that her error-free notes worked in practice, not just theory, and thus contained what would later be described (somewhat erroneously) as the world’s first computer program.
FACT: A working version of Babbage’s Difference Engine was constructed in 1985–2002  proving his machines worked. This makes Babbage the creator of the first general purpose computer.
Ada Lovelace, the Computer Visionary
To touch on the above point again, one of the most important aspects of Lovelace is her vision of what computers could do (and not her program).
Lovelace started a line of thinking that showed computers can do more than just calculate numbers. Lovelace suggested that the Engine “might act upon other things besides number… the Engine might compose elaborate and scientific pieces of music of any degree of complexity or extent”. The idea of a machine that could manipulate symbols in accordance with rules, and that number could represent entities other than quantity, marks the fundamental transition from calculation to computation in computer history. Later Alan Turning would cite Lovelace in his famous paper on “can machines think?“.
Despite the proper story being a little more complicated and a little less romantic than the one that places Ada as “literally the first computer programmer” and Babbage as the analytical and mistake prone old Codger who Lovelace danced creative circles around, the actual story is equally as important and highlights the importance of teamwork rather than individual greatness.
In the end, Ada’s program, and Babbage’s machine, represent huge leaps forward in computing technology.
FACT: Neither Charles or Ada’s program wasn’t executable until over 100 years later (as actual computers didn’t exist yet). Babbage’s machines weren’t built until the late 1900’s (the Analytical Engine has never been built, but a project is in the works). Today we have proved that Babbage’s theoretical computers worked (meaning he invented the general-purpose computer) and that Lovelace’s programs worked (meaning she was one of the first, if not the first, to write a fully executable computer program). With that said, both are important to the history of computing for more than just being “the first” at something.
FACT: Today we celebrate Ada Lovelace Day to remember her contribution to computer science, and importantly, we remember Charles Babbage (and theoretical computers in general) along with her. 
Lovelace, Babbage, Multiple Discovery, and the First Computer Program – Who Deserves Credit?
As noted above, history is a little fuzzy on who should be credited with what in the Babbage / Lovelace relationship. Below are some more considerations to think about when trying to figure out who deserves credit for what.
Ada’s notes contain a complex “computer program” that is still executable today, making her a good candidate for “first programmer”, but If we are being literal, she was predated by Babbage’s more rudimentary coding attempts from years before.
One has to consider that Babbage was detailing his theoretical machines in his notebooks before he even met Lovelace, meaning he really couldn’t have helped but to write the first bits of code (overly simple and full of errors, or not) years before Lovelace’s Notes.
Lovelace and Babbage both deserve credit in the creation of what could be considered the world’s first computer program (and let us not forget Menabrea, Babbage’s assistants, and the other Italians who worked with them).
With this in mind, Ada Lovelace herself is certainly not mis-credited with the title of world’s first computer programer by many measures, it is only that the overly simple title really doesn’t hold up under scrutiny.
It is likely today we would consider Babbage and Lovelace a team, like Jobs and Woz, each with different skills that led to an important technological achievement.
Furthermore it is important to recognize the other uncredited people who likely wrote code in and around the same time (remember Babbage and Lovelace were semi-famous aristocracy of sort in their time, more like a Turing or an Einstein).
All this to say, “Ada Lovelace created the first complex computer program, but she wasn’t the first computer programmer, that was the father of the computer Charles Babbage, her friend and partner”. Lovelace is important for lots of things, including her visionary approach to computing, and there isn’t really a need to confuse her story for those who want to explore her character, accomplishments, and times.
TED – Ada Lovelace – YouTube. This video explains the history of Babbage, the Analytical Engine, and Ada’s code. It is a talk given by the guy heading the project to build the Analytical Engine, so it is a smart one to watch.
FACT: Both Babbage and Lovelace have earlier work pertaining to the Analytical Engine and Difference Engine 1 & 2. They both spent their career contemplating these theoretical computers like Pascal had done before them.
FACT: The Analytical Engine is a theoretical computer, the ENIAC is the first working electronic general-purpose computer.
Ada Lovelace was one of the first programers, but it is a mistake to credit things like “the first program” to one person and not recognize others (see multiple discovery theory). In reality Charles Babbage wrote the first bits of code, Ada just improved upon what Babbage was already doing.
Charles Babbage invented his difference engine in 1822 and the first general purpose computer, the Analytical Engine, in 1837 along with some basic code for it.
Meanwhile, Ada Lovelace created the first complex executable computer program as notes for this device in 1842 and 1843 (although Babbage had written earlier more rudimentary codes with errors in 1836 and 1837).
Given they were close friends, I doubt they would want anything other than to share the fame. Furthermore, as they were both mathematicians and computing nerds wanting to push the bounds of science. It is likely they would simply prefer we learned about theoretical computers, and other greats computing including their predecessor Alan Turing, rather then sacrifice one to glorify the other with a mindset that we can only place one figure on a historical pedestal at a time.
If we have to credit one, let us credit Babbage with “firsts” and Ada with “creative improvements”. We can’t ignore the fact that Babbage invents his Difference Engine when Ada (born in December 1815) is not even 7 years old. When the two do begin to collaborate later, it is with Babbage as the mentor and the “Analyst (& Metaphysician)” Lovelace as a star pupil.
Thomas DeMichele is the content creator behind ObamaCareFacts.com, FactMyth.com, CryptocurrencyFacts.com, and other DogMediaSolutions.com and Massive Dog properties. He also contributes to MakerDAO and other cryptocurrency-based projects. Tom's focus in all...