Ask HN: Good programming language for kids
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).
I was thinking of something like http://www.squeak.org/ or http://scratch.mit.edu/
What do you think?
51 comments
[ 2.5 ms ] story [ 116 ms ] threadThe 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...
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?
http://www.microsoft.com/downloads/details.aspx?FamilyID=B00...
<edit> A good overview can be found here http://msdn.microsoft.com/en-us/beginner/ff384126.aspx </edit>
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.
As for hosting, you could easily host a Ruby/Sinatra app on Heroku to show off for friends.
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).
Having said that I'd probably get her a HTML/CSS book.
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.
my 8 year old went from tryruby.org to hacketyhack. i have also taught him some basic erlang list concepts - lists:reverse, lists:seq, and functions. he got it right away and found it fascinating. ruby is easier for him because of syntax but he 'got it'.
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.
I would perhaps use DrScheme.
The only issue is what she wants to do with it. I was tilted a bit towards wanting to do "real" programming, so I had no problem with the fact that I've still never actually done anything with a GUI (well, the browser is basically a GUI for your Rails/Sinatra apps).
There are ways to do GUI's with Ruby, and it doesn't look too hard, but it's not as simple as it would be in, say, VB, or probably even Java. But don't give her VB or you'll scare her away from coding forever.
If she does want to do GUI's, you could checkout http://shoes.heroku.com/ Never used it, but I hear it's pretty good.
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.
PHP is equally opinionated about OO, as is Java, C++, Smalltalk, et al. It's just that not all opinions are equal.
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.
http://www.alice.org/kelleher/storytelling/
It's the perfect tool for developing basic concepts of programming, but in a fun environment that doesn't "feel" like coding.
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!
Scheme has a simple syntax too, but with it comes much more complicated constructs like closures, scopes, etc. But still, simplicity, immediacy, predictability and regularity are what a beginner needs, and Scheme has that.
Compare them to, say, Javascript, which looks deceptively simple but has so many quirks that we regularly get articles explaining explaining the syntax (such as "this") on HN. I can't imagine diving in to Javscript as a complete beginner.
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.
For starting I prefer something like VB6, that is a little old, but it is more straightforward that the newer versions (VB.NET). In VB6 is designed to write forms in a simple way, you can show a lot of the internal information in the screen.
Later she can change to another language, like scheme.
It's a fun environment for them to experiment and mess around with, which helps learning a lot.
i learned AWK... but then QBasic is what made me a programmer.
I have two girls (10,7) and they both enjoy this one. Easy to follow.
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.
It was created to make a more friendly version of Python's turtle module.
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/