[plt-scheme] 2htdp/image questions

From: Matthias Felleisen (matthias at ccs.neu.edu)
Date: Mon Apr 19 22:26:05 EDT 2010

On Apr 18, 2010, at 8:52 AM, Stephen Bloch wrote:

> I was at a CS education conference over the weekend, and saw a number of people showing off the things their students can do to images in the first week or two of class in Python.  For the most part, these operations boil down to (not real Python syntax)
> 
> 	for i = 1 to image.height
> 		for j = 1 to image.width
> 			image.pixel[i,j] = some modification of image.pixel[i,j]
> 


I'd like to respond to a second, unmentioned theme in your message. 

When I arrived at NEU, the first-year staff was teaching just these kinds of things (they used to do it in C++, then in Java). The claim that novice programmers understand 

 -- the idea of getting a Python scrip to run 
 -- structures as a data (pixels) 
 -- 2-dim arrays (images) 
 -- parameterized for loops 
 -- nested for loops 

all in one week is ludicrous. I have seen such claims since the late 1990s. They have always turned out to be wrong. What's worse, when people have used this strategy, the graduates of such courses couldn't really design a program not to speak of explain its design. I am convinced that I could validate such a claim again for all these Python courses. 

;; --- 

In a sense, all of this has been tried in the Scheme world. Harvey's Scheme book starts with loop-level combinators and we could do this for images. I am getting the impression that the general result is the same as in similar conventional courses on loops. 

As much as I like the idea of getting students from BSL/ISL to real Scheme, I think we can't do this in one course w/o completely compromising the DP part of our original program. 

;; --- 

If you do wish to experiment with such loops, I recommend a Universe-like interface so that the function is more a description of an interaction -- like big-bang and universe -- rather than a map/for-each like construction. 

;; --- 

Noel wrote: 

> Rather than trying to copy Python, why not do something different? 

I like this idea a lot because DrScheme already supports this and has so for many years. When Pythonistas show off nested for-loops, show off the insertion of images into the IDE; show off that images are first-class values and have their own basic arithmetic, just use the docs; and if you know of basic operations that you'd like, propose them and we will add them. I like Noise and perhaps we should add EdgeSharpening, too. 


-- Matthias
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20100419/b9f97cc1/attachment.html>

Posted on the users mailing list.