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.

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 IWikipedia, 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

No comments: