Showing posts with label programming. Show all posts
Showing posts with label programming. Show all posts

Friday, November 1, 2019

Rear Admiral and Mathematician Grace Hopper Teaching Computers Something Like English

Grace Hopper, linocut on 11" x 14" Japanese kozo paper, 2019, by Ele Willoughby
The first modern computers were loud, room-sized monsters, essentially a collection of relays (electrical switches) patched together with electrical cords. Each "switch" could be one (1) or off (0) and could represent data (an input value) or an action applied to these data.  To talk to the computer, to tell it to do anything with these values, you needed to speak in machine code, in the natural language of the computer itself of zeroes and ones - and each machine had its one structure and associated code. The story of how these giant computing machines went from a rare, complex tool available only research scientists at a few select university or government labs to ubiquitous, multipurpose portable tools we carry with us everywhere and use daily, depends in part on the idea we could, and should, develop machine-independent programming languages and that these could be based on English. This revolutionary idea was popularized by American computer scientist and US Navy rear admiral Grace Brewster Murray Hopper (née Murray December 9, 1906 – January 1, 1992).

Born in on the Upper West Side of New York City, the eldest of three children, she was the sort of curious child who dismantled alarm clocks to discover how they work; she was seven when she was caught, having already taken seven clocks apart, and her mother limited her future exploration to working with a single clock. Her father owned an insurance business. She took after her mother, herself a mathematician. She was admitted to Vassar College at 17 and completed a Bachelor's degree in math and physics. By 1930, she had completed her Master's at Yale and married New York University comparative literature professor Vincent Foster Hopper (1906–1976). She began teaching at Vassar in 1931. By 1934, she completed her PhD on "New Types of Irreducibility Criteria" under the supervision of Øystein Ore at Yale. Unusually for a mathematics professor, she insisted her students write well; her first assignment would be an essay on her favourite formula. She felt studying mathematics without the ability to communicate math was pointless. Her own ability to translate real world problems into mathematics and math into English would serve her well throughout her career.

She became bored with an unexciting marriage and found teaching math less fulfilling than she hoped. When the US entered WWII she was on partial leave from Vassar, spending a year studying finite difference methods for solving partial differential equations with Richard Courant at New York University. She saw a way to change her life. At age 34, Hopper tried to enlist in the Navy, but was rejected. She was deemed too old, and a petite woman, her weight to height ratio was too low; further her job as a mathematician and professor at Vassar was considered valuable to the war effort.
Though Vassar promoted her to associate professor in 1941 she obtained a leave of absence. She persisted with her goal and got a special exemption for being 15 pounds (6.8 kg) below the Navy minimum weight of 120 pounds (54 kg) and volunteered for the the United States Navy Reserve women's branch (WAVES) in 1943. By 1945, she had divorced her husband, but chose to retain her husband's family name.

After graduating top of her class at the Naval Reserve Midshipman's School at Smith College in Massachusetts, she was assigned to the Bureau of Ships Computation Project at Harvard University as a lieutenant, junior grade. Howard H. Aiken, physicist and computing trailblazer, who had been a professor was now leading a team there as a commander in the Navy. His team was working on programming the giant IBM Automatic Sequence Controlled Calculator (ASCC), an electromechanical computer known as the Mark I. Hopper said she had to learn the languages of the different scientists and engineers whose problems they were running on the machine, the languages of the managers, and of the programmers, and her facility with these different modes of communication was why Aiken assigned her to write the first computer programming manual. Despite her doubt about writing a book, she produced a 561-page volume starting with a history of computing machines from Charles Babbage to the present. Like her forebearer Ada Lovelace, she saw the potential of a computer controlled by separate punch tape instructions (what we now know as software) rather than the need to reconfigure the machine hardware itself. Aiken had originally bristled at the thought of a woman on the team, but soon made Hopper primary programmer and his top deputy. She became known as irreverent, brilliant, sharp-tonged but a good collaborator. Together, Aiken and Hopper co-authored three papers on the Mark I. After the war, she requested to transfer to the regular Navy, but her request was declined due to her age. She opted nonetheless to remain at Harvard as Navy reserve research fellow under a Navy contract, until 1949, despite the offer of a full professorship at Vassar.

