[Q] Ruby for educational purposes and localization

L

Laurent Julliard

All,

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).
 
S

Shashank Date

Hi Laurent,

Laurent Julliard said:
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.

Let me know what you think.
-- shanko
 
G

gabriele renzi

il Sun, 23 May 2004 13:53:59 +0200, Laurent Julliard
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?
 
L

Laurent Julliard

gabriele said:
il Sun, 23 May 2004 13:53:59 +0200, Laurent Julliard



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
 
H

Hal Fulton

gabriele said:
il Sun, 23 May 2004 13:53:59 +0200, Laurent Julliard



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.


Hal
 
M

Michael Neumann

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.

Regards,

Michael
 
T

Thomas Fini Hansen

il Sun, 23 May 2004 13:53:59 +0200, Laurent Julliard


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?

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.
 
M

Michael Neumann

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".

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,015
Latest member
AmbrosePal

Latest Threads

Top