Nuby: determine method passed and determine the receiver that rec eived the method

Simon Strandgaard [mailto:neoneye@adslhome.dk] advises:

I am a newbie, and am trying to build a lesson plan for
learning oop
for beginners like me and non-programmers -and my son fits
the bill. I
hope to finish it before summer so that me and my son can learn
together.
[snip]

I tried to teach programming to my little bother (13 years
old). He understood the basic concepts (variables, methods),
but lacks the motivation for doing coding himself. I tried…

First teach the apprentice what a variable is: a pocket
where you can store useful things.

Next teach control structures: if then else, loop, 42.times, …

3rd teach methods.

Its more interesting when there is some sort of graphical
output. If you can make a small game: tetris. So that the
apprentice can better see the consequences of changes.

When the apprentice has reached this state, then we can move
on to OOP.

I’ve tried this method on my other son and other students of mine, too (I
was once a teacher =). But there is an unfortunate trend, once they learn
how to do procedural things, it is very hard to introduce to them oop (got
this fr my friend instructors, don’t know how true). Children like to do the
shortcuts… I will experiment the oo-first-method also and hopefully, the
ruby way will show how…

Wish you luck :wink:

Thanks, Simon.
Btw, I was following up on your very promising aeditor project. Is it
version 3 already??


Simon Strandgaard

kind regards -botp

Simon Strandgaard [mailto:neoneye@adslhome.dk] advises:
[snip]

When the apprentice has reached this state, then we can move
on to OOP.

I’ve tried this method on my other son and other students of mine, too (I
was once a teacher =). But there is an unfortunate trend, once they learn
how to do procedural things, it is very hard to introduce to them oop (got
this fr my friend instructors, don’t know how true). Children like to do the
shortcuts… I will experiment the oo-first-method also and hopefully, the
ruby way will show how…

Maybe by showing scary examples of what mess procedure-only code can turn
into, will make it easier to understand how OO can simplify it.

By using strategy-pattern or visitor-pattern you can eliminate most
if statements. Thats nice…

[snip]

Btw, I was following up on your very promising aeditor project. Is it
version 3 already??

ATM I am working on a regexp engine, which is needed for syntax-hiliting.
It will be compatible with perl6-regexp and ruby/perl5-regexp.
The biggest bump on the road seems to be nested repeats, For instance
/(a.*b){5}/ is entertaining. Right now I am slightly regex mental. I will
become a happier human-instance when this task gets completed.

···

On Mon, 26 Jan 2004 08:55:15 +0900, Peña, Botp wrote:


Simon Strandgaard