Computing Applications

TeachScheme! U­sing Mathematics to Teach Programming

Jack Rosenberger
CACM Senior Editor Jack Rosenberger

In a high school with 1,000 or more students, only about 30-40 of the students will ever take an introductory computer science (CS) course, says Matthias Felleisen, a Trustee professor at Northeastern University, who believes this is just plain wrong. “Every single student should take a CS course,” says Felleisen, “and be exposed to the beauty of CS.”

Unfortunately, many introductory CS courses in high school teach students how to program using a professional language, such as C. “Teaching novices how to program in a professional language does not do CS justice,” says Felleisen. “Indeed, what we have seen during the last few decades is that it drives students away.”

To remedy this situation, Felleisen and a team of computer scientists have developed the TeachScheme! Project, which provides high school teachers with courseware and other tools to use mathematics to teach programming.

Felleisen presented an hour-long introduction to the TeachScheme! Project in the opening keynote speech, titled “TeachScheme!,” at SIGCSE 2011, the 42nd ACM Technical Symposium on Computer Science Education, in Dallas. As he noted in his opening remarks, TeachScheme! has led to the creation of 10 TeachScheme!-related Web sites, 100-plus published papers, 1,000 teachers being trained, more than 10,000 students being taught, and 1 million downloads from unique IP addresses.

The ideas behind the TeachScheme! Project are a winning combination of simplicity, beauty, and astute strategic planning. TeachScheme! teaches students how to program, using mathematics, in particular algebra. It also provides students with a smooth path for learning about programming in high school (in some cases, middle school) to performing real programming in college. It also introduces students to the idea of systematic program design, a skill that is useful not only to students who are interested in computer science, but to students who choose any career path, such as medicine or journalism, that involves problem solving. “Teaching the ideas of programming with mathematics demonstrates the depth, breadth, and beauty of computing,” says Felleisen. “It also aligns our field with one of the three STEM fields,” which also helps integrate computer science into the high school curriculum.

Programming With Mathematics
The foundation of TeachScheme! is the programming language, Racket, and DrRacket, the Racket program development environment. Racket differs from professional programming languages in that it uses mathematics, especially algebra, and images to teach programming. In essence, Racket enables students to write 1980s-style video games using middle school math as the programming language. Not only can Racket improve the students’ math performance, says Felleisen, but it also can motivate them to ask for more math, such as geometry, trigonometry, and pre-calculus concepts. And TeachScheme! increases their interest in more complicated programming languages. As Felleisen puts it, “We get them hooked.”

One of the main problems with teaching students via professional programming languages is a student inevitably makes a mistake and encounters a syntax or error message. And the parser of a professional language reports these errors with messages that assume the user is a knowledgeable programmer who understands the entire language. Novices, by definition, don’t know the entire language, Felleisen notes.

Racket overcomes this problem with the use of systematic program design, in particular a design recipe. The design recipe starts by asking the student to read the problem statement and gather information about the available data. Next, it leads them through a series of steps, mechanical and creative, to gain an understanding of the language’s behavior in stages, beginning with the black-box behavior and moving to its internal structure.

This provides a means for students to learn the new language “gracefully,” says Felleisen. (TeachScheme! uses multiple programming languages besides Racket, including Java, Python, and others.) Also, Racket’s error messages are simpler and geared toward novices.

Even if students never go into computer science, TeachScheme! provides them with a systematic approach to problem solving, which is helpful in numerous other fields. Hence, with TeachScheme!, an introductory programming course is not perceived as a class in which students learn the syntax of a currently fashionable programming language, but a class in which they learn widely applicable problem-solving skills.

To emphasize the role of design in TeachScheme!, the project has been renamed Program by Design. Regardless of its name, Felleisen’s project has accomplished two important goals. One, it aligns computer science with mathematics, especially arithmetic and algebra, and provides a method for computer science to become part of the high school curriculum. Two, as already noted, it exposes students to a more user-friendly introduction to programming, and makes the transition to programming at the college level infinitely smoother.

While Felleisen has been the project leader, he was gracious in his SIGCSE 2011 keynote to acknowledge and praise the efforts of his TeachScheme! colleagues, who include Shriram Krishnamurthi, Brown University; Matthew Flatt, University of Utah; Robby Findler, Northwestern University; and Kathi Fisler, Worcester Polytechnic Institute, now runs the program.


TeachScheme! Resources

Program by Design:


How to Design Programs, second edition, by Matthias Felleisen, Robert Bruce Findler, Matthew Flatt, and Shriram Krishnamurthi:

Matthias Felleisen homepage:

Jack Rosenberger is senior editor, news, of Communications of the ACM.

Join the Discussion (0)

Become a Member or Sign In to Post a Comment

The Latest from CACM

Shape the Future of Computing

ACM encourages its members to take a direct hand in shaping the future of the association. There are more ways than ever to get involved.

Get Involved

Communications of the ACM (CACM) is now a fully Open Access publication.

By opening CACM to the world, we hope to increase engagement among the broader computer science community and encourage non-members to discover the rich resources ACM has to offer.

Learn More