Code Nation. Michael J. Halvorson

Чтение книги онлайн.

Читать онлайн книгу Code Nation - Michael J. Halvorson страница 26

Автор:
Жанр:
Серия:
Издательство:
Code Nation - Michael J. Halvorson ACM Books

Скачать книгу

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

      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 open a window on the movement’s origins in the 1950s and 1960s, let’s examine the foundations of Formula translation (FORTRAN) FORTRAN, arguably the most important platform for programming activity in the 1960s. FORTRAN products and publications encouraged new users to experiment with software creation. These computer users were often proficient in science and mathematics but not yet familiar with how computers worked. Once FORTRAN built momentum and established an audience, the learn-to-program movement expanded into other popular languages like COBOL COBOL, BASIC, Logo, and Pascal.

      FORTRAN was initially designed by Backus, John John Backus and a group of research scientists at IBM. (See Figure 3.6.) The team designed its high-level language in 1954, and then they took some 2.5 years to build the FORTRAN “translator,” as the organization described their compiling system that converted FORTRAN routines into machine code.

      IBM released FORTRAN I in April of 1957, and the language and compiler quickly became a standard for software development in the U.S. and Europe. Important for its adoption, IBM distributed the original FORTRAN software and materials for free to its customers who owned IBM hardware, eventually attracting the interest of a standards organization that built consensus around the new language and its features.

      The term “FORTRAN” looks like an acronym, but the name is actually an abbreviation for the words “formula translation” or sometimes “formula translating system.” True to its original names, the language was created for solving scientific and engineering problems, and its internal structures were designed to process mathematical equations in a straightforward way. The language included standard mathematical functions, conditional statements, looping structures, variable types, arrays, and other features that would become customary in high-level languages. All variables beginning with the letter I, J, K, L, M, or N were automatically declared as “fixed point” (or integer) values. All other variables were typed as “floating point” (or real) numbers. The language also allowed the programmer to insert comments into his or her code, allowing developers to explain what their routines were doing and where their code still needed work. Arrays

      When IBM designed FORTRAN, it was deeply concerned with improving programmer productivity. Large software development projects were already developing a reputation for being over time and over budget, and this “crisis” gained major notoriety in the 1960s. Reflecting on the economics of this issue as early as 1954, Backus wrote: “Programming and debugging accounted for as much as three quarters of the cost of operating a computer; and obviously, as computers got cheaper, this situation would get worse.”20 Early results with the new compiler were promising, however. When compared to low-level languages, FORTRAN programmers often reduced the number of statements that they used to write their code by a factor of 20.

       figure

      Figure 3.6Gathering of the engineering team that contributed to IBM FORTRAN in the 1950s. (From the ‘Pioneer Banquet’ at the National Computer Conference, Houston, Texas, 1982.) From left to right: Richard Goldberg, Robert Nelson, Lois Haibt, Roy Nutt, Irv Ziller, Sheldon Best, Harlan Herrick, John Backus, and Peter Sheridan. (Courtesy of the Computer History Museum)

      But what did it mean to “write code” in the early days of FORTRAN?

      In the first batch-processing systems, FORTRAN programmers did not use text editors to write their programs, but they wrote out routines by hand and then entered them on a key punch device that produced 80-column punched cards. The contents of one FORTRAN program statement appeared on each card, though longer statements could span multiple cards. To help with the process of preparing the cards, IBM produced standard coding sheets for programmers to fill out that identified the columns, statement numbers, and FORTRAN language elements. If the programmer checked a special box at the top of the card, the card’s contents would be considered a “comment”, i.e., an explanatory description ignored by the compiler but retained to document what the program did.

      Any spaces existing in the final program would also be ignored by the FORTRAN compiler. Spaces were known to cause confusion because they were Formula translation (FORTRAN)hard to discern on the coding sheets—both for programmers and key punch (or card punch) operators. Jim Backus later wrote that his team was criticized for designing the compiler so that it ignored spaces, but an allowance of this type was typical in an era where programmers

Скачать книгу