
Ask HN: Good programming language for kids - harrybr
My niece is 13 this week. For her birthday I've bought her a laptop and I'd like to get her into programming (I'm not a developer myself).<p>I was thinking of something like http://www.squeak.org/ or http://scratch.mit.edu/<p>What do you think?
======
derefr
Ask her! First, figure out what exactly she wants to do/make/play with—then
pick the best tool for the job.

If she just wants to make web pages, set her up with some webspace and then,
after she's gotten HTML and CSS down, show her that she can "make things
happen" using PHP and Javascript.

If she wants to make a game, I would personally recommend starting off not
with any raw-coding environment at all. Why? Kids don't generally _like_
designing game _mechanics_ —and that's what they're tasked with if they have
to turn a general-purpose programming environment—or even a multimedia
environment like Flash—into a game engine. If they say they want to make a
game, chances are what they _want_ to do is just to re-use ideas they've seen
in games they've already played, but with different content assets and
"individual-asset mechanics" (i.e. new power-ups, weapons, etc.)

My own recommendation, then, is _RPG Maker_ , partly because it's where I got
my own start in logical systems-based thinking, but also because it has a
nice, gradually-sloped learning curve, beginning with pure level design, and
then transitioning into scripting as the need arises, before finally peaking
with the limited ability to rewrite the game engine in the scripting language
itself (with just enough chafing to make them crave a better tool.) The only
catch is that it isn't free—RMXP is $60USD, as far as I'm aware.

~~~
nsfmc
_"Ask her! First, figure out what exactly she wants to do/make/play with—then
pick the best tool for the job."_

I think you've totally nailed it here, but the other part is actually
_providing something to do._

Knowing how to program doesn't mean that you have _something to program,_
which is often borne from some frustration or something that's missing in your
computer life.

I just want to throw out there that the other half is stoking the creative
fire. I think challenge projects are fun for this (like homework in a way),
but the key is finding the right balance of challenge and reward.

------
alan_p
Python comes with a turtle module, which means you can do all the neat drawing
stuff you could do in Logo back in the days.

Also Python's interactive console provides two helpful functions: help and
dir, which let you stay in the console even when you have to look up
documentation, check properties of an object or find what else is contained in
an imported module. There are other shells for Python that provide other
functionality like saving your session's input in a file so you can actually
write entire programs in Python for later use.

Also there's <http://www.inventwithpython.com/>, which is aimed at children
and lets them create simple games to see results early on.

My first programming language was PHP at age 15, so I never had to make the
jump from BASIC, but I've seen people stick with BASIC way past its expiry
date just because they were used to it, becoming increasingly frustrated with
its limitations. I think Python has the advantage that you don't easily hit a
wall like that because you are writing in a "real" programming language from
the get-go.

~~~
ericlavigne
The original poster's first suggestion was Squeak. It is a variation of
Smalltalk, a "real" programming language, that is focused on being
approachable and fun for children. I find it rather fun as an adult, too, and
would highly recommend trying it out.

If you are using Smalltalk to introduce programming to a child, I suggest
downloading the eToys version from Squeakland: <http://www.squeakland.org/>

Adults interested in using Smalltalk for developing sophisticated web
applications should take a look at Seaside: <http://seaside.st/>

------
Luc
Scratch is a great choice. Worked well with my daughter. I think she was 8 at
the time. She quickly grasped ideas like looping, variables, message sending
between objects, coordinates...

It's a fun environment for them to experiment and mess around with, which
helps learning a lot.

------
wisty
Look at storytelling Alice. It's a PhD thesis mod of Alice, designed to help
kids (especially girls) get into programming.

<http://www.alice.org/kelleher/storytelling/>

~~~
biggitybones
Another vote for Alice.. I had an intro to engineering course freshman year
that spent 3-4 weeks with Alice to teach basic programming concepts for non-
comp sci people and beginners.

It's the perfect tool for developing basic concepts of programming, but in a
fun environment that doesn't "feel" like coding.

~~~
serichsen
I have a deep mistrust of Alice. When everything you do is done by pulling
something from a menu, how do you even think about creating something basic
that is not already in those menus? It is almost like expecting to learn a lot
about civil engineering by playing with Lego. Certainly, there are many things
you would find superficially similar, but the essence is missing. Yes, I am
exaggerating, but you see where my mistrust comes from.

------
bdfh42
Microsoft's Small Basic fits the bill perfectly - perhaps undersold on this
link but...

[http://www.microsoft.com/downloads/details.aspx?FamilyID=B00...](http://www.microsoft.com/downloads/details.aspx?FamilyID=B006D58D-C2C7-44AD-936B-E7E2D7DE793E&displaylang=en)

<edit> A good overview can be found here <http://msdn.microsoft.com/en-
us/beginner/ff384126.aspx> </edit>

------
woid
I would probably try Hackety Hack: <http://en.wikipedia.org/wiki/Hackety_Hack>

~~~
steveklabnik
Hey, thanks for mentioning Hackety! I'm the maintainer now.

The site is now <http://hacketyhack.heroku.com/> , and we're gearing up for a
1.0 release in the next few weeks. There's been a lot of work to get Shoes 3
ready, and once it's done, I can get 1.0 out the door...

------
aw3c2
As weird as it might sound but I recommend Basic. With line numberings.

It will make her need to think about the whole program beforehand.That taught
me analytical structural thinking so well. Also at some point I realised I
could put more lines in between 10 and 20, 9 more lines!

~~~
Daniel_Newby
Kids should have fun programming. Line numbers are sheer torture.

I speak as someone who learned to program in TI-99/4A BASIC. The eventual move
to QuickBASIC 2.0 was bliss: structured code and full-screen editing. I
realized instantly what I had been missing.

~~~
aw3c2
And I learned on an Apple ][ with program loading taking a minute. Basic is
fun. You can make the machine do what you want.

------
ashleyw
Ruby. I don't think you could get any less verbose, it's simple to understand
and to the point, great for a first language. :)

~~~
sailormoon
I would agree 100% with you except for some personal experiences I've had. I'm
a full time Ruby developer who incessantly tries to pull all his friends,
kicking and screaming, into programming - _any_ programming - and naturally I
push Ruby first, since I find it such an elegant, intuitive language.

To my surprise, though, some people just don't "get it". Where I see elegant,
intuitive behaviour, they see incomprehensible magic. Where I delight in
"objects all the way down", they find OO to be at odds with their
conceptualisation and an unnecessary, unwelcome complexifying factor.

Depends on the person. I hate to say it but in many cases a less "opinionated
about OO" language, like (gasp!) PHP, might be a better fit.

~~~
jamesbritt
'Depends on the person. I hate to say it but in many cases a less "opinionated
about OO" language, like (gasp!) PHP, might be a better fit.'

PHP is equally opinionated about OO, as is Java, C++, Smalltalk, et al. It's
just that not all opinions are equal.

------
_delirium
A few random suggestions. I don't actually know much about Squeak or Scratch,
so those might be better options. YMMV, of course.

One way to sort of ease into the idea of instructing-a-computer-so-it-does-
things is to make things in a context-free-grammar based system, like:
<http://www.contextfreeart.org/>

I've found some people find it much easier than "real" programming, since it
avoids control constructs and such. I personally actually find it a little
harder, because I try to think of it in terms of operational semantics, and
end up mentally reverse-engineering everything I write into the equivalent C
code. I've had good luck introducing non-programming people to it, though; not
tried with any kids; mostly computing-interested adults.

Processing is a relatively simple media-computing environment. Based on Java,
but highly simplified and oriented towards 2d graphical applets:
<http://processing.org/>

I personally learned on Logo, which I thought was nice. I'm not sure if there
are good Logo implementations these days?

------
ssn
<http://www.alice.org/>

------
macco
I think the most important part of your choice is to keep her motivated: So I
would go with Squeak or Python. Squeak is great for learning programming; It
is very easy to produce little games and things like this. Python is great if
you want to use a lot of libraries and still want a clean programming
language. Php is fine for web pages - if she loves to build them it is great,
but the other languages are better suited for learning to programm. Bottom
Line: I would go with squeak!

------
myke1829
I'd recommend Scratch. It's approachable and intuitive - and cross platform.
It bundles loads of sprites, images, sounds, music loops, and sample projects.
It also imports photos straight from your webcam.

Lot's of people will rail against a language like Scratch because it doesn't
have any "real world" uses. However, teaching is a real world use, and that's
why Scratch was developed. Programming concepts transcend languages.

Most people focus on Scratch's drag-and-drop interface, which does prevent
syntax errors. Not fighting syntax errors means kids can spend more time
learning programming concepts and experimenting with things that matter, such
as arrays, variables, and stuff.

The under-talked about feature in Scratch that makes a good teaching tool is
the "single stepping" mode. This mode steps through the scripts, one block at
a time, allowing you to see the code "execute" as the game/story plays out.
Great for debugging or learning.

Lot's of great places to find tutorials online. Try: <http://scratch.mit.edu>
<http://www.scratchguide.com>

------
davidalln
Make sure she has an interest in programming first. If she does, do NOT start
her out on a graphical programming language like squeak/scratch. Future
compsci kids have romantic visions of hackers frantically typing into a
green/black terminal to break into the government mainframe. They will be
turned off instantly when they see themselves just dragging and dropping
blocks onto a white screen.

------
baxident
If she's interested in games may Kodu would be a good starting point:
<http://fuse.microsoft.com/kodu/>

It's a visual programming language for creating games, it's very simple to
create fun and playable games. It would certainly would as a good introduction
to modelling and sequencing, which would lead on to "real" programming well.

------
xrownow
<http://inventwithpython.com/>

I have two girls (10,7) and they both enjoy this one. Easy to follow.

------
serichsen
Use something where you actually have to program by typing.

I would perhaps use DrScheme.

------
carterschonwald
Squeak and Scratch are honestly the best possible choices (along with the
story generator style tools are also), please ignore any opinions to the
contrary. I would especially recommend checking out Scratch, as the folks
behind PLT Racket/(Scheme) who are very very into early CS education has
spoken well of it, though PLT itself might be a great environment for more
supervised learning of programming etc and had some very nicely developed
materials you to work from

For those who ask "why?" I say: Because visual construction/play is the first
view that is presented to the user in those environments! All things being
equal, it is always always easier to learn any topic if you are being
presented information across several media (visual, auditory, textual) than
only one.

------
ax0n
Install XAMPP from Apachefriends.org and have her start PHP. It's what many
schools use for their beginner classes. On Windows, I like PHPDeveloper
personal edition for an IDE. It's cheap (or free, I can't recall).

