18 October 2022

Ada Lovelace wrote the first ever computer programme!

Annabella Milbanke (1792-1860) was the only child of weal­thy parents in high society. Her educat­ion was first rate, especially math­emat­ics and during her court­ship with poet Lord Byron, they had a meet­ing of the minds. Annabella and Lord Byron soon marr­ied, but when Ada Byron (1815–52) was born, Byr­on was an­gry about the restrictions of marriage

Lord and Lady Byron
married Jan 1815

Portrait of Ada, 1835.

Lord Byron immediately informed his wife that he would continue having affairs and soon asked her to leave with the child. Rumours were swirling around Lord Byron’s in­c­estuous rela­tionship with his half-sister, so in 1816, Lady Byron gathered the baby and left for her par­ents’ country home. By­ron left for Greece for good; Ada never met her father.

Annabella gave her daughter a top education be­cause she was worr­ied that an unchecked imagination might encourage Lord Byron’s bad in­fluen­ce. Described by one mistress as mad, bad and danger­ous to know, Lord Byron was infamous for his dis­solute public life, drug addiction and mental health struggles.

Because of Annabella’s fears and despite suffering ill-health in ch­ild­hood, Ada was tutored in math­s and sc­ience. Thanks to Anna­b­ella’s suspicion of the arts and her love for maths, Ada fl­ourished with unusual sub­­jects for girls. She was taught by social reformer William Frend, physic­ian William King & Scot­t­ish mathematician Mary Somerville of Royal Astron­omers Society fame. Ada loved talk­ing to scient­ists & mathematicians more than to pot­ential suitors.

Lady Byron and Ada Lovelace had an intell­ectually stimulating relat­ion­ship in adult­hood, often going to English math­emat­ic­ian/inventor Charles Babbage (1791-1871)’s soirees and scientific nights togeth­er. Babb­age was dev­oted to maths and science, helping to found the Analyt­ic­al Society in 1812 to introduce European innovations in maths to UK. And when young Ada met Babbage, she list­ened to the description of his new machine.

Babbage’s Difference Engine was seen as the first modern computer. The hand-cranked apparatus of bronze and steel used stacks of cogs, met­al hammer-arms and thousands of numbered wheels to solve chall­eng­­ing maths equ­at­ions. He had fin­ished a small prototype that stood c2.5’ tall. His dem­onstration piece set Lon­don’s intellectual and scientific community alight, delighting Charles Darwin, Ch­arles Dic­k­ens & sc­ientist Michael Faraday who all socialised with Ada. It was near mirac­ul­ous, even to the greatest intellects.

Charles Babbage 

The Difference Engine was revelatory to 17-year-old Ada Byron. On seeing it in 1833, she under­st­ood how it worked! 41-year-old Bab­bage had found his intel­l­ectual equal and close friend­ in Ada, and over the next two decades, Ada proved that her vision for such machines went far beyond mere calculation.

Though the final Difference Engine was never fully real­ised, Babbage bel­iev­ed the complete product had the potential to solve much more com­plex problems. In fact Babbage was already planning a machine more comp­lic­ated and more capable, powered by steam, with very large spinning wheels. In 1834, Babbage expl­ained this new invention to Ada and her mother. While helping with a translation of an article about Babb­age’s theo­retical Anal­yt­ical Engine, Ada added her own notes that in­­cluded how the machine could be progr­ammed to calculate rational numbers, which was the ?first algorithm used for com­p­uting.

Ada also saw be­yond Babb­age’s belief that his machines could only calcul­ate numb­ers. She thought any sounds, text and pictures could be turn­ed into a digital form and manip­ul­ated by machine. The Analytical Engine would be able to do more than simple maths; instead, it would be able to store its outputs and then employ them in other equat­ions. In essence this machine would calculate AND com­pute, in an age where people worked collaborat­ively with machines.     

Ada was introduced at court, becoming a popular belle of the season ?because of her brilliant mind. Getting married was import­ant. She mar­r­ied William 8th Baron King in 1835 and became Lady King. The coup­le had 3 children, Byron, Anne Isabella & Ralph, and William was made Earl of Lovelace in 1838. Thankfully her husband appeared to have supported Ada’s intellect and thirst for knowledge.

Horsley Towers mansion in Surrey, built 1820.
Earl Lovelace acquired it in 1840, adding a great hall and towers.

Fascinated with the invention and its potential, Ada Lovelace stayed in close communication with Babbage as he developed the machine’s sch­em­atics. In 1842 Italian mathematician Luigi Federico Menabrea pub­l­ished a paper on Babbage’s machine, which Lov­e­lace tr­ans­l­ated into English to attract support for the invention.

In her Translator’s Note, Lovelace added her own explanation of how the Analytical Engine would work. The presence or abs­ence of a punch on the card automatically told the loom which threads to raise, cr­eat­ing complex designs in a short time. The An­alytical Engine would run on punch cards, using a binary code. The Analytical Engine wove algebraic patt­erns, like the Jacquard loom wove flowers, an invent­ion that had already transf­or­med the textile indust­ry 

.In Note G, Ada wrote a detailed description of how punch cards could be used in the Analytical Engine to output a long sequence of rat­ion­­al numbers that recur throughout maths. Her note converted a mat­h­ematical cal­cul­ation into a series of instructions that could be ex­ecuted by the Analytical Engine. Despite the 1801 Jacquard Loom, Lovelace was credited with writing the first computer programme!   

