[plt-scheme] Teaching Scheme

From: Stephen Bloch (sbloch at adelphi.edu)
Date: Mon May 3 12:55:04 EDT 2010

On May 3, 2010, at 10:53 AM, Shriram Krishnamurthi wrote:

> It might also be considered a strength to compute rather than print,
> and teaching programming by showing printf's might be considered a
> weaknesses.

Absolutely.  I can't tell you how many students I've had in upper-level classes who think any function that doesn't do some input, then some computation, then some output, isn't a "real" function.  As a result, they have a lot of rewriting to do when I tell them the function now has to take its input from a Web page, or a file, and produce its output as a mail message or through a speech synthesizer.  If they had separated I/O from computation in the first place, this would be much easier.

Teaching I/O at the beginning of a first course -- in ANY language -- encourages this kind of bad habit.  Even when I'm teaching a first course in Java, I try to use little or no I/O until at least halfway through the semester, and no "public static void main(String[] args)" until even later.  Of course, the ability to pospone I/O from the first day depends on your IDE: DrScheme, DrJava, ProfessorJ, and BlueJ all make it fairly easy.

I'm teaching a "programming for non-majors" course this semester, and we're not getting to I/O at all.  (I was hoping to, in the last week of classes, but things got behind schedule.)

Stephen Bloch
sbloch at adelphi.edu

Posted on the users mailing list.