Which kid's beginners programming - Python or Forth?

B

BORT

Please forgive me if this is TOO newbie-ish.

I am toying with the idea of teaching my ten year old a little about
programming. I started my search with something like "best FREE
programming language for kids." After MUCH clicking and high-level
scanning, I am looking at Python and Forth. Both have advocates that
say each is a great approach to learning computers.

My programming classes were a long, long time ago in a land far, far
away. My programming muscles, which were never truly developed, have
atrophied even so. That said, I want to learn this as we go. The
PROCESS of research and using net resources for a self-learning
adventure is almost as much of the goal as learning a programming
skill.

That said, a good learning goal for my kid would be to create a
spelling tutor for his little brother. My (simple) vision would be:

1. an input file of this week's word list
2. use a free text-to-speech engine to call out one word at a time
3. in turn, monitor each key press as a particular word is being
typed, beeping on an incorrect keystroke and going to the next word if
correct

I don't care if it takes a year or two to get to this level, I just
want a vehicle that will take us there.

I told my son, who wants to learn how to compute probabilities, that we
have to start with some boring stuff so we can learn how to do the cool
stuff. Adding and subtracting aren't really fun, but figuring odds on
rolling dice IS fun. Learning to program will be kind of like that.
He accepted that explantion.

So, that said... In ~simplest~ terms for the stated goal -- Forth or
Python?
....the goal is NOT the spelling tutor... it is learning how to use a
tool to solve a problem. I am asking which tool is more suited to an
otherwise arbitrary direction of "spelling tutor program."

[NOTE: This is not a troll. I'm geting ready to bark up a tree and I
prefer to avoid the wrong one. I am cross-posting.]

Thanks
 
R

Roy Smith

BORT said:
So, that said... In ~simplest~ terms for the stated goal -- Forth or
Python?
...the goal is NOT the spelling tutor... it is learning how to use a
tool to solve a problem. I am asking which tool is more suited to an
otherwise arbitrary direction of "spelling tutor program."

Forth is an interesting language. But, as a practical tool, Forth is
somewhat of an orphan. You're going to find a lot more in the way of
Python resources than you're going to find Forth resources (for example,
1945 posts to comp.lang.python vs 236 to comp.lang.forth in the past 2
weeks). I know "most popular" doesn't always mean "best", but in this
case, I think it's an important factor. The more you can find in the way
of tutorials, libraries, and on-line help, the easier it will be to master.

Not to mention, that when you're done learning Python, you will have
learned a modern language which includes concepts common to many languages
in common use today. When you learn Forth, you will have learned Forth.
About the best that can be said about that is that It'll give you a
head-start if your next goal is to learn PostScript :)
 
D

D H

BORT said:
So, that said... In ~simplest~ terms for the stated goal -- Forth or
Python?
...the goal is NOT the spelling tutor... it is learning how to use a
tool to solve a problem. I am asking which tool is more suited to an
otherwise arbitrary direction of "spelling tutor program."

Python is easier to learn that most other popular programming languages.

For a games approach, check out this online "book" targeted to kids:
http://staff.easthighschool.net/lee/computers/book/
It uses pygame and Lee Harr's pygsear.

For another graphical approach, playing around with images and sound
files, see the Jython Environment for Students (JES). Jython is python
running on top of java's virtual machine.
http://coweb.cc.gatech.edu/mediaComp-plan/94
http://coweb.cc.gatech.edu/mediaComp-plan/27
http://coweb.cc.gatech.edu/mediaComp-plan

For text-to-speech, if you are using Windows and python, see the pyTTS
module and this link: http://www.cs.unc.edu/~parente/tech/tr02.shtml
If you are using jython, see FreeTTS instead:
http://freetts.sourceforge.net/docs/index.php

But since your son is only 10 years old, I'd really recommend first some
non-python development environments that are even more geared to kids:
- Lego Mindstorms, which has a graphical programming environment to
control robots you build (you connect a flow chart to describe the
program instead of having to type and indent everything perfectly). It
is targetted specifically for kids his age, but it is a bit expensive.
- http://agentsheets.com/ - Very neat java-based authoring tool, but
unfortunately costs money too. Trial version only lasts 10 days, but
you can learn a lot in that time using this tool.
- NetLogo (and the older version StarLogo):
http://ccl.northwestern.edu/netlogo/ Uses Logo to script hundreds of
"turtles" in parallel. This is a free tool.
- http://e-slate.cti.gr/ really awesome authoring tool, but hasn't been
updated in a couple of years because I guess the funding ran out.
 
