Forum: Ruby Getting my sister to learn programming

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
SonOfLilit (Guest)
on 2007-02-11 14:57
(Received via mailing list)
Hello fellow Rubyists,

I've just come back from a trip home* and was surprised to find my
sister
very enthusiastic about programming and wanting to continue our lessons.

* Yes, a trip home. I spend most of my life in the dorms of the Israeli
Institute of Technology (BTW, I've heard of other Rubyists there. Would
a
RUG be appropriate?)

To those not familiar with the story (previously discussed here), I've
tried
teaching my 13-year-old sister programming more than twice. At first, I
used
C and tried to get her to create text adventure games as a way to
interest
her. It simply didn't work.
Her English isn't perfect and combined with the C syntax and extra
commands
needed to invoke an editor, gcc and the program, it was too much for her
to
remember at once and she just didn't like it.


After two or three times I gave up, but lately I gave it one more try,
this
time not touching a computer:

  I took a sheet of A4 squared paper and an orange pen (and a ruler,
although I later found no use for it) and taught her turtle graphics in
HEBREW, serving myself as a substitute for an interpreter.
  It took about half an hour for her to grasp variables, loops and
control
structures.
  We started to talk about programming theory, now that she had enough
theory, and I was amazed to hear her suggesting the abstraction of
functions.

She had to sleep and I had to leave.

A month later, I come back home and find her enthusiastic to learn more.

But now I'm confused over my head with the dilemma of what to teach her
next:

  * C has proven to be a no-go, although it's what I myself wish I'd
have
learned first.
  * Pascal, C++/Java are crossed out for personal opinion.
  * Lisp would be a great environment in which to build on the idea of
functions as the universal abstraction (and a very very simple syntax is
a
huge pro), but reverse-polish is yet one more thing to confuse her with,
and
I'm not sure what environment to use within Lisp (some GUI library? a
turtle-graphics environment? pure text?) and what libraries exist to
support
these in ways that would be easy for her to learn.
  * Squeak seems like a really great thing to teach, and Smalltalk a
great
language (simple syntax and ideas), but I can't seem to do useful things
in
Squeak myself (perhaps I didn't find the good resources? If so, could
someone point me to them?)
  * Other languages people seem to love and I don't know might include
one
more befitting (perhaps Haskell? ML?)
  * I can't find any advantage to Python over Ruby
  * I'm considering LOGO, esp. after browsing through this text:
http://www.cs.berkeley.edu/~bh/v1-toc2.html
    My only problem is with interaction-with-the-outside-world.
  * I love Ruby and it is the language I would LIKE to teach, but I have
a
few doubts:
     > Discoverability would be greatly diminished by her beginners'
English
     > Ruby has a LOT of syntax, which would confuse her
     > Lisp and Smalltalk have very simple models underlying code
interpretation, which make it very easy to grasp how programs are
executed.
Lisp has the same model I've already explained to her, and Smalltalk's
would
be really simple to explain. Ruby has a very complicated model (well,
everything is an object or a message, but each certain thing maps to an
object or a message in a different way to make it the most convenient to
use.More to the point, not everything LOOKS like an object or a message,
and
most things are intentionally disguised to look more like Algol. M-Exps,
anyone? :P ) that it would be REALLY hard for me to explain to her.
Thus,
I'm afraid, I won't be able to teach her ALL of Ruby (e.g. how to
metaprogram, how to read code that uses metaprogramming) and she will be
left knowing only half a language (When I learned Ruby I've had
familiarity
with how computers execute code on all levels, and thus intuitively
understanding how ruby code is interpreted was simple, but when I think
about it, it's very complicated for someone who isn't used to think like
a
computer)
    > Ruby culture, I think, is a lot about making things a programmer
already knows easier to use (e.g. _why's Camping or Rails, both of which
let
you write Ruby code that translates almost linearly to many other
languages
and protocols used in Web D.)

I'm posting this to the Ruby list, of all lists, for a few reasons:
 * I really hope to get responses that convince me to use Ruby
 * Ruby guys know their stuff and aren't too religious
 * I just like this list
 * This can spawn an interesting discussion on teaching programming to
beginners, esp. those who aren't fluent in English

So, what do you think? What language should I teach her, and what should
I
teach her to do with it first?

I guess I should state my intentions first, so here they are:
 * I want it to always stay interesting and intellectually stimulating
for
her. I want her to want to discover new things and be able to (this also
speaks of documentation. QBASIC, my first language, had the best
documentation-in-IDE I've ever used, since it was so small and F1 would
get
you to what you wanted, always, with examples. But QBASIC had an
advantage
that what I teach will not have: it didn't need to interact with the
outside
world)
 * I want her to be able to continue on her own as quick as possible
 * I want her to emphasize on abstraction as a means of solving problems
 * I want her to be able to interact with the outside world

Can't wait to hear back,

Aur S.
Mushfeq K. (Guest)
on 2007-02-11 17:02
(Received via mailing list)
>
>
>   * Squeak seems like a really great thing to teach, and Smalltalk a great
> language (simple syntax and ideas), but I can't seem to do useful things
> in
> Squeak myself (perhaps I didn't find the good resources? If so, could
> someone point me to them?)
>

There's a book out that uses Squeak as an introduction to programming:

http://www.apress.com/book/bookDisplay.html?bID=444

I've leafed through it a little and it looked very cool. Professor
Ducasse
also maintains a page with free online editions of a lot of classic
Smalltalk books at:

