Ask HN: My nephew wants to learn programming. What should I recommend?
My 11-year old nephew has been asking me how to get started programming. I'm thinking of suggesting Python because of its structure and clarity, though Javascript is tempting because of its web advantage. (There's Lisp of course, but I'm trying not to unfairly privilege the home team!)
What do you guys think? What language should he start on and what resources can you recommend for it? I think the goal should be to get him to rewarding feedback as quickly as possible, then he can either become an addict like the rest of us or drop it and move on.
Let me see what else... he's very smart and probably would prefer the straight goods to anything kidsy. Oh yeah, and (needless to say?) he wants to make games.
58 comments
[ 3.0 ms ] story [ 116 ms ] threadI was at my daughters new school the other day and I talked to the Librarian who is also teaching technology and he talked about using Scratch (http://scratch.mit.edu/) which looks very cool and is somewhat game focused.
I'm told it's very good.
And then there's always Why's Poignant Guide to Ruby, which is fun to read and teaches surprisingly well.
http://www.logustus.com/2009/10/gauntaga-jemini-game-in-1-ho...
http://world.cs.brown.edu/
If anyone has actually tried to teach a 10 or 11 or 12 year old lisp, the whole board would be curious about your results. For now, I think it makes more sense for gruseom's nephew to use one of the languages with pedagogy better tested on young people: python or ruby.
Gruseom, the choice between python or ruby doesn't make that much difference, go with whichever one you are more comfortable with. One nice thing about ruby is Hackety Hack; a self-contained learning IDE. http://en.wikipedia.org/wiki/Hackety_Hack
Ruby:
Scheme: Ruby: Scheme:(Infix leads to confusing bugs, like "why doesn't 'foo < bar < baz' work?" Prefix eliminates this ambiguity.)
http://www.pawfal.org/fluxus/
Finally, it's just fun. I have fond memories of moving that little turtle around with simple commands like "FORWARD 100" and "RIGHT 90", when I was introduced to programming at around the same age as your nephew. You really couldn't ask for a better first language.
Squeak by Example[1], or better yet etoys[2]
How to design worlds, as already mentioned here
Alice[3], with something like [4].
Good old scratch from the logo tradition would also be cool[5].
[1] http://squeakbyexample.org/
[2] http://www.squeakland.org/
[3] http://www.alice.org/
[4] http://www.aliceprogramming.net/
[5] http://scratch.mit.edu/
Check them all out and decide for yourself. All of them are very consistent and fun.
I'd suggest BlitzBasic in companion to the fantastic book Game Programming for Teens (http://www.amazon.com/gp/product/1598635182/ref=pd_lpo_k2_dp...). Blitz is cross platform, extremely easy to dive into, and has a great graphics library. Or, if you want to start him out pure, I'd suggest python/pygame.
Considering that, the interval between sitting down and having something that actually runs in front of you is still reasonably short.
I had a couple choices for him, due to some requirements: 1) Something easy to install or didn't have lots of things to install 2) Something with a all-in-one gaming library 3) Something with some sort of community around it. 4) It'd be nice if there was a book for it.
So with those there, there was: Ruby and HacketyHack. http://hacketyhack.heroku.com/ It also has a app framework called shoes that you can use to build both games and apps. However, since _why left, all this requires a lot of hand hold to set up.
Lua and Love. http://love2d.org/ Lua is an easy language to pick up as it's pretty minimal, and love's 2D engine is pretty fantastic. I've used it before and it's pretty easy to get started with, and plenty of examples, as well as a vibrant community.
Python and Pygame. http://www.pygame.org/news.html Pygame has all of the above, and for me, the final winner, since there was a book that walks the kid along from basic text games to the graphics part. http://inventwithpython.com/
If I could find a copy of Windows XP, and someone who had a Mac, I'd have installers done. Unfortunately, it's been a little hard to find people, even for just what amounts to a recompile.
11 might be a little young (not for programming, but for what I've recommended above).
Basic(4th grade) -> HTML(5th grade) -> Javascript hacking(using view source)(8th grade) -> Visual Basic(8th grade) -> ASP(9th grade) -> PHP(11th grade) -> Python(uni)
My personal learning route between ages 10 - 20.If I could change...
1. I wish I had hopped onto PHP earlier.
2. Also wish I didn't waste a huge chunk of time in middle school struggling with Java.
So, you need to start with something simple that will get him immediate results. Which really means HTML these days as everything else needs umpteen objects before you can see any results.
If he takes to it, you can then move to CSS and javascript. And if you get this far then the leap to actionscript or python or whatever isn't that big and you'll know that you have a good student,
That's all you need.
http://www.ustream.tv/recorded/2370164
Christopher did a good job talking about his approach to teaching a group of kids how to game. Syntax isn't as important at first - if you get them hooked on something simple like processing (http://processing.org/), then they will learn syntax later. Most kids just want to see results as quickly as possible.
Python is good too. Not always immediately available, but easy to install. Other than gui (which would need to be learned), shares many advantages of Javascript.
Mine were HTML, TI-83 Basic, and Visual Basic. All of these could get something visible and interactive relatively quickly.
These days, I would say things like Javascript/Ruby/Python, while more simple than C/C++/Java, still don't have a direct pipeline to results that matter (for a learner).
Pygame would be my choice if ¥ou had to go the scripting route.
Teaches basic programming as a side-effect of trying to make your take kill the other tank.
I haven't tried it, but what I've seen of it looks pretty interesting.
-interactive shell
-easy to debug
-lot of great simple graphics libraries too
-making 3d shapes is funner than div containers
For 3d shapes, http://vpython.org is a good simple library. He will be able to figure out how to get balls rolling around in no time.
For a media library with sound for making 2d games, definately go with SFML (simple fast multimedia library) over pygame: http://www.sfml-dev.org/
It's faster and also has versions for C, C++, .Net, D, and ruby, so if he wants to learn one of those languages later he can try to port his game.
http://davidbau.com/archives/2005/07/27/a_programming_questi...
* the fact that a computer will take everything you do literally and can't read your mind
* commands
* sequential iteration of commands
* loops
* conditionals
It's also easy to get quick results which keeps an early learner from getting discouraged. Once the learner is bored with LOGO, then you take them to a more powerful language. Ruby is nice because--even though it can get complex--you can start off very simple.
I would recommend this book for learning Ruby as a first language: http://www.amazon.com/Learn-Program-Second-Facets-Ruby/dp/19...
Seriously, by the time he's in college programming will likely be near the bottom of the list of skills in demand. While programming has provided many a good job for several generations, another field such as biotech or nanotech would be better for the next generation.