PHP is mainstream, and since it's a web technology, she can likely show it off
to her friends. It's not hard to find cheap PHP hosting if she ends up
building something that she wants to put on the public-facing Internet for
friends or strangers to use. XAMPP also comes with MySQL pre-configured, which
is a bonus.

I cut my teeth on Logo and BASIC as a youngster. I wouldn't wish BASIC on
anyone, and she's old enough that Logo would be boring.

~~~
Tichy
Come on, PHP is a horrible mess. Sorry to be so blunt, but that's the way it
is. Don't start with PHP. I usually leave PHP devs to their own world, but
since you suggest spoiling the children, I had to jump in...

As for hosting, you could easily host a Ruby/Sinatra app on Heroku to show off
for friends.

~~~
alan_p
I started with PHP and I wouldn't recommend it. It teaches you horrible habits
and its type system is equally confusing if you get started or if you come
from another language. Plus, you have that heavily polluted global namespace,
a half-assed class system (objects are special, classes are special,
primitives are special -- in Python the experience is closer to "OMG I've been
using objects all along!" (like in those movies where the protagonist suddenly
realises the shoes weren't magical, "the magic was in [him]") whereas in PHP
you actually need to understand a completely different approach to what you're
used to.

And don't get me started on naming conventions. Sure, you can adapt to PHP's
inconsistencies, but ideally the first language you learn should be reliable
and consistent.

BESIDES: if you learn a web language, you have to learn HTML first. And if you
want to learn HTML these days, you also have to learn CSS and then JavaScript
isn't far off either. In short: you'll have to learn a whole lot of stuff just
to get anywhere. If you start coding in a shell and eventually start on GUI
code, you only have to worry about what it all looks like on YOUR machine (and
if you want to share your code, you can simply (have your daddy) make sure the
other person has all the necessary modules in place).

------
Jermey128
I remember trying to learn C when I was twelve. The strange errors the
compiler generated were way above my head, because the system was more
complicated than I could understand at the time. Eventually, when I was 13 or
14, I learned a bit of VB, but not enough to be really useful. I think,
however, that someone might have a decent chance of learning python,
especially since you don't have boilerplate code. Also, if you are working
directly with the interpreter you always know that it was the last thing you
did that caused the error, so you don't have to hunt around (think attention
span).