I

Ivan Van Laningham

Hi All--

Roy said:
When you learn Forth, you will have learned Forth.
About the best that can be said about that is that It'll give you a
head-start if your next goal is to learn PostScript :)

In which case, you should start with PostScript;-) I learned it by
plugging a glass tty into the serial port on one of the very first
AppleWriters and typing away. None of this fancy-shmancy '>>>'
business;-) But what a great reward, having graphics come out the
printer when you typed 'show'.

Seriously, PostScript is a lot more fun to learn than Forth, and more
directly useful. Since the rewards are so immediate, a kid's attention
could be gained and kept pretty easily.

But I'd still recommend Python as a first programming language. Keep to
the standard stuff--ignore list comprehensions and so on--until he or
she has the basic control flow down pat.

Metta,
Ivan
----------------------------------------------
Ivan Van Laningham
God N Locomotive Works
http://www.andi-holmes.com/
http://www.foretec.com/python/workshops/1998-11/proceedings.html
Army Signal Corps: Cu Chi, Class of '70
Author: Teach Yourself Python in 24 Hours
 
R

Rune Strand

BORT said:
Please forgive me if this is TOO newbie-ish.

I am toying with the idea of teaching my ten year old a little about
programming. I started my search with something like "best FREE
programming language for kids." After MUCH clicking and high-level
scanning, I am looking at Python and Forth. Both have advocates that
say each is a great approach to learning computers.


You may find RUR interesting
http://rur-ple.sourceforge.net/
("Learning Python: Child's Play with RUR-PLE!")
 
B

Brian van den Broek

BORT said unto the world upon 27/06/2005 23:16:
Please forgive me if this is TOO newbie-ish.

I am toying with the idea of teaching my ten year old a little about
programming. I started my search with something like "best FREE
programming language for kids." After MUCH clicking and high-level
scanning, I am looking at Python and Forth. Both have advocates that
say each is a great approach to learning computers.

[NOTE: This is not a troll. I'm geting ready to bark up a tree and I
prefer to avoid the wrong one. I am cross-posting.]

Thanks


Hi,

I don't know a thing about Forth. I'm a hobbyist programmer with
enough Python , and a "tourist's" level of a few other languages. So,
no pro here :) Qualifying done:

A great thing about Python is the community. Roy Smith's stats
comparing mailing list activity is useful data. I would also add that
with the leading and closing bits of your post, it seems like perhaps
you've seen an ugly flame or two in the past, no? Well, this is a very
friendly place by 'net standards. One can get flamed in
comp.lang.python, but you have to work at it. Hard.

Another good community resource would be the Tutor mailing list --
there are a core group of posters who are very good at explaining
things in a patient and novice-friendly way (and a number of
intermediate folks like myself who sometimes ask, sometimes answer):
<http://mail.python.org/mailman/listinfo/tutor>.

A useful (and free) book aimed at high school students is How to Think
Like a Computer Scientist: Learning with Python
<http://greenteapress.com/thinkpython/>. Though an adult when I came
to Python, I found it useful while first starting and a bit
intimidated by the prospect. It quickly got me to a place where
reading "grown up" books like Learning Python was easy enough.

Best,

Brian vdB
 
G

gatti

Ivan Van Laningham wrote:
[...]
Seriously, PostScript is a lot more fun to learn than Forth, and more
directly useful. Since the rewards are so immediate, a kid's attention
could be gained and kept pretty easily.

PostScript is easy, but I'm afraid some technical details could get in
the way of enjoyable exploration, e.g. font types or scaling.
PostScript is also a single purpose language: it can print static
graphics and with a slightly more complex setup it can display static
graphics on the screen, period. No interactivity, no files, no network,
no general computation or data structures.
But I'd still recommend Python as a first programming language. Keep to
the standard stuff--ignore list comprehensions and so on--until he or
she has the basic control flow down pat.

