The Uses of Program Reading
by Lionel E. Deimel
Computer programs are written in what are rightly called languages. Computer
languages share many characteristics of natural languages, though they are more
formally defined and substantially less forgiving. In teaching programming, we
generally emphasize writing programs. Reading programs is a skill we seem to
expect students to pick up in the process of writing and debugging. Students
develop rudimentary reading skills through interaction with their own
composition and by examining textbook examples. They have little exposure to
real complete, well-written programs.
In a sense, the way we
teach programming is a bit like teaching short-story writing without ever
allowing students to read any short stories. Reading programs not only helps
students write programs better, but it also helps them develop skills useful for
program maintenance and debugging. “The Uses of Program Reading”
is a paper I published in SIGCSE Bulletin in 1985 (citation).
I had many reasons to think about program reading. (As an aside, I should add
that most papers on this topic speak of “program comprehension,” though
I could argue that “program reading” is a somewhat broader concept.) When I was
an undergraduate computer consultant at the University of Chicago, I was amused
that the mother of another student had developed a reputation for helping
students debug their programs. Her secret—she actually knew nothing about
programming—was to ask students about their programs and require answers. In
other words, she made students actually read what they had written, not rely on what they
thought they had written. Of course I developed reading skills on my own in the
course of writing programs. As a teacher, I not only had to read student
programs but also help teaching assistants do the same. Several
years after writing “The Uses of Program Reading,” I refined the ideas in the
paper and offered guidance for teaching reading in a publication of the Software
Engineering Institute. (See “Reading
Computer Programs:: Instructor’s Guide and Exercises.”)
|
 |
The Uses of Program Reading (PDF) |
|

— LED, 4/2/2023 |