------
stewars
I would definitely recommend scratch. My nephew has been experimenting and
making simple games with it for a while. There is a certain pride that an
uncle feels when asked to explain the "abs" function to a child.

------
luminarious
I vote for REBOL. Syntax is really basic, yet really powerful. Can do
graphics, simple animation, connect to the web, can accept web connections and
is really small.

Basic applications at <http://musiclessonz.com/rebol.html> rebol tutorial
include a painting app, e-mail sender and a calculator.

Syntax is the real winner. Keywords, "" and [] is basically all. No silly
semicolons, curly braces or whatnot.

------
middayc
processing. it's simple to make visual stuff, no boilerplate and "IDE" has
only like 3 buttons (play, stop and ..)

------
bmj
It strikes me that your choice should reflect her knowledge of math and basic
logic. If she has a good grasp of these, then perhaps a "typed" language might
be a good idea, otherwise, something like Alice (as suggested below) might be
better because it introduces those concepts in a visual way.

------
nfnaaron
Lots of good suggestions in here, depending on the answer to "ask her."

I'll just add that at 13 she's old enough to start in with something more
"real" than squeak or scratch. While they do teach logic, she'll be able to
build on something more realworld-like for much longer (like, forever if she
wants).

------
mhuisking
Kojo might be worth taking a look at: <http://www.kogics.net/sf:kojo>

It's Scala, but reminds me of playing with Logo a long time ago. My 12 year
old son really enjoys Squeak, but is fascinated by Kojo right now. (edited to
add part about Squeak)

------
st4lz
I've recently introduced <http://hetland.org/writing/instant-hacking.html>
tutorial to my 14 years old brother, hope python is simple enough.

------
compay
I started learning how to program with Logo when I was in 4th grade. Perhaps
it's a bit out of date now (haven't looked at it in over 20 years), but I did
end up becoming a programmer.

------
Jim_Neath
I taught myself to program when I was twelve by doing PHP. Although I wouldn't
touch it with a barge pole these days it's certainly easy to learn.

Having said that I'd probably get her a HTML/CSS book.

~~~
jamesbritt
Did you later have to unlearn any bad habits, or did you have trouble picking
up this or that concept or practice in other languages?

------
Russelldb
Big Trak, Lego Mindstorms, any programmable robot type toy.

------
jmonegro
Smallbasic from Microsoft is very kid-friendly.

------
rogermugs
basic... now with microsoft's new one who could go wrong?

i learned AWK... but then QBasic is what made me a programmer.

