Code Nation. Michael J. Halvorson
on to program exclusively in this language. In my college years (the early 1980s), I started with the MACRO assembly language for the popular DEC VAX line of minicomputers.13 Later at Microsoft, I used Microsoft Macro Assembler (MASM) MASM.Microsoft Macro Assembler (MASM) Microsoft Macro Assembler (MASM) for programming IBM PCs and compatibles running MS-DOS. Coding skills of this type were standard fare in 1980s’ programming culture as both hobbyists and professionals needed to squeeze as much power and efficiency from the early systems as possible. (For more about MS-DOS programming requirements and the architecture of IBM PCs and compatibles, see Chapter 6 and Chapter 9.)
Assembly language is a nice improvement over machine language, but it is still closely connected to the hardware architecture of a computer system. Assembler is a low-level programming language designed for speed. This means that assembly language programs written for one computer will only work on computers of the same model or type. Translating an assembly language program from one computer model to another invites a lot of work, and this made it difficult to devise general-purpose programming solutions that could be deployed on multiple systems. However, as we learned with the Altair programming example, assembly language is valuable when you want to master a chip’s instruction set and create compact and efficient code. This is probably why computer scientist Knuth, Donald Donald Knuth (1938– ) wrote so many of his algorithms in machine (or assembly) language in his magisterial book series, The Art of Computer Programming. As a rallying cry for efficient code, Knuth advised:
High-level languagesHigh-level languages are inadequate for discussing important low-level details such as coroutine linkage, random number generation, multi-precision arithmetic, and many problems involving the efficient usage of memory. A person who is more than casually interested in computers should be well schooled in machine language, since it is a fundamental part of a computer.14
Donald Knuth wrote this in the foreword to his popular book series in 1962, and it was reprinted in many editions. His writings and advice are highly valued by academics and self-taught programmers alike.
But were there even earlier attempts to teach programming to new computer users?
Arguably the world’s first computer book containing specific instructions about how to program a computer was published in the U.K. in 1951. This impressive volume was entitled Preparation of Programs for an Electronic Digital Computer, and it was concerned with formulating machine code for the revolutionary EDSAC.Electronic delay storage automatic calculator (EDSAC) Electronic delay storage automatic calculator (EDSAC) electronic delay storage automatic calculator (EDSAC) computer at the University of Cambridge.15 (See Figure 3.5.) The authors were Wilkes, Maurice Maurice Wilkes, David Wheeler, and Stanley Gill, pioneering professors and technical writers connected with the Cambridge community. Their book offered a selection of common subroutines for handling basic operations in a computational program. The instructions were specific to the EDSAC, one of the world’s first stored-program computers.
The authors undertook daunting challenges, because no programming book had been written before and there was little in the way of notation or written conventions to express complex step-by-step instructions in book form. In fact, the routines are not “code” at all but instructions on how to set up the machine’s registers and the parameters needed to solve certain types of equations. But by distributing a selection of common “routines,” the authors explained to fellow scientists how the EDSAC worked, and readers with access to a similar computer could use the book to save time and expand their programming skillset. From this began a venerable tradition that continues in all good programming primers up to the present—readers learn by example.
Preparation of Programs did well enough such that a second edition was prepared in 1957. In the revised edition, the authors provided routines that were adaptable to a wider range of stored-program computers. In a literary sense, the Learn-to-program movement “learn-to-program” movement began with these books, although the intended audience was a narrow band of scientists and engineers and not the general public.
3.3High-level languagesHigh-level Languages
Beginning in the 1950s, Hopper, Grace Murray Grace Hopper and her peers began to develop a solution that would make software less costly to produce and programming easier to learn.16 This solution was known to contemporaries as an “automatic programming language” or “autocode” for short. We know it today as the first of many high-level languages—software abstractions with a syntax closer to human language—which hide some of the inner-workings of a computer. Using a high-level language, a programmer can write instructions using recognizable statements and symbols, then use a program known as a Compiler compiler to translate the high-level statements into the machine code required by the underlying computer. Hopper wrote her first compiler between October of 1951 and May of 1952, and it was called the A-0 compiler CompilerA-0 Compiler “A-0 Compiler.”17 This proved that higher level languages were possible and useful, and scientists began designing them in earnest. In the coming years, Hopper’s work became the foundation for the FLOW-MATIC FLOW-MATIC and COBOL COBOL languages.
Figure 3.5Maurice Wilkes and his colleagues work on the EDSAC computer at the University of Cambridge, U.K. Wilkes is in the middle, kneeling and wearing glasses. (Courtesy of the Computer History Museum)
At first, the Compilerhigh-level compilers High-level compilers high-level compilers created machine code that was less efficient than human-generated machine code, but as time passed the compilers improved, and the benefits of high-level abstraction became obvious. For one thing, higher-level languages saved programming time, as software developers could more quickly build a solution if they didn’t have to manage operations inside the computer at a minute level.18 Software became easier to revise and update in future releases, and the code was easier to share among team members. In addition, high-level Cprogramming language language designers could customize their coding systems so that they met the needs of a specific industry or computer application. For example, the language’s instructions, keywords, and data structures could be readily adapted to such tasks as numerical analysis, list processing, artificial intelligence, music, and education.
Soon, there were dozens—even hundreds—of high-level computer languages. A standard task in graduate Computer Science programs became developing new compilers as an exercise to learn advanced language concepts, such as pattern recognition, lexical analysis, code optimization, and object-oriented programming. New computer science textbooks arrived in the 1970s and 1980s to introduce this fundamental skill and its applications.19
The most important early high-level languages were Formula translation (FORTRAN) FORTRAN, COBOL COBOL, Algorithmic Language (ALGOL) ALGOL, BASIC BASIC, Pascal Pascal, and C. A great amount of documentation and books related to these languages and their early supporters is available in print and electronic media, waiting for the historians of computing to assess them. These sources include Founding memoirs “founding memoirs” written by language pioneers, early language specifications and manuals, primers, corporate marketing materials, journal articles written for computing professionals, product reviews, and so on. Overlooked in the study of these languages is the abundant supply of primers or “how-to” computer books written for students, self-taught programmers, and hobbyists who sought to learn programming on their own terms or study together in a classroom or user group setting. Throughout Code Nation, I argue that computer books and magazines are a vital but neglected source of information that will help historians and computer scientists understand how technical ideas and techniques were diffused from inventors and engineers to the general public. These historical sources are just as important as “founding memoirs” for understanding how programming culture took shape in the U.S. Programming primers are in essence the daily newspapers and chapter books of the “PC Revolution”; they contributed significantly to the learn-to-program movement’s propagation across American society.
To