Monday 9 December 2013

How long is a nanosecond?

about a foot!

Grace Hopper was born in NYC on 9th Dec 1906, 107 years ago. She shouldn't be celebrated as a woman in STEM but rather as a person in STEM who made a difference.  In 1953, Crick and Watson discovered the structure of DNA with a peculiar combination of reading, bouncing ideas around, plagiarism and model building.  Their model of the structure articulated the function, was internally consistent and consistent with all the external data available at the time.  Later, PB Medawar and others, without in any way disparaging the achievements of Watson and Crick, pointed out that the discovery of the structure was inevitable and would have happened in the next few years; even if it came out in dribs and drabs, with false starts and partial solutions.  Most DNA replication happens one particular way in the natural world, so there is no utility, although a lot of fun, in inventing more elegant ways in which it might perform its coding function.

In the development of computers, however, there is an infinity of branching roads in the yellow wood of history: places where things might have been different. Three months ago I wrote, more or less on my knees, about Dennis Ritchie.  He was early enough and central enough to have made a difference in the ethos of computing, quite apart from writing C the programmers programming language and half the Unix operating system.

Grace Hopper was early too.  She was the third person to make the Mark I computer do her bidding.  That's the Harvard Mark I, not Alan Turing's Colossus Mark I (1944), or the Manchester Mark I (1949) or the Ferranti Mark I (1951).  Imagine how different our world would be if all these early computers had been called Jethro.  The Mark I was 16m long, 2.4m tall and 0.6m thick and weighed four-and-a-half tons so was hardly suitable as a mobile phone.  But your phone is orders of magnitude more powerful, so we've made some progress on your behalf. The computer was not only lumpy, it was s-l-o-w, it could only make three additions in a second, so something as simple as calculating the average of a set of numbers took a long time.  One of Hopper's famous exploits was to ask her engineers to "cut off a nanosecond", so she could show the Navy Brass why it took so long for electronic communications to travel back to Washington via satellite. The engineers sent her a piece of copper wire 30cm long which was the maximum distance that electrons (or light, indeed) could travel in a billionth of a second.

Hopper wrote her computing instructions in something that was more or less opaque to outsiders - not for nothing was it called code. So she was an early adopter of the idea of making it easier for people to instruct computers.  She was forthright in her advocacy of sharing useful code fragments, so that one engineer could build on another's successful debugging and implementation of a routine.  That's why, after a decade of coding exclusively in FORTRAN, I learned PERL in 2001 - so I could 'borrow' some sub-routines that worked from others in the lab where I'd just gotten a new job. It's not very helpful if the instructions (2+2=, say) you are sharing are written in pencil and look like:
[register] [source] [operation]
1000001 0110010 0001111
1000010 0110010 0001111
1000001 0000010 0101011
1000001 0000000 0001110
0000000 0000000 0000111
Swap a pair of those 1s and 0s and you've fritzed the program entirely. How much easier if you could write instructions that looked like a very formal, reduced-vocabulary English? Hopper's team wrote such a very early 'compiler' that would accept 20 English-like words and translate them into the binary which was all that the computers could handle. It was called FLOW-MATIC and was the mother of COBOL which became the standard business-and-accounting programming language for the next 3 or 4 decades.  Her persistence in this vision for democratizing and facilitating the process of coding in face of nonsense:  "I had a running compiler and nobody would touch it. ... they carefully told me, computers could only do arithmetic; they could not do programs" was dogged like Barbara McClintock's vision of how things must be.

Hopper signed up for the US Navy Reserve in 1943, giving up a civilian job to serve her country in WWII.  That wasn't so unusual in the extreme circumstances of the day.  She finished up as an Admiral!  That's pretty rare.  I think that she probably did better in the military than in academia.  Navy people are used to making decisions, even if they are dangerous, even if they cause loss of life.  When promoting the adoption and standardisation of COBOL, for example, she applied her talents at advocacy in the key quarters . . . and it was so!  Women in civilian departments at the same time (and this is long after the War) were still typing up and filing reports and being barred from the senior common room. That was certainly her own assessment:
"I've received many honors and I'm grateful for them; but I've already received the highest award I'll ever receive, and that has been the privilege and honor of serving very proudly in the United States Navy."

No comments:

Post a Comment