Python is general purpose; it can do graphics with a path/stroke model
like Postscript's and a whole world of other things. There are many
complex features in Python that shouldn't be introduced before the need
arises.
List comprehensions, however, *are* the basic control flow; loops are
much more verbose and they should be used only when necessary.

Lorenzo Gatti
 
D

Daniel Dittmar

BORT said:
I told my son, who wants to learn how to compute probabilities, that we
have to start with some boring stuff so we can learn how to do the cool
stuff. Adding and subtracting aren't really fun, but figuring odds on
rolling dice IS fun. Learning to program will be kind of like that.
He accepted that explantion.

I'm not sure that you actually have to start with the boring stuff.
Imagine that you have a small, but complete program that executes some
random function a thousand times and plots the distribution. Your son
could probably
* start to change parameters to the function
* try out the different distributions in the library
* combine them to form new distributions (e.g. roll two n-sided dice)
* build more complex simulations (pit two Dungeons&Dragons fighters
against each other by rolling simulated dice)

It's a bit more work for you as you'll have to decide on each step how
much of the infrastructure you implement without taking away all the
challenges.

Python vs. FORTH: what you learn from Python is more easily transferred
to other programming languages. And if you happend to speak German,
there is "Python für Kids"
<http://www.amazon.de/exec/obidos/ASIN/3826609514/qid=1119950457/302-9800191-4449651>

Daniel
 
D

Daniel Dittmar

List comprehensions, however, *are* the basic control flow; loops are
much more verbose and they should be used only when necessary.

List comprehensions are probably a bad idea for entry level programmers:
- for and while loops are much easier to debug as you can insert print
statements everywhere
- list comprehensions don't allow you to break complex expressions into
several simpler ones by using local variables, everything has to happen
in one expression

Daniel
 
R

Roy Smith

Ivan Van Laningham said:
In which case, you should start with PostScript;-) I learned it by
plugging a glass tty into the serial port on one of the very first
AppleWriters and typing away.

Same here. I had the RedBook and remember reading it and not quite
believing it would work. Then I plugged in a terminal, typed in the first
example in the book, and it blew my mind when a piece of paper came out
with a square drawn on it.
Seriously, PostScript is a lot more fun to learn than Forth, and more
directly useful. Since the rewards are so immediate, a kid's attention
could be gained and kept pretty easily.

There is something to be said for that. On the other hand, PostScript is
not easy to debug. If you blow the stack, you mostly just get programs
that mysteriously (and perhaps silently) don't work. It was frustrating
enough for me; it'll probably just turn a kid off from the whole idea of
programming. But then again, little kids seem to not have any problem
programming VCRs, so maybe their brains just work differently :)
 
M

Matt Feinstein

Please forgive me if this is TOO newbie-ish.

I am toying with the idea of teaching my ten year old a little about
programming. I started my search with something like "best FREE
programming language for kids." After MUCH clicking and high-level
scanning, I am looking at Python and Forth. Both have advocates that
say each is a great approach to learning computers.

FORTH is 'way outside the mainstream of current programming, while
Python is, if anything, excessively buzz-word compliant. If you want
to teach your kid something that will a basis for learning anything
about current practices in programming, teach him Python.
Matt Feinstein
 
E

Edvard Majakari

Ivan Van Laningham wrote:
[...]
Seriously, PostScript is a lot more fun to learn than Forth, and more
directly useful. Since the rewards are so immediate, a kid's attention
could be gained and kept pretty easily.

PostScript is easy, but I'm afraid some technical details could get in
the way of enjoyable exploration, e.g. font types or scaling.
PostScript is also a single purpose language: it can print static
graphics and with a slightly more complex setup it can display static
graphics on the screen, period. No interactivity, no files, no network,
no general computation or data structures.

PostScript is _not_ limited to static stuff, and it _does_ support
interactivity. See eg.

http://www.cs.technion.ac.il/~wagner/index_files/aaa.html

Of course, this is just academic fun(?). PostScript is mostly used for
printers, and as for yet, quite few papers support animated graphics :->

And yes, I also encourage to try Python.
List comprehensions, however, *are* the basic control flow; loops are
much more verbose and they should be used only when necessary.

Hm. My experience is that people find loops easier to understand - varies
somewhat, though. For some, 'more verbose' is 'more easy to understand'.

