Ada Lovelace is generally considered to be the first computer programmer in history.

Some people argue that Charles Babbage wrote algorithms before her and she was aware of them from correspondence with him. Even if true, she

- Was the first to publish a description of a computer program
- Published the operation sequence and changes of variables during a theoretical execution of the program if the Difference Engine (computer) was to be built (i.e. a manual execution trace)
- Theorized that a program could be used to manipulate entities other than numbers – letters, symbols, and even musical notes.

Modern programming takes less from Babbage’s work on a computing engine that can manipulate numbers better than humans; and more from Lovelace’s recognition that those numbers can represent non-numeric concepts.

There are many places to find details about Ada Lovelace’s life and work and of Babbage and his machines. I will cover the minimum I think is needed to understand Ada Lovelace’s contribution to computing history (more than just the first programmer).

## Babbage’s Analytical Engine

In the 1820s, Charles Babbage designed the Difference Engine. It was aimed at number crunching, using divided differences to create tables such as logarithms and trig functions.

In the 1830’s he generalized it and designed a new machine – the Analytical Engine. In addition to looping through a series of operations and refining approximations like the Difference Engine, it could branch. It also separated out the arithmetic logic unit and memory.

The design had 3 types of cards

- Arithmetic operations
- Numerical constants
- Variables (load & store operations)

While he did generalize the Difference Engine to allow a wider range of mathematical calculations, his focus was still on creating programs to perform mathematical calculations. He wrote dozens of examples of the states the machine would go through to calculate a variety of formulas – if the machine was ever built.

## Ada Lovelace’s Notes

In 1842, Luigi Federico Menabrea published a description of Babbage’s machine in French. Ada Lovelace agreed to translate it into English. She knew Babbage and was familiar with the machine. It still took her 9 months for the translation and notes. Her notes ended up 3x as long as the work she translated.

Note G is often said to contain the first computer program. It described the step-by-step details to calculate Bernoulli numbers on the machine. It described the operation at each step as well as the loading and saving of variables. She described this diagram as a table that

presents a complete simultaneous view of all the successive changes

Babbage had previously documented the states the machine would go through to do the same calculation. Even though his unpublished papers include the algorithm in some form, this was the first published “program” and likely went into much greater detail about the operation and variable cards than any of Babbage’s documentation of the same algorithm.

In addition to the step-by-step details of this algorithm, her notes explained the value of the separation of operation cards and variable cards and the significance of being able to save and load the variable cards.

She described many details about data in general terms, not simply as parts of an algorithm

- Constants
- Working Variables
- Result Variables
- Transformations and feedback

This is a major observation in the progression from a mathematical calculator with intermediate results to a general-purpose, programmable computing device.

In Note A she had a more direct observation related to general-purpose programming

Again,

Note Ait might act upon other things besidesĀ, 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 enginenumber

…the engine might compose elaborate and scientific pieces of musicof any degree of complexity or extent.

This is just one of many times in the notes where she describes not just the functionality of the machine but the possibilities and implications of its design.

She realized that the action of *other things**,** *in some cases, could be specified algorithmically and a machine like the Analytical Engine would be able to perform calculations about them. The purpose of most programs today is to “act upon other things besides number”. I would argue that this recognition is more impressive than her details about the cards needed to calculate Bernoulli numbers on the machine (the first program).

## Interesting Fact

Ada Lovelace’s father was Lord Byron – the famous poet. Her mother left Lord Byron shortly after she was born and she did not have a relationship with her father.

## References

Ada Lovelace’s translation and Notes: https://www.fourmilab.ch/babbage/sketch.html

Images

- https://en.wikipedia.org/wiki/File:Ada_Byron_daguerreotype_by_Antoine_Claudet_1843_or_1850.jpg
- https://en.wikipedia.org/wiki/File:Babbage_Analytical_Engine_Plan_1840_CHM.agr.jpg
- https://en.wikipedia.org/wiki/Ada_Lovelace#/media/File:Diagram_for_the_computation_of_Bernoulli_numbers.jpg
- https://www.fourmilab.ch/babbage/figures/menat5_l.png

Other

- https://en.wikipedia.org/wiki/Analytical_Engine
- https://en.wikipedia.org/wiki/Ada_Lovelace

If you have any corrections, comments, or suggestions, let me know onĀ Twitter.