Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > [Q] Ruby for educational purposes and localization

Reply
Thread Tools

[Q] Ruby for educational purposes and localization

 
 
Laurent Julliard
Guest
Posts: n/a
 
      05-23-2004
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).

 
Reply With Quote
 
 
 
 
Shashank Date
Guest
Posts: n/a
 
      05-23-2004
Hi Laurent,

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

Let me know what you think.
-- shanko


 
Reply With Quote
 
 
 
 
gabriele renzi
Guest
Posts: n/a
 
      05-23-2004
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?
 
Reply With Quote
 
Laurent Julliard
Guest
Posts: n/a
 
      05-23-2004
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?


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

 
Reply With Quote
 
Hal Fulton
Guest
Posts: n/a
 
      05-23-2004
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.


Hal




 
Reply With Quote
 
Michael Neumann
Guest
Posts: n/a
 
      05-23-2004
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.

Regards,

Michael


 
Reply With Quote
 
Thomas Fini Hansen
Guest
Posts: n/a
 
      05-23-2004
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?


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.

--
Thomas



 
Reply With Quote
 
Michael Neumann
Guest
Posts: n/a
 
      05-23-2004
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".


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


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
C++03 IDE+compiler for Windows / educational purposes Ioannis Vranos C++ 23 02-27-2008 02:43 PM
Re: C90 IDE+compiler for Windows / educational purposes Ioannis Vranos C Programming 57 02-22-2008 08:25 PM
[OT] C90 IDE+compiler for Windows / educational purposes Ioannis Vranos C Programming 35 02-07-2008 09:14 PM
NOTE: For educational purposes only Mhzjunkie Computer Support 1 07-07-2007 06:28 PM
must watch video....educational and hilarious richard Computer Support 0 10-02-2006 04:24 AM



Advertisments