[plt-scheme] Do no evil

From: wooks . (wookiz at hotmail.com)
Date: Tue Mar 9 00:15:21 EST 2010

> >> > Well it engaged my students and got them interested in seeing how > > it's implemented.> >> > It also provides me with a vehicle for introducing do and arrays > > both of which they need to learn.> > Seems to me it would make more sense to motivate arrays with the > purpose they really serve, O(1) access to a large collection of data, > as with graphs or union-find, or more mundanely perhaps, game boards > and other stuff where Schemers would tend to prefer lists.> My students aren't probably haven't and will likely never take a discrete math course and don't know what a graph is. Discrete Math is not a prerequisite for their curriculum. The examples are more esoteric than necessary.I have already explained O(1) access that arrays provide and when you need it. I motivated it using Brian Harvey's example of a lap counter in Simply Scheme. That simultaneously introduced the need for state and then O(1) access to update the lap counter for each car in the race and used an example that a primary school kid could understand. I did not see a reason to conflate the manipulation of arrays with the motivation. If you were to ask them now they could probably give a pretty good explanation as to why an array should not be the data structure of choice for summing a list of numbers. To be fair I did say I was doing that with bubble sort but I really meant motivating an example of array manipulation and I wanted to do that with an example where an array was genuinely appropriate.>> I say this just because using bubblesort to motivate do & arrays seems > kind of like the hardcore Schemers (not of the PLT school of thought) > using factorial & exp-time fibonacci to motivate recursion...i.e., > losing some students, understandably, at "why would I care about > that?" and others at "wait--so people use this stuff for algorithms > that are so bad nobody uses them?"> Count me in their number.Past exam questions have been to write a recursive then iterative version of fibonacci and to write factorial and use it to implement a program that takes n and k and calculates n choose k. I'd rather they answer those than the ones that require them to manipulate files or arrays.
We want to hear all your funny, exciting and crazy Hotmail stories. Tell us now
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20100309/8d2a0578/attachment.html>

Posted on the users mailing list.