Code as a cultural artifact
A new book argues that a computer program is more than a collection of machine commands and has important stories to tell
If every picture tells a story, what about every computer program?
In the case of a certain 30 year-old one line BASIC program, it sure does. In fact, it’s the subject of a new book, with the title being the entire program, "10 PRINT CHR$(205.5+RND(1)); : GOTO 10". The program, written for the Commodore VIC-20 and 64 computers, will generate an endless scroll of the random display of one of two PETSCII characters (which look like forward and backslashes), which ends up looking like a maze on the screen, e.g..
Among other things, the book argues that computer code is “embedded with stories of a program’s making, its purpose, its assumptions” and that code itself, “should be valued as text with machine and human meanings, something produced and operating within culture. “ In short, that code is a type of cultural artifact worth studying and understanding as something that can tell us about the times in which it was written, the history that preceded it and the technology on which its based.
I recently attended a talk in Boston by three of the book’s ten - yes, 10 - authors, Nick Montfort, Patsy Baudoin and Noah Vawter. In between doing live coding on a Commodore 64 (just the sound of the keyboard brought me back to 1982), they talked about how, by examining the code and the output, we can learn something about the history and assumptions that led to it.
For example, during the talk, Montfort pointed out the following:
Montfort, et al "10 PRINT CHR$(205.5+RND(1)); : GOTO 10"
- The BASIC PRINT command doesn’t print anything; it displays output on the screen. The command derives from the days when BASIC was being developed at Dartmouth in the early 1960s, during which time output went to a Teletype, and not to a monitor.
- As the output is generated, the screen scrolls upwards two lines at a time because one logical line on the Commodore 64 was 80 characters, while the monitor displayed 40 columns per line. The 80 column line length comes from the IBM punch card, developed in 1928, which had 80 characters on a line and was itself based on older technologies such as punch cards for textile looms. This continues, as Montfort pointed out, to today “when you open up a terminal window in Linux or your operating system of choice it’ll be 80 columns to start with.”
- The semicolon in the program, which means to print immediately without adding a newline, was added to version two of BASIC in 1964, while the colon (which allows for multiple commands on one line) was introduced by (drum roll please) Bill Gates and Paul Allen when they wrote Altair BASIC in 1975.
The book also considers the importance of coding “one-liners” as good way to introduce people to software and to get an understanding for the basic capabilities of the system on which the code runs. However, Vawter lamented the fact that the complexity of today’s systems make it harder to for non-programmers to learn how to program in a world in which software affects everybody lives in more and more ways. “The systems that we have today are not quite as simple, that entry point is not necessarily there,” he said.
The book also use the 10 PRINT program to examine the history of mazes, randomness and repetitiveness in modern computing.
All in all, it’s a very interesting way to look at computer code as something more than instructions for a machine and, for me, a way to relive part of my middle school days that doesn't involve listening to .38 Special.
If you’d like to try the program yourself, or to write your own one-liners for the Commodore 64, you can download an emulator and go to town.