Hacker News new | past | comments | ask | show | jobs | submit login
Ask HN: Good programming language for kids
27 points by harrybr on March 28, 2010 | hide | past | favorite | 50 comments
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?




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.


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


i agree with this but don't just 'prescribe' the right language - give her a few to try and see what she gravitates toward. you'd be surprised what kids can learn.

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


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.


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/


I would like to recommend my own PythonTurtle: http://pythonturtle.org

It was created to make a more friendly version of Python's turtle module.


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.


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/


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.


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.


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

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>


I would probably try Hackety Hack: http://en.wikipedia.org/wiki/Hackety_Hack


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


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!


Dijkstra be damned, I think BASIC is perfect for a beginner because it has such a readable syntax that it really doesn't take long to learn it. Not only is it simple, it's regular, readable and relatively quirk-free. For a beginner with only a small amount of skill, it's easy to look at BASIC code and work out what it does.

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.


With "modern" editors (like QB) it is posible to write code without the line numbers. It is much easier, clearer and I was very happy to be able to remove all the line numbers, and use structurate programing.

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.


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.


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


NOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO! You deserve to have your liver stabbed out with a tennis ball. A blunt tennis ball.


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


I love Ruby, and it made perfect sense when I started learning it at 13. The syntax is so natural.

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.


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.


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


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?



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!


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


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.


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.


http://inventwithpython.com/

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


Use something where you actually have to program by typing.

I would perhaps use DrScheme.


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.


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.


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.


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


Okay, I'll give you this. You made some good points against PHP, but prior to my post, look at some of the suggestions that were completely off-the-wall, impractical and hardly ever used for anything in the wild. I won't enumerate them here. Perhaps ruby or python would be okay. And sure, if you wanna break out frameworks (the auto-tune of programming) be my guest.


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


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.


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.


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


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.


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


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)


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


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.


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.


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?


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


Smallbasic from Microsoft is very kid-friendly.


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

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




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: