BASIC
From Maze
(Difference between revisions)
(→BASIC Code in Human Memory) | (→Studies of Program Memorization (Sidebar)) | ||
| Line 206: | Line 206: | ||
== Studies of Program Memorization (Sidebar) == | == Studies of Program Memorization (Sidebar) == | ||
| − | The idea that a page of code is easier to memorize than a random page of characters is supported by experimental studies. In an effort to better understand how people comprehend computer programs -- which has ramifications for programmer efficiency -- studies of program memorization were undertaken beginning in the mid-1970s. In 1976 Ben Shneiderman, referring to the cognitive science literature on remembering sentences, reported a statistically significant difference between subjects of different ability levels attempting to memorize a FORTRAN program and a series of valid statements in scrambled order, "leading us to the conclusion that the structure of a program facilitates comprehension and memorization" (127). | + | In Doctorow's story, Murray finds it easier to remember pages of code than a string of random characters, an idea supported by experimental research. In an effort to better understand how people comprehend computer programs -- which has ramifications for programmer efficiency -- scientists began studying program memorization in the mid-1970s. In 1976 Ben Shneiderman, referring to the cognitive science literature on remembering sentences, reported a statistically significant difference between subjects of different ability levels attempting to memorize a FORTRAN program and a series of valid statements in scrambled order, "leading us to the conclusion that the structure of a program facilitates comprehension and memorization" (127). |
| − | Ruven Brooks published a more elaborate theory of program comprehension in 1983; 10 PRINT shows some ways in which this theory is not generally applicable. In Brooks's theory, a programmer reconstructs knowledge about the real-world domains that the program models, developing an initially underspecified hypothesis and refining and elaborating it "based on information extracted from the program text and other documentation" (543). Brooks posited the useful idea that certain lines were "beacons," specially indicating program structures and operations (548). But his theory is otherwise difficult to apply to 10 PRINT. Brooks lists seven internal and five external "indicators for the meaning of a program," including "Indentation or pretty-printing" and "Flowcharts" (551). None are present in the case of 10 PRINT. More fundamentally, Brooks's model is for programs that simulate business processes, not computer programs in general. He introduced a shipping domain in his paper, but then noted that "If the task is to implement a general algorithm for a general purpose routine, say a matrix inversion subroutine, there will be no domain corresponding to the original domain of cargoes and routes." (545). In fact, the problem is not just with abstract processes and mathematical routines. Brooks's model cannot directly apply to any creative program that lacks a real-world domain. What are the "cargoes and routes" of games, recreational programming, art, music, obfuscated code, or productions such as demos and intros in the demoscene? | + | Ruven Brooks published a more elaborate theory of program comprehension in 1983; 10 PRINT shows some ways in which this theory is not generally applicable. In Brooks's theory, a programmer reconstructs knowledge about the real-world domains that the program models, developing an initially underspecified hypothesis and refining and elaborating it "based on information extracted from the program text and other documentation" (543). Brooks posited the useful idea that certain lines were "beacons," indicating key program structures and operations (548). But his theory is otherwise difficult to apply to 10 PRINT. Brooks lists seven internal and five external "indicators for the meaning of a program," including "Indentation or pretty-printing" and "Flowcharts" (551). None are present in the case of 10 PRINT. More fundamentally, Brooks's model is meant for programs that simulate recognizable business processes, not computer programs in general. In fact, Brooks's model cannot directly apply to any creative program that lacks a real-world domain. |
| − | Brooks's concept of beacons was used in another memorization study by Susan Widenbeck, published in 1986, in which a comprehension model with top-down and bottom-up aspects was introduced. Widenbeck found that beacon lines were recalled more often by experienced programmers. She also noted, "Memorizing a program is a very unusual programming task, and it is possible that it changed the subjects' normal program comprehension strategies and procedures." (705) She found that program memorization was not like the memorization of text: "If subjects were taking a strictly linear, or text-reading, approach to understanding the program, we would expect the lines near the beginning of the program to be better remembered ... this was not the case." (707) At the same time, she made analogies to the reading of texts in describing how her subjects read programs: "Using beacons to understand a program seems to be something like skimming an English text. They help to figure out the general, high-level function, but they do not contribute to a detailed understanding of the code ..." (708) | + | Brooks's concept of beacons was revisited in another memorization study by Susan Widenbeck. In this 1986 study, Widenbeck found that beacon lines were recalled more often by experienced programmers, presumably because they know what to look for. Widenbeck also noted, "Memorizing a program is a very unusual programming task, and it is possible that it changed the subjects' normal program comprehension strategies and procedures" (705). Interestingly, given the contemporary mantra that "code is poetry," Widenbeck found that program memorization was not at all like the memorization of text: "If subjects were taking a strictly linear, or text-reading, approach to understanding the program, we would expect the lines near the beginning of the program to be better remembered ... this was not the case" (707). At the same time, Widenbeck made analogies to the reading of texts in describing how her subjects read programs: "Using beacons to understand a program seems to be something like skimming an English text. They help to figure out the general, high-level function, but they do not contribute to a detailed understanding of the code ..." (708). |
| − | Shneiderman's early acknowledgement that programs can be memorized is significant; his result, furthermore, shows that the memorization of programs relates to the memorization of language in some important ways. But there are differences between this study's perspective and the consideration of how BASIC one-liners are memorized. Memorization was used as a measure of comprehension, the real feature of interest; although it seems evident from all of these studies that two are deeply connected, memorization is nevertheless being considered along the way to understanding something else. Shneiderman's study is about the short-term memorization of programs of about 20 lines, assigned as a task. Because short-term memory is the concern, Shneiderman cites the famous paper on the topic, Miller's 1956 "The magical number seven, plus or minus two," and discusses how his results may be consistent with the ones in that paper. | + | Shneiderman's early acknowledgement that programs can be memorized is significant; his result, furthermore, shows that the memorization of programs relates to the memorization of language in some important ways. But there are differences between this study's perspective and the consideration of how BASIC one-liners are memorized. Memorization was used as a barometer of comprehension, the real focus of this research. Although it seems evident from these studies that memorization and comprehension are deeply connected, memorization is nevertheless being considered along the way to understanding something else. Shneiderman's study is about the short-term memorization of programs of about 20 lines, assigned as a task. Because short-term memory is the concern, Shneiderman cites the famous paper on the topic, Miller's 1956 "The magical number seven, plus or minus two," and discusses how his results may be consistent with the ones in that paper. |
| − | 10 PRINT represents a category of programs that were historically memorized but which existing theories of program memorization, created for longer programs that model business processes, do not cover. The memorization of BASIC one-liners was rather long-term, was done for fun, and of course involved very short programs. This type of memorization has certain things in common with the tasks done in these memorization studies, but it may also relate to the way people memorize jokes, proverbs, and other folk texts. These studies do at least show how people can remember key statements (beacons) and the high-level workings of a program without memorizing it character by character. Also, the appearance of program variants that work identically but are written differently is consistent with studies on and theories of program memorization. | + | 10 PRINT, in contradistinction, represents a category of programs that were historically memorized but which existing theories of program memorization, formulated for longer programs that model business processes, do not cover. The memorization of BASIC one-liners was rather long-term, done for fun, and of course involved very short programs. This type of memorization has certain things in common with the tasks done in these memorization studies, but it may also relate to the way people memorize jokes, proverbs, and other oral texts. These studies do at least show how people can remember key statements (beacons) and the high-level workings of a program without memorizing it character by character. Also, the appearance of program variants that work identically but are written differently is consistent with studies on and theories of program memorization. |
== A Personal Memory of 10 PRINT (Sidebar) == | == A Personal Memory of 10 PRINT (Sidebar) == | ||
