BASIC... for kids!
April 21, 2010 6:24 AM   Subscribe

When I was home last weekend, my 9 year old nephew was on the computer when he turned to me and said, "Do you know how to write BASIC? All I can do so far is print 'Hi,' but it's really cool!"

I started learning BASIC when I was about his age, maybe younger. He is a very intelligent kid who, unfortunately, also struggles with ADHD. He loves everything to do with computers, but I don't know how much he gets on them at home. Whenever he's at my parents house, though, he's on their computer all the time.

I want to encourage him to learn more about coding. Is there any book I can give him? He loves to read. And I'd like it to be something that he can learn from/will keep his interest even if he can't be on the computer all the time.

What do y'all think?
posted by little_c to Computers & Internet (42 answers total) 46 users marked this as a favorite
 
I imagine you'll get loads of people jumping in to say this, but try steering him towards a different language - BASIC itself is out-of-date, and although Visual Basic is used it's perhaps not the easiest or most useful place to start. I'd personally recommend Python, simply because it's a) freely available, b) easy to read and write, c) used widely in the software industry and d) popular enough to have loads of people posting cool things to do with it online.

I learnt most of my Python coding from Dive Into Python, which is very readable. How to Think Like A Computer Scientist is another one that serves as an excellent introduction. For that matter, just working through the Python tutorial is a good start.
posted by ZsigE at 6:31 AM on April 21, 2010 [5 favorites]


Why's (poignant) Guide to Ruby is also available in easy to print PDF. It is simply amazing.
posted by ChrisHartley at 6:31 AM on April 21, 2010 [1 favorite]


