I second the idea of Lego Mindstorms, and also Python. What got me into programming as a kid were little BASIC game programs in magazines that I had to type in. Unfortunately, that doesn’t happend enough any more. Here’s an interesting take on teaching an 8-year old functional programming:
For a nine year old? Really?
BASIC seriously sucks. I started with it but it does.
I’d go for either the LEGO stuff, because LEGO is just really cool, or scheme, because it’s a damn good language and should be fairly easy to learn. PLT/Dr. Scheme is free and available for most popular platforms.
Yeah, you can’t go wrong with Mindstorms. Not only is it a great thing to try to program, exciting thing to program, tangible thing to program, it’s also got nice tools. There’s the graphical language, but also various IDEs offering real languages. MS has its robotics studio featuring VB.NET/C#. There’s also of course C/C++, as well as Java, Lisp, Lua, Forth, etc. A big community around these things. Will definitely grow with you.
And building with Legos is as great a mental exercise as programming them.
What you want are scripting languages. You dont need a big complex OOP environment or a complex IDE. Funny enough many schools start students with javascript. Once they can handle that they can move onto python.
You really dont want to expose kids to BASIC or anything with line numbers. Its too antiquated and will probably only cause problems later when they want to learn more.
I came in here to say scripting languages or python are DEFINITELY the way to go, but I see someone beat me to it.
For that matter while it’s not a programming language, simple HTML is great for an environment that 1) doesn’t have to be compiled inbetween changes, 2) provides instant feedback, 3) Relatively safe on your computer, 4) very simple to get the basics down. 5) Free. All you need is notepad and a browser. 6) teaches structured coding, thinking about nesting, coding styles, etc. I gotta say, for a 9 year old… I think it’d be fun and constructive way to learn programming from the ground up. From there incorporate simple scripting ala vbscript or javascript.
BASIC hasn’t had line numbers for decades now. The program flow is much the same as any other modern language, except that there’s more of a tendency to use words instead of symbols (“FOR i = 1 to 10 … NEXT i” instead of “for(i=0; i<10; i++) { … }”).
And while HTML is certainly a useful environment to be fluent in, it’s not programming. You’ll learn some lessons from it, sure, but not things like loops, conditionals, or algorithm design.
I say let him try out Small Basic. I’ve played with it and it is definitely in a usable state and receives current updates. If I had a kid this is where I’d start him out.
Small Basic reminds me a lot of QBasic, which is where I started hacking when I was about 9 years old.
I’d recommend the Lego Mindstorms stuff. There’s the standard graphical programming language but then there’s also libraries and compilers for C, Haskell, etc. that are able to work with the NXT brick. That, and it’s also fun to play with.
Also, it isn’t just a kid’s toy. Our large group project in CS at university was creating an autonomous Lego robot for navigating (a scaled down) minefield and defusing mines.
If this post was in partial response to my post about HTML; did you read my entire post?
I acknowledged that HTML isn’t programming, but it teaches a good foundation for learning structure. Furthermore, it’s a great lead in to learning a scripting language which IS programming (where you can learn about things like loops, conditionals, or algorithm design), without having to get bogged down in the things that make learning programming tough to learn like compiling programs for example, figuring out objects, etc. Introductory programming should be as simple as ‘if I type this command, I can make this happen.’
I guess Small Basic is no worse than QBASIC, but it has no docs (except the intro) and other BASIC resources don’t apply. And why does its intellisense say things like, “The TextWindow provides text-related input and output functionalities. For example using this class, it is possible to write and read some text or number to and from the text-based text window.”
Thinking more about it, I’m really leaning toward Python. It’s a fantastic language. It’s simpler than modern BASICs, and more useful. There’s also a flavor of it called Boo, which is just the best language ever (for .NET or anything). It’s fantastic at the simplest things, it’s fantastic at the most state-of-the-art things.
Here is “Dave is a wassock” in Boo:
while 1+1==2:
for i in (0, 1, 2, 3, 4, 5, 4, 3, 2, 1, 0):
print " "*i + "Dave is a wassock"
That kicks the crap out of basic. It even kicks the crap out of the SPACE$(J) macro that no modern language will have. To try Boo, download SharpDevelop and check out the Boo Primer.
Apparently not; apologies.
I totally agree re Python, btw. I was only ever a hobbyist coder, and Python is the language that for me brought back the thrill of when I was first learning programming. It’s the instant results, try-it-and-see thing. You would get that from any interpreted language, I suppose, but Python just seems cleaner and somehow more intuitive than the others I’ve tried, while still having nice modern features like the wonderful ‘for x in y’ construct above, which beats the crap out of Javascript’s or Basic’s FOR loops.
Python does not suffer from a plethora of weird punctuation marks, instead looking more like pseudocode. The idea of making indentation meaningful, rather than relying on } and { and their equivalents, seems eminently sensible, since surely everybody indents their code anyway?
As a computer person, I found that the kids that are “into” programing find a way to do it all by themselves. The ones that wait for someone to hand it to them are not as successful. So just let the kid run wild on Google on a machine with a good and updated anti-virus program on it.
For real Old School programming, it’s possible to type in and run the example programs from Kernighan and Ritchie’s “The C Programming Language” using the command-line tools provided with a Mac.
Also, if you want to experience the joys of programming in a tokenized BASIC, there’s the ZX81 (aka Timex Sinclair 1000) emulator in a webpage. No installation required–your browser does everything!
Even if that’s true on average, that doesn’t necessarily mean anything. (correlation isn’t causation.)
I know if a very bright kid is set up with opportunities and encouraged toward enriching pursuits, he’ll only get brighter. Of course, pushing hard and long an ordinary kid into something he doesn’t want to do will not necessarily end with him being in love with it.
You’re better off teaching the kid how the computer works and letting them figure out the rest for themselves. Open up OSX Terminal and you’ve got a bash shell and access to the entire system. Start by teaching them basic pipes and other neat tricks. The next thing they know they are not only programming but doing it in a way that is actually useful to them, as opposed to all these other toy languages.
Heh. “TextWindow.WriteLine”. Jesus Fuck. Er, I mean, God(Religion=“Christianity” Psilanthropism=False).FunctionExecute(“Fornicate”).
Now let’s print it in yellow. ’ TextWindow.Foreground.Color=“Yellow” '. I only hope it gets a little bit, you know, SMALLER, from there.
I’ve used Yabasic for all sorts of simple, and indeed fairly complex tasks, for quite some time, even though I can do C{,++}, Java and Perl. It seems to follow the KISS principle fairly well, the one that puts the ‘B’ in ‘BASIC’.
A nine-year old does not need Object Orientation, and should not have to worry unduly about typing variables.
Just tried Scratch. As I suspected, its graphical language is great. You know, not all graphical languages are equal. Some are like LabVIEW: retarded flowchart contraptions that do more harm than good. But Scratch isn’t like that. It resembles real code, but takes advantage of the GUI principle by setting out the options in front of you and letting you manipulate them using the mouse, buttons, comboboxes, etc. Intuitive GUIs are what young kids pick up so quickly, and Scratch is a winner.
Scratch lets you build multi-threaded, event-driven applications more simply than you can do almost anything in C#. Holy fucking shit, this really demonstrates the power of GUI languages. Moreover, Scratch isn’t quite limited to animating a cat (although all the docs are geared toward this girly dollplaying instead of manly stuff-doing). It can make any sort of sprite-based game, and there are tools for all sorts of complex interactions. Although, I wish there were more tutorials or a nice book. Maybe there are, but didn’t immediately see it on the site.
And again, I can’t stress enough how intuitive GUIs jive with kids’ learning.
I would start the kid off with Scratch, and later graduate him to a real language, like Python, Visual Basic .NET, etc. that can do real things and has a big online community (with a big community, you can just google any question and expect to get the answer). (Ie, i’d skip any other sort of isolated ‘beginner’ language.)
Or you can graduate the kid to Mindstorms. Although also a GUI lanaguage, it looks a little more complex and a bit less intuitive than Scratch. But it is much more expansive and also something where you can do real things (really real things) and have a big community.
That’s just crazy talk.