Ask HN: What is good language / project to teach 12-year old to code?

8 points by geedy ↗ HN
Thinking HTML/javascript, text game, but am open to other suggestions. I am quick to pick up languages (I already write a lot of different languages). I want to make sure that I choose something interesting enough to keep his attention if he really is wanting to learn to code.

11 comments

[ 2.4 ms ] story [ 51.3 ms ] thread
have you already looked at http://processing.org/ ? although i don't like java i think it's quite cool, because:

- good documentation

- many small examples you can start from

- all built in (video/sound/grafik)

- you can extend it by using java

Android or iOS apps is a good idea as kids will enjoy seeing the apps they've built running on their phones.
Start with C#/VB. The drag and drop GUI creation in .NET is a powerful tool for new programmers and kids alike. I learnt that with VB5 when I was 13 and was creating simple GUI based apps within a few days. A powerful IDE is absoluately necessary when learning the first language because it allows a newbie to explore things without opening any technical documentation. You can also go the HTML/JS route, again with an IDE that allows drag and drop of components. Stay away from python and java for now.
With JavaScript/HTML, Scratch, or anything that requires the internet, I'm concerned about attention span. I don't want to commit some, "it was better in the old days" fallacy, my 6 and 8 years olds are using scratch, but when they're 12, my plan is to give them an offline PC and a printed copy of Learn Python the Hard Way. It's just too easy to be distracted by the internet. When they're 16 (we homeschool, so I can do this) I'm going to let them take a half a year off from other studies and work through The Elements of Computing Systems, where they will built their own VM, language and compiler in Java.
This is a good point. I'll have to get a better handle on his ability to focus / get distracted.
> It's just too easy to be distracted by the internet.

But OTOH a lot of documentation, help, and resources are available on the Internet. Learning to program was much more difficult in the old days when those resources weren't available.

I've been doing HTML/JavaScript with my 11yr old. We're pair programming a little offline web app she can put on her iPod touch.
Write video games in Python / Pygame.

Sweigart is a good online resource.