While working on the Mark I, Hopper perfected the use of the subroutine, the way programmers use a specific chunk of code to perform a specific task again and again, such as taking the sinusoid or logarithm of a value. This a concept Ada Lovelace wrote about in her Notes on the Analytical Engine.  She began thinking about the way to take her library of subroutines and enable its use on any machine, if her source code could be translated to machine code (which is machine-specific) by using a compiler.

Famously, while working on the Mark II, she and her colleagues had to do some literal "debugging" when a dead moth was discovered in a relay. The term "bug" already existed in engineering, but the process of systematical detecting and removing problems in computer programs came to be known as debugging partially because of this specific wayward moth and Hopper delighted to telling the story of the actual bug. It was dutifully recorded by taping its corpse labelled "First actual case of bug being found," in the log book dated September 9, 1947.

The Harvard Mark I, II and III, were reliable machines based on electromechanical relays, but these were slow. Hopper's work had help make these machines the most easily programmed but she recognized that the new electronic devices using vacuum tubes were so much faster, that easy of programming and reliability were not enough. Also, it became clear that she would not be promoted or granted tenure at Harvard. She left her post to join the Eckert–Mauchly Computer Corporation where she worked on the development of UNIVAC I, the first general purpose electronic digital computer design, made for business. When the company was taken over by Remington Rand in 1950, she was appointed UNIVAC director of Automatic Programming Development. She became convinced that since people were far better at writing English than in symbols, that they ought to be able to write programs in English and that the computer themselves should translate this into machine code. It took her three years to convince others. She wrote her first paper on compilers (now known as link-loaders, the tool computers use to translate English-like computer programs into machine code) and had developed a functional link-loader the A-0 in 1952, all while her peers thought computers could only do arithmetic. As a mathematics professor she realized only, "[v]ery few people are really symbol manipulators. If they are they become professional mathematicians, not data processors. It's much easier for most people to write an English statement than it is to use symbols. So I decided data processors ought to be able to write their programs in English, and the computers would translate them into machine code. That was the beginning of COBOL, a computer language for data processors. I could say 'Subtract income tax from pay' instead of trying to write that in octal code or using all kinds of symbols." Promoted to the company's first director of automatic programming, her department released some of the first compiler-based programming languages, including MATH-MATIC and FLOW-MATIC. In 1959, she was a technical consultant to the Conference on Data Systems Languages (CODASYL) where she and colleagues defined the new language COBOL (an acronym for COmmon Business-Oriented Language), extending on FLOW-MATIC and IBM's language COMTRAN. COBOL became a major computer language in data processing and even persists today as legacy code.

She sadly retired from the Navy Reserve at age 60, as required in 1967, at the rank of commander but was recalled to active duty in 1968 and served as the director of the Navy Programming Languages Group in the Navy's Office of Information Systems Planning. She retired again in 1971, but was again recalled in 1972. She became a captain in 1973. During the 70s she argued for the move away from giant centralized computers to networks of small, distributed machines. She worked on standards for computer systems, components and programming languages like FORTRAN and COBOL. In 1983 she was promoted to commodore and remained on active duty several years beyond mandatory retirement by special approval of Congress. In 1985 the rank commodore was renamed rear admiral making her one of few women to achieve that rank. She final retired in 1986 as the the oldest active-duty commissioned officer in the United States Navy at age 79. She then worked as a senior consultant to Digital Equipment Corporation (DEC) until her death at age 85 in 1992, lecturing on the history of computers in full dress uniform. By the end of her life she was a very well-recognized figure, earning more than 40 honourary degrees, many awards and had many things named in her honour. She became the first woman to win the National Medal of Technology, the highest technology award in the US. At the ceremony she said, “If you ask me what accomplishment I’m most proud of, the answer would be all the young people I’ve trained over the years; that’s more important than writing the first compiler.” After her death, the Navy commissioned the U.S.S. Hopper, a guided missile destroyer, and in 2016 Hopper was posthumously received the Presidential Medal of Freedom.