--
# Edvard Majakari Software Engineer
# PGP PUBLIC KEY available Soli Deo Gloria!

$_ = '456476617264204d616a616b6172692c20612043687269737469616e20'; print
join('',map{chr hex}(split/(\w{2})/)),uc substr(crypt(60281449,'es'),2,4),"\n";
 
S

Scott David Daniels

Philippe said:
Hi,

A couple links ...


http://www.summerland.uku.co.uk/
http://pylogo.org/
http://www.python.org/sigs/edu-sig/


BORT wrote:

Please forgive me if this is TOO newbie-ish.

I am toying with the idea of teaching my ten year old a little about
programming. I started my search with something like "best FREE
programming language for kids." After MUCH clicking and high-level
scanning, I am looking at Python and Forth. Both have advocates that
say each is a great approach to learning computers.

My programming classes were a long, long time ago in a land far, far
away. My programming muscles, which were never truly developed, have
atrophied even so. That said, I want to learn this as we go. The
PROCESS of research and using net resources for a self-learning
adventure is almost as much of the goal as learning a programming
skill.

That said, a good learning goal for my kid would be to create a
spelling tutor for his little brother. My (simple) vision would be:

1. an input file of this week's word list
2. use a free text-to-speech engine to call out one word at a time
3. in turn, monitor each key press as a particular word is being
typed, beeping on an incorrect keystroke and going to the next word if
correct

I don't care if it takes a year or two to get to this level, I just
want a vehicle that will take us there.

I told my son, who wants to learn how to compute probabilities, that we
have to start with some boring stuff so we can learn how to do the cool
stuff. Adding and subtracting aren't really fun, but figuring odds on
rolling dice IS fun. Learning to program will be kind of like that.
He accepted that explantion.

So, that said... In ~simplest~ terms for the stated goal -- Forth or
Python?
...the goal is NOT the spelling tutor... it is learning how to use a
tool to solve a problem. I am asking which tool is more suited to an
otherwise arbitrary direction of "spelling tutor program."

[NOTE: This is not a troll. I'm geting ready to bark up a tree and I
prefer to avoid the wrong one. I am cross-posting.]

Thanks
Over on comp.python.education, David Handy recently announced his book
with a fairly long message (excerpted here):
...
Written by a homeschooling Dad and professional software developer,
"Computer Programming is Fun!" fills a need for a book that teaches
computer programming to teenage youth.
...
208 pages, $29.95 plus taxes and shipping if applicable
Order from the author's web site:
http://www.handysoftware.com/cpif/
...
"Why teach computer programming to teenagers? For the same reason
you would teach them piano or any other musical instrument. Consider
the computer an instrument for the mind."

I've not seen the book myself, but it seems like it is targeted
to very nearly your situation, so I'd investigate it.

--Scott David Daniels
(e-mail address removed)
 
D

Dennis Lee Bieber

FORTH is 'way outside the mainstream of current programming, while

Unless one is coding low-level objects on a MUCK (and even that,
on the MUCKs I sometimes visit, requires sysop approval to access the
MUF interpreter -- the mundanes make do with MPI, a LISP-like language).

--
 
P

Peter Hansen

Dennis said:
Unless one is coding low-level objects on a MUCK (and even that,
on the MUCKs I sometimes visit, requires sysop approval to access the
MUF interpreter -- the mundanes make do with MPI, a LISP-like language).

Not "unless"... perhaps "because"? Whatever a MUCK is, it's definitely
not part of the "mainstream of current programming", even if you're the
one doing it...

-Peter
 
D

Dave Benjamin

BORT said:
I am toying with the idea of teaching my ten year old a little about
programming. I started my search with something like "best FREE
programming language for kids." After MUCH clicking and high-level
scanning, I am looking at Python and Forth. Both have advocates that
say each is a great approach to learning computers.

Kids your backwards talking like if forth love will they then.
 
R

Rocco Moretti

BORT said:
I am toying with the idea of teaching my ten year old a little about
programming. I started my search with something like "best FREE
programming language for kids." After MUCH clicking and high-level
scanning, I am looking at Python and Forth. Both have advocates that
say each is a great approach to learning computers.

