<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Apr 18, 2010, at 8:52 AM, Stephen Bloch wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: 'Lucida Grande'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; ">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. &nbsp;For the most part, these operations boil down to (not real Python syntax)<div><br><div><span class="Apple-tab-span" style="white-space: pre; ">        </span>for i = 1 to image.height</div><div><span class="Apple-tab-span" style="white-space: pre; ">                </span>for j = 1 to image.width</div><div><span class="Apple-tab-span" style="white-space: pre; ">                        </span>image.pixel[i,j] = some modification of image.pixel[i,j]</div><br class="Apple-interchange-newline"></div></span></blockquote></div><br><div><br></div><div>I'd like to respond to a second, unmentioned theme in your message.&nbsp;</div><div><br></div><div>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&nbsp;</div><div><br></div><div>&nbsp;-- the idea of getting a Python scrip to run&nbsp;</div><div>&nbsp;-- structures as a data (pixels)&nbsp;</div><div>&nbsp;-- 2-dim arrays (images)&nbsp;</div><div>&nbsp;-- parameterized for loops&nbsp;</div><div>&nbsp;-- nested for loops&nbsp;</div><div><br></div><div>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.&nbsp;</div><div><br></div><div>;; ---&nbsp;</div><div><br></div><div>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.&nbsp;</div><div><br></div><div>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.&nbsp;</div><div><br></div><div>;; ---&nbsp;</div><div><br></div><div>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.&nbsp;</div><div><br></div><div>;; ---&nbsp;</div><div><br></div><div>Noel wrote:&nbsp;</div><div><br></div><div><blockquote type="cite"><span class="Apple-style-span" style="font-family: monospace; ">Rather than trying to copy Python, why&nbsp;not do something different?&nbsp;</span></blockquote><br></div><div>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.&nbsp;</div><div><br></div><div><br></div><div>-- Matthias</div></body></html>