The Difference Engine designed by Charles Babbage.
in a C19th hand-coloured woodcut

Lovelace excitedly shared her translation and notes on the Anal­yt­ic­al Machine with her mother. But because the machine has never been built while she was alive, Ada never saw it. She died of cancer in 1852, 36 years old. She was bur­ied beside dad in the Byron fam­ily vault in St Mary Magdalene Church, Hucknall near Nottingham.

Babbage completed most of the Analytical En­gine, before he died in 1871. But it was only when computer science started that Ada was rediscovered and her notes on Babbage’s analytical engine were republished in 1953.

I am a computer dimwit, so I really enjoyed reading the Countess of Computing.  





17 comments:

Hilary Melton-Butcher said...

Hi Hels - she was one amazing woman, with such an interesting background. Never recognised in her time ... but now - she needs to be better known and acknowledged for her brilliance.

There was a Steampunk novel - which had grown out of a webcomic - about Lovelace and Babbage ... titled: The Thrilling Adventures of Lovelace and Babbage by Sydney Padua ... which was a fantastic read ... published in 2015. Brought their story totally to life in comic form.

Thanks for this - a great read - cheers Hilary

Joe said...

Ada Lovelace was totally committed wasn't she? And very clever. But I wouldn't want to forget Charles Babbage.

The Computer History Museum wrote that Babbage was a gentleman scientist, independently wealthy amateur able to support his interests. Between 1813-68 he published 6 full-length works and 90 papers. He was a prolific inventor, mathematician, scientist and political economist. He pioneered light¬house signalling, invented the ophthalmoscope, proposed black box recorders for monitoring railway catastrophes, advocated decimal currency, proposed the use of tidal power once coal reserves ended, designed the altimeter, seismic detector, tugboat for winching vessels upstream. Babbage was feted with honours by European academies.

hels said...

Hilary
although I didn't know what steampunk was, I will follow up the reference and add some feedback myself. Many thanks.

hels said...

Joe
Babbage was an amazing man, intellectually fascinated by all the areas you mentioned,...and more. But he was well recognised for his achievements, and celebrated in his own time. Lovelace is only being credited for her achiements now.

hels said...

marina
Thank you for reading the post. Do you have an interest in Lovelace and Babbage?

Deb said...

Helen I wonder if Lord Byron had not acted like a turd, would Annabella and Ada have turned out so educated and ambitious.

Hels said...

Deb

Annabella Milbanke, later Lady Byron, was a very educated and religious young woman, especially in maths and science. So why on earth did she agree to marry the alcoholic and impoverished (albeit famous) poet??? Nonetheless she was going to be successful, regardless of Lord Byron's nastiness, later involving herself in important causes like anti-slavery.

Ironically Ada Byron was very educated BECAUSE her father was a shocker. Her mother took the responsibility of making up for Ada having to live without ever meeting her father, appointing all the scient­ists and mathematicians in her intellectual circle to educate her daughter. What a shame Ada died so young.

Andrew said...

Truly amazing. To me also somewhat surprising that there wasn't any pushback towards her because of her gender. Intellect wins all. Her first marriage was such a mismatch. I really wonder why she married Byron.

Hels said...

Andrew

I also wonder why an educated, religious and focused woman like Annabella would marry such a permanent womaniser. She was already born into a noble family and didn't need to marry up, as it were. And Lord Byron had no money.

But there were only two women involved, mother _Annabella Milbanke Byron_ and daughter _Ada Byron Lovelace_. Neither mother nor daughter married more than once. Sorry if my writing wasn't clear... lots of people get them confused.

mem said...

What a tragedy that she didn't survive , beyond 36 , she was obviously a genius . So fortunate too that she didn't inherit the mental instability which plagued Byron . Imagine how she might have influenced views on women and their education if she had lived to a ripe old age .

Luiz Gomes said...

Boa noite minha querida amiga. Obrigado pela excelente matéria. Uma verdadeira aula de história e que eu desconhecia e aprendi através do seu trabalho.

Hels said...

mem

I wonder why the good and the clever die young while the tyrants live to advanced old age. Ada had so much to contribute, plus (and this was rare for women) she had the keen support of her mother, Babbage and their entire learned circle.

Historians tippy toe around Lord Byron's poor mental health, agreed. But it must have been scary to those around him. Ditto his dependence on alcohol and opium. Fortunately, but sadly, Ada never met him.

Hels said...

Luiz

that is true. If you are a skilled computer person now, you can wave a thank you back to Ada :)

DUTA said...

Interesting, yet tragic.
Byron, the poet and womanizer, giving up two wonderful ladies (wife Annabella and daughter Ada). Ada, the brilliant mathematician, living such a short life (died at 36)!
The brilliance of the two ladies, make us women proud.

hels said...

DUTA
I had an excellent education and great jobs. Yet I couldn't understand the rather simple tasks my accountant required over the last 3 years and had to ask my husband for constant help. NEVER before had I believed that women were less skilled intellectually :(

But you are correct. Now Ada Lovelace has proven a great role model.

Dabas said...

Interesting article!
In the 70's I took a computer course at Uni and we used punch cards!
Also there used to be a programming language called Ada, in her honour:

https://en.wikipedia.org/wiki/Ada_(programming_language)

Hels said...

Dabas

I knew almost nothing about computing in the olden days and am still anxious about computing these days. So my knowledge of Ada Lovelace came only from reading about famous and influential women. Thanks for the reference - what an amazing honour to call the high-level programming language after Ada.