[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Re: Getting my sister to learn programming

M. Edward (Ed) Borasky

2/11/2007 5:52:00 PM

SonOfLilit wrote:
> But now I'm confused over my head with the dilemma of what to teach her
> next:
>
> * 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.
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-s...


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

If God had meant for carrots to be eaten cooked, He would have given rabbits fire.


11 Answers

M. Edward (Ed) Borasky

2/12/2007 2:56:00 PM

0

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.
> 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/...
>
> 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).
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.
> 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?
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 Pine 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.blo...

If God had meant for carrots to be eaten cooked, He would have given rabbits fire.


Vladimir Konrad

2/12/2007 4:38:00 PM

0

> 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

--
Posted via http://www.ruby-....

M. Edward (Ed) Borasky

2/12/2007 7:18:00 PM

0

Vladimir Konrad wrote:
>> 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
>
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.blo...

If God had meant for carrots to be eaten cooked, He would have given rabbits fire.


Martin DeMello

2/12/2007 8:43:00 PM

0

On 2/13/07, SonOfLilit <sonoflilit@gmail.com> 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

Martin DeMello

2/12/2007 10:32:00 PM

0

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

On 2/13/07, SonOfLilit <sonoflilit@gmail.com> wrote:
> Then, out of curiosity, why don't people USE it for real world apps?
>
> Aur Saraf
>
> On 2/12/07, Martin DeMello <martindemello@gmail.com> wrote:
> >
> > On 2/13/07, SonOfLilit <sonoflilit@gmail.com> 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
> >
> >
>

Martin DeMello

2/12/2007 11:14:00 PM

0

On 2/13/07, SonOfLilit <sonoflilit@gmail.com> 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

Martin DeMello

2/12/2007 11:43:00 PM

0

On 2/13/07, SonOfLilit <sonoflilit@gmail.com> 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

M. Edward (Ed) Borasky

2/13/2007 3:58:00 AM

0

SonOfLilit wrote:
> Then, out of curiosity, why don't people USE it for real world apps?
>
> Aur Saraf
>
> On 2/12/07, Martin DeMello <martindemello@gmail.com> wrote:
>>
>> On 2/13/07, SonOfLilit <sonoflilit@gmail.com> 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
>>
>>
>
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.blo...

If God had meant for carrots to be eaten cooked, He would have given rabbits fire.


Richard Conroy

2/13/2007 9:51:00 AM

0

On 2/13/07, SonOfLilit <sonoflilit@gmail.com> 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 Marick'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

2/13/2007 10:01:00 AM

0

On Feb 12, 11:56 am, "M. Edward (Ed) Borasky" <z...@cesmail.net>
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.