Slashdot Mirror


Teaching Programming Skills to Children?

KlaatuVN asks: "My younger siblings are asking for ways to learn to program. If I remember correctly, when I was younger I started programming by writing games like 'Lemonade Stand' in BASIC for the Commodore 64. Short of finding a Commodore 64 emulator and digging up some old BASIC programming books somewhere, what do you think is a good way of teaching children to program? I'm not trying to start a 'language war', but that does enter into it. Should I start with a scripting language? What, O Wise Slashdot Readers, are your opinions?" When I was just starting out in computers, I remember LOGO being a big help in teaching me the logic skills I would eventually use as a programmer. I know LOGO is still around, but it would be interesting to note if there are other similar projects like it. What tools, and programs would you use to teach programming skills to interested youngsters?

30 of 121 comments (clear)

  1. Start them off with a challenge! by kurosawdust · · Score: 2, Funny
  2. Use Brainf*ck by fredrikj · · Score: 2, Funny

    'nuff said.

    1. Re:Use Brainf*ck by stefanlasiewski · · Score: 3, Funny

      No, I'm sure they get enough of a brainfuck in school.

      Teacher: "You are all individuals"
      Students: "Yes, we are all individuals"

      --
      "Can of worms? The can is open... the worms are everywhere."
  3. Stagecast Creator by TitaniumFox · · Score: 2, Informative

    Stagecast Creator is a fairly elementary language that can introduce the young ones to object oriented thinking. You can program multi-level games and applications like calculators. Each object is defined by its set of parameters and how it interacts with other objects. A few friends of mine have used it to introduce their kids to programming and have found it to be pretty successful.

    TiFox

    --
    -- I'd say your post was about 3 monkeys, 18 minutes.
  4. Older kids learn Python easily enough by flockofseagulls · · Score: 5, Interesting

    I've been teaching Python to older kids and teens (10+) and have had good success. A few younger kids started in the classes but had trouble with typing and general computer skills. Most of the kids caught on to programming and were writing their own variations on assignments.

    Very young kids have problems with attention span, reading, typing, etc. so you may want to use something like Lego Mindstorms instead of text-based programming.

    See www.geekschool.org for one approach.

    1. Re:Older kids learn Python easily enough by mbogosian · · Score: 2, Informative

      Very young kids have problems with attention span, reading, typing, etc. so you may want to use something like Lego Mindstorms instead of text-based programming.

      Actually it's not just kids how have attention span issues who can benefit from Lego Mindstorms. If your siblings haven't yet taken high school geometry yet (or haven't had enough exposure to boolean logic), then Lego Mindstorms is a really cool to get a day-to-week-long introduction. Past that, I'd say, based on my own experience, that (when I was 11) C was difficult for me to pick up until after I learned Pascal. They both have similar structures, but Pascal was a much better introduction because of its use of natural language in most of its syntax.

      You can find some tutorials here, here, here, here, and here.

      The only problem with Pascal (nowadays) is that compilers/debuggers seem hard to come by. Here's a free one that might help. If that doesn't work, then you could always try something this, but I wouldn't recommend it for the beginner who doesn't even know what compilers or linkers are and why they are necessary.

  5. Rocky's Boots. by Glonoinha · · Score: 2, Informative

    Good luck finding it - but if you do it is a killer teacher of Boolean Logic.

    Last time I played it was on an Apple IIe.

    --
    Glonoinha the MebiByte Slayer
    1. Re:Rocky's Boots. by TitaniumFox · · Score: 2, Informative

      OMG, yes! I remember this program. At the time (10yo, I think), I didn't even realize what AND and OR gates were, and I was using them to solve the problems.

      It's an excellent program.

      Find it and an apple II emulator here.

      --
      -- I'd say your post was about 3 monkeys, 18 minutes.
    2. Re:Rocky's Boots. by orangesquid · · Score: 2, Informative

      Rocky's Boots did wonders for my understanding of computers, logic, and programming. I would definitely start with Rocky's Boots on an Apple II emulator. There are disk images floating around the net.

      --
      --TheOrangeSquid Is it any wonder things seem so awry? We swim in a sea of confusion and don't have to think to survive
  6. There's always by Judg3 · · Score: 4, Insightful

    Lego Mindstorms and it's RCX language. Fairly intuitive, robust, and you can get it to do cool real-world stuff.
    While I think a child might be ok with making some little PC games, I think they would love it even more if they could build a dinosaur and make it walk like they want it to.

    --
    Looking for hardware (Currently need: Large Etch-a-Sketch) Have one? See my journal!
    1. Re:There's always by Rick+the+Red · · Score: 2, Funny
      Lego in general. It learns children
      Apparantly not very well.
      --
      If all this should have a reason, we would be the last to know.
    2. Re:There's always by llamaluvr · · Score: 2, Insightful

      I'm a teaching assistant for an introductory college programming course, and we used NQC (Not Quite C) to program the Mindstorm robots during part of the course. It was a cool hand-on activity, but the students picked up a lot of bad habits that became evident when we moved to C++ later in the course. A lot of students seemed to think that all functions had zero parameters and always returned the type "void", and that all variables should be globals.

      It was probably more due to the pace of the course, but NQC and the robots kinda messed a lot of students up. I guess it's important to realize that programming the robots is fundamentally different from programming console apps. The Mindstorm robots can help develop basic programming "cause and effect" concepts, but it's not as much help with programming structures like classes and functions.

      --
      Insightful: 76, Off-Topic: 379, Flamebait: 24, Funny: 152, Interesting: 201, Underrated: 55, Troll: 9, Total: 896
  7. Assembly by inflexion · · Score: 3, Interesting

    I would vote for assembly (no this isn't a joke). Assembly is really simple when it comes down to it and would be good for instruction for several reasons:

    1) fewer operators than pretty much any other language (unless you're talking about x86 asm)
    2) teaches how computers *really* work inside. I never became an effective C programmer until I learned assembly and what was going on behind the scenes. Your kids will learn the basics of booleans, memory layout, branches, etc much more thoroughly than if they started with C. After they've mastered asm then they can move on to C and will appreciate it that much more.

    1. Re:Assembly by GuyMannDude · · Score: 3, Funny

      And teaching the kiddies assembly will have the side benefit of scaring them off of a career in programming so they'll be more likely to go where the big bucks are: business.

      Sure they'll cry now when make them sit still and trace program flow through the LDA and JMP instructions but when they're making six figures a year just for spewing some business buzzwords at those five-per-day meetings in comfy, fancy chairs they won't be able to stop thanking you enough.

      GMD

  8. A pure and useless language by splattertrousers · · Score: 2, Funny
    Since they're just programming to learn to program, you have the opportunity to start with a "pure" language that doesn't necessarily have to be particularly useful.

    I'd stay away from kludgy languages like C, C++, Java, Basic, etc.

    So Smalltalk might be good. I'd suggest Lisp, but it might be too useless ;) I've also heard good things about Ruby.

    And assembler might be good too. A big light turned on in my head when I learned assember, because I finally figured out what was going on inside the computer.

  9. flexible by muon1183 · · Score: 2, Insightful

    Go with a flexible language as a first language. You don't want them stuck using only one programming paradigm. If possible, choose something that can do OOP, functional, logic, etc. It will serve them well down the road if they ever want to use it for anything not to be stuck in just one paradigm.

    --

    There's no sig like SIGSEG
  10. Director (or its children/cousins) by dr00g911 · · Score: 2, Informative

    Macromedia Director (or Revolution, or Hypercard) seem to be a natural for an introductory taste to programming... at least they were for me.

    My "real" first taste of programming was BASIC, with the old K-power magazines and my Atari 400/Apple II+. Those were the days.

    At any rate, my entry into building actual applications came with Director 1.0, many years later.

    It gives a timeline that anyone can animate and assign rudimentary interactivity to -- building presentations, programs, and even specialized applications -- without any programming needed, but also allows for Lingo scripting (as a next step) -- which you can achieve pretty much anything with.

    Lingo is very close to BASIC, but the syntax comes closer to C/Javascript/PHP, and it's getting more object-oriented with every revision.

    The bottom line is that *anyone* can build an application or presentation with any of these tools that work, without programming.

    But *with* programming, you can add bells, whistles and functions that wouldn't be possible working in the timeline alone.

    From there, kids can (if they have aptitude) make the jump to C or scripting languages once they can understand more complicated syntax.

    Just my thoughts, but if someone tried to teach Perl or VBScript to an 8-year-old, I think it'd be an uphill battle.

    A battle I'd pay to see, because I think it'd be much funnier than anything that's broadcast on TV these days, at any rate.

    God, I miss LOGO.

    --dr00gy

  11. go with visual stuff by mikecheng · · Score: 2, Insightful
    No, I don't mean "Visual Basic" per se.

    The reason "we" got into programming when young is that we were all probably maths/science people looking for an outlet for our energy ("I never made the first team, I just made the first team laugh" - billy bragg).

    Unless they already have a flexible and mathematical brain, it's really going to be hard to teach them to cope with the logic of

    x = x+1

    That statement is directly contradictory to anything that they ever learn in maths, and I certainly wouldn't want them believing that it was actually a statement of equality.

    As programmers we contort our brains to think of it as 'x takes the value of whatever x is now plus 1' - but it's us changing our thinking to suit the computers for this specific task.

    I have thought a number of times about trying to teach teenagers computer programming, but after having taught them maths for the last 4 years, I don't think I would attempt this with any but the most advanced students.

    However, programming concepts can be taught using more visual tools. I can't remember the name of the program, but I have seen a Lego Mindstorm programming interface which is ideal for kids: it's visual, it's dragging and dropping program pieces, and it gives kids some concrete feedback on their progress (since it makes the Lego robot, or whatever, do something).

    You and I might be happy to write a "helloworld" or a "prime number list generator", but most people need something a bit less abstract as a proof of their progress. LOGO had the conrete output of a picture (so it'd be a competition between the kids to make the picture). Mindstorms have robots (so it's a competition to make the coolest robot).

    To summarise the summary of the summary
    • Be visual (few things are more boring to kids than grammar and syntax)
    • Pick something with concrete feedback (e.g. making pictures, controlling robots)
    --
    Cool, but useless.
  12. Criteria by Piquan · · Score: 4, Interesting

    I'd look at it from some criteria. The weights that you give these criteria would vary depending on your target audience. For most audiences, I've listed them in descending order.

    I refer to the Lego Mindstorm's RCX here. There are two forms for this. One is the graphical program builder that comes with it. The other is traditional languages like NQC. Generally, NQC etc have all the disadvantages of C.

    • Interactivity. It is important for a student to be able to examine the state of the program. Being able to enter single commands, and later form them into subroutines, is very helpful. Good: Logo, Lisp, Python, Smalltalk. Bad: C, Perl, Java.
    • Feedback. The program should be able to easily effect things outside of the command processor. Turtles or robots are good vehicles for this. Graphical displays are okay. Very good: Logo, RCX. Kinda good: Smalltalk (under Squeak), Lisp (under something like Lispworks). Not too bad: Java, CGI Perl. Bad: C. (Note: Any language can give output, but there's an extra spark of interest when you can easily produce "cool" effects.)
    • Growth potential. As the student begins to learn about more advanced data structures and algorithms, the language should grow with the student. Good: Lisp, Python, Smalltalk. Bad: BASIC, Perl (it gets too bogged down in syntax).
    • Easy to use. The language should not require a lot of low-level work like memory allocation. It also should not have an overly cumbersome syntax. Good: Python, Logo, Lisp, Perl. Bad: C.
    • Flexibility. The language should allow you to teach different styles of programming, such as functional, imperative, and object-oriented. Good: Lisp. Bad: Almost anything else.
    • Real-world applicability. The language should be usable in the real world. Good: Python, Perl. Bad: Logo.

    Overall, either Logo or Python would be a good choice, depending on your target audience. I'd say that Logo would be a good choice for 12 and under, and that Python would be good for after that. Note that Logo knowledge easily translates to Lisp, so one possible track would be to start with Logo, and later transitition to Lisp.

  13. Karel++ by BobTheJanitor · · Score: 3, Insightful
    Karel++ is a great starting point. Karel is a simulated robot that exists in a virtual space that can be modified like a Skinner box.

    Karel takes simple commands (for example, turnLeft(), moveForward(), or pickUpBall()) and has boolean functions that act as sensers (such as hitWall() or wallOnRight().

    When coupled with basic control structures, it's a fun and easy language to learn, and most Karel implementations have a graphic display of Karel moving around its world, so a wall-hugging function like the following isn't purely academic, it can be experienced just by watching.

    repeat forever{
    while(!hitWall()){
    moveForw ard();
    }
    turnLeft();
    }
    You can make Karel programs that solve mazes or that clear the room of balls, etc. It's obviously not a good programming language to do anything of use (although I have seen a Karel half-adder accomplished by picking up and dropping balls), it's a great introduction to OO programming that seems more like a game than education.
  14. Movies by GuyMannDude · · Score: 4, Funny

    Sit them down on the couch, push the DVD of Hackers into your player, pour the microwave popcorn into a big bowl and have them enjoy the movie for 90 minutes. Then when the show is over, carefully explain to them that real-life programming is the exact opposite of everything they just saw.

    Hope that helps,
    GMD

  15. Robocode by Gefd · · Score: 5, Informative

    Though I don't have children I would think that something like Robocode would be ideal. Considering that you can get almost instant feedback for the changes you make, and that it's a game, which if my niece is any indication, will consume any child above 2.5yrs to the point of tears when bedtime comes around.

    - Gef

  16. LOGO... by netfunk · · Score: 4, Insightful

    ...or Visual Basic. Seriously.

    I have to say this, because someone recommended assembly language with a straight face.

    Some things you should remember:

    1) Programming languages are just an expression of a problem's solution. The less time you can spend learning to express, the more time you can be solving.

    2) Teaching someone logic is really the goal at early stages. Teaching them how a computer works (i.e. - low level programming) is really just noise at the start. Teaching someone object orientation is problematic in the opposite direction.

    3) Your mileage may vary by age. A ten year old learns VERY differently than an 11 year old.

    4) You're probably a genious that learned to program by plowing through manuals and books and scouring the web. This makes you the exception to the rule. Most people do NOT learn this way.

    5) Not everyone will be good at programming, ever, but everyone can make it further than Hello World...they can make it to the point where they are conscious that they are _creating_ something.

    6) Most people benefit from immediate visual feedback. Teaching someone how to compile and link slows them down. Teaching someone to write to stdout slows them down. Slapping together something in Visual Basic and then showing them how to hook up responses gets them moving quickly, especially when they can hit F5 and see what happens immediately. VB adds other complexity, though, which makes something like LOGO better in terms of simplicity.

    7) Not everyone wants to be a coding god. Some people just want to see what programming is, some people _think_ they are l33t hax0rs but don't know shit (you always get these in large classes), some people are there against their will (parents made them do it, etc)...just keep it simple and fun. Most people won't take this to be the start of a career in software development.

    I used to teach programming courses for summer camps. Java is just totally inaccessible as a first language. I tried. Visual Basic actually worked very well. Object orientation is best explained by NOT explaining it (people will naturally understand what a "push button" is, but it's a waste of time to explain how it's "subclassed" from a "widget". These things can come later). Half the trick is not scaring them off in the first few weeks.

    If there was a free Logo package that didn't suck, I'd have used that (maybe there is, I couldn't find one at the time, but that was years ago).

    My response to it all was to develop Toby (http://icculus.org/toby/), which is a variation on Logo.

    --ryan.

    --
    Don't say, "don't quote me," because if no one quotes you, you probably haven't said a thing worth saying.
  17. Re:QuickBASIC by murat · · Score: 2, Informative

    Depends on the age. For younger children I'd teach Visual Basic instead of QuickBasic. For older ones, I'd start with C.

  18. PostScript by iankerickson · · Score: 2, Interesting
    Consider using PostScript as a teaching language for kids.

    I know, I know. Calm down, breath in and out, and put the flame-throwers away. Yes, PostScript is obscure. Yes, it's not a prepositional language (i.e. modifier before object, as in English), like Pascal or Basic. It's not even remotely "English-like". Yes, it's not a functional language, like C or nearly everything else. Yes, it's not object-oriented. Yes, it's not a fasionable language or one that will prepare kids for "the real world". There isn't even a bleeping "For Dummies" book for PostScript. Et cetera, and so on and so forth. Blah blah blah.

    But PostScript does have a lot going for it, due in part to its wierdness:
    • It's freely available and portable. Download Ghostscript and a viewer, and you're done. You can even use Adobe Distiller, if you already have it. (It's simple: type out an ASCII EPS in any editor, save the file as .eps or .ps, and drag-and-drop the text file onto Distiller. The interpretation will scroll by in the Distiller window and you'll get a PDF if your code is correct.)
    • You can download COMPLETE documentation that is well-written and loaded with code examples from Adobe and a few other places on the web. The Adobe books are named by color: the Red book, the Blue book, the Green book. Google for "Thinking in PostScript".
    • Postscript creates output kids can understand: pictures. You can do numeric results if you want, but basically the can program the computer to generate really cool pictures extremely easily.
    • They can print the results. Send the completed EPS or PS to the printer, and your kids get a hard copy of the results. It difficult to convey how satisfying this really is until you've done it. Even on a crappy printer, PostScript output looks really, really good compared to the image on a monitor. You can put the output on your fridge.
    • It's extensible. Add fonts, TIFF files, EPS files, or JPEG photos to a directory the interpreter can find, and kids can "call" them, like subroutines in a library. You could supply them with, say, JPEGs of their favorite cartoon character or rock star (What's the difference? Eh, Barney?) and they could write a program to make a montage, or a kalediescope, or an escher-like pattern from the photo(s).
    • It's interactive, if you get ghostscript. I think edit-save-compile-run-debug-repeat style IDEs are a little bit much for beginners. You want to remove all upfront obstacles to their playing with the language. With an interactive language, you can type code from the prompt and see what happens right away. That's what was so easy about BASIC on PCs from the 80s. The computers were so crude back then, most didn't have the free memory to support a modern IDE with seperate editor, interpreter, compiler, and debugger. It all had to fit in ROM.
    • PostScript is standardized. There are well-thought out, detailed specs for the language that have very reliable, nearly bug-free implementations. One non-obvious advantage of this is that code examples in PostScript from almost any book will work on your setup. Compare that to BASIC or (shudder) AppleScript, where it depends entirely on the version you have how much work will be required to rewrite the code sample into working code.
    • It's a real world language. Most printers, copiers, pre-press equipment and software, and all PDFs use PostScript for their inner logic. You can read the newspaper or a magazine together and look for fonts, rules, ligatures, transformations, and em-dashes.

    Printing and publishing are great "nerdy" hobbies for kids. I used to help my parents collate the books they wrote, photocopy hand-drawn illustrations on to the dot-matrix print-out from our Apple IIe, and trouble-shoot Apple Writer II and the printer. It turned out those skills (as prerequisites) ne

    --
    Democracy. Whiskey. Sexy. Pick any two.
  19. Many Choices by bpb213 · · Score: 2, Informative

    I have seen a lot of programming languages for kids around:

    1. Squeak. (Based on smalltalk). Graphical environment that has all sorts of 3d, sound, voice, etc stuff to play with. Everything is editable, down right to the squeak environment (of course this isnt mandatory, but can be done). Squeak kind sucks for professional work (its kinda slow, being an emulated environment) but is great to teach stuff on. Heck, it even has a part that kids can "program" without writing a line of code (using a visual paradigm that I dont have the most experience with, sorry). (oh, btw, squeak runs on all platforms)

    2. Logo. Yup, still alive and kicking. Also runs on all platforms. If you want to teach multiagent systems, then you can look into *Logo (star logo).

    3. Boxer. A mac only thing that has a lot of educational properties.

    4. Toon Talk. Oriented on the younger crowd. Uses a lego like code building process to solve missions. Only for windows i think.

    Any way, those programs should more then enough provide an educational start in programming to the younger audience.

    --

    This .sig looking for creative and witty saying.
  20. If you want some expert advice... by xenephon · · Score: 2, Informative

    Seymour Papert, who holds the Lego chair for learning research at MIT (and who created Logo) wrote a book called the Connected Family which addresses this issue. The book is available at amazon, and there's a companion website. In a nutshell, he recommends using meaningful projects to teach programming concepts in an environment like that provided by Logo.

  21. Re:Yes To HTML by buffy_fan · · Score: 2, Insightful

    Quite Right, I guess I should have been more clear.

    The point I was trying to make is that HTML is a base from which student can explore in whichever directions interest them, and have something to show for it at the end.

    I don't know the students in question so there is no way I can know what will make them happy and capture their imagination. That is the strength of html. So many things can be associated with it, that there should be something for everyone. No, it isn't a programming language, but it can teach them something of structure, and it builds their confidence and competence while they work out what *they* want to learn about next.

    If you have decided that they will make great kernel programmers, fine, give them C. Maybe they will love it!

    *However* They might find that they are happy tinkering with Flash or playing around creating yet another content management system using client/server side scripting. Give them HTML and they have a forgiving environment to explore and play with. I reckon that is important.

    If the students really have a talent for programming, they will quickly outgrow HTML and find something to get their teeth into. If not, then they will still have some basic understanding of the web, and won't have wasted their time or yours getting disheartened and struggling with something that doesn't suit them (I'm making an assumption here that HTML is easier than any programming language, I reckon that stands).

    You can be an accountant without understanding calculus, and you can be productive with computers without understanding the subtleties of pointers. You can't assume everyone wants to or can become a hardcore programmer. The thing to do is to let them explore where their level is.

  22. Feedback and Showing Off by eddy+the+lip · · Score: 2, Interesting

    Interesting that this question comes up now, as I'm just starting to teach programming to a 12 year old.

    One of the first things that I worried about was what language to use. After some thought, I decided that as long as a few guidelines were followed in language choice, it didn't really matter. The most important things were:

    • rapid feedback. Children are remarkably curious (at least based on a few flammable experiments in my parent's basement), but they also like instant feedback. They need to see results, or they'll lose interest.
    • give them something they can show off. Being able to go to their friends and say "look at the cool thing I did" is great incentive.
    • avoid theory like the plague. "|| is logical OR and does this..." is boring. "if($friend == 'tracy' || $friend == 'brent') { print "bugger off!"; }" is fun. And better than "hello, world."
    • simple environment. They're learning a language and a new way of thinking already, no need to make them learn some complex IDE as well.

    Language considerations came from that:

    • "rapid feedback" and "simple environment" meant a scripting language (no compile step), and a text editor. A side benefit of this was portability. I can teach on my linux box or her windows machine.
    • "showing off" meant something web based. She already knows HTML and maintains more websites than I can count, and a lot of her friends are online. She linked her first lesson from her homepage, so this seemed to be a good decision.
    • ability to use a subset of the language. I wanted to jump into making stuff right away, rather than spending three lessons getting up to speed on language requirements.

    This all translated into a text editor, PHP and assignments uploaded to her site. I seriously considered Perl and Python (especially Python - as it turns out that would have been very handy for teaching proper style. The concept of whitespace and proper indenting is surprisingly difficult to instill ;) ). PHP isn't my favorite language for a lot of reasons, but it's fine for teaching control flow, logic, data structures, modularity. It was handily available on her server, and meant she could show her work to her web friends right away. Python might be better in a classroom situation, because there's a pool of people with a similar environment that work can be shown to.

    At any rate, we're only three lessons in, so this is still in the expermintal stages. But if you're interested in swapping experiences, reply to this and I'll leave an email address.

    --

    This is the voice of World Control. I bring you Peace.

  23. Re:Kids pick this stuff up automatically. by wackybrit · · Score: 2, Interesting

    Just incase it sounded like I was blowing my own trumpet in the parent post, I wanted to point out that I haven't become some sort of master coder simply because I started early.

    Infact, I've met coders with just a few years' experience who can kick my ass. Despite the early grounding, it appears I turned into a generalist rather than a specialist. Perhaps this proves that nurture is not everything..