Slashdot Mirror


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

73 of 525 comments (clear)

  1. Python by Anonymous Coward · · Score: 5, Informative

    Have him learn python. On any OS.

    1. Re:Python by LifesABeach · · Score: 4, Funny

      Junior could just "Google" his questions. My daughter says Google holds all lifes answers.

    2. Re:Python by chaosite · · Score: 5, Informative

      I second the python recommendation. Have a look at this (free, available in dead tree format as well as online) book:

      http://www.greenteapress.com/thinkpython/

    3. Re:Python by Githaron · · Score: 4, Informative

      Have him learn python. On any OS.

      If you are going to teach him Python, have him take CS101 at Udacity. It is more fun than reading a book.

    4. Re:Python by durrr · · Score: 4, Informative

      Have him learn Ruby. On any OS.
      With this book: http://www.ruby-doc.org/docs/ProgrammingRuby/

    5. Re:Python by g0bshiTe · · Score: 4, Informative

      I'll 3rd that.

      Have a look here. http://www.pythonchallenge.com/ I know it's been around forever and a day, but some challenges like this will show him there are practical applications to what he is learning.

      --
      I am Bennett Haselton! I am Bennett Haselton!
    6. Re:Python by chaosite · · Score: 5, Funny

      Nah man, snakes are cool. "Playing with Ruby" makes it sound like your eleven-year-old hired a whore, or perhaps a drag-queen.

    7. Re:Python by CaptainLugnuts · · Score: 3, Interesting

      It would probably be more fun to set up an 8-bit emulator for the Atari or C64 machines and turn them loose on BASIC there. There's tons of old magazine listings to type in and learn from. It's also nice that it is possible to learn everything that is happening on the (simulated) machine. Being able to POKE a memory location with a value and see immediate changes helps bring about the A-HA! moments.

    8. Re:Python by Qwertie · · Score: 2

      Python is a good choice because it offers an interactive interpreter prompt. Or better yet, see if you can acquire the (Javascript) interactive programming tools by Bret Victor, featured in his CUSEC 2012 talk.

      An 11 year old can learn from books, too--that's how I learned when I was 11 (most of the books in the library were about BASIC, I thought "integer" was pronounced "inte-geer", and I didn't know that other languages existed for about a year.). But I'm not sure it's necessary in the internet age.

      Some have suggested C... give me a break. I started using C when I was 13 and hated it compared to BASIC. I mean, there's no function to read a single key without reading a whole line? No function to check if a key has been pressed? No function for changing the text color or drawing stuff? What's this pointer nonsense? Why do I have to wait for it to "compile" and "link"? I use C++ routinely now, but it's not for beginners.

    9. Re:Python by jcreus · · Score: 5, Informative

      Hi. Teenager here. I learnt how to program when I was about 11 (or maybe 10), self-taught. My best recommendation: let him learn how to program by himself. What I did was, and I've done such a thing for all programming languages (8, I think) I know: first, go to the first tutorial you see on the Internet. I believe I used Wikibooks (Python). And, then, leave the tutorial after knowing just the basic I/O and simple statements. Then, give yourself a project. For example, I created one which solved me the maths homework. Something you find useful. And, while doing that, one must learn more features of the language. In case you have doubts, be self-sufficient: just f*cking google it, and results will appear (learning how to google is probably a priority before programming languages!).

      So, what you said is true. Don't spend money on programming books. Let him learn by himself.

      On the other hand, regarding programming languages, I've always loved Python. Simple syntax, easy to introduce to new programmers, no pointers, great power... Furthermore, while Python keeps being my favorite, maybe, for "the current times", he would find JavaScript (+HTML+CSS) closer, for he would be able to create his own websites and that's something you often feel proud of ;). Also, it seems now everything has to be JavaScript-based...

    10. Re:Python by jellomizer · · Score: 4, Insightful

      As a seasoned adult developer who learned to program as a kid.  There is just one word of advice. Just because you know the language it doesn't make you a writer.  While learning by yourself if actually very useful, don't mistake it from the structured stuff you get in college.  I spent a good part of college de-conditioning myself with my bad habits because they worked, and with the good habits learned there was much less funny acting code, and the code ran more reliability and was easier to change.

      When I entered college I know how to program in about 8 languages (before Google) myself, I was actually codding professionally before I left for college too.  And the skills I taught myself was valuable, and gave me a heads up in College as I wasn't fretting over the technical end, and I could put the rest of my focus on good form.
      I have seen some other kids wash out of the computer science program because they knew how to write code however their egos got in the way and they never wanted to unlearn their old ways.  They will still stick on the superiority of the GOTO statement.

      --
      If something is so important that you feel the need to post it on the internet... It probably isn't that important.
    11. Re:Python by gislifb · · Score: 2

      I'll 5th that!

      Books: Learn Python the hard way or Head first Python. I personally enjoy reading the Head first books and I think an 11 year old will too.

      --
      In a world without fences and walls, who needs gates and windows?
    12. Re:Python by msclrhd · · Score: 3, Informative

      Python, Ruby or some other similar scripting languages are great to start on and build up an understanding -- they allow you to start small and build up an understanding of what you are doing without any "noise".

      The Khan Academy has programming videos oriented around Python (http://www.khanacademy.org/#computer-science), not sure how good they are but the Math videos are good so it'd be worth checking out.

      An advantage of python is that if you run it from the command line on its own, you get an interpreter where you can start typing commands and seeing the results (e.g. 2+5 'hello world'.split(' ') ':'.join(['a', 'b']) ).

      The other language mentioned here is JavaScript. The main problems with starting with JavaScript as a language is what other non-scripting languages suffer from: there is a lot you have to do to get up and running (there is nothing like hearing "just ignore the public static void bit for now" when learning to program) -- especially when you have to read a different markup (html) to get started.

      If you do decide to go down the JavaScript route, use something that makes it interactive and fun. See the "Bret Victor - Inventing on Principle" video (http://vimeo.com/36579366) for a good idea on that w.r.t. the 2D drawing APIs where you have the JavaScript on one side and the picture it generates on the other and what you change on the JavaScript side gets immediately picked up on the picture side. See http://gabrielflor.it/water for an implementation of this!

      More generally, a good choice to start with is something that gives you decent feedback quickly and something that allows you to experiment and have fun with it.

    13. Re:Python by TheLandyman · · Score: 2

      Also being a 'seasoned' developer I'm wondering why not a 'real' language like C as opposed to scripting languages. I started with BASIC back in the day but I often wished I made the shift to real languages sooner rather than later. Only when I started writing apps in VB6 (when it was first released) did I run into limitations. I wish I made the leap early from command line BASIC to C/C++. C also gives you more insight into how the computer is actually working. In the 'real world' of large scale appliactions today I see far to many a 'script kiddie' that grew up on Java who seem to think you can build huge high performance applications in these languages. At risk of being flamed, since OP has access to a macbook pro, why not give him an Objective C book and let him have at XCode for a while. It's an amazing rock solid IDE (not quite as nice as VS but still very nice). There are many very good books available for introduction to Objective C on the Mac.You might even take it upon yourself to 'learn together' for a time. This is another good quality from the real world... working with others. You could edge him on with an additional requirement or two. This will help re-inforce early a good general life lesson: the fact that things can change and you need to adapt.

    14. Re:Python by CCarrot · · Score: 4, Funny

      When I entered college I know how to program in about 8 languages (before Google) myself, I was actually codding professionally before I left for college too.

      Hmmm...sounds a bit fishy to me.

      --
      "I love animals! Some are cute, others are tasty, what's not to like?" - Betsy Schroeder, Jeopardy contestant
    15. Re:Python by dvice_null · · Score: 3, Insightful

      I also learned programming myself, over 15 years ago. Yet I have still today learned a lot of useful stuff from others who I have worked with.

      This is what I think:
      - If he is motivated to learn by himself, that is the best way to start. Not because of what you learn about programming, but because of what you learn about learning and studying new stuff.

      - After a year or so, if possible, get a good mentor. This time, to learn about programming. There is a lot of advanced topics which you don't even know to exist unless you have a really good book or a really good mentor. This doesn't mean that you couldn't study this stuff by yourself, but you will need someone to tell you what to study. Here is a list, which contains topics, perhaps a bit too advanced for someone who just started to program, but the list contains a lot of things I wish someone had told me sooner:
      -- unit testing (more important than the program itself),
      -- more about testing and what you can do with it, e.g. performance testing
      -- pair programming
      -- writing clean code (e.g. why it is important that you think really hard how to many each variable you create),
      -- refactoring (how you can do it and why you should),
      -- programming principles and patterns (e.g. why a class or a function should have only one responsibility),
      -- usability (how you can analyse it and improve it),
      -- user experience (why people think that the software is faster and has less errors just because you changes the error messages more polite),
      -- tools(version control, IDE, continuous integration with static and dynamic analysis, and how they can help you do your job).
      -- Agile methods, lean, kanban. (these are pretty good to know when you start working for real)

      My recommendation for language: Python with pygame (for writing games).

    16. Re:Python by Monkey-Man2000 · · Score: 2

      Another vote for Python and another free book to add to the rest of the comments...

      --
      This post was generated by a Cadre of Uber Monkeys for Monkey-Man2000 (603495).
    17. Re:Python by Tassach · · Score: 5, Insightful

      Also being a 'seasoned' developer I'm wondering why not a 'real' language like C as opposed to scripting languages.

      Dynamic (scripting) languages are no less "real" than compiled languages. Both have their place, their strengths, and their weaknesses, which is something a "seasoned developer" should know.

      An instruction language should just get out of your way and let you concentrate on doing stuff and understanding the CONCEPTS, instead of concentrating on making the compiler/interpreter understand you or doing routine housekeeping (eg: memory management). This is true for real-world development, but is especially relevant when teaching someone how to program. For this reason, Python is an excellent choice as a first language -- even MIT uses Python as a teaching language. (I can't think of a better endorsement than that)

      The advantage that Python has over other dynamic languages (Perl, Ruby) is that it is designed for readability and clarity. Even as a die-hard Perl programmer, even I can admit that Python is an easier language to learn and explain, and is probably the first language I'll teach my children. Whether it's (IMHO) dumbed-down syntax is an advantage or a disadvantage for doing serious work is a subject of debate (if not holy wars).

      C is a wonderful language for a specific class of problem, but it has lots of problems that make it suboptimal (if not completely unsuitable) for other tasks. Knowing *when* to use C (and, more importantly, when *not* to use it) is as important as knowing *how* to use it, if not more so. It is not a good teaching language for a beginning programmer, any more than it is a good language for general application development. Someone who doesn't understand this has no business calling themselves a "seasoned developer".

      --
      Why is it that the proponents of "one nation under God" are so eager to get rid of "liberty and justice for all"?
    18. Re:Python by Shoe+Puppet · · Score: 2

      Depends on what you consider "knowing to program" and "language"... I'm a freshman and I have surely looked at dozens of programming languageish things.

      --
      (+1, Disagree)
    19. Re:Python by Smallpond · · Score: 3, Funny

      Today I had to tuna database, then I was supposed to do some ray tracing but I floundered.

    20. Re:Python by Gorobei · · Score: 4, Interesting

      C will teach you how computers work.
      Python will teach you how programming works.

      Ideally, you want to know both. The question is just which one you want to learn first (and if you even want to learn about the other one.)

      There's no right answer. My 8 year old daughter figured out Universal Turning Machines from watching minecraft videos*. If she wants education I'd probably teach her Python. But I could also see showing her NAND gates, working up to a general purpose computer, then C. It's all about her interests and aptitude.

      * She ran into my room excitedly to say: minecraft runs on a computer. I can build a computer in minecraft. So it could do minecraft. I probed a bit, and she explained that it was just like a book ("Diary of a Wimpy Kid" was her example) referencing the book itself by name. Of course, her current career choice is helicopter door gunner, so nothing may come of this.

  2. Datasheet by Matt_Bennett · · Score: 4, Funny

    Print out the datasheet for a microcontroller and hand it to him. It might discourage him, but you could just be creating a prodigy.

    1. Re:Datasheet by Quaoar · · Score: 4, Funny

      Or the Unabomber...

      --
      I'll form my OWN solar system! With blackjack! And hookers!
  3. Head First by Anonymous Coward · · Score: 2, Informative

    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.

    1. Re:Head First by ShieldW0lf · · Score: 5, Interesting

      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
    2. Re:Head First by jepace · · Score: 2

      I second Scratch. It is fun, easy, and powerful. I recently got a group of 3rd-5th graders playing with it in an hour and a half, as well as mentoring a 6th grade student who made a fun little fishing game in an afternoon. I'm working on a bowling game while debugging some of the advanced features of my Portal inspired game.

      Scratch!

  4. codeacademy.com by Anonymous Coward · · Score: 3, Informative

    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.

    1. Re:codeacademy.com by CanHasDIY · · Score: 2

      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.

      I'm not a programmer, and I find the cobbled together, unforgiving, often poorly written lessons on codecademy.com, many of which will allow bad code to pass but fails good code, to be quite frustrating at times. Also, I doubt I'm actually learning much, as I have yet to be able to apply any of the material from the lessons to a real world situation.

      And yet, I still enjoy going through them (the Q&A section is typically far more informative than the lessons themselves), and keep finding myself going back for more. I would recommend anyone using the site develop a good understanding of programming structure and syntax before starting the lessons.

      --
      An enigma, wrapped in a riddle, shrouded in bacon and cheese
    2. Re:codeacademy.com by LMacG · · Score: 2

      Site name is codecademy.com (no first "a" in the "academy" part).

      --
      Slightly disreputable, albeit gregarious
  5. Normally C but... by danwesnor · · Score: 4, Insightful

    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.

    1. Re:Normally C but... by Rhacman · · Score: 2

      I started toying around with QBASIC when I was around 8 but was always frustrated about why my attempts to write code to work with graphics didn't run as efficiently as I thought it ought to. At the time I felt like the holy grail would be to learn C so that I could do some more advanced graphics programming. The problem I discovered was that C was a PITA to learn unaided (and be able to do the type of things I wanted to do). It wasn't even that the language was that confusing so much as troubleshooting code that won't compile / link / run. Linker errors in particular baffled me as a newb, particularly since I just assumed that if I had example C code it should just work.

      That said, I think C (or any language really) would be a fine beginner language for an 11-year old IF there is hands-on guidance available from someone who knows what they are doing. I'm not saying an instructor would be necessary, just the ability to step in and provide some guidance. The REAL determining factor to what language he learns should be related to what type of software he would like to write. Back in college I downloaded the SDK for the original Half-Life and poked around writing C++ code to add new items and features to the core game. Even something as simple as tweaking existing code to alter the behavior of a weapon in the game was a learning experience in working with actual code and provided immediate satisfying feedback in terms of seeing how it impacted the game.

      I'd recommend starting by helping him search around for an existing project that is related to his interests (that is entirely or partially open-source of course). Pick out a book based on the language that project uses (I'm somewhat partial to the Deitel and Deitel books but don't have a strong preference) and help him get the code initially built and running. He'll probably write a few standalone Hello-World applications first but from there can jump into tweaking an actual working project.

      One last thing I'll say is to not get too hung up on picking the perfect beginner language for fear that a particular language wouldn't be as useful to him in the future. I took a course in high school where we spent two weeks at a time to learn various different languages such as x86 assembly, COBOL, Fortran, Pascal, Visual Basic, JavaScript, etc. I hardly use ANY of those languages in my current work but I found that the more languages I learned the easier learning new languages became. Every language you learn gives you a glimpse into the different ways you can write code to solve problems. Even if you never use that language again it broadens your perspective and gives you additional experience to draw upon when deciding the best language to use to approach a programming task.

      --
      Account -> Discussions -> Disable Sigs
    2. Re:Normally C but... by Anonymous Coward · · Score: 5, Funny

      Isn't that how Bill Gates got started? Look what that got us.

      Yes, but look at what that got him.

    3. Re:Normally C but... by tool462 · · Score: 4, Interesting

      I disagree. I was 10 when I started programming, and when I did it was in C. There are some advantages in being close to the hardware like you are with C, as opposed to the higher level languages like Java, Perl, Python, etc. Just like how everyone learns arithmetic by hand to start, but once that's mastered most people just use a calculator for anything they can't do in their heads. Without learning the manual process first, you wouldn't understand the guts of how arithmetic works. The calculator would just become a magic box that spits numbers out at you.

      Just like with math I MUCH prefer to spend my time in a high level language like Perl or Python, but I'm much better at using them because of my early experiences with C. An example:

      One of the early C programs I wrote was an implementation of Conway's Game of Life. It's a fairly simple program, conceptually, but it hits a lot of major gotchas in programming. At by "it", I mean me :)
      - array bounds checking
      - data integrity (you have to have a buffer array to create the next generation or you'll get very screwy results)
      - array copying (pointers are both powerful and dangerous)
      - static vs. dynamic memory allocation (free your pointers, kids)

      All of these things can cause issues in most programming languages, but the bugs they cause can be a lot more subtle in some of the higher level languages.
      Consider a one-dimensional array
      C-style
      int a[3] = {1,2,3};
      int b[3];
      b = a;
      a[1] = 5;
      *** b is now {1,5,3}

      Perl style
      @a = (1,2,3)
      @b = @a;
      $a[1] = 5;
      *** b is still (1,2,3)

      For this, Perl seems better since it matches what the user likely wanted to do.
      However, now look at 2d:
      C-style
      int a[3][3] = {{1,2,3},{4,5,6},{7,8,9}};
      int b[3][3];
      b = a
      a[1][1] = 10;
      *** b[1][1] is also 10

      Perl-style
      @a = ([1,2,3],[4,5,6],[7,8,9]);
      @b = @a
      $a[1][1] = 10
      *** $b[1][1] is ALSO 10

      Why the difference? Array assignment in perl only copies the top level structure, which happens to consist of array refs in the second case. So after the assignment both $a[1] and $b[1] point to the same array ref. If you're already familiar and comfortable with C pointers, this kind of bug is a lot easier to find and fix. You're less likely to make this mistake anyway, though, because you have that intuition that array copying is a hard thing to implement and that different languages will do so differently. So if you need to copy some kind of complex data structure, you better look into how that particular language does it.

  6. Java / BlueJ by bennomatic · · Score: 2

    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?
    1. Re:Java / BlueJ by bennomatic · · Score: 2

      Oh, and if you want him to work in a large Microsoft-centric enterprise, have him learn C#.

      And if he's got an iDevice, push him towards either Javascript for mobile web development or Objective C for native iOS programming.

      --
      The CB App. What's your 20?
  7. A plug for Alice by crazyjj · · Score: 4, Interesting

    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?
    1. Re:A plug for Alice by crazyjj · · Score: 4, Interesting

      I should also mention that there are a bunch of books available that will help with it too.

      I would also urge you to ignore all the "If he can't start out with the hardest stuff, he doesn't belong in our fraternity" snobs here who are recommending you try to get your kid to learn stuff like C, and Python hand-coding right out of the gate. If you subject him to that, not only are you setting yourself up for child abuse charges, but you're probably going to turn him off to programming for good. He should learn the principles first (which Alice teaches in a fun way), and save the hard stuff for when (and if) he's ready to pursue it further..

      --
      What political party do you join when you don't like Bible-thumpers *or* hippies?
  8. Anything by Packt by turkeyfeathers · · Score: 2

    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.

  9. Hello World! Computer Programming for Kids and Oth by LordNimon · · Score: 3, Interesting

    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
  10. Find out why. by JustAnotherIdiot · · Score: 3, Informative

    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?
  11. I am self taught by Anonymous Coward · · Score: 3, Interesting

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

  12. Re:Tube classics by Anonymous Coward · · Score: 2, Insightful

    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.

  13. Mobile by CharlyFoxtrot · · Score: 4, Interesting

    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.
  14. Python or JavaScript by GeneralSecretary · · Score: 2

    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.

  15. Free Python Book by reiserifick · · Score: 3, Interesting

    I highly recommend "Learn Python the Hard Way". Best of all, the online HTML version is free! (as in beer) http://learnpythonthehardway.org/

  16. Minecraft / Lua by CliffH · · Score: 2

    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
  17. Possible languages to choose from by Shoten · · Score: 2

    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.
    1. Re:Possible languages to choose from by amaupin · · Score: 2

      Languages you inexplicably did not mention:

      Python - Less boilerplate code than other languages, easy readable syntax that encourages clean code but more importantly allows a beginner to easily focus on control flow logic, functions, etc. Forget every other language mentioned - Python is where a beginning programmer should start. It's fun, will teach all the concepts, and can do anything.

      Javascript - Runs inside any web browser and is the de facto language for web development. Exploding all over the place thanks to node.js and html5 canvas games/apps. Every web browser is a platform, making distribution of code to friends/family a snap.

  18. Re:Start with a goal... by Nutria · · Score: 2

    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
  19. Perl rocks! by swm · · Score: 5, Funny

    Learning Perl
    Schwartz & Christiansen

    Or just send him to http://perldoc.perl.org/

  20. If using Python... by CJSpil · · Score: 5, Interesting

    You might want to check out the book Snake Wrangling for Kids

    --
    For people who like peace and quiet. A phoneless cord!
  21. "Hello, World", by Sande & Sande by dbc · · Score: 2

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

  22. Lego Mindstorm by mrops · · Score: 4, Interesting

    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.

  23. Re:_why's stuff? by Ken_g6 · · Score: 2

    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)
  24. Try "Invent With Python" by Bob+the+Hamster · · Score: 2

    Try Invent With Python: http://inventwithpython.com/

  25. Why's Poingnant Guide to Ruby by jtara · · Score: 3, Informative

    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

  26. Pascal was good by jd · · Score: 2

    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)
  27. Re:BASIC by CaptainLugnuts · · Score: 2
    Pedantic alert: BASIC has different variable types, or at least the ones I used did.

    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.

  28. LOGO / Turtle Graphics by N0Man74 · · Score: 3, Interesting

    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.

  29. Re:Tube classics by crankyspice · · Score: 2

    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.
  30. Re:Art of Assembler by ArhcAngel · · Score: 4, Interesting

    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
  31. And for the reading by Hentes · · Score: 3, Informative

    The Python manual, embedded in the official distribution contains a very nice tutorial.

    1. Re:And for the reading by dr_leviathan · · Score: 2

      I know two teenagers who went through the official python tutorial and started their way toward being great programmers:

      http://docs.python.org/tutorial/

      --
      Religion is poison to rationality, and we lose sight of that at our own peril. -- Lurker2288
  32. Re:Perl rocks! - but the goal is most important by Digicrat · · Score: 2

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

  33. Re:Tube classics by next_ghost · · Score: 2

    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.

  34. Create a goal for him first... by Tasha26 · · Score: 2

    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.

  35. Re:By Himself & Google by TaoPhoenix · · Score: 4, Interesting

    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
  36. I disagree by Anonymous Coward · · Score: 2, Interesting

    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.

    1. Re:I disagree by thestuckmud · · Score: 2

      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.

      Honestly, I don't believe learning C helps one to programs in Prolog, Scheme, Haskell, Smalltalk or other non-traditional, but at times very handy, programming languages. If you insist on starting out with low level concepts, buy the kid a copy of Knuth Vol. 1 and work through some example on a MIX simulator!

      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.

      Pointers and stacks are not required organizational structures for progamming languages. I'm qualified to comment, having worked on the stack-less, continuation passing style back end of the SML/NJ compiler way back when. If you approach programming assuming these as fundamental, you limit your vision of what is possible. The way I see it, teaching a kid to avoid incredibly useful modern features like garbage collection and first class functions just seems cruel.

      3) C++ is still in use and in-demand in a much wider variety of industries than Python.

      A self-motivated 11 year old has plenty of time to learn c++. My high school band teacher offered sage advice when asked about accepting a gig when you don't know the style of music: "Of course you take the gig! You then spend every spare minute learning a set and you show up ready to perform." The same approach worked for me with regard to programming languages. I never lied about my experience, but I have often promised to be ready to perform in a new language, and I have never disappointed. Of course, you don't get there out of complacency, I had read Stroustrop and knew the concepts of C++ long before writing a line of code and accepting my current MFC/COM/C++ job. If our 11 year old is going to be a great programmer, he'll do the equivalent because remaining ignorant will simple not be acceptable for him.

      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.

      "Harder than other languages" is an understatement. One apt critic describes C++ thusly: " It's just beastly and horrendously ugly - confuses students like heck (huh? copy constructors? virtual destructors?)"

  37. Scratch, Storytelling Alice, Looking Glass by awilden · · Score: 2

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

  38. He Doesn't Need a Book by Patman64 · · Score: 2

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

  39. lisp by Gunrunner00 · · Score: 2, Interesting

    The Land of Lisp has been a pretty good book thus far for learing lisp http://landoflisp.com/

  40. Playboy by Osgeld · · Score: 2

    save him now