Grace Hopper - The Mother of Cobol
Written by Historian   
Article Index
Grace Hopper - The Mother of Cobol
Towards High-Level Language
A Lifelong Teacher

A Real Bug

Whether Grace Hopper really was the first to coin the term "bug" is an open question but her version of the story is at least fun. The Mark I was acting up and giving incorrect results. An internal examination located the faulty relay and there jammed between the contacts was a moth - beaten to death by the rapid opening and closing of the relay! The moth was removed and taped into the machine's log book with the note "First ACTUAL bug found".

 

bug

The log book complete with bug is now in the
National Museum of American History

 

Clearly Grace and her colleagues had been long used to referring to programming errors as bugs before a real life bug was found. Aiken would come in and say "Are you making any numbers?" a phrase which hasn't really caught on and they would reply that they were "debugging the machine" - a perennial programmer's excuse ever since! 

Manuals and tables

It is clear that Aiken was a hard task master because Hopper also reports that like generations of programmers to come she spent many long nights working hard to make something work properly. As an aside it is also worth mentioning that it was her job to write the first manual for the Mark I. A job that Aiken gave to her with the words "you're in the Navy now" to dispel any doubts that she might have about completing the task!

After the War Hopper spent some time programming actuarial tables for the Prudential and then teaching at Harvard. Her next important move was to the Eckert-Mauchly Corporation which was nearing completion of the UNIVAC. Before that machine was available she programmed the BINAC - a small binary machine built in secret for the Snark Missile project. This used an octal representation for its Op codes and Hopper quickly learned to think in octal - even to the extent of mistakenly adding up her bank balance in octal!

It was at this time that she seems to have realized that the computer was a symbol manipulator rather than just a big calculator. This may have been due to her exposure to some of the more philosophical ideas of Babbage, or just because the machines were becoming more capable. Even if it was a natural progression it is clear that the majority of people, programmers included, tended not to share this now obvious viewpoint.

 

Towards a higher level language

At first she thought about ways of making machines easier to use by creating higher level languages. This again seems like an obvious move but at the time there were no compilers in existence let alone compilers that could produce efficient code.

In 1952 Hopper and her team at Remington wrote the A-0 compiler, almost just to show that it could be done. To make it all work they had to invent many of the fundamental techniques of translation. For example, she solved the problem of forward references by using a fixed jump area where the addresses of routines could be stored when they were discovered later in the program's text. Hopper claims that the idea came from her days playing women's basketball where the forward pass was well-used strategy. This same technique is still used today in all sorts of ways and the programmers who use it always think that it is very clever and ever so sophisticated! The belief that the computer was just a number cruncher and couldn't be used to translate or work with general symbols was so widespread that A-0 wasn't perceived as being particularly important.

In another attempt to widen horizons she wrote the first symbolic differentiator, i.e. a calculus program. Hopper invited people to bring her problems for solution. One poor man had been working for six months on the derivatives of a particularly horrible function - the machine spat out the first fifteen derivatives in 18 minutes. The man refused to believe that there wasn't a human hiding somewhere in the system!

At a more trivial level she demonstrated that a compiler could translate programs written in French and German into machine code. The company executives were shocked that a machine built in the USA could do anything in a foreign language!

The tide slowly turned in her favour and at last she was given the chance to put together a compiler for a large language - the B-0 compiler which then became FLOW-MATIC in 1957. The language was targeted at business use and Hopper even felt that arithmetic expressions were too complicated for the average user and introduced a very wordy language - for example

Add One To Total

rather than

Total=Total+1

After the huge success of Fortran in providing a high level language for the scientific community the business community felt a little left out. The result was the Cobol language which included much of Flow-matic. Grace Hopper did much to influence the newer details of the Cobol language and, while she was not a working member of the final standards committee, there is no doubt that she deserves to be called the mother of Cobol.



Last Updated ( Friday, 01 August 2025 )