http://www.iam.unibe.ch/~ducasse/FreeBooks.html

Mushfeq.
SonOfLilit (Guest)
on 2007-02-11 17:13
(Received via mailing list)
Yes, but I want to teach her an environment where if she comes to me and
wants to program, say, a GUI, or a game, or a website, I can show her
how.

With Squeak, I haven't figured out the only simple task I've ever tried
to.

That isn't a good sign...

Aur S.
SonOfLilit (Guest)
on 2007-02-11 17:18
(Received via mailing list)
By the way, this is looking REALLY great:

http://www.logowiki.net/

It's... It's like TryRuby with graphics!

No installation is a huge advantage if I want to teach her remotely.

I think I'll postpone my decision and teach the first few lessons here,
and
then ask her what kind of thing she would like to create and choose by
her
answer.

Still, until I start I am very open to suggestions.

Aur S.
M. Edward (Ed) Borasky (Guest)
on 2007-02-11 19:53
(Received via mailing list)
SonOfLilit wrote:
> support
> these in ways that would be easy for her to learn.
If you don't mind switching from Lisp to Scheme, there are lots of great
resources. Scheme is pretty much the ultimate pedagogical/academic
language. I don't know what, if anything, is available in Hebrew, but
the wealth of information in English on Scheme and the underlying
computer science is phenomenal. "The Little Schemer" is one way to get
started. "drscheme" from PLT is another. I'd personally go with
"drscheme"; I found "The Little Schemer" hard to read. Check out
http://www.plt-scheme.org/


> I'm posting this to the Ruby list, of all lists, for a few reasons:
> * I really hope to get responses that convince me to use Ruby
> * Ruby guys know their stuff and aren't too religious
> * I just like this list
> * This can spawn an interesting discussion on teaching programming to
> beginners, esp. those who aren't fluent in English
>
> So, what do you think? What language should I teach her, and what
> should I
> teach her to do with it first?
Well ... I guess if you're talking about programming languages, I'd pick
Scheme/Lisp or Ruby. But the natural language issue -- English vs.
Hebrew -- is obviously a big factor here. You've mentioned it enough
times that perhaps you should be teaching her English as well as
programming. One way to ease into that might be to find some open source
natural language processing software and break it up into small pieces.
The open source world seems to me to be way ahead of the commercial
world in natural language processing. It's not my area of expertise, but
I'm pretty sure there's quite a bit of natural language processing
software written in Lisp, if not Scheme, and there are also some things
in Ruby.

I'd stay away from "toy" languages like Logo, and I'd stay away from
Squeak. As far as I can tell she's smart enough to work in a real
language -- Logo just *isn't* a real language. It's designed for kids
and she'll outgrow it quickly. In fact, I'm guessing she already *has*
outgrown it! And Squeak is, as you've noticed, just plain bizarre. I've
been programming since ... well, let's just say you had to be a graduate
student to get your hands on a machine with core memory and solid-state
logic. :) And I found Squeak so counter-intuitive that I gave up on it
after a week. Smalltalk is a wonderful language, but Squeak is just
plain weird.

--
M. Edward (Ed) Borasky, FBG, AB, PTA, PGS, MS, MNLP, NST, ACMC(P)
http://borasky-research.blogspot.com/

If God had meant for carrots to be eaten cooked, He would have given
rabbits fire.
Benjohn B. (Guest)
on 2007-02-11 23:55
(Received via mailing list)
On 11 Feb 2007, at 15:12, SonOfLilit wrote:

> Yes, but I want to teach her an environment where if she comes to
> me and
> wants to program, say, a GUI, or a game, or a website, I can show
> her how.
>
> With Squeak, I haven't figured out the only simple task I've ever
> tried to.
>
> That isn't a good sign...

Do you have to pick one language? When people decide to write a game,
or GUI or website, they use different languages, generally. So why
not pick the right tools for the job, and encourage her to do the same.

I think you did excellently starting with Logo. Maybe you should
teach her a bit more of that, and actually get her doing graphics on
her own. I'd favour languages with a low barrier before results -
that's what I favour in work too. Logo is good for that in the right
domain. Ruby is good in others. c has a few places too. Excel can be
pretty cool for learning, even.

Perhaps learning several languages can be part of the fun. I don't
think it'll make the task harder either. It's more likely to be easy
because she'll be seeing the same concept from different points of
views and settings.

Good luck :)

Cheers,
  Benj
Benjohn B. (Guest)
on 2007-02-12 00:04
(Received via mailing list)
On 11 Feb 2007, at 15:18, SonOfLilit wrote:

> By the way, this is looking REALLY great:
>
> http://www.logowiki.net/
>
> It's... It's like TryRuby with graphics!

That's really cool! I can't see how it works. Doesn't seem to be SVG.
Anyone know?

Cheers,
  Benjohn
Morton G. (Guest)
on 2007-02-12 02:43
(Received via mailing list)
On Feb 11, 2007, at 7:56 AM, SonOfLilit wrote:

> Hello fellow Rubyists,
>
> I've just come back from a trip home* and was surprised to find my
> sister
> very enthusiastic about programming and wanting to continue our
> lessons.

...

> that what I teach will not have: it didn't need to interact with
> the outside
> world)
> * I want her to be able to continue on her own as quick as possible
> * I want her to emphasize on abstraction as a means of solving
> problems
> * I want her to be able to interact with the outside world

