
-----------------------------------
wtd
Mon Sep 19, 2005 12:03 pm

Teaching Ruby
-----------------------------------
One more time!  :)

So, since I started this topic before the roll-back, it's occurred to me that there are effectively two major approaches.

You can either take a step-by-step approach of introducing various capabilities of Ruby, or you can just throw some code out and pick it apart.

Though I'm a fan of the former, I'm beginning to think the former holds promise, since it has the potential to really grab attention, and to simultaneously address the question: "ok, that's great... can I do anything useful with it?"

-----------------------------------
Tony
Mon Sep 19, 2005 12:33 pm


-----------------------------------
I'm in favour of step-by-step approach.

Here's a line, here's what you can do with it. Now try something else with what you've learned last week's line.

I think that midway you can then do something like

you - "lets learn Objects"
students - "oh noes! it's too difficult"
you - "you've been using Objects since day one.. here's how"

Bottom line -- control your urges to dive right into the technicalities, let students have their fun. Everything will be taught in due time.

-----------------------------------
Cervantes
Mon Sep 19, 2005 3:37 pm


-----------------------------------
Step-by-step approach.

I've no idea if you read what I posted or not, wtd, but it sounds like you did.  I'll repost the order of things that I had suggested, in any case:

puts
variables
gets
if structures
(could throw cases in here)
methods (made by the programmer, not pre-made methods of various classes)
(could throw arrays and hashes in here)

Now you are free to teach Object-Orientation, and you need not have used it at all until this point.

You can either take a step-by-step approach of introducing various capabilities of Ruby, or you can just throw some code out and pick it apart. 

Though I'm a fan of the former, I'm beginning to think the former holds promise, since it has the potential to really grab attention, and to simultaneously address the question: "ok, that's great... can I do anything useful with it?"

I'm guessing that's supposed to say that you're a fan of the former, but beginning to see merit in the latter.  Or is it the other way around?

-----------------------------------
[Gandalf]
Mon Sep 19, 2005 3:45 pm


-----------------------------------
Both points have their advantages.  The problem I see with letting the students have fun before technicalities is that they might later see no use in learning those specifics (objects, etc.)  If you go into the hard stuff early on though, they might get discouraged, and they might think that there is no real use to all that.  The one reason why Turing was pretty good in that aspect is that it allows you to do the visual, encouraging stuff fairly early on.  A learning language should be able to encourage you to program and see the results, showing you how many possibilities there are.

-----------------------------------
wtd
Mon Sep 19, 2005 5:57 pm


-----------------------------------

You can either take a step-by-step approach of introducing various capabilities of Ruby, or you can just throw some code out and pick it apart. 

Though I'm a fan of the former, I'm beginning to think the former holds promise, since it has the potential to really grab attention, and to simultaneously address the question: "ok, that's great... can I do anything useful with it?"

I'm guessing that's supposed to say that you're a fan of the former, but beginning to see merit in the latter.  Or is it the other way around?

Indeed.

I fear going through and doing things the step-by-step way simply be boring.  In talking to compsci.ca members privately about other languages, I've noticed that sometimes I can get interest by throwing out some code, getting a "WTF?!" response, then picking it apart so that they can see how, yes, it really does make sense.

Here's a sample.  There was a script posted before the rollback which I revised:

require 'rexml/document'

document = REXML::Document.new 