Ask Slashdot: Best Book For 11-Year-Old Who Wants To Teach Himself To Program? 525
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."
Python (Score:5, Informative)
Have him learn python. On any OS.
Re:Python (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/ [greenteapress.com]
Re:Python (Score:5, Informative)
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.
Re: (Score:2)
I'll 4th that.
Wow, nigh universal consensus on Slashdot. Next, it'll be snowing in April in the Mid-Atlantic! (erp, nevermind)
Re: (Score:3)
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 co
Re:Python (Score:4, 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 [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)
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)
Have him learn Ruby. On any OS.
With this book: http://www.ruby-doc.org/docs/ProgrammingRuby/ [ruby-doc.org]
Re: (Score:2)
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*
Re:Python (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.
And for the reading (Score:4, Informative)
The Python manual, embedded in the official distribution contains a very nice tutorial.
Re: (Score:3)
I know two teenagers who went through the official python tutorial and started their way toward being great programmers:
http://docs.python.org/tutorial/ [python.org]
Re: (Score:3, Interesting)
Re: (Score:3)
Re:Python (Score:5, Funny)
Re:Python (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...
Re:Python (Score:5, Insightful)
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.
Re:Python (Score:5, 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.
Re: (Score:3)
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.
Re:Python (Score:4, Funny)
Today I had to tuna database, then I was supposed to do some ray tracing but I floundered.
Re:Python (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. [mit.edu] (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".
Re:Python (Score:5, 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.
Re:By Himself & Google (Score:5, 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.
Re:Python (Score:4, 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).
Datasheet (Score:5, Funny)
Re:Datasheet (Score:5, Funny)
Head First (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.
Re: (Score:2)
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)
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]
Re: (Score:2)
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)
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.
Re: (Score:3)
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
Re: (Score:3)
Site name is codecademy.com (no first "a" in the "academy" part).
Normally C but... (Score:5, Insightful)
Re: (Score:2)
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.
Re: (Score:2)
Plenty of 11 year olds got their start coding a mix of BASIC and 6502 assembly. C shouldn't be much worse.
Re:Normally C but... (Score:5, Funny)
Isn't that how Bill Gates got started? Look what that got us.
Yes, but look at what that got him.
Re: (Score:3)
Re:Normally C but... (Score:5, 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.
Java / BlueJ (Score:3)
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.
Re: (Score:3)
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)
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)
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..
Art of Assembler (Score:2)
Break his spirit early (or discover how awesome your kid is).
Re:Art of Assembler (Score:5, Interesting)
Anything by Packt (Score:2)
Hello World! Computer Programming for Kids and Oth (Score:4, 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 [amazon.com]
Find out why. (Score:4, Informative)
I am self taught (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!"
Re: (Score:2)
Re: (Score:2)
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 ...
Here's a strange one (Score:2)
Mobile (Score:5, 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.
Python or JavaScript (Score:2)
Free Python Book (Score:3, Interesting)
MIT's Scratch (Score:2, Redundant)
http://scratch.mit.edu/ [mit.edu]
Explains programming concepts though visual components.
Minecraft / Lua (Score:2)
Possible languages to choose from (Score:3)
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.
Re: (Score:3)
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
Gortek (Score:2)
K&R Text (Score:2)
Perl rocks! (Score:5, Funny)
Learning Perl
Schwartz & Christiansen
Or just send him to http://perldoc.perl.org/ [perl.org]
Re:Perl rocks! - but the goal is most important (Score:3)
+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.
_why's stuff? (Score:2)
Re: (Score:3)
I'm surprised nobody's linked to Why's stuff [uniqpath.com] yet. (Since it's a free online book and all.)
Think Like a Computer Scientist (Score:2)
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)
You might want to check out the book Snake Wrangling for Kids [briggs.net.nz]
"Hello, World", by Sande & Sande (Score:3)
"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.
yo (Score:2)
If he's into World of Warcraft... (Score:2)
Python for kids (Score:2)
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)
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.
Google is your friend (Score:2)
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" (Score:2)
Everything in this list, eventually (Score:2)
Small Basic (Score:2)
Stanley Lipmman, Qt, assembly, DX11, and engines (Score:2)
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
Pull internet (Score:2)
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.
Why's Poingnant Guide to Ruby (Score:4, 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 [wikipedia.org]
Are you sure you want a book? (Score:2)
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
Final Post (Score:2)
Goodbye Slashdot account. It's been fun but it's time to move on.
Pascal was good (Score:3)
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 (Score:2)
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
More creativity, please (Score:2)
This post would have been more interesting were it in the form of a small animated hologram
Robocode (Score:2)
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.
Open Source (Score:2)
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.
Scripting languages (Score:2)
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.
LOGO / Turtle Graphics (Score:4, 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.
Create a goal for him first... (Score:3)
Playboy (Score:3)
save him now
Re: (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.
Re: (Score:3)
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 [wikipedia.org] 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 [atarimagazines.com] and books available at local booksellers [worldofspectrum.org]. As I progressed, I picked up a copy (likely got it as a present) of the AppleSoft Basic Programmer's Ref [google.com]
Re: (Score:3)
Re: (Score:3)
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 [wikipedia.org]
http://www.basic256.org/index_en [basic256.org]
Re: (Score:2)
Outside of a couple of toy langauges pretty much all major programming langauges in use are from last century. That's a really dumb qualifier to use as a negative.
Re: (Score:2)
Everything else is just mostly a scam, a corporate interest language, a self-promotion language, a graduation paper language, a support feeder language, a 'secure' language, a wikipedia entry language, we need to slow things down to push our hardware kind of language, an Amazon book language etc.
Re: (Score:2)
Re: (Score:2)
Re: (Score:2)
This reminds me of another great book (from which I learned most of my C): "The C Book" by Mike Banahan. It is out of print now, but it has been made freely available at http://publications.gbdirect.co.uk/c_book [gbdirect.co.uk]
I liked it a lot.
Re: (Score:2)
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.