I’d have sent a card if only Clintons carried them. Ada Lovelace Day has been set up to commemorate the role of women in technology.
It wouldn’t be surprising if you haven’t heard of Augusta Ada King, Countess of Lovelace, who must be considered the World’s first computer programmer – even though she died almost a century before the first computers roared into life.
Ada was born in December 1815 into a life of wealth and privilege as the only legitimate daughter of the poet Lord Byron; although he deserted his family only a year after she was born. A sickly child, Ada was not expected to survive, but despite a series of life-threatening illnesses, she continued her education, and by her teenage years was becoming recognized as a mathematical prodigy. In addition to whatever natural talent she possessed, Ada was driven to the exploration of mathematics by her mother; who saw in logic, a cure for the madness that had afflicted Lord Byron. Ada was taught by, and corresponded with many of the leading mathematicians of her day. And one of these mathematicians was perhaps the most extraordinary man of his day – Charles Babbage.
Born in 1791, Babbage was a brilliant although deeply unpleasant man. He had been a professor of mathematics at Cambridge, broken the supposedly impenetrable Vigenère autokey cipher used by every diplomatic mission in Europe and even had time to invent the cowcatcher for locomotives. But his real passion lay in the possibility of automating mathematical calculations.
The scientific and Industrial revolutions had created an insatiable demand for accurate calculations ranging from determining the orbits of the newly discovered planets Uranus and Neptune; to generating accurate maps and navigational charts needed for the expanding global economy; through to the tables of logarithms, sines and cosines used by the engineers building the machines on which European prosperity was based. Such was the demand that there were not enough mathematicians in the world to perform the calculations.
A similar problem had confronted the mathematician and engineer, Gaspard de Prony who had been commissioned to draw up new books of tables for the French government. De Prony’s task was immense; he would need to create logarithms for all of the numbers from 1 to 10,000 – accurate to nineteen decimal places, and the sines of angles to no less than twenty-five decimal places! De Prony’s solution was to create three teams of mathematicians. At the top were six of France’s leading mathematicians who would devise the calculations needed to generate each entry in the table. Below them were a similar number of less-skilled mathematicians who would decompose the complicated formulae into a series of relatively simple additions or subtractions. The lowest tier of de Prony’s scheme were eighty relatively unskilled workers who actually produced the mathematical tables. So long as they followed the list of additions and subtractions in the correct order (and got the right result), they would arrive at the right result.
Babbage saw de Prony’s monumental tables and made the next intellectual leap. If de Prony could treat people like machines in order to generate mathematical tables, then perhaps it would be possible to generate them with machines. He was not the first person to think of this, as long ago as 1623, Wilhelm Schickard had built a simple calculator; but Babbage’s machine was far more elaborate and capable of performing complex calculations. Babbage was also perhaps the first person to realise that so long as a machine was correctly constructed it would produce tables to any level of accuracy without ever tiring or making an error.
He became so excited by the possibility of mechanical intelligence that he was taken ill
An intriguing second source of inspiration for Babbage was the so-called 'Mechanical Turk’, an elaborate parlour trick that had been touring Europe from the late 18th Century. The Mechanical Turk was supposedly a machine that could play chess against a human opponent – and crucially, win. It had proved a sensation in the courts of Europe with opinion equally divided whether it was an especially clever automaton, or if it actually concealed a human player. In 1819 the Turk came to Britain where Babbage challenged it to at least two games (he won one, lost the other). Babbage was convinced (correctly as it turned out) that the Turk was a trick and operated by a human, but he began to consider the possibility that a machine was capable of playing games against humans. He became so excited by the possibility of mechanical intelligence that he was taken ill and forced to retire to the countryside in order to recuperate.
During this period he began to design the Difference Engine that was announced in1822; it was to be a man-sized machine built from steel rods and brass gears turned by hand for the express purpose of generating mathematical tables. The Difference Engine made a huge impression; and the British government agreed to fund its development with the colossal sum of £17,000 (about £1,200,000 today).
There was only one problem – and that was Charles Babbage. He simply could not settle down to the task of building his machine. The Difference Engine had triggered a creative explosion; Babbage had a new idea; one that had never occurred to anyone in the World – a machine that could perform any intellectual task. The Industrial Revolution was in full flood and it was being powered by machines – pumps, ships, locomotives, weaving frames, drills – but each of these machines served a single purpose; a steam locomotive could not weave cotton. But Babbage’s Analytical Engine could be repurposed – it could be programmed – it was a computer.
Once again Babbage’s inspiration came from France where in 1801, Joseph Jacquard had designed a loom capable of weaving intricate patterns into cloth and silk, not because of a skilled operator, but by blindly following instructions punched into cards. Rearranging the cards created new patterns in the cloth – they constituted a very simple program. A single loom, operated by unskilled labour could replace dozens of skilled workers, producing much more material at a fraction of the cost; perhaps inevitably, Jacquard's looms triggered civil unrest when they were introduced into the French weaving industry; the first of many disputes caused by automation.
Babbage’s Difference Engine stood about as high as a man and would have been operated by hand. His Analytical Engine would have been the size of a large house and powered by steam – but once you get past the awe-inspiring scale of the endeavour, the tens of thousands of jewel-like gears and bearings – it resembles a modern computer in almost every respect. The Analytical Engine had a memory (which Babbage called the ‘store’) big enough to hold one thousand numbers, each of up to fifty digits; these were to be processed in a central processor (the ‘mill’). Babbage’s mill would be able to perform all of the simple mathematical functions as well as logical comparisons (such as ‘greater than’ or ‘less than’) and calculate the square roots of numbers.
The machine would have been controlled by thousands of Jacquard’s cards that would have been fed into the Analytical Engine from automated hoppers. Each card would contain either data or instructions. The instructions formed the very first computer programming language and contained concepts such as loops (which repeat operations) and conditional statements (such as IF this is TRUE then do this…), which are familiar to all modern computer programmers.
There is no doubt; the Analytical Engine was one of the greatest ideas of the 19th Century. It should have changed the world.
And this is where we return to Ada Lovelace. She met Babbage at his London studio when she was only seventeen and had seen some of the workings of the Difference Engine. According to her companions, Ada immediately understood the workings of the machine and its potential. Throughout the 1830s conversed regularly with Babbage and the two became close friends, although there is no evidence they were ever romantically entangled. Certainly Babbage was entranced with his young protégé. In 1843 he wrote:
Forget this world and all its troubles and if possible its multitudinous Charlatans — every thing in short but the Enchantress of Numbers.
In 1842 Ada translated Luigi Menabrea’s description of the Analytical Engine ‘Notions sur la machine analytique de Charles Babbage’ from the original French. At first she was content to perform only the translation, but at Babbage’s instigation, she began to add extensive annotations to the original text.
We discussed together the various illustrations that might be introduced: I suggested several, but the selection was entirely her own. So also was the algebraic working out of the different problems, except, indeed, that relating to the numbers of Bernoulli, which I had offered to do to save Lady Lovelace the trouble. This she sent back to me for an amendment, having detected a grave mistake which I had made in the process.
These ‘algebraic working’s are what we would now call a computer program – they were the commands that would be punched into Jacquard cards and fed into the Analytical Engine. Charles Babbage and Ada Lovelace had written the world’s first computer program – and they didn’t have a computer!
The distinctive characteristic of the Analytical Engine, and that which has rendered it possible to endow mechanism with such extensive faculties as bid fair to make this engine the executive right-hand of abstract algebra, is the introduction into it of the principle which Jacquard devised for regulating, by means of punched cards, the most complicated patterns in the fabrication of brocaded stuffs. It is in this that the distinction between the two engines lies. Nothing of the sort exists in the Difference Engine. We may say most aptly that the Analytical Engine weaves algebraical patterns just as the Jacquard loom weaves flowers and leaves.
But Ada’s thoughts about the Analytical Engine went even further. Babbage had always seen his creation as a way of generating numbers, Ada saw the possibilities were unlimited; just as Babbage had once wondered that a machine might play a game of checkers, Ada saw the Analytical Engine as a creative tool.
Again, [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 . . . Supposing, for instance, that the fundamental relations of pitched sounds in the science of harmony and of musical composition were susceptible of such expression and adaptations, the engine might compose elaborate and scientific pieces of music of any degree of complexity or extent.
It's worth pausing for a moment - in 1843, Ada Lovelace was imagining a machine that would not only play music, but also create it.
The story does not end well for any of the players. Ada went in to long-term decline shortly after the publication of her work. She was desperately lonely, lacking friends with whom she could discuss her explorations of mathematics, and as a woman she was forbidden from joining many of the scientific institutions of the day. She is known to have become a heavy drinker and to have experimented with opium. Worse still, she became convinced she had found a perfect scheme for determining the winners of horse races; she became a gambling addict and ran up huge debts. She even became estranged from her family. In 1852 she was diagnosed with uterine cancer, which progressed rapidly. She died later that year, aged only 37. Charles Babbage remained her friend to the end.
Babbage too was a deeply troubled man. The original funding for his Difference Engine had dried up because of his inability to bring the project to a conclusion. Rather than produce a working Difference Engine, Babbage had become distracted by the possibilities of the Analytical Engine. An enraged government turned their back on the scheme, claiming it was worthless and would never have worked. It was a desperately shortsighted decision; the Difference Engine was entirely practical and would have revolutionised the World. Much later, variations of it were produced in Britain and Europe; but Charles Babbage never saw a penny. A near replica of the Difference Engine was constructed for the Science Museum in Kensington using materials and construction techniques that would have been familiar to Babbage. It works perfectly.
The Analytical Engine was never finished; only models and individual components had been completed by the time Babbage died in 1871. He had beset by financial problems and, following the self-inflicted fiasco of the Difference Engine, unable to obtain government funding. Worse still, Babbage’s own difficult personality had led him into conflict after conflict, most notably with his chief engineer Joseph Clement who had devised the ultra-high precision machine tools needed to cut the myriad components of the Analytical Engine. As if that were not bad enough, many of Babbage’s contemporaries began to denounce the project, claiming it was worthless or even impossible.
By the 1850s, it was clear that Babbage’s best work lay in the past. He became deeply embittered, writing (all too presciently):
Propose to an Englishman any principle, or any instrument, however admirable, and you will observe that the whole effort of the English mind is directed to find a difficulty, a defect, or an impossibility in it. If you speak to him of a machine for peeling a potato, he will pronounce it impossible: if you peel a potato with it before his eyes, he will declare it useless, because it will not slice a pineapple.
When he died of kidney failure in 1871, Charles Babbage was practically unknown to the public. The funeral attracted only one carriage and three mourners. He did not even receive an obituary.
Today, Babbage is regarded as the father of the modern computer and one of the most brilliant individuals of the 19th Century. Ada Lovelace is less well remembered, her most widespread monument being the computer language Ada that has been used to build some of the largest and most reliable computer systems in the World. But perhaps her best memorial is in her writings. In 1843 Ada was wondering if a machine could be intelligent:
It is desirable to guard against the possibility of exaggerated ideas that might arise as to the powers of the Analytical Engine. In considering any new subject, there is frequently a tendency, first, to overrate what we find to be already interesting or remarkable; and, secondly, by a sort of natural reaction, to undervalue the true state of the case, when we do discover that our notions have surpassed those that were really tenable. The Analytical Engine has no pretensions whatever to originate any thing. It can do whatever we know how to order it to perform. It can follow analysis; but it has no power of anticipating any analytical relations or truths.
Today, computer scientists working in artificial intelligence and science fiction authors still argue whether Ada was right.