I think Logo is great as a first computer language. There are some
Logos available today that let one do some really neat stuff. They
usually have really good documentation written by people who really
understand the needs of beginning programmers. Google "Brian Harvey
+Logo".

I also think Ruby with turtle graphics added would be good way to
start. We recently did a Ruby Q. where the problem was to add
turtle graphics to Ruby. I've found that with this add-on it's easy
to translate Logo code into Ruby. If you would like to try it, I'll
send you the complete Ruby turtle graphics kit with a bunch of Logo
programs I've translated into Ruby (direct to your e-mail address --
its too much to post here).

One advantage of Ruby with turtle graphics is that after the initial
lessons with the turtle, you can go off into more advanced
programming in any direction you want. The main disadvantage is that,
compared to Logo, there is relatively little in documentation/
tutorials for entry-level programmers.

Regards, Morton
Ilmari H. (Guest)
on 2007-02-12 04:27
(Received via mailing list)
On 2/12/07, Benjohn B. <removed_email_address@domain.invalid> wrote:
> Anyone know?
It's using the canvas[1] tag, a vector graphics canvas built into
Safari & Firefox. Might be fun to use for learning JavaScript (esp.
with Firefox+Firebug.)

You can do fun stuff like
http://www.cs.helsinki.fi/u/irkheikk/fireworks2.7.html with it </plug>

[1] http://developer.mozilla.org/en/docs/Drawing_Graph...
Vladimir K. (Guest)
on 2007-02-12 12:49
i would start with scheme (drscheme environment):

9 year old was able to start programming:
http://www.adelphi.edu/sbloch/class/hs/testimonial...

http://www.teach-scheme.org/
http://www.htdp.org/

the reason being that the "syntax" of scheme is so regular and easy to
pick up + drscheme environment was designed with teaching in mind. once
she knows the concepts, she can move to something else (like ruby).

vlad

ps:
Brian C. (Guest)
on 2007-02-12 13:40
(Received via mailing list)
On Mon, Feb 12, 2007 at 09:42:19AM +0900, Morton G. wrote:
> I also think Ruby with turtle graphics added would be good way to
> start. We recently did a Ruby Q. where the problem was to add
> turtle graphics to Ruby. I've found that with this add-on it's easy
> to translate Logo code into Ruby. If you would like to try it, I'll
> send you the complete Ruby turtle graphics kit with a bunch of Logo
> programs I've translated into Ruby (direct to your e-mail address --
> its too much to post here).

How about sticking it up on rubyforge?

I asked exactly the same question a couple of years ago,
http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/...

A reply pointed to
http://onestepback.org/packages/rubyturtles/

but I've not tried it.

The advantages I can see in teaching Ruby are that it's a language you
can
do real work in; it's easy to install; and it's sufficiently "normal"
that
normal people don't have to work hard to read your code (unlike, say,
LISP)

At least the basic syntax is clean. I know there are skeletons lying in
the
cupboard for the more advanced Rubyist to trip over, but by that stage
they're probably hooked anyway :-)

Cheers,

Brian.
SonOfLilit (Guest)
on 2007-02-12 13:47
(Received via mailing list)
It is done with Canvas (so it might not work in IE).

It IS very very fun.

I had lots of fun just playing with it.

Interesting, how neat design makes playing with graphics more fun.

Only problem is that they seem to be read-only - I'd want to put lessons
for
my sister there that others could read and enjoy too.

Aur S.
Brian C. (Guest)
on 2007-02-12 14:01
(Received via mailing list)
On Mon, Feb 12, 2007 at 08:58:41AM +0000, Brian C. wrote:
> A reply pointed to
> http://onestepback.org/packages/rubyturtles/

I've tried it now. It works exactly how I was hoping:

$ irb1.8 -rtkturtle
irb(main):001:0> include TurtleGraphics
=> Object
irb(main):002:0> fred = Turtle.new
=> Turtle(0,[0,0])
irb(main):003:0> fred.pendown
=> nil
irb(main):004:0> 3.times { fred.forward 100; fred.turn 120 }
=> 3

The included examples all work, although the test suite generates a few
parser warnings (possibly meaning it was written for ruby 1.6)

However I love the following stanza from testturtle.rb:

require 'mock'
require 'turtle'

Nice one Jim :-)

Regards,

Brian.
SonOfLilit (Guest)
on 2007-02-12 14:11
(Received via mailing list)
On 2/11/07, M. Edward (Ed) Borasky <removed_email_address@domain.invalid> wrote:
>
> If you don't mind switching from Lisp to Scheme, there are lots of great
> resources. Scheme is pretty much the ultimate pedagogical/academic
> language. I don't know what, if anything, is available in Hebrew, but
> the wealth of information in English on Scheme and the underlying
> computer science is phenomenal. "The Little Schemer" is one way to get
> started. "drscheme" from PLT is another. I'd personally go with
> "drscheme"; I found "The Little Schemer" hard to read. Check out
> http://www.plt-scheme.org/


I was talking about the Lisp FAMILY, of course, so scheme is included.

I would have gone for DrScheme, I think, as it is the only sane choice I
know except for emacs+SLIME - and as much as I like this one, I don't
think
my sister will.