Scratch, and Greenfoot are both programming environments built with kids in mind; Scratch for younger, Greenfoot for older. Greenfoot is based on Java so you can actually learn a bit of a grown up language using it (although you don't have to).

If he's already into BASIC he might want to look into a proper language rather than a simplified environment. And as proper programming languages go, Python is one of the more popular suggestions for younger learners. I've heard good things about "Invent your own computer games with python".
posted by handee at 6:32 AM on April 21, 2010


Damn, someone already got in here with a python comment. Let me just say that teaching python to kids should be classified as child abuse. Only java is more tedious.
posted by felix at 6:36 AM on April 21, 2010



Damn, someone already got in here with a python comment. Let me just say that teaching python to kids should be classified as child abuse. Only java is more tedious.


Gah, let me add my gasoline to this flame war. Teaching programming in a language other than python should be considered child neglect! Literally. Ish. Not really, but python is awesome and beautiful.
posted by Salvor Hardin at 6:41 AM on April 21, 2010 [3 favorites]


Rur-ple might be worth a look too.
posted by jquinby at 6:42 AM on April 21, 2010


try ruby! is a interactive browser based tutorial/ ruby interpreter so he can try things out from the book I linked above without needing to install anything.
posted by ChrisHartley at 6:45 AM on April 21, 2010


Processing is pretty awesome in giving learners that instant results kick that really gets them going.
posted by pharm at 6:52 AM on April 21, 2010


Snake Wrangling for Kids is a free book that teaches programming in Python - aimed obviously at kids.
posted by COD at 6:59 AM on April 21, 2010


Previously (ish)
posted by mkb at 7:07 AM on April 21, 2010


LOGO was quite popular back in the day...
posted by schmod at 7:14 AM on April 21, 2010


Seconding Python, but "Dive Into Python" is wrong, since he's not a programmer of other languages yet. The official Python tutorial is a better. "Snake Wrangling" is almost certainly best of these three.
posted by cmiller at 7:24 AM on April 21, 2010


Wow, don't kill his interest by trying to cram python or ruby or any other heavy language down his throat. He can make his own way there.

Like schmod said, LOGO was a very popular introductory language. I learned the basics of programming through LOGO and BASIC. They aren't very functional nowadays for real-world programming tasks, but they are perfect as an intro to programming. If his interest is piqued, he will find his way amongst the multitudes of languages out there and eventually formalize his learning at school (college/university). For me, my progression was LOGO -> BASIC -> C -> ASM -> perl -> C++ and then after that I lose track (web languages, ruby, rails, etc.)
posted by splice at 7:29 AM on April 21, 2010 [3 favorites]


turnLeft();
turnLeft();
turnLeft();
Move();
PutBeeper();
posted by sagwalla at 7:31 AM on April 21, 2010 [1 favorite]


Scratch (see my earlier comment) is kinda like the new LOGO.
posted by handee at 7:32 AM on April 21, 2010


*sigh*
These questions always end the same. Python, Ruby, blah, blah, blah.
I'm no better, but I'll add my own repetitive answer here.

smallbasic comes with a great tutorial PDF, is BASIC and offers loads of examples and free "web-hosting" for any written programs.
Plus you get groovy in-program help/
Plus - Loads of examples on the web for everything upto quite complex games.

You don't get classes and objects, but you do get Turtles and Flickr.
It's a great learning environment.
posted by seanyboy at 7:34 AM on April 21, 2010


If he's interested in BASIC, maybe these books are available. The old ones that used to put sample programs in magazines that lots of kids used back in the day.
posted by CathyG at 7:46 AM on April 21, 2010


Wow, don't kill his interest by trying to cram python or ruby or any other heavy language down his throat. He can make his own way there.

What makes you think BASIC goes down easier then Python? Probably, Python is easier to use and learn then BASIC. Basic is over 40 years old, and there have been a lot of advances, both in expressive power and ease of use since then.

How is python a "heavy" language? It has classes and objects, but they aren't necessary, as far as I know.
posted by delmoi at 7:46 AM on April 21, 2010 [1 favorite]


I will say this against python - the Tkinter GUI module is pretty dense to get into - I probably wouldn't have had the patience to learn it at 9 yrs old. I haven't tried wx, but I think it's pretty similar. Maybe a language with a more natural graphics output would be better. I know I loved making little balls move around in QBASIC when I was a kid.

PS: There may be a simpler and more kid-friendly graphics module available somewhere - I haven't looked.
posted by Salvor Hardin at 7:58 AM on April 21, 2010


You might find this interesting to watch:
OSCON 2008: Nat Torkington: "Spawning the Next Generation of Hackers"

Nat talks about his own experience teaching programming to his kids. He started them out on Scratch, then moved on to Processing. He notes that immediate results are important when teaching kids to program. (I myself observed the importance of this when teaching introductory programming to freshmen with no prior programming background - something interesting had to happen on the screen as a consequence of their actions to keep them interested in further programming.)
posted by needled at 7:59 AM on April 21, 2010 [8 favorites]


I just looked at some python code, and BASIC is easier. The kid doesn't have to use BASIC forever, but there is value in learning something that's very ... basic first. Especially if he's interested in it. Let him go at his own pace.
posted by gjc at 8:00 AM on April 21, 2010 [1 favorite]


I provisionally second some of the books that we of the C64 and Compute! magazine generation learned out of as kids.

I'm curious as to which BASIC environment your nephew is using now. Something at school perhaps? Maybe a programmers reference for whatever he's already using would be the best first choice.
posted by ob1quixote at 8:01 AM on April 21, 2010


Unlike some, I don't think there's anything inherently terrible about BASIC. (There, I said it. Ha!) The problem you run into is that, although you can still find BASIC environments — actual BASIC, not VB, which I'd stay away from — that will run on modern machines, they're pretty limited in terms of their standard libraries. You pretty quickly get to a point where it's like "okay, that's great, now what?"

That was pretty much my recollection of LOGO as well. It's neat, you can make the 'turtle' move around the screen and draw things, but it gets old fast. And the jump from LOGO to 'real programming' is pretty severe — as a kid, I never made it. (I spent almost two decades after taking those LOGO classes as a total non-programmer, because languages like C — real languages, or so they seemed — were totally incomprehensible. I only rediscovered programming through shell scripts, and then Python, and then Java...)

But I wouldn't push your nephew too hard towards another programming language. If he's interested in BASIC, by all means let him play with it; if he gets bored, then let him try something else. There's no harm in playing around with it, as long as he doesn't think that he's limited to it.

If he's open to it, I'd agree with the suggestion others have made of Python, but don't get pushy. Python has a very nice, clear syntax, a fun interactive mode, and there are a ton of high-quality tutorials around. You can start off using it as a sort of "super BASIC," doing everything imperatively, playing with print statements and stuff (including the very extensive standard library), and work your way up to functions and objects. There's a reason why it's very popular for introductory programming courses.

But in general I'd just give him the tools and see what he wants to do with them, rather than trying to steer him too hard in any particular direction. Let his interest dictate where you want to go. It might turn out that what he really wants to do is something more tangible, like microcontroller / Arduino programming, which would let him build robots and stuff. Or maybe he'll want to make web pages that use PHP. Almost impossible to say, but it's great that he's interested.
posted by Kadin2048 at 8:03 AM on April 21, 2010


Hello World!
Computer Programming for Kids and Other Beginners

by Warren D. Sande and Carter Sande
posted by Lanark at 8:08 AM on April 21, 2010 [1 favorite]


And the jump from LOGO to 'real programming' is pretty severe

LOGO is based on LISP, with lists a fundamental data type, and you can do some really real things with it. The problem is, learning a dialect of LISP first will make languages like C seem clunky and inelegant...
posted by kindall at 8:22 AM on April 21, 2010 [2 favorites]


When I was a kid, I learned a lot of programming concepts from A FOTRAN Coloring Book. I never wrote any FORTRAN, but the book was so fun to read, I couldn't put it down. He might get a kick out of something so old school, or maybe you'll find something along the same lines that's been updated.
posted by TurkishGolds at 8:56 AM on April 21, 2010


Microsoft's Small Basic project seems like a perfect match.
posted by jeffamaphone at 9:45 AM on April 21, 2010 [1 favorite]


I agree that kids should be encouraged to pursue whatever programming language they choose naturally. They'll eventually want to do something more complex or faster than BASIC allows, and then you can introduce them to your language of choice. That's what happened with me, anyway.

That said, if I were teaching a kid from scratch, I would use Python.

Also, there is so much of software engineering that is common to all programming languages: write short functions with descriptive names; don't copy-and-paste; write tests; consider time and space complexity; don't optimize prematurely; profile before optimizing; design and debug by rubber ducking; know when code smells funny. Before worrying about what language a kid is writing in, worry about what habits they're learning.
posted by novalis_dt at 9:51 AM on April 21, 2010


Also, two games that could give him a good intro to programming concepts:
RoboZZle ( iPhone version )
Robo Rally
posted by nomad at 9:54 AM on April 21, 2010


The language isn't as important as what he does with it. Give him some sort of authentic task. Challenge him to build a quiz about himself that calculates a score at the end, and stores it in a High Scores list. Or ask him to write you a program to help you keep track of your grocery list. Or a program that can encode and decode secret "encrypted" messages that you two can pass back and forth. Something that piques his interest and has a real application that he can be motivated by.

(FWIW, I'd go with Python too, despite being a Perl devotee.)
posted by msittig at 10:10 AM on April 21, 2010


When I was about 9 or 10 I found a BASIC environment on my dad's computer and a book at the library about how to program for the Commodore 64 in BASIC. Even then I could tell the book was very dated, but I still figured it out.

Then one day my uncle was visiting I asked him the same question little_c's nephew asked, and what followed was about four hours of my uncle and I locked in front of my dad's computer. For a good year or so we passed every family get-together sitting in the den until the CRT monitor started to burn our eyes.

He hadn't used BASIC in years, and had forgotten a good portion of the rules. I'd ask him how to do something, he'd think about it, and say, "maybe the best way is like this." Then he'd write out a program for me and we'd test it. When those ideas didn't work we sat there and came up with a new way together. Even though all I knew was BASIC, and I was a child, my uncle still listened to my ideas. It's the first time I can remember being part of a problem solving team.

I don't think it matters to much what language a child learns, so long as they're learning. I don't use BASIC anymore--and I probably don't use any of the programing concepts I learned from BASIC anymore either--but BASIC did give me a good understanding of logic and problem solving, along with a healthy dose of self confidence, and I use all those things on a daily basis.
posted by Hoenikker at 10:10 AM on April 21, 2010 [2 favorites]


If he ends up writing programs for his TI graphing calculator in early high school (as I did), he'll use BASIC. It's a great place to start, and it'll pay off immediately when he writes programs to do his homework.
posted by Sfving at 10:12 AM on April 21, 2010


I know nothing but isn't ALICE supposed to make learning programing fun.
posted by notned at 10:16 AM on April 21, 2010


I used Scratch with my 9 year old nephew and it worked great. The combination of drag and drop visual programming and instant results worked like a charm. Its worth mentioning that it had been specifically designed for exploratory learning and he started to come up with basic algorithms on his own very quickly. The Scratch ->Processing route sounds ideal.
posted by tallus at 10:28 AM on April 21, 2010


Get him a Lego Mindstorms kit for his 10th birthday.
posted by ikaruga at 10:42 AM on April 21, 2010 [4 favorites]


I'll join the "anything but BASIC" crowd here, but I have a different suggestion:

JavaScript.

He probably wouldn't mind learning a bit of HTML anyway, since making web pages is fun. And JavaScript is a nice simple language with an immediate real-world application, where he can see his results on a web page instead of on a command line.

I learned to program in BASIC when I was young (in the 80s) but I'm not sure it's the best choice now. Many modern environments are different in that they are more event-based and object-based than linear, and that was a difficult switch for me to make.

I don't think the language is THAT important. If not JavaScript, go with Scratch or Processing or maybe Python. They'll all teach him concepts that will apply to real-world programming much more than BASIC.

If he ends up writing programs for his TI graphing calculator in early high school (as I did), he'll use BASIC.

Is this still something kids do? I would think by the time he's in high school he'd be able to write those programs on his laptop, or his iPad, or his phone. When kids are carrying around phones with more processing power than a graphing calculator, I doubt the venerable TI or HP would be appealing to them.
posted by mmoncur at 10:53 AM on April 21, 2010


Normally, I say python for this, but lately I've been thinking javascript or processing (or processing.js) are better choices. Getting right to drawing pretty pictures is quite a motivator and python doesn't really do graphics very well, not on its own. Javascript has the nice benefit of being available everywhere there's a browser and now has canvas support for quick and relatively amazing graphics.
posted by chairface at 11:05 AM on April 21, 2010


When kids are carrying around phones with more processing power than a graphing calculator, I doubt the venerable TI or HP would be appealing to them.

The phone will be Internet-connected and thus usable for cheating. Kids will still need dedicated calculators for a while, I think.
posted by kindall at 11:51 AM on April 21, 2010 [1 favorite]


RoboZZle and the other programming games are great!

When I was young, I found the main barrier to enjoying programming was the steep learning curve until you could actually get something cool happening visually. There's only so much thrill in writing a guess-the-number game or calculating a factorial.

So I'd actually recommend Flash, particularly using ActionScript 2.0. You can get a little character moving around in no time with Flash, and there are toooons of tutorials on the web showing how to make simple sames. And it makes it very easy to share you work with others -- just upload it to a website.
posted by Herschel at 11:51 AM on April 21, 2010 [1 favorite]


You know, it's a shame HyperCard isn't around anymore because HyperCard (and its scripting language which looks like an ancient ancestor of Actionscript, AppleScript, and JavaScript) is perfect for this kind of exploration. Being able to create applications pretty much instantly was incredibly gratifying as a kid, and then being able to actually write code that did relatively complex stuff was even cooler.

So I second Flash although I think the curve is still way higher than HyperCard. I mean, with Flash you have to spend a fair amount of time figuring out how everything works. HyperCard could be understood pretty much instantly.

Everybody clamoring to get him to learn Python: just because it's a fine programming language, that doesn't make it suitable for this purpose. Python has little or no immediate gratification. BASIC is almost better because it is clunky. Kids can take something written in BASIC and really bash it around. It's the building blocks of programming. Python is closer to the model airplane of programming in that sense. You have to be a bit more delicate and thoughtful when writing stuff in it. I mean, I know that doesn't make sense really, but it just feels more delicate.
posted by Deathalicious at 10:53 PM on April 21, 2010


So I'd actually recommend Flash, particularly using ActionScript 2.0.

Oh dear god no. By far the least pleasant programming language I've ever used. It's impossible to find errors.
posted by delmoi at 5:05 AM on April 22, 2010


Just found this Logo interpreter on the web:

http://www.calormen.com/Logo/

Just in case anyone wants to try their kid out in Logo.
posted by CathyG at 9:06 AM on April 26, 2010 [1 favorite]


« Older Rory's so ignorant of hip-hop he can't make a...   |   So I had a pretty craptastic morning... Newer »
This thread is closed to new comments.