Call me biased, but I'd recommend Python, and it all comes down to a
single concept: Transferability.

As others have mentioned, Forth programming is in somewhat of it's own
class. It's not really imperative, object oriented, or declarative. It's
based on an interesting, but rarely used, principle of stack programing.
Great for someone who is expanding their horizons, but not a lot of
value for a beginning programmer who might want to branch out to
C/Visual Basic/Java/etc.

Also, due to the stack-based nature of the beast, the base way of
specifying mathematical operations doesn't transfer to/from elsewhere,
unless you're talking about old HP calculators. Python uses the standard
mathematical notation, and even uses mathematical precedents (i.e.
multiplication before division).

So for Math you'd do something like:

y = b + mx + cx^2

(Where ^2 is a superscript 2)

For Python it would be:

y = b + m*x + c*x**2

IIRC, for Forth it would be something like (please excuse the mistakes
in operator notation):

x 2 ^ c * m x * + b + 'y' setvar

Where you read from left to right, and imagine pushing items onto a
stack, and when you encounter an operator, you pop the appropriate
number of items, act on them, and push the result back onto the stack.

Granted, you can get Forth dialects with the ability to do infix
(mathematical) notation, but that leads to another transferability
issue, that between interpreters. There is one "official" Python
interpreter, and the developers work dang hard to make sure it runs on
every commonly used platform. The other interpreters are usually special
purpose, and tend to be up front about where they differ from the
"official" Python. Thus, if you see Python code somewhere, it is highly
likely it will run on your Python interpreter

Forth, as it has been around much longer, is a much more fragmented
community, with many more interpreters. What works on one may not work
on another, and a particular interpreter is likely to be available only
for a single platform. With Forth it is *very* easy to extend the
language, and so an interpreter-specific piece of code that someone
posts may not work for you on your interpreter, especially if you're
using a free interpreter for Windows, which tends to be the bastard step
child of free stuff.

There are ANS and IEEE standards for Forth, but official standards tend
to leave things implementation dependent, especially in platform
specific things like file access. To further compound the issue, a Forth
system tends to be self contained and insular - interaction with the
surrounding environment may be minimal at best. Python, where possible,
tries to shield the user from platform specifics, while still allowing
full access to the environment. There are a number of Python bindings to
C libraries which give near complete control to the desktop/screen/sound
system, etc. Forth-bound libraries will likely be rarer, and again,
interpreter specific.

It's been quite some time since I've looked at Forth, and the reference
material that I used then was probably outdated anyway, so someone with
more recent experience can correct me if I'm wrong. However, I would
think it's highly likely that the experience you receive with Forth is
going to depend heavily on which interpreter you choose to use.

P.S. Any 10 year old getting into programing would likely love a library
like PyGame (www.pygame.org) - I'd suggest seeing if the Forth you're
considering has something similar before deciding.
 
R

Rocco Moretti

Rocco said:
It's been quite some time since I've looked at Forth, and the reference
material that I used then was probably outdated anyway.

Sorry, thought of one more thing Python has going for it vs. Forth -
reference material. Check the catalog of your local library. I'd guess
that there is more choice for Python programming books vs. Forth
programming books. If your local library does have a Forth book, it's
likely that it'll be discussing some 1970's interpreter that ran on a
now-defunct timesharing system, if mine is any indication.

If you can afford to buy books, the selection at a new or used
bookseller is going to be *much* better with Python than with Forth. My
local new bookseller has at least a shelf of Python books. I don't think
I saw any Forth ones last time I was there - they might have had a
single title that I missed.
 
A

Andrew Durdin

Sorry, thought of one more thing Python has going for it vs. Forth -
reference material. Check the catalog of your local library. I'd guess
that there is more choice for Python programming books vs. Forth
programming books.

I just checked, and you're quite right: the State Library of Tasmania
has only one Forth book -- but it has two Python books (Python
Essential Reference and Python Pocket Reference). Not that the local
booksellers are any better -- I've only found one place that had
anything better than the dreadful "Teach yourself Python in 24 hours",
and since I bought Python in a Nutshell from them a year ago, they've
not got any more in stock. Thank goodness for Amazon, especially as
it's cheaper to order from Amazon than to get the bookstore to order a
book in for me...
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top