### 1` `Why Computer Science Doesn’t Matter

(with Shriram Krishnamurthi)

#### 1.1` `Grade School, High School, and the Three Rs

The three Rs – reading, ’riting, ’ritmetic – symbolize what matters in
American primary and secondary education. Teaching these three essential
skills dominates the schools’ agenda in the minds of parents, educators
and legislators. *Any* new material competes with these core
elements; if it isn’t competitive, it plays a marginal role, often
relegated to nerd status or aligned with vocational subjects.

Computer science plays such a marginal role. While participation in Advanced Placement courses on mathematical subjects soars, the enrollment in AP computer science courses barely registers. Even during the dot-com boom in the 1990s, it never managed to compete with mainstream subjects, motivating massive industry outreach efforts such as the Academies of Information Technology project. Worse, evidence shows many schools are likely to eliminate courses on computing as soon as the enrollment drops off from its heights during boom times.

A large part of the problem is due to how computing is marketed to schools, to parents, to the people who allocate the education budgets, and even to students. Our community insists on teaching the fashionable programming language and the popular programming paradigm. Some can’t even imagine missing out on the latest software engineering ideas du jour: structural and top-down programming, objects and encapsulation, objects-first, objects-last, event-triggered, and all with uml diagrams. Of course, most of the languages and programming paradigms won’t be around by the time students graduate but never mind that.

Not all of these are necessarily bad, but they are tangents not essentials.

When enrollments drop off, the leaders of the computer science education community routinely look for saviors in programming content: graphics, animation, robotics, and games have all been cast in this role. Others act embarrassed about programming, our field’s single most valuable skill, and propose to deemphasize it in favor of “appealing” aspects. And a third group believes that lobbying and advertising differently may just be the key to success.

What our community should really aim for is the development of a curriculum that turns our subject into the Fourth R – as in ’rogramming – of our education systems. One way of doing so is to align programming with one of the Three Rs and to make it indispensable. An alignment with mathematics is obvious, promising, and may even help solve some problems with mathematics education.

#### 1.2` `Mathematics and Programming

All students must enroll in mathematics for most of their school
years. Many students have difficulties imagining how mathematics works and
seeing why it matters. *Good* programming has the potential to
partially solve this problem with properly used graphics and animations,
something that almost every student likes.

