Slashdot Log In
Best Way to Get Kids Started in Programming?
Posted by
Cliff
on Fri May 26, 2000 02:18 PM
from the getting-started-at-an-early-age dept.
from the getting-started-at-an-early-age dept.
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? "
This discussion has been archived.
No new comments can be posted.
Best Way to Get Kids Started in Programming?
|
Log In/Create an Account
| Top
| 777 comments
(Spill at 50!) | Index Only
| Search Discussion
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
Lisp and/or Scheme! (Score:3)
check out www.schemers.org [schemers.org] for more information
-------------------------------------------
My Advice: Java (Score:3)
What I _wouldn't_ worry about is teaching them a "toy language". Of course they'll learn other languages. Do NOT start them on C or C++. Yes, those are languages "professionals" use. So? You don't learn to drive in a formula-1 race car or an eighteen wheeled semitruck, despite the fact that is what the "professionals" use. You don't learn to fly in an F-16 jet fighter. You learn to drive in a Geo Metro with an automatic (or equivelent), and you learn to fly in a piper cub.
Python, Maybehaps... (Score:3)
Not involving huge quantities of "line noise" or other such punctuation
No no! You're all wrong! (Score:3)
clearhome
pendown
fw 45
rt 160
fw 45
rt 160
da w00t.
Re:Don't underestimate them (Score:3)
--
Re:Python - designed for teaching (Score:3)
I was going to say the same thing, but you beat me to it friend.
Folks, mod this guy up another for me!
More detail: Python is an object-oriented language built as such from the ground up, un like C++ which is none the less derived from C and has less syntactical conformity (and I say this where my only difference with the above statement is that I perfer C++ slightly over Python, though Python is a close second.) Not only that, but Python is a great numeric language with native Ultra-Long integer type and a complex number module build in. With the LLNL PyNum Numeric Extensions. Couldn't find a good implementation of the Gamma function over the set of Complex numbers, but I guess your youngins' ern't inta that yet. :)
Another possility if you wanna get retro is do what I and doubtless you did: teach them on the C64! That is, get one of the variety of C64 emulators on the net and let them programme their hearts out in Basic. The great thing about the C64 is that because it uses PET/ASCII with all those graphics character in the characters with the MSB high so it's pretty easy to use graphics without having to use MoveTo, LineTo and the DC (if you do go the Windows route -- though so far all I've suggested exists in Linux-port form and I don't recommend teaching X-Motif just yet! :) The point is, it's much more WYSIWYG and really easy to come up with some cool stuff. For instance, I wrote a character editor for the C64 which was quite a fun project. The advantage is that the entire operating system is Basic so you have to be a programmer from the beginning just to use it. :) Disadvantage: it's a Proceedural, not on OOP language.
A good list of available emulators can be found at http://commodore64.net/emulators/ [commodore64.net]
The other thing I would strongly recomend is Logo. Logo is graphics and geometry application in which the user controls a 'turtle' by simple geometric commands. This is a great tool for learning the [most] basic principals of Graphics which I'm sure your kids will be most interested in because of their love for games. They can use it to draw their own pictures using basic proceedural programming techniques such as loops and recursion.
You can get an MS Windows version of Logo at: http://www.softronix.com/logo.html [softronix.com].
You could also download a Linux port of the Berkley Logo Software from this University of North Carolina at Chapel Hill software archive [unc.edu] though you may need to check out Steve Bakers' Software Page [airmail.net] if you have any problems with the port.
Anyway, Python DOES have a pretty good graphics library and with TCL/TK you could even teach them a bit about interface design and with PIL you've got Graphics so that's just about everything. Anyway, at least I would choose one or more of those three options and make sure in time they should try to learn them all.
One last note I should make is it's you be very helpful to their overall understanding of programming and logic if they could learn at least one rule-based language down the road, such as Scheme [indiana.edu] (thank you Professor Romanik! :).
Be Seeing You,
Jeffrey.
Game programming, all the way! (Score:3)
What you need is strong motivation. If your kids are anything like I was, that motivation is games. Do you have any games that support scripts or macros? Use 'em! Another poster suggested Lego Mindstorms. Great! I happen to enjoy MUDs, some of which allow extensive player programming. Even for the ones that don't, a specialized MUD client will.
My point is, exploit your kids' desire to excel in their game, or make their own. They'll learn. Faster than you'll believe. It worked for me.
The way I learned... (Score:3)
Your milage may vary.
Try Scheme (Score:3)
Book [rice.edu]
Interpreter with IDE [rice.edu]
Lego! (Score:3)
Lego helps you very much to understand how to build and put together components, things can always be adapted, expanded and be made better in some way with intelligent composition of basic pieces and evolve to new structures, buildings, machines, robots, ...
I enjoyed building with lego, not playing.
I'm not Linus, but I'm sure he played Lego too. And some day in the future my children will play Lego too.
ms
No, Simple Languages Aren't (Good) (Score:3)
The only thing that makes BASIC easier for anyone than C is that it is more like (bad) math. But this only helps if you've had lots of (bad) math. It doesn't really help those who haven't had the (bad) math.
What a programmer really needs is Data Structures and Flow Control. Until these things are internallized, you are not a programmer, after they are, you will always be one. BASIC doesn't do either well, so your children will not learn either well. C does both well, so your children will learn both well. (Actuall I would use C++, it's a little more forgiving, but still doesn't let you cheat like perl does (which is something you don't want newbies doing (as the wont fully learn those two lessons)))
Do not underestimate the flexibility of a child's mind. Look at baseball or pokemon stats. Give them a real language. After they learn it, even a little bit, it will stew in their brain. With many cognitive tasks, how LONG you have know something is more important than how WELL you know something, and they will NEVER need to have know BASIC for 20 years. (but if they are 10 year C/C++ veterans when they get to college?)
Do not underestimate how very MUCH time children will spend working on something they find interesting, so even hard tasks are mastered. Think of video games, sports, TV, reading. They HAVE the time, let them work on something real.
Also, C on UNIX is simpler than most things they can do on WinX boexen. File access and piping makes more sense, etc. If they have NEVER programmed, they have no legacy to overcome, so start them on the simpler system.
---
"Elegant, Commented, On Time; Pick any Two"
Teaching Teenagers Java (Score:3)
Look for links pertaining to 'Virtual Family'. It's intended for Win95/98, and I believe it's still being worked on. I am not sure if you can just 'buy' a copy, I think you may have to get a beta version and give them feedback on it, after using it. (I may be wrong here... info should be on the website).
---
Obvious answer: Mindstorms! (Score:3)
And really, it's a toy that evolves with you. If 30 year-old jaded programmers can still get a kick out of it, imagine a kid... He'll probably wear it down before he gets tired of it!
Lego Mindstorms Website [legomindstorms.com]
Re:Not Python, they need to learn babytalk first. (Score:3)
confidence in your code;
do things quickly is what keeps up interest
frustration
I think in all of these respects Python is as good as BASIC. Plus it
has GUI IDE's which really help with polishing I/O, plus one is
learning good programming habits from day one. It doesn't hurt to
have the powerful features there: on the contrary it's nice when one
wants them not to have to learn a new language.
Coding machine language is nice, but it's not so easy now as it was
back then. One of the satifscations of learning Z80 and 6502 was that
you could grasp the architecture of the processor without outside help
and you knew you had mastered the whole instruction set. Not so easy
with multi-level caching, instruction pipelines, stack frames
coprocessor pipelines, memory management, SMP, privileged
modes... have I forgotten anything? Well, the point is, really
grasping a modern PC is a much bigger deal than it was 20 years ago.
Charles
Allegro solves this problem (Score:3)
something more structured like C involves having to deal with too many complicated issues of programming theory and structure, and unless you're willing to sit through complicated stuff like X or Windows GUI coding, all you'll get is some boring text program.
There's a very easy library for graphics and sound under C. It's called Allegro [demon.co.uk], and it has the advantage of being available on most important platforms; it currently works on DOS, Win32, Eunuchs/X11 (even on non-Intel such as linuxppc), and BeOS. You don't have to wade through that WinAPI bullshit; Allegro is a simple layer around GDI or DirectX.
Re:I started on BASIC (Score:3)
Now, if you really want them to grow up with a structured language embedded in their brains, BASIC can get in the way when taught later: it has no functions or "black-box" capabilities. I suggest that you stop speaking in English to them, and start conversing in C. This way, even though it is hard and confusing, they will pick it up quickly and will be permanent hackers. but note, under ALL CIRCUMSTANCES, you are NOT to do this with HTML, this can cause brain damage and even cancer!
*toy* languages for kids (Score:3)
As a lot of other posts concur, any of the BASIC dirivatives are a good idea. VB, although poor at developing high-availability, cross-platform applications, is just fine for a youngster to start out in.
There are also those *toy* programming languages based on eiffel and Smalltalk put out by Lego and others. Those are great. Hell, Smalltalk is pretty wonderful as it is, and quite easy to pickup.
Just because we as professional developers know of a languages limitations, doesn't mean it isn't *programming*. Remember, what's basic to us, is still quite a bit over their heads!
Unless you had kids just to turn out a team of software engineers, I would start them out with something simple. If you try to through a command line compiler and debugger at them and expect any results, you have another thing coming... especiialy if they are heavy into games and graphical stuff...
Re:Don't underestimate them (Score:3)
This is not just a hunch, I have a degree in education, and know from studying childhood development models that the pre-teen and the "terrible twos" are the two periods of life when the human brain is growing the fastest... and they were too busy learning to talk to write code when they were toddlers. :) You do not want to waste these years.
Give them the most powerful tools they can handle. Kids at this age don't just love the feeling of power, they crave it. They have no control over their voices, bodies, emotions, or sex drive... that's why kids often go for weird or elaborate haircuts at that age (one of the few things they can control is their hair). Put one of these kids in front of a flexible CLI and let them hack away at it! One of the best things my parents ever did for me was buy my my first computer (a Vic20) and insist that I figure it all out for myself. With all the web information out there these days, your kid might even know more than you in a couple years. :)
Why not Java? (Score:3)
Its no more difficult than any other language to learn (remember, kids have nothing to unlearn), except for the grasping the object concept. And that may actually be easier for them to start with, since it models the real world.
Its also reasonably platform independant (just stay away from j++ *cringes in terror*)
Re:Give them Squeak (Score:3)
Logo (Score:4)
For those who aren't familiar with it, you basically have a cursor (called a Turtle) that draws a line behind it. There are commands to move the turtle, change the color of the line, in a friendly programming environment. I've seen everything from games to really wicked fractals done in Logo.
This was, admittedly, over ten years ago, on an Apple IIe. Anyone know if it still exists?
--Alex
Why? (Score:4)
I think the most important characteristics of a beginners programming language are simple, logical syntax, a reasonably small set of instructions and operators, and enough high-level functions to allow kids to do something useful. Specifically, you should be able to run a "hello world program" in a line or two, and you should be able to graphics and other fun stuff like that without knowing too much about OS internals.
Perl's not a terrible language for this (it is interpreted and provides some high-level functionality), but its syntax is only logical if you're used to c, it has an ungodly number functions and operators, and it's not designed to do graphics or interactive functions. (Yes, I'm sure there are modules and such to do pretty much anything, but the whole point is that we're talking about beginners)
I grew up with BASIC on the Apple II. I started in first or second grade, and spent the next 5 years programming games and stuff almost constantly. I moved on to other languages and platforms in high school.
So I still think BASIC is a good choice. Not sure VB is quite the ticket-- I wonder if there are any good free BASIC interpreters.
I guess Perl would be an OK second choice. A close third would be Java, which has some nice graphics capabilities and a less obfuscated and complex syntax.
Java/JBuilder (Score:4)
* JBuilder Foundation is free (as in beer) and comes with the JDK. Few parents can justify spending $hundreds on an IDE for their child.
* It will let kids put together a simple GUI just by dragging buttons and stuff around. Immediate sense of accomplishment keeps kids interested. Writing a "Hello World!" program isn't impressive enough to keep their attention. VB will do this, but it's expensive.
* It let's you make a graphical change in the GUI designer, and immediatelly let's you see the changes in code - and vice-versa. This is great for demonstrating how changing X and Y values of an object translates to a GUI layout.
* The code is pretty simple to read (may be my bias, since I'm familiar) when compared to C and even VB. The syntax is pretty straightforward, and the API naming conventions are consistent and English - no modified Hungarian notation here. There are some freaky things (for a kid) like escaping characters in Strings, logical operators, ternary (?:); but there are no pointers. Pointers hurt small heads.
* The IDE color-codes keywords and offers dynamic lookup of methods and parameters, organizes declarations and definitions, supports auto-indentation for readability, but doesn't enforce 'weird' habits. VB will structure their code for them (Capitalizes keywords, automatically normalizes spacing and such BS) but I've found that this just makes people sloppy - some discipline is good. Unlike VB, in JB you see all your code. VB keeps the subroutines visually separate - this breeds bad habits and confusion later, with REAL languages.
* It's something that they can show to their friends on the net, without the complications of VBRUNxxx or missing libs or actually copying the executable. Applets are a neat thing for this. Peer reinforcement is a powerful thing in the teen and pre-teen.
* It's a simple, yet non-trivial language that's a valuable skill (nobody hires Mindstorms developers). Granted, they're kids and it's not yet a priority - but Java is Cish in syntax, and the transition will be easier later; it's something they can use non-trivially NOW. They can do MATH homework with it, they can do hard-science with it. They can even hack together their own mini-ICQ with relatively (to other languages) little effort.
* It's something that will scale as their skills and interests grow. The API is developing and includes built-in support for neat-o things like images, sounds, 2D and 3D graphics; as well as XML, databases, real-time, complex math, crypto.
* It's as simple or as complicated as you want it to be, and the performance (a sore issue for hardened developers) is not a problem for kids writing toy programs. Once they start complaining about the poor performance of the interpreter, it will have done it's job.
Add to this a decent book, with examples, and you should be golden.
Give 'em some existing code to modify (Score:4)
I think I learned quickest not when I was writing stuff from scratch, but when there was existing code that I was used to running, and started changing it. I remember adding features to other kids' programs on the school computer, speeding up games that I had typed in from COMPUTE!, etc. That way I learned both from doing things myself, and from seeing how other people had done things.
Maybe start with a game, written in something like Python.
And if they get bored with that, give 'em the BSD kernel. ;-)
---
Don't flame me for this... (Score:4)
IMHO, of course.
What I used to do... (Score:4)
Between the ages of 17 and 22, I was a camp councelor / teacher at a computer came (think the kids that went there were nerds? Imagine what the means the teachers were ;-) I taught the 'intermediate' level stuff - basicaly, one step up from LOGO, and one step down from Pascal (which was the advanced course.)
My trick was to show them some graphical stuff in basic (things like random lines, minor stuff like a really low-tech computer etch-a-sketch with they number pad where they could also change the numbers.
I would show what was possible, then, begin teaching them the command set nessisary to achieve that small goal (for instance, the random lines demo required teaching them to change the screen mode (this was back in QuickBASIC), the RND statement, line lables, and the goto statement, plus explaining how it worked.
After each time that I explained one of these programs, and showed how it worked, I let them have time to play with it, and teach them more commands to extend thier command set (for instance, teaching them what the circle command was, what all the parameters for the line command (box, fill so they could do filled rectangles), changing colors, etc. I wouldn't implement the new commands for them - I would just tell them what they were, and how they worked, and let them implement it themselves.
As the programs got more advanced, I tought flow control, formating the program correctly so that they could look at it later and understand it, variable types, etc., etc., etc. I rotated back and forth between programing new parts for them to play with, and letting them implement things themselves.
Granted - this was in a teacher-student environment with 20 some odd kids, and someone else helping me out. I'm not sure how well that would work in a one-on-one parent - child relationship. But, the pointer I have that would apply is this: make thier progress very visible. Let them see the results onscreen, so that they have something very visible and tangable to see. Set it up at first so that every minor change produces a change on screen for them to understand. You'd be surprised how excited they can get by very little graphical changes.
Oh, and one more thing - the kids were age range from 9 to 14 or so. That probably also has alot of bearing on how they react, and what works best for them.
I think algebra might be a first step... (Score:4)
I am not exactly sure what age level kids learn algebra these days but I think it is an important step. What I'm really trying to get at is the concept of variables. I know that was at first a hard concept to figure out. If your kids haven't learned algebra then hey maybe it would be a great time to kill two birds with one stone. Finally kids can see where that math pays off!
Now I haven't looked at all the comments frankly since none of them were at the 4 or 5 level. So there is a chance that I could be saying something already said. So here it goes.
Make sure that you give them a good lesson in computer history. A person must have good, strong roots in order to grow strong. Teach them binary. Let them know there is more than one way of counting things. Once they have a good foundation don't be afraid to teach them the 'hard' languages.
How many times would we M$ converts be grateful it we had be taught a real operating system in the first place? I know you say your kids are primarily on windows and playing games but maybe it's time to introduce them to the greater powers of the computer. I started out playing games on the computer too. Then a game came a long named X-Wing. Awesome game. The only problem was when I died my pilot was gone. Everything I worked hard to achieve was gone. That's when I learn the copy command to save my pilot file somewhere else just in case. They've only just scratched the surface and now they are asking you to teach them more. Personally I would not look towards the 'easy' languages that's just seems like scratching a little bit harder at the surface. I rather just get to the root of it and then let the rest fall into place. They can handle it.
I think C/C++ or Java would be a good place to start. But more importantly the underlying principles of programming is what should be concentrated on. Once you know what algorithms are and what variables are does it really matter what language you learned it in first?
Which ever language you do choose I'm sure they'll thank you for it later. :)
Give them Squeak (Score:5)
Don't dismiss VB (Score:5)
I realise VB is an incoherent mess, and perhaps Delphi is better (I've never used it) but the biggest advantage of VB is that you can quickly and easily produce visual applications. You can see results, right there on your PC, even with simple projects. Learning something more structured like C involves having to deal with too many complicated issues of programming theory and structure, and unless you're willing to sit through complicated stuff like X or Windows GUI coding, all you'll get is some boring text program.
There may be better ways to do this than VB. Tcl/Tk for example, or tkperl, or even javascript/HTML. But I think the place to start with children is something that produces highly visual GUI output in short order.
Re:Python - designed for teaching (Score:5)
it's easy and at the same time it'll scale down to C. It has been
said that it bridges the gap between RAD languages like perl and
serious languages like C.
One interesting project based on Python is 'computer programming for
everybody' (cp4e). Parent article links to document with details.
In short, the idea is to eliminate difference between a programmer
and a user. Right now there's probably
development and 99.9% users who don't and therefore have only indirect
influence on development. If the language was easy enough for let's say
60% of users to be able to go and make minor changes/tweaks, that would
be quite a revolutionary change. That's what cp4e is trying to accomplish,
in a nutshell.
Python highlights:
* Free, OpenSource
* Simpler and more elegant than Perl (subjectively)
* Mature - started in '89 - before Linux.
* Unix/Win/Mac/etc
* Some big organizations like NASA and Yahoo use it.
* Core philosophy is KISS (keep it simple stupid) vs Perl's 'There Is More Than One Way to Do It'.
Don't underestimate them (Score:5)
Re:Logo (Score:5)
It is a real programming language, designed specifically for children for learning. It is a real programming language, with functions, parameter passing, etc. It is very graphic-oriented, so it's a great way to begin. Bugs in your code are very obvious as problems with the drawing.
The inventor of Logo, (Seymour Papert??) wrote a great book on Logo. I don't remember the name of it, but it is definitely worth reading.
The design of Logo was influenced by research into how children learn. One of the main goals is that children program the computer, rather than most so-called educational programs, which are more about the computer programming the children. Bugs are recognized as an opportunity to learn, not as mistakes to be punished.
On a personal note, I got my start in programming using Logo on an Apple II way back in grades 3 and 4. It was a great way to start. In the twenty years since then, I've programmed in dozens of languages. It's my career now. But I'll always remember commands like "FORWARD 20", "RIGHT 90", "PENUP", and "COLOR BLUE".
In fact, back around 1992 I started writing a Logo interpreter in Turbo Pascal for Windows. (Hey, it's what I knew at the time.)
If I had kids, Logo is where I would start them.
However, for older kids there's other possibilities. One interesting one off the top of my head: UnrealScript, for older kids who like games. It's also a real programming language, and kids can learn to customize Unreal and Unreal Tournament and do all sorts of neat stuff.
Torrey Hoffman (Azog)
Python - designed for teaching (Score:5)
http://www.python.org is the main home page, and http://www.python.org/cp4e/ is the home page for his educational projects.
Mindstorms? (Score:5)
How about Mindstorms? Good introduction to the relationship between programming and results.
Logo isn't dead; Methods for teaching Children.. (Score:5)
It isn't dead, by a long mile.. It's just quiet. There's a free interpreter for most platforms called 'UCBLogo', and its derivative for windows environments, called 'MSWLogo'. I've been using MSWLogo as an environment for introducing elementary school children to procedural thinking and logic, and we plan to use Python for a second phase for students who show a desire to continue learning how to program.
We use Logo, first, because it's got a very high work-to-results ratio for the children. That kind of visual feedback is priceless, for getting them to think in a methodical fashion about a problem. Python requires a bit more of a learning curve before the children get 'interesting' programs that they enjoy, which is why we teach it to them, second.
The idea is, get them addicted, and identify the ones who want to learn more, then switch them onto a professional, albeit gentle, language. I'm still debating whether I'd rather use Pascal than Python, because it's strongly typed, but the quick turnaround for type-it, eval-it environments is nice for teaching.
But I agree with earlier comments. The first rule, is never underestimate your students. The second, is to never slow them down. Once you've given them a foundation, hand them a list of projects to do, and let them move at their own pace in accomplishing them. Younger students prefer praise as a motivator, older students will find their own motivations, and will want a more mentor-like relationship.
Good luck!
You might consider Alice (Score:5)
http://www.alice.org [alice.org]
To quote:
The scripting language used by Alice is a slightly modified version of Python [python.org], a language itself designed to be used by novices.
I don't have a windows box, so I haven't played with it, but it looks like it would be a good, fun way to ease kids into programming.
Corran
Don't be afraid of BASIC, VB, etc... (Score:5)
Same goes for anything kids do - expose them to everything and let them decide as they grow.