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.
Most of the Head First books will be good for the young'n--I'm 30 and I still need their cheery images to keep me interested ;-)
http://shop.oreilly.com/category/series/head-first.do
Python is probably the language he should use first.
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 don't know about books, but if you go to http://bluej.org/, you'll find a nice, simple IDE, and some documentation and exercises that I know have been used successfully in high-school level classes. I know there are some other languages and associated programs that are specifically targeted at teaching younger kids, but I figure it's nice to get them into real, modern practices quickly.
I also like scripting languages, like Python, Javascript, Perl and Ruby. The advantage with Ruby is that there's an intro text that's a comic book. Something like "The Poignant Guide to Ruby". Check it out.
The CB App. What's your 20?
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?
I'd recommend any book from Packt. They are by far the best source of books on programming, as evidenced by the many glowing reviews posted on Slashdot.
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!"
All far too dense for an 11 year old, and all pretty much require more background knowledge than an 11 year old is likely to have. I'm not sure there really is an answer to the OP's question though, at that age, even a very bright kid is almost certainly going to lack the prerequisite knowledge to learn to program from just a book.
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'd first look at KhanAcademy. They have courses on Python. See http://www.khanacademy.org/#computer-science-container Python in general is a good first language. I first learnt it with http://www.greenteapress.com/thinkpython/ But, I would highly recommend Head First books to start learning any language. I think they'd be great for an 11 year old. Head First Python http://goo.gl/tKRMu Another option that has been discussed recently as a good first language is JavaScript. It has the advantage of running in every browser and allows the ability to see nice visual feedback right away. When I was in high school I learnt a bit of Java using , which I also enjoyed because Swing gave me the ability to create GUIs right away.
I highly recommend "Learn Python the Hard Way". Best of all, the online HTML version is free! (as in beer) http://learnpythonthehardway.org/
Funnily enough, my son has gotten into programming via Minecraft and Lua scripting. Through this he has moved into VB (although he was interested in this prior to Minecraft), Javascript, toying with C++ now, and still tinkering with C as well. All in all, maybe a book may not be the best option.
sigs are like a box of chocolates, they all suck remove the underscores to email me
Java - Good because it's C-like, but more directly useful and without the challenges of memory handling that few computer languages have to worry about these days. If he ends up writing in C++ later, he can learn how. Also in use in a lot of places.
C# - Good because it's also in widespread use, and again, lacks some of the pitfalls of lower-level languages. Much like Java in construction as well, and useful for both native executables and website development. It's also a bit easier and cheaper to get hosting space that will run C# than a Tomcat server for JSPs.
PHP - If he wants to just play with web application development, this is a great place to start. Lots of documentation and examples, and the hosting is super-easy to come by.
Ruby on Rails - Good for putting together apps in a hurry, and will teach him about frameworks early on as well, which will probably turn out to be very useful.
Another thing...once he gets started, he's going to have trouble finding problems to solve. That's another way you can help him. I had the exact same problem when I was younger (I, too, learned to code when I was 11...back then it was Applesoft BASIC). So that's one way that web apps might be better...he can actually produce an app with a functional purpose for the family. Just make sure that you either restrict access to it, or that you ensure that he uses secure coding methods. Sanitizing inputs takes you a long, long way and is pretty easy to do.
For your security, this post has been encrypted with ROT-13, twice.
Microsoft BASIC taught a jillion geeks to program on Apple II & C64 and there's no reason why it can't do so now.
http://en.wikipedia.org/wiki/Basic-256
http://www.basic256.org/index_en
"I don't know, therefore Aliens" Wafflebox1
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!
"Hello, World" uses Python. It has aged a wee bit, only because Python has moved on, so the "how to install Python" section of the book is slightly stale. Other than that, I think it is great. A Real Computer Scientist(tm) wrote it with his 10 year old son, so the book reflects the interests and questions of a young kid. I used it with my daughter, and she loved it. I've recommended the book to adults that want to learn Python, and they liked it.
As for what language to use, I say use Python. You can teach proper computer science with it, and the language doesn't get in the way. Save C for later. Pascal is of historical interest only at this point. If you don't know Python, work through "Hello, World" with your son (or on your own) -- you will be glad you did.
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.
I'm surprised nobody's linked to Why's stuff yet. (Since it's a free online book and all.)
(T>t && O(n)--) == sqrt(666)
Try Invent With Python: http://inventwithpython.com/
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
Because it forced people to understand how to write programs, rather than how to hack something that worked in a specific language. Very few people used Pascal in the real world, but because Pascal was so rigid in style, the thinking that resulted would work with any language in any era of programming. That's exactly the approach that should be used in learning programming, since you don't know (and can't know) what will be used in a decade's time (assuming he goes on to take a 3-year degree followed by a career in something utilizing programming skills).
Pascal is not the correct choice for today, but the strategy is still sound. You want something that allows him to learn programming (the subject) with as few dependencies on the specific stylistic choices of any given era as possible. In other words, you don't want something that depends on templates, aspects, objects or other phenomena which may or may not even exist in later languages, in just the same way that you wouldn't teach a person to drive one specific make and model of car where you're guaranteed those skills won't transfer and that the model won't exist for 90-95% of the person's actual time behind the wheel.
Python or Ruby might be good choices - however I dislike modern interpreted languages as they don't have the immediacy of feedback of BBC Basic or PET Basic, and if you don't have immediacy you might as well use a compiled language and get the additional feedback of warning and error messages. I'm not impressed with their GUI support, either.
Tcl/Tk has a really ancient GUI design, but does give you a lot of useful core concepts. The syntax is horrible, though. It looks like a cross between LISP and line noise after being put through a blender. It makes a great second language, but probably not a good introductory one.
MARS D has the concepts, the syntax is good and in most respects it is exactly what you want for a teaching language. It lacks development and debug tools, though, which means it's harder than necessary to make the jump from theory to practice and then from cause to effect. However, if he's willing to put in the extra effort necessary to bridge the gap, I'd say D is the best teaching language currently out there. It's also distant enough from commercial languages that the inevitable bad habits picked up when first starting won't impact him later on, yet close enough that good habits can be adjusted and recycled.
Java is NOT suitable as an introductory teaching language, because it forces a particular methodology. That is absolutely the WORST thing you can possibly do at the start. Java IS correct for teaching OO design and OO methodology as aspects of programming, but should absolutely NOT be used to teach programming itself. Further, because it IS used in the real world, bad habits picked up at the start will be congealed and reinforced rather than eliminated - always a bad move in education, although you wouldn't know it in many modern schools.
It's a small world and it smells funny; I'd buy another if it wasn't for the money; Take back what I paid (SoM)
A is a float, by default
A$ is a string
A% is an integer
On my VIC-20 it was important to use integer variables as much as possible for speed. They were also 16 bits so you saved two bytes, which is important when you 3583 bytes available at boot.
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.
All far too dense for an 11 year old, and all pretty much require more background knowledge than an 11 year old is likely to have. I'm not sure there really is an answer to the OP's question though, at that age, even a very bright kid is almost certainly going to lack the prerequisite knowledge to learn to program from just a book.
Say what?! I was programming at age 11, self-taught, using 'just books.' (Unless you count some early -- and very rudimentary -- Logo exposure in grade school; later scholastic use of the computer was, IIRC, limited to Oregon Trail, though once you got to high school you could take a class that taught Pascal...)
I got started hand-keying source code from magazines and books available at local booksellers. As I progressed, I picked up a copy (likely got it as a present) of the AppleSoft Basic Programmer's Reference Manual.
These days, I have to imagine it would be both easier (every API you need to get started is quickly available online, often with excellent accompanying tutorials and/or with user-contributed sample code snippets), and perhaps more intimidating (as the complexity of our systems has increased precipitously). (On the flip side, much, much easier to get a GUI working under Java than back in the day when you had to hand-code memory bank switching and deal with the bizarre "but it saved a chip!" oddities of Apple II graphics programming...)
Mind you, I wasn't a very good programmer, and honestly wouldn't be until I was finally exposed to proper procedural programming (C), then OOP (C++, and when it was released, Java), in college. But I had fun with it, and my stuff worked. Wasn't terribly robust or full-featured, but, it worked. (My database was a flat-file, not relational, and, um, written in BASIC... ;))
Okay, all that said, it might be worth checking out the Head First books. Head First Programming uses Python and is supposed to be a general introduction to programming. There's also Head First Java. No direct experience with either, but people rave about 'em.
geek. lawyer.
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.
+1, though I was ~13 when I started learning Perl myself and it remains my favorite (if sometimes under-appreciated) language.
More important than the language though is the end goal. For me, I had no interest in Perl at that age, it was merely a means to an end-- in my case a login system for my Starcraft Clan.
Start by identifying what the kid is interested in and/or wants to build, then find the right tool that they can learn in order to achieve their goal.
Not really. The C Programming Language is really good. It's very straightforward, it tells you everything you need to know about each feature of the language and it doesn't confuse the reader by hiding important details until later. It's much easier to understand than those fancy books that try to be smart about what they tell you right away and what they try to hide because the writer thinks you might be too dumb to understand it.
By that I mean, don't make him start from scratch. Create the compiling environment. GUIs are fun to fiddle with so if you think C++ or Java are good languages (in the event that you don't want him to learn Visual Basic and then he gets stuck with it till the age of 18 because his brain has developed an affinity for VB like kids do with pets), then give him a skeleton source code which compiles to an empty window or GUI. Then let him have fun adding code that will shape the GUI into a calculator or depending on his drive, maybe he'll want to parse expressions lol... For kids, I think GUIs are fun so he can code: A paint program; A simple car game. The goal is more important (i think). Then pick a language. And when he's faced with a problem, he'll google it or find a Youtube 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
He should read "C++, How to Program"
Why C++?
1) It is lower level than Python. Having a solid grasp of these lower-level concepts will make learning any other programming language easier in the future.
2) The sharp distinctions between pointer variables and regular variables, stack and heap, etc., will (when mastered) give him a solid intuitive grasp of the key organizational structures that DO support all other programming languages, even when the grammar abstracts some of them away. This will make it easier for him to troubleshoot broken code written by people who only have a high level understanding.
3) C++ is still in use and in-demand in a much wider variety of industries than Python.
4) He will be forced to deal with cleaning up his own data structures, which will ensure that his code stays clean after he moves to languages that have garbage collection. People who start with garbage-collected languages often forget to release their unmanaged resources in the rare cases that they are used...C++ veterans are much better about this sort of thing.
5) It is an unwalled garden, allowing him to do all kinds of crazy hacky things. He should get that worked out of his system as early as possible, and also get as much experience dealing with the problems hacky code causes, so that he won't be tempted to write like that (in ANY language) once he does anything serious.
6) His brain is young and nimble, making him more able to grasp novel, abstract, and difficult concepts. Dumbing things down for him would be a waste of his potential. C++ is harder than other languages, which is precisely what gives an advantage to programmers who have mastered it.
I second the comment on Scratch. My son started on it around 7yrs old and still uses it at 11. One thing he liked a lot is that in Scratch you can spend time editing your icons in a paint-like subprogram; this activity uses different parts of the brain than traditional programming, so it let him work longer on the system w/o getting burned out. He also liked the online aspects a lot. You should also look at Storytelling Alice or it's newer incarnation "Looking Glass". These were specifically designed to pull in middle school girls, but there's nothing "girly" about the environments. The basic idea is that you control a stage, add actors and props to it and then animate a "play" by telling the different actors to do things like "tell Jane to walk up to Bob", "tell Jane's left hand to hit Bob's left face", "tell Bob to say 'what was that for' " and so on. Has a lot of the "share" features of scratch too. My son started SA at the same time he started Scratch and he still uses both. They definitely teach different things, though both are drag/drop programming instead of typing free text, but they're also both efficient drag/drop programming as opposed to the VeX system which I always found incredibly painful...
What he needs is a project. It is far, far easier to learn a language by practice and discovery with some supplementary materials than by reading some book. Books aren't interesting. Writing plugins for a server running one of your favourite games is.
So find something that interests him and is extensible and start there. Language is irrelevant. It's just a matter of learning enough syntax to get started and then learning new things as you need them.
(My bias: I taught myself my first language, C++, by fixing bugs in a piece of open source game server software, a year after completely failing to learn it from C++ For Dummies.)
The Land of Lisp has been a pretty good book thus far for learing lisp http://landoflisp.com/
save him now