Best Way to Get Kids Started in Programming?
kbh3rd writes: "A couple of my kids are starting to make noises about learning to program computers, just like their old man. 8^D I'm totally unsure how to start out. I'm a *nix geek, but I don't know if they'd keep interest if started with 'main () { printf ("Hello, world!\n") ; }' and command-line gcc. They almost exclusively use Win98 because that's where their games run. I can't believe I'm saying this, but maybe they should start with something where they could get some Windows programs going, like VB (shudder) or Delphi? What language/development environment would be best for kids aged 11-13 who think they want to learn some programming over the summer? And what are some good books they might start with, too? "
In fact, many self-proclaimed OO programmers should try Smalltalk BEFORE trying languages like Java. The fact is that after C(C++) people are so messed up that rarely can write correct OO.
Smalltalk is a two-thumbs-up for anyone wanting to program in OO. (At least it'll put your thinking on the right track.)
Finally, it's simply lots of fun!
My kids currently attend a school that has a mandatory music program because of studies that show kids with music education learn math more quickly and easily.
Since programming is also largely a mathematical pursuit, it should come as no surprise that the two are related. Most of the engineers I know are also musicians...
Yes, but you don't need to use the Lego software. The protocols and whatnot have been reverse-engineered, and third-party tools (like NQC) are available.
Finally, my advice to our asker is to remember that kids rarely find computer programming boring....don't worry too much if they'll lose interest. They will probably love it...most kids do.
Werd.
http://www.mindrover.com Basically you use a graphical programming environment to build small robots which compete in competitions. The game aspects would certainly get kids interested and the programming environment is a seductively easy way to get into modern event driven programming.
__
Oops, I forgot to mention... it's also open source.
sigs are a waste of space
If you think syntax is the major thing you need to learn when picking up a new programming language, you are sadly mistaken. All the college when I was introduced to a new language I was given roughly a day to learn the syntactical structure.
Scheme and Smalltalk are much more than syntactically different. They are different in terms of the fundamental underpinnings of the language (although less so with Smalltalk).
Here's the huge syntactic difference you're refering to:
aBoolean ifTrue: [
b = a;
].
vs.
if (aBoolean) {
b = a;
}
Are you telling me that the average human being can't learn the syntactic difference is a matter of seconds? Certainly, there are larger conceptual differences underneath the hood, but the syntax is not what's killing you.
If you to concern yourself with the syntax, you should know that's Smalltalk's syntax was chosen to make it easily accessible for children, so to the extent that it's relevant it's BETTER suited to this particular task.
The presumption that young children of today are going to be doing C/C++ programming tomorrow is also pretty misleading. Based on the history of language cycles kids of today are as likely to be using C/C++ when they get out in the work force as I am of using Fortran and Cobol today.
sigs are a waste of space
Unfortunately, notable ones like ML and Haskell head very quickly into the arcania of type theory, which may be a bit more math than you want to push at youngsters that are still working on getting used to the notion of abstract ideas.
In contrast, the arcaneness of "pointer twiddling" in the C descendants is rather nasty.
Contrast with the arcania of "program structure" in Pascal, where a single semicolon out of place causes great contortions...
Lisp-like systems have irritating quantities of parentheses. (At least, for the first month that you use Lisp...)
Which all goes to say that all the languages out there have some strengths and some weaknesses.
If you're not part of the solution, you're part of the precipitate.
Instant.
Gratification.
Code stuff. "RUN". See stuff happening. Change stuff. "RUN". See new stuff happening.
Unfortunately there aren't many other good (for kids) interpreted languages out there today. There's VB (not really BASIC and possesses few of the above qualities that made BASIC great). Anyone do LOGO anymore? (ooo! Turtle graphics!) There's the various scripting/batch files of DOS, the *nix shells, but these are text only and lack ***simple*** sound/graphics commands and ***SIMPLE*** ways to read input devices (keyboard, joysticks, mice, etc.) that kids will HAVE FUN[*] with. I really miss the SET() and RESET() block graphics of TRS-80 BASIC. and the commodore 128 BASIC's 'SOUND' statement. HyperCard for the Mac wan't bad for the older kid (16+ year old) programmer looking for new ideas, but I think that's dead now too. What creative tools does the SW industry give kids? Dress barbie or Choreograph the Spice Girls. Blargh.
[*] Fun is really the key. Writing a pong game in BASIC for the C64 was fun because even at age 11, it was doable for me. If programming isn't fun, kids aren't gonna want to do it.
English language, machine: people.
"Johnny, go tell your sister to clean up her room."
I just remembered this old Metallica song. . .
These are my friends, See how they glisten. See this one shine, how he smiles in the light.
Where do people get the idea that BASIC's syntax is simple? It's not -- it's almost insanely crufty. Almost every single statement has its own special syntax.
:-).
It's only BASIC in comparison to FORTRAN -- and thank goodness nobody's mentioned that
Me? I think I'll be using Alice (www.alice.org) to teach; it's very motivating. I'll then upgrade to jPython.
-Billy
There was a game years ago called "Chipwits". It ran on Macs (Plus and older) and Commodore-64s and Apple ][s. In it, one programmed a robot character to navigate mazes, find "food", destroy dangerous critters, and avoid hazards. You programmed him in a graphical language called IBOL which was stack based and which had code size limitations based on both the number of panels available and the layout of icons on the panels. My son loved it. As did I. I really wish I could get a modern implementation of Chipwits!
Dog is my co-pilot.
My first serious programming was on a TI-30. Well, that's not quite right. It was on a slide rule. ;-)
Imho, real computing involves numbers. If they can't do that - or if they don't want to do that - that's cool. Not everyone is going to be a programmer. (I hope I remember that as my little one makes her choices in life.
Graham
Graham
Linux - Fast Pane Relief
For kids who have just begun learning to read, LOGO might be a good choice; it's got a dirt-simple command set, and programming the "turtle" to draw graphics is fun. In fact, now that you've reminded me of it, I think I'll show it to my almost-five-year-old this weekend.
"How many light bulbs does it take to change a person?" --BMcC-->
Nowadays, they have nothing.
Then it it is on to VBS. Just think of the pride that you will have when your darling children send Grandma a wonderful I Love You note on Grandma's birthday. Oh, this just brings tears to my eyes. But make sure, they don't wipe out Grandma's MP3 collection!
Of course, proficiency with the CLI is a must. A kid that can't run a root kit shell script,..., well that's just sad. Unfortunately, kids grow up and will not be adorable script kiddies forever. When your kids start to questioned authority (not the gov, but big business), then they will be ready to move on to bigger and better challenges. I suggest they then learn C. Give them copies of DeCSS and Gnutella (ahh, the forbidden fruits). And don't forget to introduce them to buffer overflows using such classics as the WU-FTP, BIND, and Sendmail.
Finally, make sure they snap up a snazzy nick real quick as all the good ones are being taken.
They'll learn :
--
Here's my mirror
The problem I see with this is that it doesn't really teach *programming.* Sure, you can make it print "hello world," but you can't do the sorts of things that kids generally want to do-- games, screensavers, etc. Basic concepts like loops, variables, etc, exist in Javascript, but they are generally de-emphasized in favor of more practical how-to knowledge.
That's not the end of the world, but I'm not sure it's all that useful when it comes to learning programming skills. You can have an encyclopedic knowledge of HTML tags and JavaScript rollover tricks and still know nothing about coding, whereas playing with basic can teach you many of the conceptual foundations of programming (even if it does stunt your ability to write nice modular code: one of these days I'm going to go look at the BASIC programs I wrote back when I was 10. I can only imagine the spagetti code I must have written.)
I'll agree that Java's a decent choice, but I think the big problem there is that there's too much overhead in making it work. You need to declare objects and functions, learn to use the compiler, declare all your variables, and other fun stuff like that. Graphics are also kind of a pain. On my apple ][, I could do a hline 2,50,3, and it would make a line across the screen. WIth Java, you've got to create a Window, create a painting object and put it into it, and do other stuff I don't remember at the moment before anything appears on the screen.
So I think Java is probably an excellent second language, and it might be a good choice for high school kids. But before that I think something like BASIC is a better starting point.
Because it was introduced to me late in my CS education (long after I left college), I was very slow to internalize the ideas. If somebody had taught me inheritance and polymorphism when my brain was still supple and non-judgemental, and had shown me better examples, I might have been a lot more accepting of it. I bet your teachers might have had experiences a lot like mine. Maybe we need to wait another generation before we have really good OOP teachers.
Kids have enormous mental flexibility, and if you can hold their interest, they can learn an awful lot. Having hacked Python for a few years, I now find OOP totally natural, and I'm not unusually intelligent. It would astound me if it proved to be really impossible for kids to get this stuff.
WWJD for a Klondike Bar?
What first got me into programming was a little program for the Commodore 64 called "Arcade Game Construction Kit" All it was, was this gui thing that let you create sprites and sounds background drawings and make a little top-down run-n-shoot game out of it (think "Rambo"). There was no programming involved, it was really fun and easy, and it got me thinking about things like system resources and what could and could not be done with that particular machine.
Well I enjoyed and used that program so much that after cranking out 3 pretty cool games, I began to outgrow it.
Next thing my dad knew, I turned 14 and for my birthday I asked for the C64 programmer's reference guide (basically a big thick book detailing the 6502 (?) assembly language) and the rest was history!
I didn't really even know about "high level languages" like C until I was around 16.
Absolutely. I started to learn to program in logo on an apple 2e when I was in 4th grade (10 years old). Logo was the only language we had. By the end of 5th grade I was already banging my head against the limits of the language and the computers.
Go ahead and start them out with C or Pascal. Visual Basic, for all its simplicity, has some severe limitations. C, for all its supposed complexity, has a very concrete and clear, if abbreviated, syntax. You don't have to, and absolutely shouldn't, try and teach them all about pointers until they have learned some about programming. By that I mean how to think through the algorithm and structure the program so that it works and is understandable. I think that was the most important thing I learned from the logo teacher I had in middle school. She knew how to teach the programming, completely independent of the syntax.
If you're kids are itching to get into programming, then they're probably smart enough to learn it.
One other thing to remember: It was years (YEARS!) before I ever wrote a useful program. Don't worry about thinking up useful programs at first. Think up programs that will teach the programmer how to program better!
-Matt
-Cheetah
BASIC is a great starter language, because it lets you do exactly what all programming is: tell the computer what to do - and it does it very, very simply. Data structures are important, yes, but only to us people. The real meat is that we tell the computer what to do; everything else is eye-candy and syntactic sugar. Trying to get kids interested in arranging their bytes is like trying to teach them good martial arts - they like the noise their fist makes when it slams into the focus mit, but they don't care about body positioning for better power; just like they will think it's neat if their POKE 54328,15 command changes the background color, but won't care about arranging their integers in a linked list.
You can get kids to practice good body positioning, or make linked lists or whatever, but you can't make them care about it like adults... they are still kids, after all.
As a 5th and 6th grader, I spent hours messing around on Hypercard at my school's mac lab. I don't know if many of you have ever seen it, or if it is even still around, but man it rocked.
Basically, it was like a drawing program when you first learned to use it. You had toolboxes of fill patterns and paint tools, and just drew on the screen. Then, you want to start a new page. Well thats where "cards" come in. Choose the "new card" option and you get a new blank page. Each file you work with is called a stack, as in stack of cards. Then you find you can do things like editing a universal stack background, so all cards will share a background.
Then you start noticing these other icons in the tool box - buttons and fields and such. Instead of having to use the text paint tool to put text on the page, you can make a field that can be moved around, and have its text edited at any time. For easy navigation, you can put buttons on a page and easily link them to other pages. Perhaps make a memo page at the beginning. Neat. Now you know enough to make any kind of powerpoint style presentation.
Many hypercard users just stopped here. But wait! Hypercard had it's own scripting language, called hypertalk. How does that button I made before know to go to that page? Hmm, let's see here, it has a "script" which says,
on mouseUp
go next card
end mouseUp
(note - "go to" meant the same thing as "go". also, you could specify a card by number, id, or relative position to current card)
Actually, everything had an associated script - buttons, fields, cards, backgrounds, stacks - able to control any property and handle any event. I strongly suspect visual basic was modeled after this. Visual basic is more feature rich for designing an application, but man, hypercard was great for a kid fooling around.
The language was great too - it was an autoindent type thing that read almost like english. You could guess what the command for something would be without having seen it before. And you could bring up the messagebox for a command line interface. It was great stuff. By seventh and eigth grade, I had made a chess-playing stack, and gotten into encryption. My friends and I would invent codes, and use hypercard to "implement" them. I had a card with two fields - you paste something into one, hit the "Encrypt" button, and your ciphertext goes into the other. We actually had challenges where we'd invent a code, tell the other guy how it worked, and he'd try to write a routine that would break it (little did I know that this is EXACTLY what cryptographers do). Once we had enough imagination to get past simple substitution ciphers though, we could never break each others codes. Oh well.
Anyways, the thing that made it so much fun was that it was so spontaneous. For kids, you don't want something that makes it into an engineering discipline requiring planning and design. You want it to be like a moist, malleable clay that a person can just sink his hands into and mold and mold and mold...
--
grappler
Vidi, Vici, Veni
- Does
/ban*a*/ match "banana"? Why or why not? - Write a regular expression that matches both "knife" and "knives".
- How many regular expressions can you come up with that will match both "cookie" and "cake"?
- (For kids who are taking Spanish:) Write a regular expression that will match as many forms as possible of the Spanish verb "hablar".
- Go back to one of the regular expressions that you wrote when answering a previous question. What other English words does it match?
You can do a lot of exploring, brainstorming, and analysis with paper, pencil, and blackboard. Then you can sit down at a computer and type grep 'ban*a*'--
"But, Mulder, the new millennium doesn't begin until January 2001."
send all spam to theotherwhitemeat@ropine.com
A resource for those interested in introducing kids to programming - last year, we held a conference for Grade 9 girls, and the sessions I led made use of "The Virtual Family". This applet (and tutorial) was designed to interest junior high school kids in programming, and teach them some fundamental Java concepts while allowing them to mess around in the code, make changes and see the effects. Most of the kids enjoyed it, and several of the really keen ones requested copies for home.
You can The Virtual Family applet from the SWIFT site. They will send you a cd containing the source code and the tutorial (which is the coolest part IMHO) if you sign a NDA.
YS
"Arrr! The laws of science be a harsh mistress." -- Bender
Strongly seconded. Studying existing code lets you experience maintenance, which is a crucial thing to know. :)
I learned mostly from other people's code.
My blog: http://www.seebs.net/log/ --- My iPhone/iPad app: http://www.seebs.net/seebsfrac/
Yes, basic is a real crummy language. Yes, one of the first thing it'll teach you is how to use goto's. Yes, I think it's the best language for small kids. Basic is good for this particular purpose because you can write a working program without learning any theory. It would be downright cruel to give a 700-page Java book to kid who just wants to make something. Basic may not last very far, but it will help your kids to decide if they are at all into programming. Besides, for a programming newbie a program that simply takes two ints and sums them is a triumph because for the first time they can say "look *I* wrote that program".
I think this is a little harsh, like throwing a kid into the river to learn to swim. Although they may learn to swim, their attitude towards you and swimming may not be as desirable.
I think the post about mindstorms is a good idea. Most children have a short attention span, C, C++, Java, etc is not something you can correctly grasp and understand in half an hour while the programming interface that comes on the Mindstorm CD is. Once they get bored of Mindstorms (a few days) you can talk to them and get a feeling for where they want to go from there. Most hardcore or mediocre programmers are going to say "Eww, the mindstorms graphical interface is horrid." while most programmers don't seem to want to admit or remember that they didnt know how to program in a split second. I started off using BASIC when I was 4 and moved onto Hypercard on the Mac when I was 6 or so followed by perl and C then Java. I imagine if my dad had thrown a C book at me I probably would have handed it back to him and loaded lunar lander back up..
Also, don't push too hard, if they don't want to be programmers, let that go. If you push too hard they may retaliate and view programming as something they never want to try again...
Good Luck,
Geoff
I would suggest either of the following
... see http://www.moo.mud.org/ and telnet://lambda.moo.mud.org:8888/ for more details)
LambdaMOO! (a MUD with a single inheritance prototype based object oriented language
Squeak! (original Smalltalk-80 updated with multimedia extensions, a new prototype based UI called Morphic, ability to play Flash, Quicktime, etc.)
Either would teach important concepts of object orientation, prototyping, simple clean syntax, and have direct concrete results that younger people love (in LambdaMOO you can write methods on your "things" to make them do things in the room you're in, etc. and get immediate feedback)
ryan
Lessee... Around 8-10, it was BASIC on a TRS-80. Then, as a HS senior, a semester of C that was all but forgotten. Next, as a sophmore in college who was beginning an undergrad research project, it was FORTRAN 77 on VMS (later HP-UX). As a grad student, it was an eclectic mix of F77 and F90, with an intro to C++ thrown in. Then I picked up PERL so's I could do some personal web projects. Finally, when I got a job as a software engineering consultant, it was on to (PL/)SQL.
I can't think of a one of them that I'd want to START on... Maybe FORTRAN. It's a very straight forward language for the most part.
Eric
Squeak has a lot going for it, but familiarity for Windows users is not on the list. Probably a better choice would be Dolphin Smalltalk; it "feels like Windows" (a good thing in this case), it's a real Smalltalk, it comes with good tutorial documentation, and there's a free (as in beer) version available.
Good news: Smalltalk was designed (back in the 1970s, assuming computers as powerful as we have today!) to be a programming language for kids. Bad news: Really smart kids took to it like fish to water, but most really struggled.
Those of us who cut our teeth on punch cards and Teletypes were used to command line (or worse) interfaces and text programs. Today's kids aren't; even typing Smalltalk programs may bore them.
Consider Stagecast Creator or Toon Talk as a couple of purely visual development environments. They're more suited towards development of games and simulations, but that's a plus if the goal is to get your children excited about programming (probably the right target at first).
Here are a couple of stories about teaching kids to program: This one from Kids Domain has a lot of links to resources, while this one from Suite101.com is an interview (with fewer but entirely distinct links).
Stupid job ads, weird spam, occasional insight at
Where was that area, anyway?
:) And when I had that code.. wow, I was so happy. I remember the long distance calls on my 2400 baud modem to the nearest WWIV distribution site in NC to get the latest version when it came out, as I couldn't wait to get at it.. proving if you are passionate enough for something, you will -want- to learn it, even if you are young and inexperienced.
I remember seeing some article back in the day that listed the most popular BBS software by region, and like, only near Washington D.C. was WWIV insanely popular. Everywhere else, except for CA, it was hardly used at all.
Mainly, I wanted the code.. I wanted to go in and change stuff around.. and man, $70 as a kid when I was 14.. that was a FORTUNE to me. A lot of lawn-mowing and snow-shoveling
As a side note, if you were in the WWIV area, what BBS did you run? I ran The World's Address in Northern Virginia for some time, and started up a network called FearNet, that grew to like 3rd or 4th largest overall at some point - until everyone died and went off to the internet.
BilldaCat
A great tool I have used with my 11-yr-old son is Tcl Robots. Basically, it's a Tk application where the user writes small Tcl procedures to control robot "tanks" around a battlefield. You provide the algorithms for how to move, when to shoot, how to scan for enemy tanks, etc., by writing a procedure in Tcl. The program then runs your tank against other built-in or user generated tanks on a battlefield canvas (the canvas is part of the program, not created by the user).
This has had several good effects: First, the kids are doing actual coding in a real programming language (albeit Tcl, not C). Secondly, they get very quick results in a graphical fashion. Third, several kids can write their own tank code and compete against eachother, which can raise the level of interest by making it kind of a game for them.
I wish I had access to the URL right now, but a google search would likely turn it up quickly.
Python (which is a great, great language) is making a big "Computer Programming For Everybody" (CP4E) push, and you can check out their education special interest group right here. I think it would probably be more appropriate for 7th-12th graders, though.
You can actually find a decent amount of material on Python for education here as well. One great thing about Python is the ease with which you can develop GUIs without using GUI builders. Not that there's anything wrong with GUI builders, I just question whether they're helpful for beginning programmers, who end up spending more time learning the interface of the particular IDE, rather than learning to program.
--JRZ
The subject says it all. They can learn to program while building their own robots. Very cool.
:) I taught myself BASIC on our TI/99 when I was about their age, maybe ever a bit younger. Get them programming or building their own computers at an early age.
BTW, kids are smarter than you think
The best way to keep them interested is to give them what they need to get results quickly.
Start them in a language that has little infrastructure overhead, such as Visual BASIC, or Perl... Nothing with #includes and everything wrapped in a function and all that... Save that stuff for later.
Whet their appetite by accomplishing little things first. Start with teaching them to write a "guess the number" type game perhaps.
As they absord that -- and they will absorb it quickly -- move on to new stuff.
Once they have a sufficiently broad set of "tools" at their command -- basic flow-control (loops, conditionals...), I/O (producing output to the screen, reading user input), variable manipulation -- you can introduce more complex concepts.
It'll be a while before they understand *why* "goto" is generally bad, functions are good, and encapsulation is neccesary to ensure one's sanity but they will gradually get there.
The really tricky part is presenting this with correct timing. Don't go too fast -- they'll get confused -- but don't go too slow -- they'll get bored. And as above, any kid is going to get bored if they can't recognize progress and accomplishment in their efforts.
-JF
MrJoy.com -- Because coding is FUN!
After that you have to find what it is the kids are in to and then give them the right tools. Pascal, Java, Modula-3, Python, and Smalltalk are all great. Simple, elegant languages that are easy to learn.
I would hold back on C and C++ until they are a little bit older, I think I was about 10 when I started to play with C and it was really tough until I was maybe 13 or 14 and started to really grasp the concepts..
I think those robot lego toys are pretty cool, I've never used one but I bet it would captivate the hell out of me when I was 6-12. Hell it might still and I'm, 24.
This is my signature. There are many signatures like it but this one is mine..
Kids that age (11-13) enjoy getting things done and seeing things they created. If you can sneak some learning in there, that's a bonus. If little Billy can sit down at the computer and 15 minutes later have a compiled program that does something cool, he'll probably stick with it. If he spends 45 minutes getting compile errors, he'll probably walk right back to the Dreamcast. I think VB would be a great way to start a kid down the road to geekdom.
-B
Programming is one of the hardest things that we have ever asked the human mind to do. We are not built for the kind of internalization of flow and structure that it requires, and we are certainly not built for the level of perfection it demands.
As such, not every one CAN do it, and most that CAN do it, CANNOT do it easily, or well. (this is true, how many gurus do you know? How many midlevel people do you know? I rest the case.)
So we need help. And like everything else that people do, learning this task requires that we internallize certain things. If I am a golfer, I will be forced to internalize a representation of the ball and my club if I intend on getting good. This does not mean that I will be aware that I have done it, but If I want to be able to plan consequences, I have to have an internal model.
So in programming, if I am to become a Programmer, as opposed to just playing with a toy language for a bit and dropping it, I have to internalize as accurate a model of how a computer works as possible, and that means Data Structure and Flow Control.
I cannot do anything so rediculous as "Programming the way I think" because I AM NOT A COMPUTER. If I programm in a way that works, and seems to be "The way I think" then it is because I HAVE LEARNED TO THINK THAT WAY.
So, In conclusion, it is not programming languages that *should* force a programmer to think in certain ways, it is Programming At ALL that DOES force a programmer to think in certain ways. And programming is what we want to teach.
---
"Elegant, Commented, On Time; Pick any Two"
-- Crutcher --
#include <disclaimer.h>
Also, while I'm at it, games are always a big plus. Kids love to hack games. Go to your local BestBuy, since I know they sell them, and pick up whatever's the equivalent to "Game Programmer's Development Kit". i first saw it in QBasic form, where it would come with an IDE, and the source for a bunch of games. These days they have a similar thing out, only for Java.
www.HearMySoulSpeak.com
It may not be as fast/whatever as C++, but the tools are free, and its way better then visual basic
ReadThe ReflectionEngine, a cyberpunk style n
I started programming when I was 12.
:P C and C++ came very natural after assembly!
:)
* I started by writing small programs and games in Atari 800 XL's BASIC.
* I tried to learn Assembly, but I just couldn't understand all those wacky mnemonics. Though, I did write some hardware code.
* I wrote with AmigaBASIC on the Amiga500. My next language was AMOS, which I still find to be pretty good as a BASIC variant.
* Then I learnt 680x0 Assembly, and I wrote intros/demos with that, and learnt hardware access. 3d gfx was my fave.
* I learnt C and Pascal on the Amiga. I was using a pirated version of the SAS/C
* I was forced to program in Pascal and Java in Comp. Sci. undergrad. But I insisted on C++. I also enjoyed LISP/Prolog a lot, I think LISP could also be a good starter after assembly!!
* I now code mainly in C++, but have an interest in new / interpreted languages and lang. design...
So, that'w how my evolution went. I strongly suggest *clean* and *featureful* BASIC variants with which they *won't* be making GUI's but plain graphics and games. That's how you get to learn real programming (He he, demo scene rullaz!)
Then, the kids will want to check out networking, and they can practice with Perl about TCP/IP stuff, I guess. (Not so scary)
Java may seem like a pedagogic device, but avoid at all costs! It sucks. It will distract kids from the joy of programming, too dry... (Juice is what we're after, right?) [Java zealots write to my e-mail addy and if you're a Sun executive you get special treatment!]
Don't tell them that C is the ultimate language; it isn't. Let them play with the following paradigms in the evolutionary order
* Procedural (BASIC, Assembly)
* Functional - Symbolic (LISP, PROLOG!)
* Data driven - (FORTRAN, C)
* Object Oriented/Generic (C++, Ada...)
That will get them to understand why that language is done that way. The best is to pick one language from each generation of languages... BTW, as you see there isn't another generation after oo/generic languages, because there isn't.
If you show them a RAD tool, they will think that programming is all about GUI's and databases and trivial networking. It isn't. It isn't. It isn't. Get them to read some computer science stuff, like sorting algorithms (even consider some excrepts from Knuth!)
This will get you going
--exa--
I started ata bout 8 years old. My grandfather gave us his old Franklin Ace 1000 he was retiring in favor of a brand-new spiffy (*gasp* IBM XT). I used the machine for some games and stuff, and i wanted to make a couple games of my own, but didn't know how. Luckily both my mother and my 3rd grade teacher knew BASIC and they both taught me what they knew. This was enough that i could make a text adventure (more like a choose your own adventure story) where the program would output some stuff, and then prompt the user to choose among a few options of what they wanted to do next. THen i made it a little more complicated by using the random number generator to make some of the decisions, and then i went a little further by doing some calculations (as in i'd ask the user how much fuel they wanted to buy, and kept track of the usage...)
I think that starting people in a text environment is good, because it provides a liniar, Input->Proccessing->Output flow model which will help them later in life (i run into a lot of programmers who started with threaded GUI environments who can't make or read a flowchart to save their lives, and who can't debug a simple state machine). These more threaded/event driven models are best learned once one has a good handle on logic and program flow.
Also the text adventure format is nice because it is rather timeless. I still fire up and play some of the old text adventures i've played since elementary school (i'm 21 years old now, and working full time as a programmer) but all those years don't take away from the appeal of a good text adventure.
After i had that down, i did most of my other learning (except for a pascal class in middle school) on my own. I took apart existing code (something that was possible then, and now due to open source, is possible again). I read books at the library. I talked with others with an interrest in programming. If anybody had told me it would be a marketable skill, i'd have laughed at them, but it has provided me with steady and decent employment for the last several years, so go figure.
Now i think that starting them in BASIC may be a good idea still, but i would go for a console based BASIC rather than a GUI based setup. I also think that moving to C or C++ should happen before GUI stuff is added. But most of all, don't rush them, give them the seeds, and they will pick their own direction, etc...
=:-) -lars
---
Play Six Pack Man. I
First of all I'd say you know your kids best and you should best be able to know what would interest them and what would turn them off. Also you can ask what they want to know or be able to do.
However, you can't always work that way. Before you can do the really exiciting things like writing games like the ones you play, you have to start with the basics.
All that being said I'll offer how I got started if that can be of any help. My first interest in programming was when a friend of mine made some program that did some calculation and showed the class in 5th grade. To put a time line on this I am 19 and a college sophmore now. Anyway, I asked my dad to teach me how to program (he is also a computer person). He started teaching me GW-BASIC from a book. We would go through the book together and do the exercises, I could ask him question, and I after writing something pretty much out of the book I might decide I want to make it do something else and we'd figure out how together. I still have the 5.25 floppy with all my first programs. They mostly printed my name repeatedly in random colors or drew stuff.
BASIC is a terrible language but it is meant to be a teaching language (*Begginers* all-purpose symbolic instruction code). I don't know if that is still a usefully way to start (with QBasic) because when I learned people still used DOS, but I think you have to start with text based stuff which is simple before you use graphics and Object-Oriented environments.
When I was in 7th grade I started working in QBasic and learned alot from a friend who was amazing at it. I read his code, tried to emulate some of the techniques. I got VB2 and learned a bit about how windows worked.
In High school I learned PASCAL and C++ but alot of what I learned an figured out had little to do with the teacher and more to do with my ability to take what I had previously learned and figured out about programming logic and use the Borland C++ help files to help me apply it to C. Eventually I replaced VB with BCB. A friend helped me get started with Linux but after a while of asking him questions all the time I became self-sufficent. I have taught myself Perl, PHP, MySQL, mantaining a linux system, and an Apache webserver all in the last year.
You've just written another book.
Has VA realized this revenue stream yet?
--
+&x
Alice is a lot of fun, and a useful learning environment, but it tends to make your system unstable.
Q: "My machine's messed up, and I don't know why."
A: "Try uninstalling Alice"
is a somewhat frequently heard snippet of conversation around CMU.
--
Forward, retransmit, or republish anything I say here. Just don't misquote me.
Webmonkey has a good javascript tutorial:/ javascript/tutorials/tutorial1.html
http://hotwired.lycos.com/webmonkey/programming
they also have a kids page but it's all html, no javascript yet:
http://hotwired.lycos.com/webmonkey/kids/
When they start getting annoyed with the limitations of javascript they could easilay move into java.
- bridgette
get them hooked on computer games... all of them, but especially the classic brain-bending ones... Like Zork or Enchanter or any Infocom games, Ultima III,IV, etc. These games challenge young minds and make them want to further explore computers... Get them hooked on the games, and they will want to learn how to code. Alternatively, get them hooked on music, there is a strong correlation between good coders and music.
... hi bingo
When I was 12, I started learning Basic in school (on Apple IIs at school, C64 at home). I quickly realized that Basic would not permit me to create the games that I could buy at the store. That made me wonder what those were programmed in. Asking around a bit, I was introduced to assmebly language.
Not realizing that assembly was supposed to be too much for a kid, I bought a C64 programmer's bible (which covered the assembly instructions) and started teaching myself. In no time, I had a working knowledge of assembly, and from that point on, I've been in love with programming.
The great thing about learning assembly early is that it makes learning other languages (Fortran, C, C++, etc) not seem so forbidding.
Steve
Democracy is a poor substitute for liberty.
I haven't tried it, but I too think that HTML/Javascript might be a good idea. It has some features that are good for beginners, if not for more mature programmers, like not having to predeclare variables.
It also scales nicely: you can start writing straight-line "global" code, then introduce functions, then introduce objects.
It also teaches C syntax, which will help get them into Java and C later.
You can build displays in HTML/CSS, which don't really require programming skill, and then script them with Javascript. That's a nice learning curve, and gives you nice concrete structures to manipulate with your programs.
You can build interfaces and graphical stuff (very COOL graphical stuff soon, with SVG), and do lots of other things, using the powerful libraries built into modern browsers.
Another nice thing is that when you've done something, you can put it on the Net and show all your friends, or email the results around.
Also, these skills are very useful and marketable.
A lot of good suggestions so far...
However, what I think would matter far more than just teaching a child to program, would be to teach them to think logically about solving problems, and to use those solutions for similar, future problems. This style of thinking will help them in every area of life (and, regretably, possible stunt them in other areas - anyone who has tried to work logically with their non-logical SO knows what I mean).
Don't push them, if they don't like it - let them seek thier own level. You sound like that kind of individual already, noticing their clammoring for wanting to program.
Depending on their ages/interest - you might try starting them out with a Mindstorms set (I know others have suggested this) - let them play with the built in system/ide that it comes with, then progress them into something like LegOS or NQC - to teach them further coding fundamentals. Always answer thier questions, and if you don't know something, tell them so (they'll appreciate you honesty), but also tell them you'll find the answer - then go out and find it.
After playing with these languages on Lego - if they are still interested, you have a couple of ways to go - you could go the route of learning real robotics (progress by building a parallel relay box, hooking the Lego motors to that, then code in a regular languge, such as C/C++, to control it all - then after that, move to using a soldering iron and tools more to build real robotic devices), or take the "virtual" robotics route, and lead to small scale AI for game programming (game programming can teach a lot about many programming side areas - DB management, arrays, sound, graphics, etc).
If they enjoy tinkering and building their own stuff, Lego is especially the way to go...
Reason is the Path to God - Anon
There's no point in thinking about what languages are currently popular in the industry, because if you're dealing with ten and twelve year olds by the time they're adult something new will have come along. This industry changes rapidly. But the fundamentals don't change; algorithms are algorithms whatever language you write in, and ideas of structure, modularity and granularity are fundamental.
So any of these things would in my opinion be good choices:
I personally play with and hugely enjoy Lego Mindstorms, but I don't really think it's good for kids. The programming system which comes with it is really poor, and none of the programming systems which other people have developed for it really seem suitable for kids - except, possibly, a smalltalk-based one which only runs on Windows and consequently I haven't tried.
I'm old enough to remember when discussions on Slashdot were well informed.
I quite agree. But graphics feels more cool when you're 10 or 11 so be sure to get them doing something interesting like that. (Mandelbrot set? Just tell them the rules they don't have to understand the maths). Also, make sure there's plenty of example code around for them. I got really frustrated when I was 10 cos I couldn't get scanf working properly. Some example code would've been great. What I would've done for some free software code like there is now! Gah, kids have it easy these days
perl -e 'fork||print for split//,"hahahaha"'
This is tough. I started with BASIC on my TI99/4a back in '82 or so. It was bad. The Extended BASIC was pretty good. I could do lots of graphics and animation which kept my attention and kept me wanting to program more and faster stuff. I briefly did a little Forth, then assembly language. Many years later I do Java primarily, some C, and some Python.
My son is 5 months old. I have a while before I have to deal with this, but I would prefer he learn a language without goto's (or at least doesn't need them much). It would probably help kids if they didn't need to worry about variable types. I don't want to have to explain the difference between a long and short to a 6 year old. Python comes to mind, but python have cool libraries that your kids would like? Graphics and animation appealed to me. I doubt they will want to jump into file I/O or database interfaces.
What ever happened to Logo? Another thought: what is used to program Lego Mindstorms? That would probably interest them.
-tim
My first official procedural programming class was in Pascal. Pascal was designed as a language for instruction and it does quite well for that purpose, leaving complicated things like pointers under the covers (but still accessible if necessary), while supporting clean and intuitive top-down procedural design. Of course, it isn't object oriented, which is where Delphi comes in. Delphi is Object Pascal, the OO superset of Pascal. So Delphi can first be used to teach the kid normal, procedural console programming. Then graduate them up to OO concepts. And then onto full OO RAD GUI design. Delphi is really great in this respect...you can go from the very basics, to creating a full-blown OO and/or GUI app really painlessly. You don't have to expose any of the complicated stuff early on, unlike with C and C++ where you must have a tome of knowledge in your head, and a penchent for reading cryptic runes before you even create a Hello World. The language scales ;) As is evidenced by the fact that Delphi is (or at least was, last time I checked) Borlands #1 selling product. Plus, Object Pascal is being brought to the Linux platform with Kylix, which is a great bonus, and will provide a smooth transition (hopefully) for moving from Windows development, to Linux development and understanding.
I really started with BASIC, but I don't think that is the ideal beginning language. It is loosely typed and doesn't give the same intuitive structure Pascal does (we should not have to explain the peculiarities of "DIM" and "REDIM" or the weirdness of different starting indexes, or that a type of variable can be denoted by the symbols $, #, !, %, & (*UGH!*)).
It's 10 PM. Do you know if you're un-American?
VB is an excellent language for teaching, as long as it's taught right... which, unfortunately, it almost never is. VB courses always seem to get hung up on windows and widgets, and hip technologies like ADO and web front-ends. Object-oriented concepts often don't come up at all, even though VB is about 80% as object-oriented as Java (and the next version will supposedly be 100%.)
Maybe the solution is to use VB, but forbid anything "visual" until the students are comfortable with programming. MS has a library floating around somewhere that lets you do console I/O using COM (I think it's part of the WSH,) so it's not too hard to write a full-fledged console-only app in VB.
MSK
I learned BASIC on my Tandy CoCoIII when I was 10.
Way back then we had to use things like gosub and line numbers. I think QBASIC comes, slightly hidden, on the Windows CD, or you could teach them pico, and use basic on *nix.
A very high level language like basic, or pascal is definately the way to go when teaching beginners, especially young ones. Even if you can't re-use code when you mature, you keep strong programming concepts such as loops, arrays, functions, subroutines, etc. Which make other languages much easier to get into.
hint: don't teach them about pointers and objects, ok? (-:
Personally, I'd recommend teaching an object oriented language first.
:-)
Don't get them started on the procedural path for a number of reasons:
1. It's slowly dying out.
2. It's a lot easier to grasp procedural after OO than the reverse. (since any OO language can be reduced to a procedural language.)
3. There's no reason to follow an evolutionary path. Just because we did things in a certain order doesn't mean our kids have to repeat our mistakes.
4. OO languages almost force a better methodology when designing code.
5. If your kids program some good ideas in an OO language, they're easy to steal for work.
Kids don't need to understand why a language is done a certain way. If they want to know, they'll ask, but there's no reason to teach them hieroglyphs and then move on to the alphabet so that they'll understand why the alphabet is used instead now.
Give'em the most advanced tools available.
Give'em something they can get immediate results from.
Give'em something that doesn't teach bad habits for the future.
KWiL
That Jesus Christ guy is getting some terrible lag... it took him 3 days to respawn! -NJ CoolBreeze
it seems so obvious - has someone done this? is there a Mac or Linux front end I give to my kids?
In my experience Mindstorms works great. My son and I used Lego Mindstorms to build a mini-sumo robot and beat 17 other entries first time out! We have also built and programmed numerous run-around the floor robots and a bar-code reader/candy dispenser. Several things are good about Mindstorms. You can build active, interesting *fun* robots, and fun is *most* important. You see the results of your program in a real manifestation (show me a 10-year-old cares about "Hello World?"). The Lego programming language is very drag-and-drop visual, and is dead simple to get started with. Once you get going there are several other languages to use. I use NQC (not quite C) which has a very c-like syntax and a reasonable programming environment called the RCX Control Center. More info on NQC is at: http://www.enteract.com/~dbaum/nqc/index.html . There is also a Forth variant and another low-level language called, I think, LegoS. The last 3 all run under linux. NQC also works with Windows.
If you get interested in robots, there are several systems based on a series of microcontrollers called BASIC STAMPs. These, as you might guess, are programmed in versions of BASIC (running under DOS). The advantage here is you can teach some electronics fundamentals along with the programming, again in a real-world environment. the Robot Store, http://www.robotstore.com/ has lots of resources.
I don't say java just because I do it. I say it because it's a middle range language.
If you learn java, VB is easy. Cold Fusion is easy. The syntax is similar to C. It really has a great sense of programming logic to it.
Java is great online, it has inheritance (woohoo!), networking built in, it's multi-threaded, it's FREE, it's growing so rapidly.
Java is expanding into neat stuff like speech recognition, telephony API, JavaTv API, RMI (remote method invocation), embedded stuff, OS work, (cute mascot), etc etcetc...
java is free, abundant, and useable.
Fook!
The price we pay for immortality... is death. Narnia The Great Fall
You may want to go a little simpler than game programming, especially in windows.
Perhaps, a diary program or CD inventory program? This is something that could be accomplished in a couple of nights (with dad's help). Once they had a success you could better judge the next move.
If you have Office 97 or later, you can do most of the VB programming tasks through VBA. It simplifies some of the more mundane(?) tasks and may be easier to handle. (In addition you do not have to buy VB.)
Of course, a completely unrelated option may just be HTML/XML. They could build some web pages and post them to a free site for the world to see. It may not be the same a programming but it may hold their interest. If they really dug in you could move to JAVA.
My daughter, thinks I play games all day. Don't be disappointed if at 11-13 they do not see the thrill in what we do.
That's a harder question than it sounds. Of course, the obvious answer - for its simple syntax - is BASIC in some form, and visual basic would give very immediate and easy results. But of course, VB is evil for the bad habits it teaches, and for the sheer stupidity of the limitations it puts on you.
:)
Were it not for the lack of a GUI interface for it, I would recommend perl, since it has both very readable syntax and quite good structure.
C (or C++), of course, would be great, but kids are likely to get turned off quickly with the relatively arcane syntax and having to debug problems with pointers and missing semicolons...
But overall I'd have to say Java is your best bet. It's fairly quick and easy to whip up an applet (easier than C++ in many ways), and it's fairly easy to add little tweaks in, but it's also quite deep and can get them into OOP and efficient (size/speed) programming.
And what's more, you can write a pretty-looking applet in relatively few lines of code. And it's portable - unless it's MS J++
---------------- Take the red pill
I think that it's a bad idea to overestimate them, too. Give a kid a linux box that he can't understand, and he might just become frustrated and use NT. That would be very sad.
SO, my advice is to challenge children in moderation.
Just my two cents.
No comment at this time
LOGO. I'm not kidding. It's the most accessible, instantly gratifying language to learn basic programming structures from.
And now, there's StarLOGO, developed by the MIT Media Lab. It's an OOP version of logo, where you can have tons of turtles running around. Each is an instance of a turtle object whose behavior you define. Individual patches of territory are incarnations of objects, also. You make up rules for how turles and territory affect each other. It's terrific fun, and has even been used for scientific simulation.
There's no better way to introduce a youngin' to programmin.
Delphi would probably be a good choice. The underlying code is Pascal, which is designed to be a teaching language. Being able to create visual & interactive programs will keep their interest more than commmand line stuff would. If they enjoy that, move them up to C++ Builder, so they can learn a language that will be useful later on.
human://billy.j.mabray/
"Every good system has a backup." -- Dale Hanchey
Note that I generally prefer programming in C++ for my own applications for various reasons (I like manual memory allocation and pointers, and tweaking code, and stuffing bits and stuff) but that's not what a beginner needs to know about, they need to get stuff running quickly and easy without ever having to reboot their machine because of a pointer bug.
I'm not sure what are the right books for a kid, maybe "learn Java in 21 days".
One nice part is that once you teach them how to write an Applet they can show off to their friends on their web pages.
For an IDE, I suggest MetroWerks CodeWarrior for Java. Get CodeWarrior Pro if you want to do C++ too. CodeWarrior supports a variety of processors and OSes. When they move over to Linux (and they will move over to Linux after your gentle urging), they can use the CodeWarrior IDE on Linux for a familiar UI and won't have to write makefiles.
That's the other thing - first way to scare off a beginner is to require him to write a makefile to compile a project.
Mike
-- Could you use my software consulting serv
I agree, but programming from a shell account has it's downfalls.
One of the things that would have to draw kids to programs is being able to see their output. This isn't as easy in Windows as it is in Linux. I think the best thing would be to get them doing some GTK+ stuff, some QT stuff, maybe a little Motif stuff, that way, they can see what's going on. Making it more visual is only a bonus.
I started doing BASIC when I was 5, and that was cool. But when our instructor showed us how to draw things on the screen based on our input, that's when it really blew my mind! That was what made me want to program.
Brad Johnson
--We are the Music Makers, and we
are the Dreamers of Dreams
Brad Johnson
I'm in total agreement here -- Lego Mindstorms is an ideal way to start a child with programming. The only drawback I can see is the expense.
The programming environment that comes with the system is a very simple GUI that runs under windoze. That programming environment is fairly limited, and your child will probably outgrow it fairly quickly. Once that happens, you can introduce him or her to the more advanced methods available to program the system, including Visual BASIC, pbForth and the various Gnu compilers under *NIX using legOS.
There's also a web page at http://www.crynwr.com/lego-robotics/ that has links to lots of other programming environments for Mindstorms.
You also might be interested in MicroWorlds. It's a commercial product by LCSI. It's based on Logo and includes a great IDE for multimedia-web-authoring; there's also a Pro version for older kids. Their approach to children education is constructivist, meaning that students will have more meaningful learning experiences when they work on projects that interest them and have a cross-disciplinary approach. It's basically learning by doing not by listening to some boring teacher.
There are tons of projects for kids to pursue on the LCSI website. So your kids will not only learn programming but multimedia authoring, project management and, of course, math, biology or whatever science(s) their project is based on.
There are English, French and Spanish versions of the software. I highly recommend checking LCSI products out. One last and important note, LCSI was founded in 1981 by professor Seymour Papert.
"All the things one has forgotten scream for help in dreams". Elias Canetti
10 PRINT "HI THERE"
20 GOTO 10
The is apparent in everybody's first BASIC program. But the problem is only if it is overused. There is absolutely nothing wrong with GOTOs if used responsibly (i.e. the code is still readable). I think for infinite loops, a GOTO is more than justified.
And to think that after using GOTOs for loop control, that a kid won't be able to take the plunge into structured programming is just bunk. I had my TRS-80 until I was 16 and learned Pascal in high school. I must say that my early BASIC programming experience was a *huge* advantage over the other students, who largely had no previous exposure to programming. The gap between BASIC and a structured language like Pascal was a very small one.
If you want someone to learn a language fast, and keep them entertained for a while, give them an old TRS-80, or Apple II, or C-64 along with a game programming book from the mid-80s. Once the need for more power comes around, it's time to haul out Pascal for some structured lessons. Finally, once the need for "real programming" rears its (ugly) head, it's time for Java's introduction.
"Evil will always triumph over good, because good is dumb." - Dark Helmet (Spaceballs)
But then again, all I had was an Apple II (not even the +). Delphi is close enough to Pascal that it might be good - structered language, some OOP.
BASIC gets you into that GOTO thing, which is really poor programming. Better to start kids off with a good simple, yet structured language.
-- Ever notice that fast-burning fuse looks exactly the same as slow-burning fuse? I didn't... (Edgar Montrose)
Yup. Start them on something fun. I started programming on an old hand me down Creative Apple II computer (that was when Creative was still making apple II compatibles). Its graphics and sound were state of the art for its time - it even had a Text of Speech synthesizer which could speak english and mandarin (mandarin speech synthesis worked very well due to the regular phonetic nature of the chinese language).
I started programming in Basic, reading the arcane user's manual - which didn't help much. Then I discovered that many of the games were written in Basic, and by listing the source code, new worlds opened up. It's a real pity that the same is rarely possible today... who knows how many potential programmers are lost because of the closed source nature of games today.
But I preferred Pascal, to write games for DOS 6 (win95 was very recent, 320x200x256 was a good resolution).
Now I use Perl most of the time.
--
--
Stay tuned for some shock and awe coming right up after this messages!
The classic young-programmer's languages seem to be BASIC and LOGO. Both are good.
If you want to start with something a little sexier (as it were), how about Java. Simple text-based software is about as easy to write as BASIC. Fancier stuff is fairly easy. They can work on that Win98 box or a UNIX environment easily. There are some decent IDE's available.
All that, and they'd be starting off with a solid OO basis to boot.
I'd also recommend that any new programmer spend some time in Lisp. Not as a first language. But, when you get to the point where you start playing around in languages, make Lisp one of the first. I think it really helps a programmer to think in the very data-driven model once in a while.
I have to agree with the comments about getting hold of the source for something they'd like to modify. I fondly remember stripping the sound out of MS BASIC games so we could play them in the lab without being noticed.
Good Luck.
If your kids have access to any sort of Macintosh, they should definitely start out using Hypercard. If not, visual basic is the next best thing. It will teach them basic programming concepts in an environment which is not too complex for them to understand or too boring for them to continue with. There will always be time for them to learn more complex, non-visual languages later, but start them off with something simple. After all, the goal here isn't for them to write some specific useful program, but just to learn basics and develop an interest which will serve them well later on.
C++? I know that obvious objections are that C++ is too complicated for children, but I can argue for it.
In C++ you can have close to immediate feedback, necessary because of the TV shortened attention span of today's kids. Teach them how to g++ helloworld.cpp and they can start with quick programs.
You can scale C++ very easily. Add functionality by linking a library. If they want to learn GUI, just link in toad or kapplication or whatnot. New math features? Show them how to create a library and what it does.
Very important, C++ lets you be somewhat creative with your code. It lets you skin the cat in new ways. So you kids won't get stuck worrying about rigid pascal-like structures (this can come later).
Though I am a diehard C programmer, C++ is now old enough that books are no longer showing non-standard features that aren't in the spec (a problem when trying to learn newborn languages).
He is learning control structures, IO, scoping, regular expressions and simple data structures. This is all with some very simple programs, that don't do much of anything, yet.
--
I grew up with my trusty old Commodore 64, so the first language I learned how to proram in was BASIC. I believe that it's a rather good language to start off in, because pretty much everything about it is so simple. Plop your kids down in front of an old version of QuickBasic and give them a Intro to BASIC book from the discount rack... it should be a great introduction for them.
-- Dr. Eldarion --
It's not what it is, it's something else.
I disagree. Classic interpreted BASIC is interactive. You get instant feedback when you do something wrong. In fact, you can type in a command and watch what it does at any time. There is no compiling, no linking, no libraries, no GUIs, and no lists of cryptic error messages. You don't have to master a complicated editor, and there a no makefiles.
This makes Basic very approachable and unthreatening. A "segementation violation" or "unhandled exception" could be a little intimidating to a 12 year old.
Once they understand variables, operators and their precendences, file I/O, etc. they can graduate to a better language. There's no point in teaching engineering design concepts when they still don't grasp the concept of arrays and output formatting.
-- ;-)
Kuro5hin.org: where the good times never end.
I liked my Apple II+ a lot, but got bored of AppleTrek and Lemonade Stand, so I started reading the Apple Basic book and loved it!. I made a Christmas card in Basic and ... that was it. I was hooked.
Then, in High School, we had a SWTPc Uni-Flex multiuser computer donated to our school. It was great!
Many of my best friends were made in the computer room before, during and after school.
When I started thinking about a job, it was not hard to decide what path to take...
-- @rjamestaylor on Ello
If you want someone to become a cool hacker they should learn Assembler or C.
I believe children should start with recursive and functional languages such as prolog and lisp. You can always find out about computer architecture and learn C or Assembler, you can find out about data structures and learn C++, you can go MOP and learn Java or you can aim for RAD programming and learn VB but if you want a person to learn thinking - teach them Prolog and Lisp (or at least Scheme.) It is fun too.
You can't handle the truth.
Agreed. Educators are switching to Java left and right. Your kids can start out by doing cool GUI stuff and then moving on to cool server-side stuff and make their parent proud :-). It seems to be especially suitable for you, since in some ways you can think of Java as sugar-coated C. I recommend a book by Deitel & Deitel, which is great for beginning programmers. Can't remember the name tho.
People at XEROX PARC during the 70's were doing great research teaching Smalltalk to kids. If you interested in teaching kids how to program, you must see this video. The video shows ten year olds writing useful programs.
The Apple Advanced Technology Group did impressive work with Common Lisp in education during the 90's.
tcd004
Here's my Microsoft parody, where's yours?
I agree...or even a number of other robotics kits from companies like Parallax...most of Parllax's bots use microcontrollers programmable in basic. The ability to visualize your routines in a physical manner(such as an if-then-else for a robot's 'feeler' arm) can be a great tool. Along those lines there are many, many preassembled robotics kits that use very very easy to understand fuzzy logic...not so much programming but it's a great tool to teach kids(people) to think ahead and think in a 'programmers mindset'.
;) )...albeit not as point and click as VB is for constructing GUI's..but it certainly will teach them OOP easily enough.
;)
This of course strays away from computers, and maybe your children don't like electronics or robotics at all...but I've found it to be a good tool.
Like the posters above, Id have to say Python if its a strictly computer language...its a Very High Level Language(tm) and as you show a concern for Windows...the win32 version has tcl/tk support included and is very easy to use(and cross platform!
And like other posters have said...I wouldn't hesitate to throw BASIC at them...when you throw something with somewhat more restrictions in built-in ability into the mix, it forces you to think more creatively and ultimately to develop innovative ways of doing things...hell..you could even go grab them a couple of old Tandy1000's(what I learned on) or a C64 or an AppleII....if they don't already have their own computer to play and experiment with.
G'luck
And if you are going to start them on Windows then you should look at Mark Hammond's WIndows extensions. Particularly PythonWin, a nice IDE. You can compare it with IDLE (that is Guido van Rossum's crossplatform IDE).
http://www.python.org/windows
A good Python book for beginners is David Ascher and Mark Lutz's _Learning Python_
Trent
Get the best of both world and use Lisp. It is thrice (does this word exist?) easy, powerful and interactive. And functional programming gives a good incentive to structure your programs well.
A lot of people will say. yeah, but Lisp suck with all its parenthesis and its prefix syntax. Maybe but the latter is mainly because you are used to infix by other language and don't want to/can't learn new ways of doing things while the former may not be the most aesthetically pleasing to some but really helps checking you got everything closed correctly with any editor able to match parenthesis.
So I would say go for Scheme, given that it is basically a Lisp designed to be clean and to have as few concepts as possible at the base.
"The obvious mathematical breakthrough would be development of an easy way to factor large prime numbers." Bill Gates,
There are also some nice aspects of HTML which might appeal to newcomers, and especially kids. First of all, HTML is very forgiving, which is nice for a youngster ("Daddy, what's a GPF?"). Another is that they can post their work on the Internet instantly and show it off to their friends. A subtle (but important) lesson of HTML is that it's possible to obtain immense enjoyment out of something which is both free and relatively simple. Finally, HTML certainly has more practical value than a typical beginner language like BASIC or FORTRAN.
HTML also serves as a good launching point to learn a more complete language like BASIC or C: you understand that with more power also comes more complexity, and a greater potential for harm. Furthermore, the learner will already have multi-language experience and understand that different technologies are best suited to different tasks.
I didn't start programing as a kid. My first language was APL. My second was BASIC on a PDP-8. The interpreter took up most ot the 8k memory so I had to learn assembler to get anything done.
By far the most instructive experience was with pdp-8 assembler. The 8 only had 5 commands plus a few 'micro' commands. What I liked about the experience in retrospect is that it taught me what computing is, in the sense of a logic machine, as opposed to a 'number cruncher.' At the machine level there are no numbers. Memory was so scarce that I had to look through the compiled code to find 'code' that had the bit pattern I needed to use a 'numerical' constant since there was no room to store a constant as such.
As much as I loved the old 8, and miss its simplicity and purity of essence, I'd never suggest anyone teach their kids to program on one. Still, I do think that it is better in some ways than things like VB, especially Wizard-driven app-generators. I just don't think kids can learn much from such experiences. Dragging, dropping and filling in some blanks doesn't build understanding or creativity. And its so distracting, bright colored buttons, beeps, boops and inscrutible error messages dialogs poping up from nowhere all of the time.
I suppose it boils down to what you want your kids to take away from the experience. My intuition is that they would be best served by learning programing in as abstract a way as possible. They don't need to know much arithemitic anymore, that is all done by calculators and spreadsheets now. The interesting, difficult and creative skills instead concern how to express your understanding of some situation in a logical manner (a good computer language) in order to acheive some purpose. Such a lesson would be worthwhile even if computer programming becomes obsolete and your kids never ever have to program anything in their later lives.
So, what language? I haven't seen it mentioned here yet so I'll suggest Perl. Of the languages I've known and used, Perl is the one I feel most creative with. It has the advantages of BASIC in that its interpreted, but its a much richer language that comes much, much closer to behaving like people think than any language I know, complete with depth, ambiguity and astonishing power. You can even write poetry in it that does something. Also, the Camel Book is one of the best-written computer books I know of. The glossary is a hoot and a half all on its own. I think a kid could learn to love Perl. Perl also has graphical hooks (Tk/Tcl, gtk), if they want that route (controlling Gimp via a perl script is a show stopper). There are tons of Modules to play with too. Something else here too, each module, and Perl itself, are attached to real, human personalities, not some anonymous marketing droid in Redmond, so there is a sense of community you'll never see in VB.
Another posibility is Logo. I think this was designed especially for teaching. Turtle graphics were meant to teach recursive algorithmic structure. I played with it for a while and its quite nice in some respects. Drawing trees and Sieiepinski(sp?) triangles was fun, even for a jaded old crank like me. What I liked about it was was that while I was using it really changed the way I looked at problems and sought solutions. A good dose of logo can change the way you think. Look at the book "The Algorithmic Beauty of Plants" sometime, this could help connect their learning with the usual appreciation of nature kids have (How does an acorn compute an oak?) I know a friend of mine's kid started on turtle graphics in logo in second grade and he liked it. There are implementation of logo for unix, windows and the Mac, along with pretty good manuals and tutorials.
Despite having a reputation for being very unintuitive, I recommend GVIM as the editor to use. It is a wonderful piece of software, and if the beginner hasn't developed bad habits by using another editor it should be easy to learn.
The beginner should write HTML that complies 100% with a DTD, and use validator.w3.org to verify compliance. The best document type to start out with is probably HTML 4.0 Strict.
Only once a beginner has learned how to use a text editor, and can code clean HTML should they learn to program.
My primary suggested language for beginners: I'd suggest Python as many others have.
My second suggestion: Learn how to use Microsoft Access and VBA. Yes, this are many problems with MS Access and VBA, but it is also fairly easy to use and the GUI environment provides immediate feedback. This is also (currently) a more marketable skill than python. Of course, in a few years I expect Python to be in heavy demand.
More important than choice of language, is a goal to meet.
I personally learn much faster when I have a specific goal in mind. For example, one of my long term goals is to learn Java. This has been a goal for some time, but I didn't make much progress until a more specific goal came about. In this case, I needed a java applet for a web page. I couldn't find one available that met my needs, so one weekend I taught myself enough java to be able to program the applet.
Instead of setting the goal of teaching someone how to program, I suggest inventing a project that would interest them. Then get them to make finishing that project their goal. For kids, a good project might be building a database of their whatever junk they like collection, or write a game with their favorite pop culture icon.
ActiveState has Perl for Win32 boxen. Try www.activestate.com
The simple truth is that interstellar distances will not fit into the human imagination
- Douglas Adams
Which makes it great for very young children or MCSE's. ;)
This guy said his kids really want to be programmers. If that is true, they are probably math geeks that can take on raw code without the pretty pictures and not get scared. I was their age when I was hacking on Commodores and Apple II's, and I loved it. Starting out with near-WYSIWYG object programming might actually take some of the fun out of it.
Information wants to be anthropomorphized.
Sorry, but I still disagree. Any kid that goes out of their way to express a desire in programming probably wants to get their fingernails dirty with the real thing. Mastering CLI concepts will make it much easier for them to understand what is really happening when they work with a GUI-based object language.
To tell a new hacker to start out with VB would be like telling a young gear-head that his first hot-rod should be a Honda Civic. Sometimes you can get away with that, but I say you give that kid a rusted-out junk-yard Ford Mustang to restore, and harness that youthful enthusiasm to its full potential.
Information wants to be anthropomorphized.
I believe that the most simplistic yet useful "language" to learn is Dark Basic http://www.darkbasic.com I mean, kids aren't going to want to code databases and word processors - they want GAMES! Dark Basic is VERY simple to work with, and is a step up from QuickBasic only because of functionality. I mean, give a kid a week (and some guidance) and he can probably code himself a fully 3D game utilizing Direct3D. And now that they've released source code to their demos (which took them only a day to code and look very good), you've got some resources to work with. Give it a look, it's great! Being the idiot that I am, I can't begin to code in C++ I mean... I can probably code OOP stuff, but I really haven't found a simple way to use direct 3D. How long do you think it'll take me to code a simple demo where I have a 3D tank created in 3DS or Milkshape rolling around on 3D terrain in C++? It'll take a day for me just to learn that. Took me 10 minutes in Dark Basic, including the time to read the docs on it.
...I am proof that intelligent beings are not always intelligent...
However, my favorite programming experience was with Hypercard (mostly cuz I could manipulate my doodles in a 'game'), even though I realized it was rather weak as a general-use language. But, I did a maze game (pretty limited one) and even allowed for a couple of creature combats.
Whatever you choose to show your kids how to do this, (and if they're interested) I'd recommend working on a dungeon-maze type game. It's fairly fun, and you get to show the use of variables, arrays, calculations for leveling/combat systems and the rest.
Of course, that's just me as a kid. I liked Final Fantasy and drawing, so making a mini-RPG was a natural choice for me. But, trudging through all the nuances of 'programming' (Hypercard, remember?) was a lot more rewarding when I took just a couple of steps forward in making my game.
I started programming when I was 12. I got myself a book on ANSI C called Type and Learn C by Tom Swan. I'm sure it's a bit dated now, though.
When I was 14, I started in with C++. I've never owned a book on C++ and got all the info I needed off the web. I'm seventeen now and still learning and doing.
I never did anything but copy a few example BASIC programs from a book before I started with C. So the point I'm trying to make is: It probably isn't necessary to start them with a simpler language.
When they get the C syntax down and the basic stuff like conditionals, data types, pointers, arrays, etc., you may want to introduce them to C++. The reason being so they don't get too acquainted with C programming paradigms.
I've read about and experienced the rough transition to object oriented programming from too much procedural programming experience. That's the reason why many people say one should learn C++ from the start and skip learning C before hand.
I disagree with that, though; as many things are easier to learn when you're not concerning yourself with abstract objects and the like. Of course, that's just my opinion. I don't want to start a holy war here. I also wouldn't let them get to acquainted with the standard C library. That seemed to make it difficult for me to learn the standard C++ library (STL, streams, etc.).
I think I'd make sure they've got pointers down before you show them C++. Pointers are hard enough to learn (IMO), because a person often doesn't understand why they're needed at first. And then you start trying to explain to them the differences and similarities between pointers and references and when to use one or the other and it all comes crashing down. :-) Once again, though, that's just my experience. Please don't flame me if you've been coding since you were 6 months old and found pointers to be the easiest thing to grasp. :-)
And lastly: If they use Win98 exclusively, then I'd get them a copy of Visual C++ 6. It's a nice IDE with an easy-to-use but relatively powerful debugger. It can do simple, singe-file based projects just as well as it does large projects. And the Windows console subsystem makes the programs seem like they're running under DOS (so they don't have to make "hello world" show up in a window :-). I also think it would be good since they're already familiar with the Windows environment, and they wouldn't need to worry about doing trivial OS tasks. Just make sure they stay away from all that MFC and "ClassWizard" crap. :-)
I don't think I'd even mention the existence of Visual Basic to them. :-)
Good luck!
// Spunkee
I'm sure you'll get a ton of posts on this, but start them learning Perl or PHP. Both are nice and platform independent so that when they want they can move to a non-MS system (or they can stay). and plus they can show their skillz off to their friends online. E
My life is dedicated hosting
I think they are old enought to start programming in a language that will teach them how to program good clean code. Find for them an old copy of Turbo Pascal and a starter book about that thing. They won't program any fancy thing like a windows app, but they will soon find out how to do an eazy game... Pascal is a clean language with strong principles of programming, so IMHO is the best start to form a good programmer. Maybe Oberon would be a better start, but unfortunatelly is an unusable language at this stage (like Pascal was before Turbo Pascal came out). :) McLion
I'd go with PERL. It's almost interpreted. It's very powerful. You can use english like sentences and teach to test results of function calls as if it was fun: open JOKES,"jokes.file" or die; And you can run small programs directly from the command line.