From: Matthew Smillie Date: 2006-06-12T04:48:39+09:00 Subject: Re: Ruby for Highschoolers? On Jun 11, 2006, at 17:55, Nicholas Evans wrote: > Howdy list, Howdy Nicholas. > I think that teaching students Ruby might be a bit less...arcane. > It looks friendlier, for one. 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... When it comes to teaching programming, I'm not certain Ruby is a good fit. There are definitely some points in its favour, which have been pretty much covered it seems to me, so I'll point out a couple of reasons I think it's not an appropriate fit. For a bit of context, I'm a PhD student at the moment, and have been a tutor/TA on introductory programming courses for a couple of years now (they were in Java). The reason for this is that there are many, many different ways to accomplish things in Ruby, and this can actually be detrimental to the students' fully understanding the basic concepts involved. They tend to get hung up in trying to sort out the minor differences between, say, all the different ways of doing a conditional. When this happens, I've noticed students tend to drift towards "string substitution" - basically just fiddling with the order of what they've written, hoping to hit the right combination by chance; they get the assignment done, but they've learned essentially nothing. Basically, there are many ways to accomplish a given task, which makes it comparatively easy to write a program that - while it produces the desired output - completely misses the point of the learning exercise. Another difficulty is that while the syntax might *look* straight- forward, but in part that's because a lot of Ruby relies on programmers having an understanding of how programming works in general, and a lot of the generic terms can be elided or condensed. When you're learning programming, you need to know about those implicit bits, and having to write them out explicitly helps with that. To give a concrete example, think of the 'return' statement - it's *required* in Java for the method to return anything, and is optional (but generally not used) in Ruby. For someone learning Ruby, this means they have to remember that the last statement evaluated is the return value, which is just one more thing to put on their stack of not-quite-understood concepts (and they have LOTS of those concepts when they're learning). matthew smillie.