Getting my sister to learn programming

On 2/12/07, M. Edward (Ed) Borasky [email protected] 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? :slight_smile:

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.

On 2/13/07, SonOfLilit [email protected] 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

Then, out of curiosity, why don’t people USE it for real world apps?

Aur S.

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

On 2/13/07, SonOfLilit [email protected] 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

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.

Could you show examples of things quicker to do in Eu… than in Ruby?

Aur S.

fr: Ilmari H. [mailto:[email protected]]

You can do fun stuff like

http://www.cs.helsinki.fi/u/irkheikk/fireworks2.7.html with it

[1] Canvas tutorial - Web APIs | MDN

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

On 2/13/07, SonOfLilit [email protected] 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

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.

On 2/13/07, M. Edward (Ed) Borasky [email protected] 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

On 2/13/07, SonOfLilit [email protected] 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.

On 2/13/07, Richard C. [email protected] 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

On Feb 12, 11:56 am, “M. Edward (Ed) Borasky” [email protected]
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.

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.

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.

On 2/13/07, Peña, Botp [email protected] wrote:

fr: Ilmari H. [mailto:[email protected]]

You can do fun stuff like

http://www.cs.helsinki.fi/u/irkheikk/fireworks2.7.html with it

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

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] SoundManager 2: JavaScript Sound For The Web

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?

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.

Seems like exactly something to KILL the spark that I am so trying to
preserve…

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.