Well ... I guess if you're talking about programming languages, I'd pick
> Scheme/Lisp or Ruby. But the natural language issue -- English vs.
> Hebrew -- is obviously a big factor here. You've mentioned it enough
> times that perhaps you should be teaching her English as well as
> programming. One way to ease into that might be to find some open source
> natural language processing software and break it up into small pieces.
> The open source world seems to me to be way ahead of the commercial
> world in natural language processing. It's not my area of expertise, but
> I'm pretty sure there's quite a bit of natural language processing
> software written in Lisp, if not Scheme, and there are also some things
> in Ruby.


Getting her to learn English is part of the fun. Well, her English is OK
on
a basic language - she can have a conversation in English and could
eventually understand every text I throw at her, I think (school ruined
it a
bit - you know how schools work). But she'd have difficulty studying
from an
English book / tutorial, and English names in APIs wouldn't feel natural
to
her, so she'd have to memorize every word. That's why I said Ruby's
advantage of very clear and obvious names would be lost.

I'd stay away from "toy" languages like Logo, and I'd stay away from
> Squeak. As far as I can tell she's smart enough to work in a real
> language -- Logo just *isn't* a real language. It's designed for kids
> and she'll outgrow it quickly. In fact, I'm guessing she already *has*
> outgrown it! And Squeak is, as you've noticed, just plain bizarre. I've
> been programming since ... well, let's just say you had to be a graduate
> student to get your hands on a machine with core memory and solid-state
> logic. :) And I found Squeak so counter-intuitive that I gave up on it
> after a week. Smalltalk is a wonderful language, but Squeak is just
> plain weird.


Logo seems quite real to me (I'm talking about Brian Harvey's UCBLogo).
He
shows how to do some very nifty things in his books about it, like for
example a BASIC to Logo translator:
http://www.cs.berkeley.edu/~bh/v2ch6/basic.html

As a matter of fact, Logo (a language I was first taught to "use" for
turtle
graphics at third grade but totally forgot about and rediscovered today
as
an experienced programmer) seems to me like having a relationship with
Lisp
like that of Ruby with Smalltalk: Take the underlying engine and make it
look like simple English. I especially like the keyword "to" used for
function definition, as in "to draw a triangle, repeat three times doing
this and that".

If only it had a FFI, I'd have no doubts and teach her Logo.

Without one, I'm afraid to say it's a VERY limited language (AFAIK it
doesn't have PEEK and POKE, BASIC's FFI in the times of ASM reign).

That leaves Ruby or Scheme.

Ruby is more natural, Scheme is simpler. Part of Ruby's "natural"
advantage
is lost because of language mismatch. Ruby's libraries are allowed to
have
simpler APIs, but the cost is in the complication of implementing such
APIs.
I know Ruby far better than Scheme (have only played a bit with the
latter).

What do you think?
unknown (Guest)
on 2007-02-12 16:41
(Received via mailing list)
>> That's really cool! I can't see how it works. Doesn't seem to be SVG.
>> Anyone know?
>
> It's using the canvas[1] tag, a vector graphics canvas built into
> Safari & Firefox. Might be fun to use for learning JavaScript (esp.
> with Firefox+Firebug.)

Oooh, wonderful! That's kind of what I've been looking about for.

> You can do fun stuff like
> http://www.cs.helsinki.fi/u/irkheikk/fireworks2.7.html with it </plug>

*grin* but not when you open it from work where the browser is IE
though?

> [1] http://developer.mozilla.org/en/docs/Drawing_Graph...

I'll take a good look at this, thank you very much.
M. Edward (Ed) Borasky (Guest)
on 2007-02-12 16:57
(Received via mailing list)
SonOfLilit wrote:
> I was talking about the Lisp FAMILY, of course, so scheme is included.
>
> I would have gone for DrScheme, I think, as it is the only sane choice I
> know except for emacs+SLIME - and as much as I like this one, I don't
> think
> my sister will.
Well ... yes, but there are clear differences in the popularity of
Common Lisp and Scheme. There is a lot of real-world software written in
Common Lisp. Scheme, on the other hand, is primarily a pedagogical
language. The most common non-pedagogical use for Scheme is as a
"scripting language" for tools like TeXmacs. And that is most often done
using the Guile implementation.
> an experienced programmer) seems to me like having a relationship with
> Lisp
> like that of Ruby with Smalltalk: Take the underlying engine and make it
> look like simple English. I especially like the keyword "to" used for
> function definition, as in "to draw a triangle, repeat three times doing
> this and that".
>
> If only it had a FFI, I'd have no doubts and teach her Logo.
>
> Without one, I'm afraid to say it's a VERY limited language (AFAIK it
> doesn't have PEEK and POKE, BASIC's FFI in the times of ASM reign).
What is it about MIT and wanting to build languages and computers for
children? :) Seriously, though, I started programming for a living when
APL was a gleam in someone's eye and Lisp 1.5 was the most advanced
functional language you could actually get your hands on. My programming
"childhood" was spent in the FORTRAN and macro-assembler world. I was
sad to see Lisp "dumbed down to Logo for kids" and FORTRAN "dumbed down
to BASIC for Dartmouth undergraduates". The other side of that coin,
though, is that I was also sad to see the first really high quality
computer for kids, the TI 99/4, die.

My point remains that programming students who will go on to become
programmers or electrical engineers or computer scientists or applied
mathematicians or software engineers quickly outgrow things like Logo
and Dartmouth BASIC.
>
> What do you think?
Well ... despite the obvious pedagogical nature of Scheme in general and
Dr. Scheme in particular, I'm leaning towards Ruby unless the goal is to
prepare her for an academic career or something similar. Scheme isn't
much used by professional programmers, and it isn't growing in
popularity relative to other languages. Ruby, on the other hand, *is*
growing in popularity and can do more things without having to build
them from the ground up.

