TeachScheme: It's About Program Design, not Scheme!

Matthias Felleisen

A first course on computer science must include an introduction to programming, which is the major activity for 99% of all computer science graduates. For high school students, programming should be attractive because it is creative, satisfying, and accessible with just a minimal amount of algebraic background. Traditional courses on programming, however, focus on teaching syntactic rules rather than what makes programming interesting.

The focus of our introductory computing curriculum is the systematic design of programs, the essence of programming. Our curriculum teaches design receipes, which emphasize analysis, systematic creation, and examples over plain coding. We start from the observation that a program is a ``black box'' that consumes and produces information. A programmer (1) studies the two collections of information, (2) describes them (in rigorous English), (3) and makes up examples of how the program relates specific pieces of data. In most cases, (4) this step naturally leads to an outline of the program that matches the data description from step 1. Afterwards, (5) the programmer (and student) can focus on the truly creative step of programming, by filling in the gaps in the outline from step~4. Last but not least, the programmer uses the examples from step 2 and others to test the program. Only after the completion of all six steps is the program fully developed.

Our curriculum is in close alignment with high school algebra. From the first day, programming is seen as the creative essence and counterpart of algebra, which, in turn, motivates students to study algebra in more depth. The use of Scheme enables students to turn basic algebraic exercises into programs on their first day, an exercise that is usually postponed to the second or third week of a traditional course. By the fourth week, students begin to study so-called complex data structures like lists; indeed, they can write their first list-processing program by the end of the fifth week.

Programming in our sense also teaches general problem-solving and communication concepts. In particular, students learn to analyze a problem statement, typically stated as a word problem; express its essence, abstractly and with examples; formulate statements and comments in a precise language; evaluate and revise these activities in light of checks and tests; and pay attention to details. All of these are activities that are obviously useful for a businessman, a lawyer, a journalist, a scientist, an engineer, and many others.

One key element of our approach is the use of Scheme, a language that does not require a boring and mind-numbing study of syntax (in contrast to traditional languages like Pascal or C++) and that supports a highly interactive style of program development. Any language with similar characteristics could serve this purpose, and there are now several that basically satisfy these criterion (ML, CAML, Haskell). Of these Scheme is the most widely used in teaching and in industry, which is the primary reason why we chose it. The second part of our curriculum will show how the same techniques and skills apply to Java. The TeachJava! project is under development. For a more detailed look at this question, see the accompanying Web page.

PLT / scheme@cs.rice.edu

Last modified at Tuesday, 12-Oct-1999 11:14:20 CDT