In my portrait I've shown her as she was in WWII in front of the Harvard Mark I, with a little nod to the famous "first" computer bug. I am the sort of nerd who actually looks up the actual moth recorded and then put some thought into species that may have fit the size and colour of the moth found at Harvard.

References
Gilbert, Lynn (1981). Women of Wisdom: Grace Murray Hopper. Lynn Gilbert, Inc.
Software Bug, Wikipedia, accessed October 2019 
Grace Hopper, Wikipedia, accessed October 2019 
COBOL, Wikipedia, accessed October 2019   
Harvard Mark I,  Wikipedia, accessed October 2019   
Walter Isaacson, Grace Hopper, computing pioneer, The Harvard Gazette, December 3, 2014
Grace Murray Hopper (1906-1992): A legacy of innovation and service, Yale News, February 10, 2017

Tuesday, March 24, 2009

Ada Lovelace Day!

Ada Lovelace linocut by Ele Willoughby
Today is Ada Lovelace Day! I've blogged about the brilliant proto-software engineer before. Daughter of absentee father, the mad, bad, and dangerous to know, Lord Byron, she was able to describe and conceptualize software for Charles Babbage's computing engine, before the concepts of software, hardware, or even Babbage's own machine existed! She foresaw that computers would be useful for more than mere number-crunching. For this she is rightly recognized as visionary - at least by those of us who know who she was. She figured out how to compute Bernouilli numbers with a Babbage analytical engine. Tragically, she died at only 36.

In honour of her, Ada Lovelace Day is an international day of blogging to draw attention to women excelling in technology. Almost 2000 people have pledged to blog about a women in technology, to help remedy the fact that women in technology and their "contributions often go unacknowledged, their innovations seldom mentioned, their faces rarely recognised."

Frequency Hopping with Hedwig Keisler, aka Hedy Lamarr, by Ele Willougby
So apart from Ada Lovelace herself, I thought I would tell you about another, historic, under-appreciated figure: Hedy Lamarr. It's not often one gets to talk about a Hollywood star/scientist and innovator (as well as mother), but this woman could do it all. Austrian, of Jewish heritage, she worked as an actress in film, until she married. Though her arms-manufacturer husband was part Jewish, he was a Nazi-sympathizer which infuriated her. She escaped from Europe where in 1937, by disguising herself as her maid. She came to Hollywood and made 18 films in 9 years. Meanwhile she was working with her neighbour, avant garde composer George Antheil and experimenting with automated control of instruments. Together, the two submitted the idea of a Secret Communication System in June 1941 and were granted a patent (U.S. Patent 2,292,387). This early version of frequency hopping* used a piano roll to change between 88 frequencies and was intended to make radio-guided torpedoes harder for enemies to detect or jam.

They were ahead of their time and the mechanical technology did not exist for decades. "It was not implemented in the USA until 1962, when it was used by U.S. military ships during a blockade of Cuba, after the patent had expired. Neither Lamarr nor Antheil (who died in 1959) made any money from the patent. Perhaps owing to this lag in development, the patent was little-known until 1997, when the Electronic Frontier Foundation gave Lamarr an award for this contribution." [wikipedia]

The frequency-hopping idea lives on in modern spread-spectrum communication technology - a basis for a lot of wireless communications. It's also popular in my field; geophysical electromagnetic researchers often transmit pseudo-random binary sequences (PRBS) into the earth to get a spread in frequencies and take advantage of the wider bandwidth (which means more information about a larger array of different depths below the earth's surface - different frequencies penetrate to different depths).

"Lamarr wanted to join the National Inventors Council, but she was told that she could better help the war effort by using her celebrity status to sell War Bonds. She once raised $7,000,000 at just one event." [wikipedia]

So there you go.

I write about these late, great women inventors, not to say that women in technology were extraordinary figures from the past, but rather to highlight that crucial innovations have been made by women for a long time, and that even when they had the good fortune to also have fame, fortune and beauty, as well as brilliance and innovation, they remained in the shadows.

If you want a living local hero, my favorite is Ursula Franklin. Definitely one of my heroines. Maybe I'll blog about her next....

I am so going to do a lino block print of Countess Lovelace.