One final note -- perhaps you can persuade Chris P. and the good folks
at Pragmatic Programmers that a Hebrew translation of "Learn to Program"
is a good idea. Why should all the good Ruby books be in Japanese and
English only?


--
M. Edward (Ed) Borasky, FBG, AB, PTA, PGS, MS, MNLP, NST, ACMC(P)
http://borasky-research.blogspot.com/

If God had meant for carrots to be eaten cooked, He would have given
rabbits fire.
Vladimir K. (Guest)
on 2007-02-12 18:37
> Scheme isn't much used by professional programmers...

maybe it is not used much (meaning being popular), but my very good
friend is doing advanced programming for a big bank in germany, mainly
using scheme 48 implementation (he very rarely uses any other
programming language). so it does happen - mainly if the projects get
hard enough...

vlad
M. Edward (Ed) Borasky (Guest)
on 2007-02-12 21:18
(Received via mailing list)
Vladimir K. wrote:
>
I went to a Scheme satellite session at a conference on functional
languages in Portland last September. The overwhelming majority of the
papers were academic; there were IIRC only two papers on people using
Scheme for actual automation of something. One was an Air Force lab that
was using it as a scripting language, a task for which 99 percent of the
world uses Perl or Python these days. :) And the other one was about a
port of Scheme to a mobile phone OS.


--
M. Edward (Ed) Borasky, FBG, AB, PTA, PGS, MS, MNLP, NST, ACMC(P)
http://borasky-research.blogspot.com/

If God had meant for carrots to be eaten cooked, He would have given
rabbits fire.
Morton G. (Guest)
on 2007-02-12 21:40
(Received via mailing list)
On Feb 12, 2007, at 3:59 AM, Brian C. wrote:

> On Mon, Feb 12, 2007 at 09:42:19AM +0900, Morton G. wrote:
>> I also think Ruby with turtle graphics added would be good way to
>> start. We recently did a Ruby Q. where the problem was to add
>> turtle graphics to Ruby. I've found that with this add-on it's easy
>> to translate Logo code into Ruby. If you would like to try it, I'll
>> send you the complete Ruby turtle graphics kit with a bunch of Logo
>> programs I've translated into Ruby (direct to your e-mail address --
>> its too much to post here).
>
> How about sticking it up on rubyforge?

Here are few reasons why not:

1. It's already available (except for some of my Logo translations)
from Ruby Q..
2. I haven't the slightest clue on how to put something on rubyforge.
3. My very limited understanding of rubyforge is that if I post
there, I become responsible for maintaining what I post. I can't do
that with the turtle graphics kit because it's only partly my code.

Regards, Morton

P.S. It Ruby Q. 104. The url is <http://www.rubyquiz.com/index.html>.
Morton G. (Guest)
on 2007-02-12 21:48
(Received via mailing list)
On Feb 12, 2007, at 4:36 AM, Brian C. wrote:

> => Turtle(0,[0,0])
>
> require 'mock'
> require 'turtle'

The Ruby Q. turtle graphics kit is more Logo-like. One can write in
the style of your example or one can write (using Logo short form
commands)

    Turtle.new.run { fd 100; rt 120 }

or (using Logo long form commands)

    Turtle.new.run { forward 100; right 120 }

It was written and tested with Ruby 1.8.

Regards, Morton
SonOfLilit (Guest)
on 2007-02-12 22:34
(Received via mailing list)
On 2/12/07, M. Edward (Ed) Borasky <removed_email_address@domain.invalid> wrote:
>
> Well ... yes, but there are clear differences in the popularity of
> Common Lisp and Scheme. There is a lot of real-world software written in
> Common Lisp. Scheme, on the other hand, is primarily a pedagogical
> language. The most common non-pedagogical use for Scheme is as a
> "scripting language" for tools like TeXmacs. And that is most often done
> using the Guile implementation.


More important is "CAN it be used?". I think it can. Am I wrong?

What is it about MIT and wanting to build languages and computers for
> children? :)


You got a point there. Well, MIT seem to be the only guys around (funded
by
research grants) that care about how humans can use computers better,
and
that's part of it.

Seriously, though, I started programming for a living when
> mathematicians or software engineers quickly outgrow things like Logo
> and Dartmouth BASIC.


I don't necessarily want my sister to become one of those. I want to
give
her an important skill and a great hobby.

Myself, for example, though ALL of my previous work experience is as a
programmer (and so is my current half-job), I am studying Mechanical
Engineering. I love programming and it is my most regarded hobby, but I
wouldn't like to practice it as a hired employee.

Well ... despite the obvious pedagogical nature of Scheme in general and
> Dr. Scheme in particular, I'm leaning towards Ruby unless the goal is to
> prepare her for an academic career or something similar. Scheme isn't
> much used by professional programmers, and it isn't growing in
> popularity relative to other languages. Ruby, on the other hand, *is*
> growing in popularity and can do more things without having to build
> them from the ground up.


Again - if she'd want to build a real world application  in scheme,
COULD
she?

One final note -- perhaps you can persuade Chris P. and the good folks
> at Pragmatic Programmers that a Hebrew translation of "Learn to Program"
> is a good idea. Why should all the good Ruby books be in Japanese and
> English only?


With less than ten million Hebrew speakers worldwide, and all virtually
all
Hebrew geeks fluent in English, I don't think so.

