Ask Slashdot: Best Book For 11-Year-Old Who Wants To Teach Himself To Program?
New submitter waferthinmint asks "What is the best book for my son to use to teach himself to program? He wants to study on his own but everything seems to assume an instructor or a working theoretical knowledge. He's a bright kid but the right guide can make all the difference. Also, what language should he start with? When I was in HS, it was Basic or Pascal. Now, I guess, C? He has access to an Ubuntu box and an older MacBook Pro. Help me Slashdot; you're our only hope."
Have him learn python. On any OS.
Print out the datasheet for a microcontroller and hand it to him. It might discourage him, but you could just be creating a prodigy.
I'm an experienced programmer, but I really liked the step-by-step stuff on codeacademy.com, where the language du jour is javascript, actually.
For an 11-year old who's learning, I can't imagine C is a good fit. He'll want to spend his time making working code and not chasing crashes. Something safer.
I would like to put in a plug for Alice as a great introductory language and IDE too. Unlike a lot of introductory languages, it teaches actual object-oriented programming, and it's fun to boot.
What political party do you join when you don't like Bible-thumpers *or* hippies?
My nine-year-old is using "Hello World! Computer Programming for Kids and Other Beginners" to learn Python. She's not really very motivated, though.
http://www.amazon.com/dp/1933988495
And the men who hold high places must be the ones who start
To mold a new reality... closer to the heart
Different languages excel at different things, so It's probably a good idea to figure out what he plans on doing with programming knowledge.
What do I know, I'm just an idiot, right?
I am a self taught programmer. For me it started with video games which I practically grew up on. My mom bought a nintendo to keep busy while staying at home with her new baby. I started playing before i could walk, and my interest was sparked when I basically said "Who set these rules, what if I want to jump higher or have more bullets". My parents got me a Vtech computer from walmart for ages 9 and up. I was 6. It had a single line text-only display with 20 characters. But it had BASIC on it and I learned it myself through reading the book.
Get him going on BASIC. It's not out of date.
C has way too much involved features that would confuse him. Scoping, inheritance, pointers, etc.
Get him to the point of writing a small text based battle system. That's what I first wrote as a kid.
"You encounter the enemy, who has 20hp"
"Press 1 to punch, 2 to kick, 3 for magic list"
1.
"You punch the enemy doing 7hp damage, he has 13hp left"
"The enemy kicks you dealing 12hp damage, you have 12hp left"
"Press 1 to punch, 2 to kick, 3 for magic list"
3
"Magic list"
"1: fireball"
"2: heal"
"3: whatever"
1
"You shoot a fireball doing 13hp damage."
"THE ENEMY IS DEAD, YOU WIN!"
I don't know about a book but I'd teach him Objective C or Java. Something you can use to create an app for a mobile device. There's nothing like being able to carry your work around with you in your pocket and showing it off to people. Personally I'd go for Objective C because making a UI in Xcode is quick and easy and you can then focus and the real coding.
If all else fails, immortality can always be assured by spectacular error.
I highly recommend "Learn Python the Hard Way". Best of all, the online HTML version is free! (as in beer) http://learnpythonthehardway.org/
Learning Perl
Schwartz & Christiansen
Or just send him to http://perldoc.perl.org/
You might want to check out the book Snake Wrangling for Kids
For people who like peace and quiet. A phoneless cord!
If he is 11, get him lego mindstorm. Out of the box it comes with a UI that lets you do logic and control your lego creations. Once he gets the concepts of loops and ifs, wipe the firmware with community Java firmware (lejos) where he can write Java code to control his mindstorm bots.
By this time he would have bootstraped himself into programming and internet would be enough.
Set him up with Scratch.
http://scratch.mit.edu/
I taught my daughter to program using it. It uses most if not all of the standard logical constructs, but instead of having to type and debug code, you drag and drop, attaching little lego-brick looking things together. It lets you focus on logic errors instead of syntax errors, and makes it a lot more accessible.
Also, you can log in to the scratch website and publish from within the Scratch IDE. This was a major source of encouragement for my kid, who is more driven by the appreciation of her peers than by the achievement itself. After our game got featured on the front of the website and over a hundred kids posted comments about how cool she was, it stopped being a way to spend time with Dad and became something exciting in its own right.
You can also download other kids programs, open them in the IDE and see exactly how they work. If you then create a derivative work and publish it, that will all be preserved... anyone looking at your program will be able to identify that you made it, what it was derived from, and who made the original. So, it teaches them to share, too, and helps them learn from each other.
Once he gets deeper into it, you can buy him some hardware and he can use scratch to control that. It's compatible with Lego, and also with the PicoBoard:
http://www.picocricket.com/picoboard.html
-1 Uncomfortable Truth
For an 11 year old? That's easy: Why's (poignant) Guide to Ruby
Just make sure you stock-up on chunky bacon.
(Multiple formats linked from the Wikipedia article)
http://en.wikipedia.org/wiki/Why's_(poignant)_Guide_to_Rubyhttp://en.wikipedia.org/wiki/Why's_(poignant)_Guide_to_Ruby
Have you considered LOGO (or Turtle)?
It helps teach some basic concepts, while at the same time giving more feedback (which is good for kids). BASIC on a TRS-80 Color Computer and LOGO on a TI-99 4A were 2 of my earliest introductions to programming. I also learned about logic through some very old game that used many types of logic gates to solve various puzzles involving flow of power (I wish I remembered the name).
You could also pick up a copy of the board game Robo Rally, which is an amusing game that involves planning and visualizing instructions that you will be executing at a later time (with lots of uncontrolled variables screwing things up). While not being like actual programming, it's a fun way to exercise some of the types of thought patterns involved.
In my opinion, at that age, the choice of Language isn't really as important as just some of the basic ideas involved, such as sets of instructions, iterations and control structures, and logical decisions.
what's funny is I got hooked on programming by typing in the machine code/assembler programs from the back of Byte (or was it Compute!) magazine on my C64. I'd wait for each new issue and sit at the keyboard for what seemed like hours to see what I could "create" I had no clue what I was actually typing in but the fact that I put it in the computer and it did something meaningful led me to investigate it further and eventually I took an advanced math class that was basically a 7th grade computer programming class. ( Ah that TRS 80 and BASIC! ) By the time I got to high school I went for C/C++ ( IBM ATs in class and an Atari 1040 STe @ home ) I thoroughly enjoyed breaking down the logic and figuring out how to have a computer do what I wanted it to do. Then reality set in. I got a job...programming! It was never as much fun after that.
"A person is smart. People are dumb, panicky dangerous animals and you know it." - K
The Python manual, embedded in the official distribution contains a very nice tutorial.
Interesting approach, but there is also a theme that some learners need a guide so that the 5 stunning ideas they never thought of don't become warps to their understanding.
You said "don't spend money" - some of the new languages have free mini intro books. We can decide later in Language Wars about Python vs Ruby but for example Why The Lucky Stiff's Poignant Guide To Ruby looks stunning to capture the attention of an 11 year old with humor. That kind of thing is sorely lacking in most texts that feel they have to impress other academics. I have the programming aptitude of a gnat but I'll glance over that just because the sidebars are fun. From what I gather the programming content is well done, and a couple people have praised some of the language design mechanics of Ruby.
My first Journal Entry ever, in 8 years! http://slashdot.org/journal/365947/aphelion-scifi-fantasy-horror-poetry-webzine