Slashdot stories can be listened to in audio form via an RSS feed, as read by our own robotic overlord.

 



Forgot your password?
typodupeerror
Books Education Programming

Ask Slashdot: Best Book For 11-Year-Old Who Wants To Teach Himself To Program? 525

Posted by timothy
from the it-isn't-huckleberry-finn dept.
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."
This discussion has been archived. No new comments can be posted.

Ask Slashdot: Best Book For 11-Year-Old Who Wants To Teach Himself To Program?

Comments Filter:
  • Python (Score:5, Informative)

    by Anonymous Coward on Thursday April 12, 2012 @02:16PM (#39662959)

    Have him learn python. On any OS.

    • Re:Python (Score:5, Informative)

      by chaosite (930734) on Thursday April 12, 2012 @02:34PM (#39663389)

      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/ [greenteapress.com]

      • Re:Python (Score:5, Informative)

        by g0bshiTe (596213) on Thursday April 12, 2012 @02:40PM (#39663533)
        I'll 3rd that.

        Have a look here. http://www.pythonchallenge.com/ [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.
        • by Salis (52373)

          I'll 4th that.

          Wow, nigh universal consensus on Slashdot. Next, it'll be snowing in April in the Mid-Atlantic! (erp, nevermind)

      • Re:Python (Score:4, Informative)

        by msclrhd (1211086) on Thursday April 12, 2012 @03:33PM (#39664589)

        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 [gabrielflor.it] 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.

    • Re:Python (Score:5, Informative)

      by Githaron (2462596) on Thursday April 12, 2012 @02:35PM (#39663421)

      Have him learn python. On any OS.

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

    • Re:Python (Score:5, Informative)

      by durrr (1316311) on Thursday April 12, 2012 @02:37PM (#39663445)

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

      • by durrr (1316311)

        Also, when someone asks what your son is up to, you'll make it appear as if he's a welladjusted teenager, as opposed to endangered by his reckless father.
        "oh my son,he's playing with [a] Python" *gasp*

    • And for the reading (Score:4, Informative)

      by Hentes (2461350) on Thursday April 12, 2012 @02:57PM (#39663865)

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

    • Re: (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.
    • Another vote for Python and another free book [briggs.net.nz] to add to the rest of the comments...
  • Datasheet (Score:5, Funny)

    by Matt_Bennett (79107) on Thursday April 12, 2012 @02:17PM (#39662987) Homepage Journal
    Print out the datasheet for a microcontroller and hand it to him. It might discourage him, but you could just be creating a prodigy.
  • Head First (Score:2, Informative)

    by Anonymous Coward

    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.

    • by Bigby (659157)

      Head First books are my favorites as well. Nothing like seeing an EJB with arms and legs getting shot by a person.

      To keep someone 11 interested (gaming connections) and demonstrate the usefulness of math (geometry), you could ease them into 3D programming.

      It is probably good for them to see the results of their labor, so web programming is a good start. Maybe PHP, since it is dynamically typed, has all the control logic, data types, and OO hacked into one language. Less errors = less frustrating to an 11

      • Re:Head First (Score:5, Interesting)

        by ShieldW0lf (601553) on Thursday April 12, 2012 @02:39PM (#39663499) Journal

        Set him up with Scratch.

        http://scratch.mit.edu/ [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 [picocricket.com]

    • by Githaron (2462596)

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

      Yes. The Head First books are pretty awesome.

  • codeacademy.com (Score:3, Informative)

    by Anonymous Coward on Thursday April 12, 2012 @02:17PM (#39662993)

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

    • by LMacG (118321)

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

  • Normally C but... (Score:5, Insightful)

    by danwesnor (896499) on Thursday April 12, 2012 @02:19PM (#39663023)
    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.
    • by Talennor (612270)

      Conversely, chasing crashes is a fun problem solving activity, and pointer arithmetic (while bad in the real world) really lets you know what's going on.

    • by Hatta (162192)

      Plenty of 11 year olds got their start coding a mix of BASIC and 6502 assembly. C shouldn't be much worse.

    • by Rhacman (1528815)
      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
    • Re:Normally C but... (Score:5, Interesting)

      by tool462 (677306) on Thursday April 12, 2012 @03:45PM (#39664795)

      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.

  • by bennomatic (691188) on Thursday April 12, 2012 @02:19PM (#39663037) Homepage
    I don't know about books, but if you go to http://bluej.org/ [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.
    • 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.
  • A plug for Alice (Score:5, Interesting)

    by crazyjj (2598719) * on Thursday April 12, 2012 @02:20PM (#39663051)

    I would like to put in a plug for Alice [wikipedia.org] 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.

    • Re:A plug for Alice (Score:5, Interesting)

      by crazyjj (2598719) * on Thursday April 12, 2012 @02:29PM (#39663285)

      I should also mention that there are a bunch of books [alice.org] 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..

  • Break his spirit early (or discover how awesome your kid is).

    • Re:Art of Assembler (Score:5, Interesting)

      by ArhcAngel (247594) on Thursday April 12, 2012 @02:57PM (#39663861)
      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 [wikipedia.org] @ 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.
  • 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.
  • by LordNimon (85072) on Thursday April 12, 2012 @02:21PM (#39663085)

    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 [amazon.com]

  • Find out why. (Score:4, Informative)

    by JustAnotherIdiot (1980292) on Thursday April 12, 2012 @02:21PM (#39663095)
    Different languages excel at different things, so It's probably a good idea to figure out what he plans on doing with programming knowledge.
  • I am self taught (Score:3, Interesting)

    by Anonymous Coward on Thursday April 12, 2012 @02:21PM (#39663101)

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

    • Speaking of BASIC, VB.NET allows you to lay out Windows dialog visually via click-and-drag and it is easy to play with stuff and then check out the generated code. Of course you still need to write logic to hook it all together and make it actually do something.
      • by i.r.id10t (595143)

        That is the one thing I liked about VB... pages of code in Java or C/C++ to do the same task as a quick click-n-drag ...

  • Starting Forth [forth.com] by Leo Brodie. Possibly the best book I've ever read about how to decompose a problem into chunks, and turn those chunks into code to solve the problem. As an added bonus, Forth works very well in immediate mode, allowing one to write and test simultaneously.
  • Mobile (Score:5, Interesting)

    by CharlyFoxtrot (1607527) on Thursday April 12, 2012 @02:25PM (#39663185)

    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.

  • I'd first look at KhanAcademy. They have courses on Python. See http://www.khanacademy.org/#computer-science-container [khanacademy.org] Python in general is a good first language. I first learnt it with http://www.greenteapress.com/thinkpython/ [greenteapress.com] 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 [goo.gl] Another option that has been discussed recently as a good first language is JavaScript. It has the advantage of running in
  • Free Python Book (Score:3, Interesting)

    by reiserifick (2616539) on Thursday April 12, 2012 @02:25PM (#39663203)
    I highly recommend "Learn Python the Hard Way". Best of all, the online HTML version is free! (as in beer) http://learnpythonthehardway.org/ [learnpytho...ardway.org]
  • MIT's Scratch (Score:2, Redundant)

    by preaction (1526109)

    http://scratch.mit.edu/ [mit.edu]

    Explains programming concepts though visual components.

  • 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.
  • by Shoten (260439) on Thursday April 12, 2012 @02:26PM (#39663219)

    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.

    • by amaupin (721551)

      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

  • I would avoid Gortek and the Microchips [lemon64.com], it is a little aged. Scripting seems to be an easy start and there are a ton of Perl or Python tools ready and available on the internet. I am mentoring a high schooler now and let him chose his language and he is using Perl - easy, tons of tools, lots of flexability. One thing I see with these languages though is that you have to unlearn bad habits unless you have some structured education. Personally I learned Assembler, Basic, C and Pascal as first languages b
  • I am not sure if your 11-year old is ready for the K&R text, but if he wants a full stack education, the K&R book will give him in-depth knowledge of how low level languages work. It's clearly written, succinct, and arguably one of the best technical manuals ever written. I will caution that It will require more maturity and self motivation to finish, but he'll go through the book understanding how almost all software works. If he is truly motivated, I would even go lower level to leading him to com
  • Perl rocks! (Score:5, Funny)

    by swm (171547) * <swmcd@world.std.com> on Thursday April 12, 2012 @02:28PM (#39663265) Homepage

    Learning Perl
    Schwartz & Christiansen

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

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

  • I'm surprised that nobody has brought up Hackety Hack and Why's (poignant) Guide to Ruby.
  • If I was recommending a book for a peer in a non-computer related field, I'd definitely recommend How to Think Like a Computer Scientist, which assumes no programming knowledge and builds up the thought process behind decomposing problems, etc. It's been a while since I read it, but I think it would work reasonably well for an advanced preteen. The version I read used Python, which I think is a great introductory language.

    http://www.greenteapress.com/thinkpython/ [greenteapress.com] for a dead-tree version, or in various ele

  • If using Python... (Score:5, Interesting)

    by CJSpil (166214) on Thursday April 12, 2012 @02:31PM (#39663331)

    You might want to check out the book Snake Wrangling for Kids [briggs.net.nz]

  • by dbc (135354) on Thursday April 12, 2012 @02:32PM (#39663347)

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

  • by buddyglass (925859)
    I recommend C or Java, and echo others' recommendation of the K&R book. Big benefit = it's short. Recommend against dynamically typed scripting languages, e.g. ruby, python, php, perl, et. al. Other benefit = both C and Java are near-ubiquitous. Possible alternative is C#.
  • Then Lua might be a good language to start with. It's what WoW addons are written in, and several other games use it as well. (Minecraft, RIFT, more.) I'd say the main thing is that he needs something that he's interested in making the computer *do*. Working with a goal in mind makes it much easier to learn things beyond what you can learn from "toy" programs.
  • Snake Wrangling For Kids http://www.briggs.net.nz/snake-wrangling-for-kids.html [briggs.net.nz]

    Free, python based, and downloadable. Worked for my kid.

  • Lego Mindstorm (Score:5, Interesting)

    by mrops (927562) on Thursday April 12, 2012 @02:34PM (#39663405)

    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 haven't bought a book in ages -- yet have learned a couple new languages and technologies in the meantime without them.
    Every language will have a dedicated community site with tutorials covering most your essential topics and lots of code samples and user help forums, where most the questions any novice will have are already answered.

    When I did buy books though, I found that ones that were lighter weight and focused more on the practice than the theory, because the dense ones, while a good resource of inf

  • Try Invent With Python: http://inventwithpython.com/ [inventwithpython.com]
  • One could try Microsoft Small Basic. Some self-directed learning guides are available on the site as well.
  • Stanley Lippman's C++ Primer, 4th ed. and Inside the C++ Object Model.

    Why C++ and not something like Python or Java? Becuase C++ is what you use to program games and I think one of the best thing a kid can to is try to write a simple game.

    I'd also recommend a book on Qt 4 or whatever your favorite cross platform GUI library is. He should understand early on that there is more than just Windows or OS X out there and Qt looks good in all 3 major OSes.

    If he is interested in writing a simple game I'd also recom

  • Give him any book. Pull the plug on the internet.
    Tell him that he will get internet back when he has made a small math- guessing-game. ;)

  • by jtara (133429) on Thursday April 12, 2012 @02:44PM (#39663599)

    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 [wikipedia.org]

  • I don't have a helpful answer, but are you sure you're looking for a book? There might be a website or application that is aimed at teaching programming in a way that's a little more interactive-- like your changes become apparent without recompiling or anything.

    With that in mind, I would wonder if the best place to start would be web development. HTML and CSS are relatively simple and can give instant feedback. He can make a change, reload the browser, and see how the change affected the outcome. He c

  • Goodbye Slashdot account. It's been fun but it's time to move on.

  • by jd (1658) <<moc.oohay> <ta> <kapimi>> on Thursday April 12, 2012 @02:47PM (#39663681) Homepage Journal

    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.

  • How to Design Programs [htdp.org].

    It was written with zero prerequisites in mind. Works as a CS 101 course, but also works as a do-it-yourself course, and ought to be accessible to a bright young kid.

    The language is Scheme, although that's sort of incidental—the point of the book is to teach programming, not to teach Scheme. The good thing is that DrScheme is an no-distractions IDE tailored specifically to teaching. The bad thing is you probably don't have access to the same kinds of bells and whistles (grap

  • This post would have been more interesting were it in the form of a small animated hologram

  • I'd recommend doing something fun regardless of what language.

    If you are fine with Java or .Net, try out http://robocode.sourceforge.net/ [sourceforge.net]

    I know I'd love to write code as a kid to battle other players.

    I learned most of my programing as a kid by picking apart other code. I learned on a trs80 loading up basic games and then in my teenage years, tweaking code for BBS sites when 1200 baud was awesome.

  • Find something open source that's exciting to him. He'll read the code, compile it, find the tools, edit it, and learn. The language isn't as important as the problem solving part and not getting lost in hello world programs and simple problems.

    However, I'd recommend staying away from PHP or Perl. You can learn some bad things there.

    I wouldn't limit the search for a fun project to high level software, either. Arduino is an awesome platform for embedded stuff with tons of open source code out there.

  • Since he has a Linux computer available writing simple programs in any of the scripting languages such as Perl or Python is a good way to start. Then move on to Tck/Tcl and simple GUI constructs. http://oreilly.com/ has a good selection of programming books for Linux and would be a good place to start. Some of their titles are available freely on line too.

  • by N0Man74 (1620447) on Thursday April 12, 2012 @02:50PM (#39663743)

    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.

  • by Tasha26 (1613349) on Thursday April 12, 2012 @03:23PM (#39664393) Homepage
    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.
  • by Osgeld (1900440) on Thursday April 12, 2012 @08:31PM (#39668357)

    save him now

To avoid criticism, do nothing, say nothing, be nothing. -- Elbert Hubbard

Working...