[Q] Ruby for educational purposes and localization

Discussion in 'Ruby' started by Laurent Julliard, May 23, 2004.

  1. 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).
     
    Laurent Julliard, May 23, 2004
    #1
    1. Advertising

  2. 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
     
    Shashank Date, May 23, 2004
    #2
    1. Advertising

  3. 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?
     
    gabriele renzi, May 23, 2004
    #3
  4. 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
     
    Laurent Julliard, May 23, 2004
    #4
  5. Laurent Julliard

    Hal Fulton Guest

    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
     
    Hal Fulton, May 23, 2004
    #5
  6. 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
     
    Michael Neumann, May 23, 2004
    #6
  7. 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
     
    Thomas Fini Hansen, May 23, 2004
    #7
  8. 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
     
    Michael Neumann, May 23, 2004
    #8
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. hiwa
    Replies:
    63
    Views:
    1,594
    Dale King
    Jun 1, 2005
  2. Ioannis Vranos
    Replies:
    35
    Views:
    944
    Kelsey Bjarnason
    Feb 7, 2008
  3. Ioannis Vranos
    Replies:
    57
    Views:
    1,693
    Ioannis Vranos
    Feb 22, 2008
  4. Ioannis Vranos
    Replies:
    23
    Views:
    950
  5. Raymond Hettinger

    Today's fun and educational Python recipe

    Raymond Hettinger, May 4, 2011, in forum: Python
    Replies:
    12
    Views:
    428
Loading...

Share This Page