Nobody treated the issue of which would be better for a beginner syntax-
and
concept-wise.

Any opinion?

Aur S.
Martin DeMello (Guest)
on 2007-02-12 22:43
(Received via mailing list)
On 2/13/07, SonOfLilit <removed_email_address@domain.invalid> wrote:
>
> Again - if she'd want to build a real world application  in scheme, COULD
> she?

With PLT scheme, almost certainly. It ships with a very nice
complement of libraries.

martin
SonOfLilit (Guest)
on 2007-02-12 23:58
(Received via mailing list)
Then, out of curiosity, why don't people USE it for real world apps?

Aur S.
Martin DeMello (Guest)
on 2007-02-13 00:32
(Received via mailing list)
Hard to say. I speculate that it's because there are more attractive
languages in the various ecological niches it inhabits - ruby and
python are more unixy when you want a scripting language, common lisp
is more 'batteries included' when you want a lisp, ocaml is faster
when you want a multiparadigm language. But when you want a teaching
language, it's hard to beat scheme, and nigh impossible to beat the
DrScheme environment. Then the question is not whether it'll scale up
to be the *best* real-world application platform you can find, but
merely whether it *can* scale up from toy programs to real-world
applications, and the answer to that I'd say is "yes".

Also, I just found out that Euphoria (http://www.rapideuphoria.com/)
has gone open source, which suddenly makes it a very attractive first
language indeed. Check it out - I know I'm going to start recommending
it to beginners once I've written a couple of small programs to
convince myself it's a pleasant language. The only caveat seems to be
the lack of lexical closures; I'm torn over whether that makes a
difference in a first language.

martin
SonOfLilit (Guest)
on 2007-02-13 00:49
(Received via mailing list)
Any advantage to Euphoria over Ruby?

Having pass-by-value and copy-on-write seems like the only interesting
bit
to me.

Is there any reason at all for a Rubyist to learn it?

Aur S.
Martin DeMello (Guest)
on 2007-02-13 01:14
(Received via mailing list)
On 2/13/07, SonOfLilit <removed_email_address@domain.invalid> wrote:
> Any advantage to Euphoria over Ruby?
>
> Having pass-by-value and copy-on-write seems like the only interesting bit
> to me.
>
> Is there any reason at all for a Rubyist to learn it?

None that I can see - it looks like a less powerful language, overall,
and as I said, it'll take a *lot* for me personally to learn a new
language that lacks proper lexical closures (the only one I'm even
considering is D). On the other hand, it seems like a better successor
to QBasic than either Ruby, Python or Scheme, or even the various VB
clones, so as a first language it might get someone to the fun bits
faster. I'd say the difference is that Ruby makes programming fun,
whereas Euphoria makes getting a computer to do things fun.

martin
SonOfLilit (Guest)
on 2007-02-13 01:30
(Received via mailing list)
Could you show examples of things quicker to do in Eu... than in Ruby?


Aur S.
Martin DeMello (Guest)
on 2007-02-13 01:43
(Received via mailing list)
On 2/13/07, SonOfLilit <removed_email_address@domain.invalid> wrote:
> Could you show examples of things quicker to do in Eu... than in Ruby?

You misunderstand - you can almost certainly do anything quicker in
Ruby than you can in Euphoria,  but Euphoria is a simple, procedural
language that looks like Basic and supports a lot of C libraries. My
contention is that this will make it more fun for someone who doesn't
want to learn about elegant programming constructs or language
expressivity, but just wants to learn a bare minimum of formal
programming to start making the computer *do* something. I remember
having a lot of fun learning Basic as a first language (and a certain
noted computer scientist notwithstanding, it doesn't appear to have
done me any harm :)), and will thus be seriously exploring Euphoria's
potential as a Basic replacement.

(Of course, it might prove to be not as nice as I hope it will - like
I said, I haven't really looked at the language before, due to its
earlier closed-source nature.)

martin
Peña, Botp (Guest)
on 2007-02-13 04:22
(Received via mailing list)
fr: Ilmari H. [mailto:removed_email_address@domain.invalid]
# You can do fun stuff like
# http://www.cs.helsinki.fi/u/irkheikk/fireworks2.7.html with it </plug>
# [1] http://developer.mozilla.org/en/docs/Drawing_Graph...

wow, that is very cool.

is it possible to make javascript+css+html as the builtin gui of choice
for ruby (besides tk)? maybe, create wrappers in ruby to output
html/javascript/css complete with menus/bars/trees/widgets/etc.

ok, if that is difficult, does anyone know of a gui editor producing
javascript/css? fr there, we then interface ruby w javascript? i am
speaking of course on the client side only, making the ubiquitous
browser as the gui interface..

kind regards -botp
M. Edward (Ed) Borasky (Guest)
on 2007-02-13 05:58
(Received via mailing list)
SonOfLilit wrote:
>> > she?
>>
>> With PLT scheme, almost certainly. It ships with a very nice
>> complement of libraries.
>>
>> martin
>>
>>
>
Simple economics and the law of "good enough". Java is "good enough". C#
is "good enough". Perl and Python and Ruby are "good enough". Linux,
Windows, MacOS and Solaris are "good enough". Etc. etc. etc.

And because they don't teach *software engineering* using Scheme -- just
programming and introductory computer science.

--
M. Edward (Ed) Borasky, FBG, AB, PTA, PGS, MS, MNLP, NST, ACMC(P)
http://borasky-research.blogspot.com/