Naturally, we realized that doing so cannot be achieved with the dominant approaches to programming instruction. Writing down “public static void main ( String argv [ ]) {” just to define a mathematical function makes little sense.

Even automating this one annoying step of Java programming – plus eliminating “class Example” – won’t help because the results still aren’t aligned with mathematics.

Instead,

the nature of this form of programming must be so mathematical that it is nearly indistinguishable from mathematics;

the mathematics must be expanded to the manipulation of non-numeric forms of data, including images and animations; and

programming must become so lightweight that imposes less than a few minutes of overhead of teaching it.

If we don’t develop and accept this notion of programming, little skill transfer will take place, and no educational administrator will ever admit that Rogramming belongs right up there with Reading, Riting, Rithmetic. If we do succeed, we will solve two problems. First, we will provide students with an interactive, engaging medium for studying mathematics. Second, we will align programming with a subject that is considered indispensable to every student’s education. If we do it right, there will also be a smooth (continuous) path from this lightweight notion of programming to full-fledged software engineering.

Let’s make this vision a bit more concrete. Imagine a typical algebra text book from your younger days. As you may know from watching your children, things haven’t changed that much. These books still contain exercises that ask questions such as what is the next entry in the following table

1

2

3

4

5

...

x1

4

9

16

??

...

??

or create a general “variable expression” that computes any arbitrary
entry of the table. Students are of course expected to say that 5 comes
with 25 and *x* comes with *x * x*. A student who has been told
about functions may even write down *y = x * x*.

Why not train the students to embrace *f*(*x*)* = x * x*? This notation
explicitly states what varies and what depends on variations.

To make such problems look “relevant,” math textbooks may reformulate this kind of question involving real-life things. Well-worn examples demand that trains meet between two cities and that garden tiles be arranged in some rectangular pattern that happens to correspond to a quadratic formula.

Why not tell students that animations are series of images and that displaying them at a rate of 28 images per second makes a movie?

We could also tell them modern arithmetic and algebra doesn’t have to be about numbers. It may involve images, strings, symbols, Cartesian points, and other forms of “objects.” For example,

*placeImage*(*,*25*,*0*,*)

is an arithmetic expression involving images in addition to numbers, and the value of such an expression is just another image:

*placeImage*(*,*25*,*0*,*)*
**=**
*

Making movies is all about using the “arithmetic of images” (and its algebra).

Now imagine asking students to determine how quickly a rocket reaches a certain height. We could start with a table and the simplifying assumption that rockets lift off at constant speeds:

0

1

2

3

4

...

t0

10

20

30

40

...

height(t)= ?

And, since students know about images, we could express this exercise as a problem involving series of images and asking such as what is the next entry in the following table

1

2

3

4

5

...

t??

...

rocketImage(t)= ?

or create a general “variable expression” that computes any arbitrary entry of the table.

You would hope to get an answer like this one:

*rockeImage*(*t*)* = placeImage*(*,*25*,*10**t,*)

With one more step, students can display this mathematical series of images and get the idea that constructing mathematical series can become something visually pleasing:

*showImages*(*rocketImage,*28)

This expression demands that *rocketImage* be applied to 0, 1, 2, etc
and that the result be displayed at a rate of 28 images per second.

A sophisticated teacher may even point out here the possibility of re-using the results of one mathematical exercise in another:

*rockeImage*(*t*)* = placeImage*(*,*25*,height*(*t*)*,*)

Students thus see and visualize the composition of functions and
expressions, all while using mostly *plain* mathematics as a
programming language.

By this time, a reader shouldn’t be surprised to find out that the above isn’t just imagination or a simple software application for scripting scenes. It is a full-fledged programming language and, in this language, even the design and implementation of interactive video games doesn’t take much more than algebra and geometry. We have prototyped and field-tested this idea, and it works.

#### 1.3` `TeachScheme!, Reach Java

When we founded the TeachScheme! (pronounced: teach Scheme, not) project in 1995, we explicitly set the goal of integrating an appealing form of programming into the core curriculum. We wanted

to exploit what students find attractive about programming, graphics and animations;

to introduce such concepts as quickly as possible and as mathematically as possible;

to make programming enriching and indispensable for

*all students*; andto create a

*smooth path*from such humble beginnings to full-fledged programming.

We wanted to place computing where it belongs: in the hearts and minds of every single student.

At the technical level, we succeeded, though it took us several years to get there. We now use the above “rocket launching” program as our “hello world” program. Students are introduced to programming just as we described it above. Nobody should be surprised to find out that students love this introduction and find it appealing; we never tell them that they are “doing mathematics.” It is only a matter of four weeks to go from here to interactive graphical games.

While the project does not use the Scheme programming language per se, it relies on a series of four loosely related dialects that stay as close as possible to mathematics. Every operation is a mathematical operation; translating any program into plain mathematics is straightforward.

Last but not least, the project team has also extended the curriculum with units that lead to plain Java programming. More precisely, the project supports a series of teaching languages that take students from this mathematically oriented introduction to classes, interfaces and methods on a step by step basis. At no point encounter students a step too steep to conquer. Everything is just one more link in a seemingly natural chain. In the end, students find computing with objects and message sending completely natural.

Over 12 years, we have trained a few hundred teachers and college faculty in extremely intensive one-week workshops. Independent evaluators have confirmed that 95% of the attendees found these workshops to be mind-opening. “They changed the way we thought about computing” was the most common response. Due to preconceptions and prejudices, only some of these trained teachers and faculty have had a chance to translate their workshop training into a couple of years of classroom teaching. They found it appealing and they also found highly positive effects on the performance of their students on the AP/CS exam. Even more important, they found that their students improved their mathematical problem-solving skills. In short, the curriculum works for all students and brings students naturally into the fold of our discipline.

#### 1.4` `Crossroads

Our community is at a crossroads. We can continue to search for more saviors and hope that somehow, somewhere computing will receive the respect that it deserves. Or we can try to help ourselves, exploit what students find appealing and align ourselves with (and help) the core school curriculum. TeachScheme! is just one way of moving in this direction. There could be others. What we do know is that we tried the old ways for 40 years and that they didn’t succeed. The choice is ours.

##### 1.4.1` `Acknowledgment

Kathi Fisler helped hone our thoughts in this essay.