I have been thinking for some time now about the right way to teach
the basic of computer languages and programming to young children that
are roughly 11/12 years old.
In my first experiments I found them extremelly good at picking the
basic ideas of object oriented programming. Creating objects which
answers messages is something they understand almost instantly.
After telling them about the first basic OOP conmcepts came the
question of what environment to use to let them implement their first
program. After some trial and errors sessions it looks like Ruby is
easy enough to understand for them and they were able to implement a
few things very quickly.
The problem is that for non english speaking children, all programming
languages add the burden of learning the reserved keywords of the
language (Class, method, for, each, while,etc…) which are all in
English and not in their mother tongue.
So I started to think about a way by which one could define “synonyms"
for all Ruby reserved keywords in another language (e.g in French
"while” would be “tantque”, “do” becomes “faire”, etc…). All this
should be done while preserving the ability to require any existing
Ruby module written in plain english.
I would be happy to start a discussion on that topic and welcome any
input on what the alternatives would be to do this?
Thanks!
Laurent
PS: I am now convinced that Ruby is ideal for teaching computer
programming to children, the next step is to have something similar to
the Squeak Environment (http://www.squeak.org).
“Laurent Julliard” <laurent__no__@__spam__moldus.org> wrote in message
I have been thinking for some time now about the right way to teach
the basic of computer languages and programming to young children that
are roughly 11/12 years old.
In my first experiments I found them extremelly good at picking the
basic ideas of object oriented programming. Creating objects which
answers messages is something they understand almost instantly.
After telling them about the first basic OOP conmcepts came the
question of what environment to use to let them implement their first
program. After some trial and errors sessions it looks like Ruby is
easy enough to understand for them and they were able to implement a
few things very quickly.
The problem is that for non english speaking children, all programming
languages add the burden of learning the reserved keywords of the
language (Class, method, for, each, while,etc…) which are all in
English and not in their mother tongue.
So I started to think about a way by which one could define “synonyms”
for all Ruby reserved keywords in another language (e.g in French
“while” would be “tantque”, “do” becomes “faire”, etc…). All this
should be done while preserving the ability to require any existing
Ruby module written in plain english.
I would be happy to start a discussion on that topic and welcome any
input on what the alternatives would be to do this?
Thanks!
Laurent
PS: I am now convinced that Ruby is ideal for teaching computer
programming to children, the next step is to have something similar to
the Squeak Environment (http://www.squeak.org).
This has been my interest for the past year or so and my 12 yr old son
and I have been working on it for a while. In fact, if selected, we will be
presenting our work at RubyConf 2004. I will definitely like to collaborate
on writing an environment that is similar to the Etoys component of Squeak.
One of the ways to do this, I think, is to build a bridge between Squeak
and Ruby. There are quite a few experts who are well versed in both these
langs and I am sure they can help us through it. I think Ruby fits well
into the “Constructivist” model of learning and I will be dedicating my
efforts
to support this claim. I have some other projects which are on my plate
right now, so I will be able to contribute only after July.
have you thought about writing a dumb wrapper around ruby that just
does a gsub!(/word/,‘mot’) of the script and then pipes it into the
real ruby?
···
il Sun, 23 May 2004 13:53:59 +0200, Laurent Julliard <laurent__no__@__spam__moldus.org> ha scritto::
So I started to think about a way by which one could define “synonyms”
for all Ruby reserved keywords in another language (e.g in French
“while” would be “tantque”, “do” becomes “faire”, etc…). All this
should be done while preserving the ability to require any existing
Ruby module written in plain english.
I would be happy to start a discussion on that topic and welcome any
input on what the alternatives would be to do this?
il Sun, 23 May 2004 13:53:59 +0200, Laurent Julliard > <laurent__no__@__spam__moldus.org> ha scritto::
So I started to think about a way by which one could define “synonyms”
for all Ruby reserved keywords in another language (e.g in French
“while” would be “tantque”, “do” becomes “faire”, etc…). All this
should be done while preserving the ability to require any existing
Ruby module written in plain english.
I would be happy to start a discussion on that topic and welcome any
input on what the alternatives would be to do this?
have you thought about writing a dumb wrapper around ruby that just
does a gsub!(/word/,‘mot’) of the script and then pipes it into the
real ruby?
This is one possible scenario although there is always the risk of
changing words that are in normal strings. Another point is that
ideally this should be made transparent and the “localized” ruby file
should first require a specific module which does the processing
before ruby evaluates the rest of the file. Is this possible?
e.g. something like
require ‘french_ruby’
i = 0
tantque i < 5
affiche i
fin
would be transparently transformed internally into this before it is
executed
il Sun, 23 May 2004 13:53:59 +0200, Laurent Julliard > <laurent__no__@__spam__moldus.org> ha scritto::
So I started to think about a way by which one could define “synonyms”
for all Ruby reserved keywords in another language (e.g in French
“while” would be “tantque”, “do” becomes “faire”, etc…). All this
should be done while preserving the ability to require any existing
Ruby module written in plain english.
I would be happy to start a discussion on that topic and welcome any
input on what the alternatives would be to do this?
have you thought about writing a dumb wrapper around ruby that just
does a gsub!(/word/,‘mot’) of the script and then pipes it into the
real ruby?
That sounds like a possibility. Another would be to build a “custom”
Ruby by editing the source and translating the keywords. I don’t
think this is as hard as it sounds.
I’d suggest to just teach them the few words they need. Kids are quick
to pick things up, and it’ll save them having to ‘relearn’ the
programming language later.
···
On Sun, May 23, 2004 at 10:43:47PM +0900, gabriele renzi wrote:
il Sun, 23 May 2004 13:53:59 +0200, Laurent Julliard > <laurent__no__@__spam__moldus.org> ha scritto::
So I started to think about a way by which one could define “synonyms”
for all Ruby reserved keywords in another language (e.g in French
“while” would be “tantque”, “do” becomes “faire”, etc…). All this
should be done while preserving the ability to require any existing
Ruby module written in plain english.
I would be happy to start a discussion on that topic and welcome any
input on what the alternatives would be to do this?
have you thought about writing a dumb wrapper around ruby that just
does a gsub!(/word/,‘mot’) of the script and then pipes it into the
real ruby?
That’s really easy, just edit file “keywords” and rebuild the Ruby
interpreter. I quickly tried this out by germanizing some keywords as
shown below (note that it wasn’t possible to build the full “ruby”
executable easily this way, only miniruby):
% miniruby
wenn 1 == 1 dann
puts “okay”
ansonsten
puts “falsch”
ende
BUT: Mixing different keyword languages is not possible in this way.
Regards,
Michael
···
On Mon, May 24, 2004 at 01:41:35AM +0900, Hal Fulton wrote:
gabriele renzi wrote:
il Sun, 23 May 2004 13:53:59 +0200, Laurent Julliard > ><laurent__no__@__spam__moldus.org> ha scritto::
So I started to think about a way by which one could define “synonyms”
for all Ruby reserved keywords in another language (e.g in French
“while” would be “tantque”, “do” becomes “faire”, etc…). All this
should be done while preserving the ability to require any existing
Ruby module written in plain english.
I would be happy to start a discussion on that topic and welcome any
input on what the alternatives would be to do this?
have you thought about writing a dumb wrapper around ruby that just
does a gsub!(/word/,‘mot’) of the script and then pipes it into the
real ruby?
That sounds like a possibility. Another would be to build a “custom”
Ruby by editing the source and translating the keywords. I don’t
think this is as hard as it sounds.
This is one possible scenario although there is always the risk of
changing words that are in normal strings. Another point is that
ideally this should be made transparent and the “localized” ruby file
should first require a specific module which does the processing
before ruby evaluates the rest of the file. Is this possible?
e.g. something like
require ‘french_ruby’
i = 0
tantque i < 5
affiche i
fin
would be transparently transformed internally into this before it is
executed
i = 0
while i < 5
print i
end
Laurent
but what happens when they do
require ‘french_ruby’
while = 0 # while is not a keyword in french_ruby!
tantque while < 5
affiche while
fin
When translated to ruby_en that would turn into
while = 0
while while < 5
print while
end
So there are 2 options that I see:
learn the keywords and avoid them - which goes against the idea
of the localization
to a reverse localization - while-> tantque and tantque->while,
which would create
tantque = 0
while tantque < 5
print tantque
end
This of course will create confusion if read by a person whose native
language is french, so the translation should only be done on runtime.
But what will you do for external modules where they use the english
keywords as method names? e.g. I have a class that uses a 2D array of
custom objects, and I’ve implemented an ‘each’ method… the keyword
would be changed to, say “jeden”, but my class would still expect
“each”.
···
On Mon, 24 May 2004 02:12:51 +0900, Michael Neumann mneumann@ntecs.de wrote:
On Mon, May 24, 2004 at 01:41:35AM +0900, Hal Fulton wrote:
gabriele renzi wrote:
il Sun, 23 May 2004 13:53:59 +0200, Laurent Julliard > > ><laurent__no__@__spam__moldus.org> ha scritto::
So I started to think about a way by which one could define “synonyms”
for all Ruby reserved keywords in another language (e.g in French
“while” would be “tantque”, “do” becomes “faire”, etc…). All this
should be done while preserving the ability to require any existing
Ruby module written in plain english.
I would be happy to start a discussion on that topic and welcome any
input on what the alternatives would be to do this?
have you thought about writing a dumb wrapper around ruby that just
does a gsub!(/word/,‘mot’) of the script and then pipes it into the
real ruby?
That sounds like a possibility. Another would be to build a “custom”
Ruby by editing the source and translating the keywords. I don’t
think this is as hard as it sounds.
That’s really easy, just edit file “keywords” and rebuild the Ruby
interpreter. I quickly tried this out by germanizing some keywords as
shown below (note that it wasn’t possible to build the full “ruby”
executable easily this way, only miniruby):
% miniruby
wenn 1 == 1 dann
puts “okay”
ansonsten
puts “falsch”
ende
BUT: Mixing different keyword languages is not possible in this way.
I don’t actually suggest to translate the keywords into german or any
other language. It was just a test to see whether it works or not.
But maybe for very very small scripts where you know all the libraries
which are available in advance this makes sense. Imagine something like
Logo, but actually using Ruby.
To solve the each/jeden problem:
module Enumerable
def jeden(*args, &b)
each(*args, &b)
end
end
Regards,
Michael
···
On Mon, May 24, 2004 at 02:24:58AM +0900, Claus Spitzer wrote:
But what will you do for external modules where they use the english
keywords as method names? e.g. I have a class that uses a 2D array of
custom objects, and I’ve implemented an ‘each’ method… the keyword
would be changed to, say “jeden”, but my class would still expect
“each”.