BASIC
From Maze
(Difference between revisions)
(→A Brief History of Programming) | (Style and small edits) | ||
| Line 27: | Line 27: | ||
== Dartmouth BASIC and Time-Sharing Minicomputers == | == Dartmouth BASIC and Time-Sharing Minicomputers == | ||
| − | In 1962, change was sweeping through the remote Dartmouth campus. Time Magazine noted late that year, in article that declared the college was coming "out of the woods," that the school had built a major new arts center and that John Kemeny, who had made full professor at age 27, had built "the best college math department in the country." [http://www.time.com/time/magazine/article/0,9171,829487-1,00.html] The year, Kemeny and his colleague Thomas Kurtz had started developing a time-sharing system and a new programming language for the education of all students at Dartmouth -- not just those studying math, science, or engineering. They aimed to make a radical improvement in access to computers and to computer programming. "While the availability of FORTRAN extended computer from a handful of experts to thousands of scientific users," Kemeny wrote, "we at Dartmouth envisaged the possibility of millions of people writing their own computer programs." (Man and the Computer p. 30) | + | In 1962, change was sweeping through the remote Dartmouth campus. Time Magazine noted late that year, in article that declared the college was coming "out of the woods," that the school had built a major new arts center and that John Kemeny, who had made full professor at age 27, had built "the best college math department in the country." [http://www.time.com/time/magazine/article/0,9171,829487-1,00.html] That year, Kemeny and his colleague Thomas Kurtz had started developing a time-sharing system and a new programming language for the education of all students at Dartmouth -- not just those studying math, science, or engineering. They aimed to make a radical improvement in access to computers and to computer programming. "While the availability of FORTRAN extended computer from a handful of experts to thousands of scientific users," Kemeny wrote, "we at Dartmouth envisaged the possibility of millions of people writing their own computer programs." (Man and the Computer p. 30) |
| − | To reach millions, Kemeny and Kurtz would clearly have to significantly lower the existing barriers to programming, barriers which were related not only to the nature of programming languages but to the material nature of programming. The two began development of DTSS, the Dartmouth Timesharing System, and with it the BASIC programming language. They considered developing a subset of FORTRAN or Algol, but found this unsuitable and set to work, with a team of undergraduates, developing a new language (Masterminds of Programming p. 79). They saw the value of an interactive time-sharing system for allowing users to quickly correct minor errors rather than coming back 24 hours later with a new stack of punched cards for their next scheduled batch job. They also relaxed some of the specific requirements that were tied to using keypunch machines and cards. Kurtz told an interviewer, "we wanted ... to get away from the requirements that punched cards imposed on users, which was that things had to be on certain columns on the card." (Masterminds of Programming p. 81) Oddly enough, spaces between BASIC tokens were optional in Dartmouth's versions of the language, and extra spaces were ignored, because, as Kurtz put it, "some people, especially faculty members, couldn't type very well." (MoP p. 81) This aspect of Dartmouth BASIC was carried over onto the Commodore 64, as mentioned in the first Remark. | + | To reach millions, Kemeny and Kurtz would clearly have to significantly lower the existing barriers to programming, barriers which were related not only to the nature of programming languages but to the material nature of programming. The two began development of DTSS, the Dartmouth Timesharing System, and with it the BASIC programming language. They considered developing a subset of FORTRAN or Algol, but found this unsuitable and set to work, with a team of undergraduates, developing a new language (Masterminds of Programming p. 79). They saw the value of an interactive time-sharing system for allowing users to quickly correct minor errors rather than coming back 24 hours later with a new stack of punched cards for their next scheduled batch job. They also relaxed some of the specific requirements that were tied to using keypunch machines and cards. Kurtz told an interviewer, "we wanted ... to get away from the requirements that punched cards imposed on users, which was that things had to be on certain columns on the card." (Masterminds of Programming p. 81) Oddly enough, spaces between BASIC tokens were optional in Dartmouth's versions of the language, and extra spaces were ignored, because, as Kurtz put it, "some people, especially faculty members, couldn't type very well." (MoP p. 81) This aspect of Dartmouth BASIC was carried over onto the Commodore 64, as mentioned in the introduction. |
| − | BASIC was designed in other ways to help new programmers, with "error messages that were clear and friendly" and default options that would satisfy most users' needs (9). "If the expert needs something fancier," Kemeny and Kurtz declared, "let the expert do the extra work!" (11). And, BASIC was meant to be a true high-level language, so that programmers would not need any detailed knowledge of the specific hardware being used (9). | + | BASIC was designed in other ways to help new programmers, with "error messages that were clear and friendly" and default options that would satisfy most users' needs (9). "If the expert needs something fancier," Kemeny and Kurtz declared, "let the expert do the extra work!" (11). And, BASIC was meant to be a true high-level language, so that programmers would not need any detailed knowledge of the specific hardware being used. |
| − | While BASIC didn't require that programmers put things in certain columns, there was a requirement that something be put at the beginning of each line: A line number, such as "10." This facilitated branching, of course; the GOTO and GOSUB statements refer to the line numbers where program flow should continue. Although often associated with BASIC, GOTO did not originate with Kemeny and Kurtz's language. FORTRAN already had a GOTO statement, which was the basis for the one in BASIC (MoP p. 86). Before that, the unconditional branch was a feature of assembly and machine languages and did the same thing as GOTO. | + | While BASIC didn't require that programmers put things in certain columns, there was a requirement that something be put at the beginning of each line: A line number, such as "10." This facilitated branching, of course; the GOTO and GOSUB statements refer to the line numbers where program flow should continue. BASIC did not actually need line numbers for this purpose, however. Labels, such as those used in assembly, would have sufficed, and indeed they do suffice in later versions BASIC that do not use line numbers. The line number's real value is seen on a Teletype or other print terminal, or in any environment where full-screen editing is not an option. Line numbers made it easy in those cases to delete existing lines; simply type the line number without any further instructions, and the line disappears. To correct a single existing line, it's possible to simply retype the line with the same line number. To see what a particular line, say line 50, currently is, "LIST 50" will do the trick -- although if one had written the line recently, one could also look up to where the line had been printed out on the roll of paper. |
| − | |||
| − | While numbered lines were to some extent helpful for branching, BASIC did not actually need line numbers for this purpose. Labels, such as those used in assembly, would have sufficed, and indeed they do suffice in later versions BASIC that do not use line numbers. The line number's real value is seen on a teletype or other print terminal, or in any environment where full-screen editing is not an option. Line numbers made it easy in those cases to delete existing lines; simply type the line number without any further instructions, and the line disappears. To correct a single existing line, it's possible to simply retype the line with the same line number. | ||
The practice of numbering program statements by multiples of five or ten is not merely aesthetic; the insertion of new lines in a program requires that, as the 1964 manual puts it, "the original line numbers <ins>not</ins> be consecutive numbers" (22). Numbering a program 10, 20, 30, and so on ensured that between every existing program statement there was room for nine more. It was an acknowledgement that the program is dynamic rather than fixed and perfect. The ''Commodore 64 User's Guide'' also advises that "it is good programming practice to number lines in increments of 10--in case you need to insert some statements later on" (33). | The practice of numbering program statements by multiples of five or ten is not merely aesthetic; the insertion of new lines in a program requires that, as the 1964 manual puts it, "the original line numbers <ins>not</ins> be consecutive numbers" (22). Numbering a program 10, 20, 30, and so on ensured that between every existing program statement there was room for nine more. It was an acknowledgement that the program is dynamic rather than fixed and perfect. The ''Commodore 64 User's Guide'' also advises that "it is good programming practice to number lines in increments of 10--in case you need to insert some statements later on" (33). | ||
| Line 41: | Line 39: | ||
DTSS and the versions of BASIC that ran on it served almost all of the students at that college - Kemeny stated in 1971 that 90% of seven classes of freshmen had received computer training. Access to Dartmouth's system extended to many other campuses, and it was not the only time-sharing system with BASIC. By 1965, General Electric - on whose computers DTSS and the original BASIC ran -- was offering a commercial time-sharing service that included BASIC (Waldrop p. 292). Before the microcomputer revolution, other college and university students were taking required courses in computing using BASIC - at NYU's business school, for instance. Even before the arrival of home computers with built-in BASIC, the language had extensive, if not pervasive, influence. And even before the microcomputer era and the full toppling of BASIC's Tower of Babel, the permissive attitude of Kemeny and Kurtz had led to many different implementations of BASIC for different systems. Writing in 1975, one author commented: "BASIC systems differ among themselves in much the same way that the English language as we know it differs among the English-speaking nations around the globe." (Mullish p. 6) | DTSS and the versions of BASIC that ran on it served almost all of the students at that college - Kemeny stated in 1971 that 90% of seven classes of freshmen had received computer training. Access to Dartmouth's system extended to many other campuses, and it was not the only time-sharing system with BASIC. By 1965, General Electric - on whose computers DTSS and the original BASIC ran -- was offering a commercial time-sharing service that included BASIC (Waldrop p. 292). Before the microcomputer revolution, other college and university students were taking required courses in computing using BASIC - at NYU's business school, for instance. Even before the arrival of home computers with built-in BASIC, the language had extensive, if not pervasive, influence. And even before the microcomputer era and the full toppling of BASIC's Tower of Babel, the permissive attitude of Kemeny and Kurtz had led to many different implementations of BASIC for different systems. Writing in 1975, one author commented: "BASIC systems differ among themselves in much the same way that the English language as we know it differs among the English-speaking nations around the globe." (Mullish p. 6) | ||
| − | While BASIC was a significant project at Dartmouth, it was only one part of the push to expand access to computing that resulted in DTSS, allowed sites all around the East Coast to connect to Dartmouth's computers, and fostered a more productive and creative relationship to computing. In his book 1972 ''Man and the Computer,'' he defends programming and playing games and other "recreational" uses of the computer as important, writing that such actrivities are relaxing and help people to overcome their fear of computers (p. 35). Kemeny also described some of the context in which BASIC programming was done at Dartmouth: "The computation center is run in a manner analogous to Dartmouth's million-volume open-stack library. Just as any student may go in and browse the library or check out any book he wishes without asking for persmission or explaining why he wants that particular book, he may use the computation center without asking permission or explaining why he is running a particular program." (Man and the Computer p. 33) | + | While BASIC was a significant project at Dartmouth, it was only one part of the push to expand access to computing that resulted in DTSS, allowed sites all around the East Coast to connect to Dartmouth's computers, and fostered a more productive and creative relationship to computing. In his book 1972 ''Man and the Computer,'' he defends programming and playing games and other "recreational" uses of the computer as important, writing that such actrivities are relaxing and help people to overcome their fear of computers (p. 35). Kemeny also described some of the context in which BASIC programming was done at Dartmouth: "The computation center is run in a manner analogous to Dartmouth's million-volume open-stack library. Just as any student may go in and browse the library or check out any book he wishes without asking for persmission or explaining why he wants that particular book, he may use the computation center without asking permission or explaining why he is running a particular program." (Man and the Computer p. 33) It was not only the BASIC programming language, but also the development of this permissive attitude toward computing that allowed for programs with no obvious military, business, or scientific purpose -- such as 10 PRINT -- to come about. |
| − | Even before computers moved into the home, they had become more welcoming and available for a wider variety of uses thanks in part to BASIC. | + | So, while home computing provides a significant context for the program at the center of our discussion, |
| + | computer had become more welcoming and available for a wider variety of uses, even before they moved into the home, thanks in part to BASIC. | ||
== Altair BASIC and Micro-Soft == | == Altair BASIC and Micro-Soft == | ||
