From: Christian Neukirchen Date: 2006-06-12T20:35:20+09:00 Subject: Re: Ruby for Highschoolers? Nicholas Evans writes: > I also like Ruby better than Scheme. Again, just a matter of taste. ;-) >>>The goal of the course is to teach programming concepts in half of a >>>school year. The things that were covered during this year's course >>>were writing functions to do a simple calculation, using variables, >>>and using cond/booleans. Many students struggled during the beginning >>>of the year with writing basic functions. Our teacher kind of blamed >>>herself for that, because this was her first year teaching >>>programming, and she had never been trained on Scheme. >> Do you think an untrained teacher better teaches Ruby instead of >> Scheme? > I think I've underexplained the situation. If I end up as the > teacher's assistant and I can sell Ruby, I'm going to be the one > teaching it to the class AND the teacher. Aah, so that's the reason. Okay. Of course, given you know Ruby, you can teach Ruby better than Scheme. Fair point. (And it's probably better to teach Ruby by a person that can program instead of teaching Scheme by a person that can't program.) >>>I think that teaching students Ruby might be a bit less...arcane. It >>>looks friendlier, for one. >> That's a matter of taste; people that never saw code didn't yet >> develop a taste for it. > That said, I saw people getting incredibly confused by the idea of > matching the curly braces up. Ruby looks a lot more natural, so I > think it would be easier for people to relate something like this: > > def do_something(n) > if n < 10 > true > else > false > end > end > > As opposed to: > > (define (do_something n) > (cond > [(< n 10) true] > [else false] > ) > ) > > (Sorry for parse errors, if there are any.) IMHO, cond is overused. This is perfectly readable, no? (define (do_something n) (if (< n 10) true false)) (Hint: Senseful indentation matters.) >>>It would also open the course up to more concepts than Scheme >>>offers, like automagic testing, manipulating files, object >>>orientation, etc. Teaching OO during this course would probably also >>>benefit the kids later on for Java during Programming II... >> I'd say, due to the small core of Scheme, it's even easier to >> explain >> these topics. You have everything: write a few macros for >> unit-testing, files can be done with ports (they are in the spec), >> object orientation can be done with closures. Once they did all this, >> they know what they are talking about. > I was unaware that Scheme had OO. I don't really *know* Scheme, so I > guess I'm not being terribly fair. It doesn't have OO out of the box, but it's powerful enough to build your own OO. >> Of course, teaching this is not that easy. Did you ever read SICP? >> Have a look into it and rethink your choice. > I haven't even heard of that. I'll look into it. =) > >> (Despite all of this, I prefer Ruby for *coding*, of course. But >> Scheme is the better choice for teaching. YMMV.) > Thank you for the feedback! You're welcome. -- Christian Neukirchen http://chneukirchen.org