Difference between revisions of "Ada Lovelace"
FrederickT (talk | contribs) (fixed layout) |
(sp) |
||
| Line 12: | Line 12: | ||
She was born Augusta Ada Byron, and called by her middle name as a child. She married William King, who later became Earl of Lovelace, making her "Countess of Lovelace". She has been called Augusta Ada, Augusta Ada Byron, Augusta Ada Lovelace, Ada Lovelace, Ada King, or just Ada. | She was born Augusta Ada Byron, and called by her middle name as a child. She married William King, who later became Earl of Lovelace, making her "Countess of Lovelace". She has been called Augusta Ada, Augusta Ada Byron, Augusta Ada Lovelace, Ada Lovelace, Ada King, or just Ada. | ||
| − | In October of 1842 Luigi Federico Menabrea (1809-1896), an Italian professor of | + | In October of 1842 Luigi Federico Menabrea (1809-1896), an Italian professor of mechanics at University of Turin (and later premier of the Kingdom of Italy), published a paper describing the function and theory of Babbage's Analytical Engine. Ada translated the paper from French to English and added her own extensive comments. (See ''Science and Reform, Selected Works of Charles Babbage'' by Anthony Hyman.) This was published in 1843 and impressed Babbage, for it included, as Babbage himself wrote, |
{{cquote|some complicated programs of her own, the most complex of these being one to calculate the sequence of Bernoulli numbers.}} | {{cquote|some complicated programs of her own, the most complex of these being one to calculate the sequence of Bernoulli numbers.}} | ||
| Line 25: | Line 25: | ||
At the start of the program, she gives initialization of V1=1, V2=2, and V3=N. (Modern computers often have "immediate" instructions to handle constants without using up registers.) | At the start of the program, she gives initialization of V1=1, V2=2, and V3=N. (Modern computers often have "immediate" instructions to handle constants without using up registers.) | ||
| − | Then she lists the 23 instructions, giving their source and destination registers, opcodes, and commentary on the progress of the program. The first 5 | + | Then she lists the 23 instructions, giving their source and destination registers, opcodes, and commentary on the progress of the program. The first 5 instructions, for example, are: |
V4=V5=V6 = V2 * V3; // Get 2N. The machine allowed multiple destination registers. | V4=V5=V6 = V2 * V3; // Get 2N. The machine allowed multiple destination registers. | ||
Revision as of 16:53, May 17, 2011
Ada Lovelace (1815-1852) was a British mathematician involved in the extremely early history of computers, long before the "modern era" of actual construction of working computers. She worked with Charles Babbage on an extremely visionary, completely mechanical, computer called the "analytical engine". It was never built, because Babbage's design was way ahead of its time.
Along with Babbage and others, she made notes for programming the proposed computer, and she became famous in the modern era for her description of the "classic recurrence relation for computing Bernoulli numbers"[1] used by Jakob Bernoulli. On this basis, feminists eager to promote women in science decided to dub her "the first computer programmer".[2][3][4]. This claim arises from the fact that she was first to publish a paper (in 1843) containing a mathematical algorithm encoded for the purpose of being executed by an automatically controlled digital computer. Her program calculated Bernoulli numbers. That is, she wrote the first published, surviving computer program designed to solve a real problem.
But the issue is not clear-cut, because there are different opinions about what constitutes a "program" and what constitutes a "computer". Perhaps the main objection is that the computer for which her program was written was never built, so her program did not actually run. Ada had to write the algorithm on paper, rather than at a keypunch or computer terminal, of course. But, to use modern terminology, she actually "wrote code". Also, since the term "program" had not been coined, she described her algorithm as a "plan". In the 20th century, the program was carefully analyzed and simulated, and found to have a minor "bug".
Early Life
She was the only legitimate child of of the famous British poet Lord Byron, but he abandoned her and her mother before her first birthday. She was raised by her mother.
She was born Augusta Ada Byron, and called by her middle name as a child. She married William King, who later became Earl of Lovelace, making her "Countess of Lovelace". She has been called Augusta Ada, Augusta Ada Byron, Augusta Ada Lovelace, Ada Lovelace, Ada King, or just Ada.
In October of 1842 Luigi Federico Menabrea (1809-1896), an Italian professor of mechanics at University of Turin (and later premier of the Kingdom of Italy), published a paper describing the function and theory of Babbage's Analytical Engine. Ada translated the paper from French to English and added her own extensive comments. (See Science and Reform, Selected Works of Charles Babbage by Anthony Hyman.) This was published in 1843 and impressed Babbage, for it included, as Babbage himself wrote,
| “ | some complicated programs of her own, the most complex of these being one to calculate the sequence of Bernoulli numbers. | ” |
What did Ada's Bernoulli program look like?
The program, and detailed technical commentary, appeared in a paper "Sketch of the Analytical Engine Invented by Charles Babbage" that Ada wrote in 1843. The program itself has been reproduced in the "sidebar" on page 79[2]. First there is a list of the six input and output variables that are used: V1, V2, V3, V21, V22 and V23. And the temporary variables V4 through V13. In modern terminology in a strongly typed language such as C++, we would write something like:
int V1, V2, V3; // inputs int V21, V22, V23; // outputs int V4, V5, V6, V7, V8, V9, V10, V11, V12, V13; // temps
At the start of the program, she gives initialization of V1=1, V2=2, and V3=N. (Modern computers often have "immediate" instructions to handle constants without using up registers.)
Then she lists the 23 instructions, giving their source and destination registers, opcodes, and commentary on the progress of the program. The first 5 instructions, for example, are:
V4=V5=V6 = V2 * V3; // Get 2N. The machine allowed multiple destination registers. V4 = V4 - V1; // Get 2N-1. V5 = V5 + V1; // Get 2N+1. V11 = V4 / V5; // Get (2N-1)/(2N+1). V11 = V12 / V2; // Get (1/2) * (2N-1)/(2N+1).
(She used the old-fashioned multiply and divide signs "<math>\times</math>" and "<math>\div</math>". These seem quaint by today's standards, but they were the symbols that people used at the time. Neither the 026 keypunch nor the ASCII character set had been invented.)
She used two loops—see the other sidebar on page 78. V10 is the outer loop counter. The loop consists of instructions 13 to 23. It continues until V10 counts down to 1.
Was it a computer?
The "analytical engine" was so far ahead of its time that one might be tempted to call it just a "visionary idea". The technology of the time was nowhere near capable of building it. Even the much-less-ambitious "difference engine" was beyond the technology of the day—making the counters do arithmetic reliably required very careful machining of the parts. Only a small partial prototype of the difference engine was built in Babbage's lifetime. But Babbage clearly knew what he wanted[5]. His vision of a calculating device that can perform operations under control of a "program" punched into cards, and that makes control decisions based on the data resulting from the calculation steps, was incredibly prescient. It was exactly the principle used in modern computers. Lovelace understood that vision, and even extended it to the idea that computers might perform tasks beyond purely numerical ones, such as composing music. The fact that the analytical engine was mechanical rather than electronic did not make it any less a computer. It just made it harder to build. It took about 100 years for the field of electrical engineering to make computers such as that envisioned by Babbage realizable.
Was it a RISC machine or a CISC machine?
From looking at Ada's program for Bernoulli polynomials, it is clear that the machine did its calculation by manipulating numbers in specific registers. It did not have any "random access memory" that could be addressed. CISC machines address memory in their operation instructions, while RISC machines operate on registers, loading and storing memory locations only with specific instructions. So the analytical engine would have to be classified as a RISC machine in that sense.
Was Ada's program a real program, or just a "description of an algorithm"?
It is impossible to answer this to everyone's satisfaction. She certainly didn't punch it on cards or type it into a computer terminal. (She might conceivably have punched it onto cards if Babbage had made his design sufficiently concrete as to assign binary opcodes, but he never got anywhere near that far.) Since it never ran on a computer in the form in which she wrote it, it could be argued that it wasn't a program, but was merely an algorithm. But, whatever it was, it was written in the peculiarly stilted language of computer machine code. That is, the numbers that it was manipulating were assigned to specific registers. As the iteration loop cycled around, those registers were overwritten with new values. That is not the way ordinary mathematical algorithms are expressed. They are expressed in terms of more abstract formulas and recurrences. In Ada's case, the formulas were broken down into individual operations, manipulating specific registers that she specified. The recurrence was specified by manipulating a count register and testing whether it had reached zero.
Algorithms like Euclid's algorithm or Heron's formula, or even integration techniques or the description of the factorial function, are not described that way unless one is writing a computer program.
"Algorithms" for calculating Bernoulli numbers had been known for some time. But she wrote this "algorithm" in the form of specifically realizable numerical operations that she (naively, Babbage's design was far beyond what the technology of the day would have provided) believed the analytical engine could have done. And she used the specific ability of a calculating device to make control decisions based on the data.
- Ada suggested to Babbage writing a plan for how the engine might calculate Bernoulli numbers. This plan, is now regarded as the first "computer program." [1]
Was Ada really first? Were the Bernoulli notes the first program?
The decision to dub Ada Lovelace the first computer programmer ignores the historical fact that
- Babbage and others also had written “programs” for the never completed Analytical Engine. [2]
Also, she was not the sole author of the notes on calculating Bernoulli numbers. The notes were originally written by another person, and she translated these and expanded upon them. This would make her a co-author of the notes.
There are those who claim [6] that Babbage himself, or an assistant of his, or perhaps some of his sons, must have written "programs" before Ada did. Issues like this arise from time to time, perhaps most notably in the "calculus war" between Newton and Leibniz, or the "non-Euclidean geometry war" among Gauss, Bolyai, and Lobachevsky. The scientific community generally gives great weight to the act of publishing one's work. If these other people wrote programs before Ada did, they don't seem to have published them, and they are lost. It is not known what problems these earlier programs might have been solving.
She was certainly one of the pioneers of software development, but whether she was the first person to write notes for an algorithm that a machine could carry out is not certain. Nor is there wide agreement on whether such notes constitute an actual computer program.
Controversy
Some people, perhaps motivated by misdirected passion over the issue of feminism, take an unexpectedly strong stand in favor of, or against, the idea that she was the world's first computer programmer. What one person did 170 years ago really has nothing to do with contemporary social issues.
The ADA programming language
Starting in the 1970's, a project was undertaken by the U.S. Department of Defense to find one high-level language to be used for all DoD software, replacing the hundreds of languages then in use. After much evaluation work, the winning language (called "green" in the evaluation process) was named ADA in Ada Lovelace's honor. Its goal of replacing all the previous languages has not been met, partly because interoperability considerations have changed the way software is put together, relative to the way things were done in the 1970's. The ADA language has had less than complete acceptance in the military, and is not widely used in the civilian sector.
References
- ↑ Augusta Ada Byron (1815-1852) - Ryan Stansifer, Associate Professor - Department of Computer Sciences - Florida Institute of Technology
- ↑ 2.0 2.1 Scientific American, May 1999, pp76
- ↑ http://cs-www.cs.yale.edu/homes/tap/Files/ada-bio.html
- ↑ http://www.cs.fit.edu/~ryan/ada/lovelace.html
- ↑ That Babbage knew what he was doing is attested to by the fact that his full difference engine was finally constructed in 1991 (the bicentennial of Babbage's birth) and is on display at the London Science Museum. Babbage's original plans were almost exactly correct.
- ↑ http://projects.exeter.ac.uk/babbage/ada.html
Further Reading
- Repurposing Ada - contains several denials (including one by a biographer) that her "Notes" were a computer program
- Menabrea's Sketch and Ada's Notes