If God had meant for carrots to be eaten cooked, He would have given
rabbits fire.
SonOfLilit (Guest)
on 2007-02-13 10:51
(Received via mailing list)
On 2/13/07, M. Edward (Ed) Borasky <removed_email_address@domain.invalid> wrote:
>
> And because they don't teach *software engineering* using Scheme -- just
> programming and introductory computer science.
>

Wow, you got a strong point there!

So... any ideas as to what the second lesson should be?

The first lesson would be about turtle graphics. I'll let her paint a
few
things and then get her to paint scenes in a modular way, using
functions
and loops.

Should the second lesson be about a language feature? Should it be
implementing something and learning ob the way whatever is needed? If
so,
what should I implement? Perhaps some other beautiful graphic thing?
Perhaps
something completely different, like a game or text processing or sound
or
homework-solving?

Perhaps to ask her (I'm just not sure she knows enough to answer)?

Aur S.

Thanks very much for all the comments upto now
Richard C. (Guest)
on 2007-02-13 11:52
(Received via mailing list)
On 2/13/07, SonOfLilit <removed_email_address@domain.invalid> wrote:
> So... any ideas as to what the second lesson should be?

BTW: I am assuming you are going to teach her Ruby. About the most
serious argument against Ruby you have raised is the English factor,
and I suspect that affects the alternative choices equally, with the
exception perhaps of mainstream commercial/academic languages.

I always found that working with Files was a useful early lesson. You
build on the students existing knowledge of the PC, and it provides
a foundation for other much more interesting tasks, like say:
-indexing all the MP3 files on her PC
-searching through an Instant Message chat log

> Perhaps to ask her (I'm just not sure she knows enough to answer)?

One of the things that is not taught well to beginners is giving them an
appreciation for what Programming can do for you. Mostly because this
is something actually quite hard. The big languages aren't suited for
simple script level activities that are good entry points for beginners,
while many scripting languages have low 'ceilings' - you can exhaust
their usefulness quickly.

Ruby is quite unusual in that it provides for simple scripting and easy
learning, but it keeps scaling up in complexity.

But you nailed it: ask her. Some of the ideas she has may be not
appropriate for a beginner, but it is important to know her ambition.
You could structure interim exercises that build towards her
suggestions.

Also a final word: beginners don't know which concepts are hard or
easy. Brian M.'s book 'Everyday Scripting with Ruby' (highly
recommended BTW) is particularly clever about this: it introduces
Ruby Blocks (an advanced concept to an experienced programmer)
before conditionals. This means that beginners will be predisposed
to use more elegant block syntax than verbose conditionals - without
knowing any better, they are being taught to write better code.

In fact his book has a lot of ideas and I am really warming to it as
an entry level book. I got it to teach Ruby to our testers at work,
but I am considering buying it for my Dad & Girlfriend too, who I am
teaching Ruby to as well.
gga (Guest)
on 2007-02-13 12:05
(Received via mailing list)
On Feb 12, 11:56 am, "M. Edward (Ed) Borasky" 
<removed_email_address@domain.invalid>
wrote:
> The other side of that coin,
> though, is that I was also sad to see the first really high quality
> computer for kids, the TI 99/4, die.

Oh, man.  I was *SO* happy to see that machine dead.  The TI 99/4 was
a big piece of poo and it was already dead on arrival.
By the time the TI 99/4 was used for teaching, I was using an Atari
800XL computer... with 256 colors, colored sprites, blitter, etc...
and with 48K or so of memory, instead of the pathetic monochrome
screens and 16K or less of most machines back then ( the TI99 had
basically no RAM and forced you to buy the additional 32K module).
And with a BASIC that was not a pain to use and was built into the
ROM, not taking useful RAM.  The Atari 800XL is without a doubt one of
the best pieces of computer equipment I ever owned.
Trust me, as one of those students that was forced to use a TI because
someone sold my school that those machines were good teaching
machines, I can attest it was shear PAIN to have to work on that piece
of crap machine.
The original Atari computer line was *the* best computer to teach at
the time.  Not a PC, not an Apple, not a Spectrum, not a C=64.  It
just was hard and somewhat expensive to get them, as their stock was
small.  Atari was also run by morons back then, who figured selling a
computer was the same as selling a game console.  You put it in a
window and it sells... doesn't it?

Other than that, I do agree with your post, thou.
SonOfLilit (Guest)
on 2007-02-13 12:12
(Received via mailing list)
On 2/13/07, Richard C. <removed_email_address@domain.invalid> wrote:
>
> BTW: I am assuming you are going to teach her Ruby. About the most
> serious argument against Ruby you have raised is the English factor,
> and I suspect that affects the alternative choices equally, with the
> exception perhaps of mainstream commercial/academic languages.


The two strong arguments I have against Ruby are that the syntax is more
complicated (remember: the alternative is a Lisp) and that the mapping
from
code to how it is executed is far, FAR, more complicated to explain
(since
it is split into many many different cases, with many different rules of
precedence etc').

I always found that working with Files was a useful early lesson. You
> build on the students existing knowledge of the PC, and it provides
> a foundation for other much more interesting tasks, like say:
> -indexing all the MP3 files on her PC
> -searching through an Instant Message chat log


Good idea, thanks.

> learning, but it keeps scaling up in complexity.
>
> But you nailed it: ask her. Some of the ideas she has may be not
> appropriate for a beginner, but it is important to know her ambition.
> You could structure interim exercises that build towards her
> suggestions.


 That would indeed go against showing her what programming /can/ do. Is
there any middle way that does both? Perhaps going through a
tree-structure
of possibilities?

Also a final word: beginners don't know which concepts are hard or
> easy.


That is SO correct. A very important point.

Brian M.'s book 'Everyday Scripting with Ruby' (highly
SonOfLilit (Guest)
on 2007-02-13 12:14
(Received via mailing list)
Side question to ask ye olde programmers of BASIC age:

Is there a cheap way to get myself one of those oh-so-limited machines,
and
one that does not require a TV set?

I always feel like I just never learned the lesson those machines taught
programmers.

Aur S.
gga (Guest)
on 2007-02-13 12:35
(Received via mailing list)
> On the other hand, it seems like a better successor
> to QBasic than either Ruby, Python or Scheme, or even the various VB
> clones, so as a first language it might get someone to the fun bits
> faster.

Best Basic clone I have found is Blitz Max.  It is the new generation
of that old Amiga favorite Blitz Basic.  It is commercial but worth
it.  Very nice syntax, static typed, extremely fast and multi-platform
(including Linux, albeit no demo for it).  It also has a strong
community.

Albeit I'd probably recommend Ruby over it, it is also a good starting
language if you are into games.  For a full game coded in it, see Yoda
Soccer on sourceforge.  It is a clone of Sensible Soccer, and that IS
impressive for a "scripting" language.
Ilmari H. (Guest)
on 2007-02-13 20:13
(Received via mailing list)
On 2/13/07, Peña, Botp <removed_email_address@domain.invalid> wrote:
> fr: Ilmari H. [mailto:removed_email_address@domain.invalid]
> # You can do fun stuff like
> # http://www.cs.helsinki.fi/u/irkheikk/fireworks2.7.html with it </plug>
> # [1] http://developer.mozilla.org/en/docs/Drawing_Graph...
>
> wow, that is very cool.

Canvas works pretty nicely for making flashy HTML GUIs, here's
a small proof-of-concept
http://www.cs.helsinki.fi/u/irkheikk/login2.html

> is it possible to make javascript+css+html as the builtin gui of choice for
> ruby (besides tk)? maybe, create wrappers in ruby to output
> html/javascript/css complete with menus/bars/trees/widgets/etc.

What's needed: a bunch of ajaxy widgets for html - the web is full of
ready-made ones - and a webrick server to provide auth and
server-side parts of the app. For drawing, canvas and SVG are ok,
for audio you'd need some flash parts[1], 3D stuff, uh, may be hard.
And a DSL for Ruby for constructing these apps with less trouble
than it takes to write the thing in html + js.

I'd design a bunch of simple apps first, extract their requirements,
find or build the components for those, do { write the apps, extract
API } a couple times to get the API right. A slideshow / photo editor,
music player, file manager, notes app, spreadsheet + graph drawer
should be a pretty comprehensive list.

[1] http://www.schillmania.com/projects/soundmanager2/
Suraj K. (Guest)
on 2007-02-13 22:15
SonOfLilit wrote:
> I've just come back from a trip home* and was surprised to find my
> sister very enthusiastic about programming and wanting to continue our lessons.
>
> I'm confused over my head with the dilemma of what to teach her next:

How about Loro?

http://loro.sourceforge.net/z/?About

Loro is an open system intended to help beginners learn programming. It
uses its own programming language and includes an integrated development
environment system focused on first-year students. The language features
a "specify, then implement" methodology; you have to specify a task
before writing any implementation (algorithm). Specification is an
explict, compilable construction to make a contract between suppliers
and clients, and can be implemented in either Loro or Java (via
BeanShell). The IDE features support for test-driven developing, syntax
highlighting, and automatic HTML documentation generation and
visualization.

The Loro Programming System has been designed from the grounds up under
the following principles: 1) "program to an interface, not an
implementation" (GoF, 1995); 2) Design by Contract; and 3) Test driven
development.
SonOfLilit (Guest)
on 2007-02-13 22:21
(Received via mailing list)
Seems like exactly something to KILL the spark that I am so trying to
preserve...
Mushfeq K. (Guest)
on 2007-02-15 05:17
(Received via mailing list)
You should teach her Javascript. I'm serious.

You get an IDE that she's probably already comfortable with, and the
immediacy of getting cool things to show up in webpages. It's not a very
conventional introduction to programming I know, but that's all the more
reason to try it!

Mushfeq.
SonOfLilit (Guest)
on 2007-02-15 10:29
(Received via mailing list)
But, although JS is a very powerful language, it is an ugly one
syntax-wise,
and that immediately throws it off.

Remember how I failed miserably when trying to teach her C.
Martin DeMello (Guest)
on 2007-02-15 10:37
(Received via mailing list)
On 2/15/07, Mushfeq K. <removed_email_address@domain.invalid> wrote:
> You should teach her Javascript. I'm serious.
>
> You get an IDE that she's probably already comfortable with, and the
> immediacy of getting cool things to show up in webpages. It's not a very
> conventional introduction to programming I know, but that's all the more
> reason to try it!

javascript itself is a beautiful language, but trying to do anything
real with it will involve messing with the browser DOM, which I'd
strongly derecommend.

martin
SonOfLilit (Guest)
on 2007-02-15 10:49
(Received via mailing list)
Javascript syntax is scary.
This topic is locked and can not be replied to.