Slashdot Mirror


Best Introduction To Programming For Bright 11-14-Year-Olds?

firthisaword writes "I will be teaching an enrichment programming course to 11-14 year old gifted children in the Spring. It is meant as an introduction to very basic programming paradigms (conditions, variables, loops, etc.), but the kids will invariably have a mix of experience in dealing with computers and programming. The question: Which programming language would be best for starting these kids off on? I am tempted by QBasic which I remember from my early days — it is straightforward and fast, if antiquated and barely supported under XP. Others have suggested Pascal which was conceived as an instructional pseudocode language. Does anyone have experience in that age range? Anything you would recommend? And as a P.S: Out of the innumerable little puzzles/programs/tasks that novice programmers get introduced to such as Fibonacci numbers, primes or binary calculators, which was the most fun and which one taught you the most?" A few years ago, a reader asked a similar but more general question, and several questions have focused on how to introduce kids to programming. Would you do anything different in teaching kids identified as academically advanced?

23 of 962 comments (clear)

  1. Logo, LISP, Scala, F#, Erlang, and Haskell by Marxist+Hacker+42 · · Score: 3, Insightful

    Functional programming is making a comeback- it's going to be to the 2010s what OOPs was to the 1990s. I'd suggest these, and make recursive loops a major sticking point. Dr Dobbs has a nice article on why these functional languages make excellent methods for taking advantage of multi-core processors.

    --
    SJW: a person who perceives an injustice, and while correcting it, commits a greater injustice.
  2. LOGO! by mamono · · Score: 5, Insightful

    It is partially in jest, but LOGO was created to teach kids how to program. Real world wise, though, I would say C or PHP. They are both currently used, relatively easy to learn and require no cost to get started.

    1. Re:LOGO! by laird · · Score: 3, Insightful

      I'll second this. While Logo has a reputation as a limited language, it's actually as expressive as Lisp, which is to say that it's a more powerful language than most, though teachers tend not to go too far with it.

      Back when I taught kids programming, I found that the best languages were the ones that supported iterative development so that users could easily try ideas. For this, Logo is perfect. Once kids learn Logo, they know about variables, scope, functions with parameters and return values, recursion, closures, etc., all of which apply to any civilized language.

      There more modern instructional language options, such as Squeak/Scratch (http://scratch.mit.edu/) and OpenStarLogoTNG (http://education.mit.edu/starlogo-tng/) that are really fun as well. They are (IMO) a bit too complex for very young programmers (I taught 5-6 year olds simple Logo programming, as it's designed to be super-approachable for kids, but I think that a kid would have to be 7-8 to tackle those).

  3. Python by EvanED · · Score: 5, Insightful

    See subject.

    I started with QBASIC, and I would rather recommend against that. Things like real functions (as opposed to GOSUB) and such, even though you can do them in QBASIC, I didn't see for years.

  4. DO NOT by MindlessAutomata · · Score: 4, Insightful

    DO NOT, I repeat DO NOT do what many comp sci departments and high schools do, and that is "begin with Visual Basic".

    NO! NO NO NO NO NO! Okay, so they learn about variables and shit, but, just, NO. Terrible programming practices and weird little things where commenting is done with apostrophes and other typical retarded shit is what you'll end up teaching them.

    Visual Basic is OK for a quick and dirty Windows program. But if you want to teach the basics of what "real" programming is, I wouldn't recommend VB.

  5. Lego Mindstorm by Dynedain · · Score: 5, Insightful

    If you're trying to introduce the concepts of looping, iterations, etc and don't want to get hung up on the details of the language, I highly recommend the Lego Mindstorm kits. They have a flow-chart programming interface that I had great success introducing programming to my 11-13 year old cousins, and if I remember correctly, they also have a lower level interface to let you start writing your own functions.

    For kids this age, nothing is better/cooler at showing them the basics of programming than something that gives a physical response. Loops, conditions, make so much more sense when trying to figure out how to keep your robot from running off the edge of the table.

    Tangible real-world feedback, and a sense of real accomplishment. If you just give them abstract languagues for the sake of language, they get disappointed they can't just whip up the next Madden game. Besides, they probably all already have Legos at home, and a Mindstorm kit is something they can easily get at home, which probably won't happen with Pascal compilers or Basic editors.

    --
    I'm out of my mind right now, but feel free to leave a message.....
  6. Re:PHP? by moderatorrater · · Score: 4, Insightful

    PHP or C are ideal for a number of reasons. Enforcing OO from the outset is a terrible way to teach programming, so java should be right out. Functional languages are fun and interesting, but unless a major paradigm shift happens in the next decade, it's not going to be as useful.

    With a procedural language, you get the benefit of showing them with just a few lines of code what you can do. The basics of programming can all be taught from the outset including arrays, loops, conditionals, functions w/default parameters, etc.

    As they learn more, they'll have a natural step up to OO with C++ or php's built in OO. With C, they get the benefit of compiling code and having an avenue for more sophisticated programs, graphics libraries, etc. With PHP, they'll be able to set up web servers and use that as a stepping stone to html, servers, and javascript.

    Neither language needs a large investment to start programming with in terms of money or teaching, both languages are widely used, and both languages give them a clear avenue to more advanced topics.

  7. Re:C# is the best alternative... by fuzzyfuzzyfungus · · Score: 4, Insightful

    Huh, funny. I could have sworn that I'd heard of some other little outfit that let you download free source code and programming tools and stuff.

    I'm not going to disagree with you on MS's offerings; but you make it sound like they are an oasis of free stuff in a sea of unaffordable tools. With the exception of the various outfits that sell pro tools for various languages and scenarios, is there any major programming language(or, for that matter, many minor ones) for which you cannot get the necessary free stuff to get started?

  8. simple: use perl by petes_PoV · · Score: 5, Insightful
    You want a language where it's possible to start producing results with very little initial effort. That precludes anything which uses or requires an IDE - just learning to navigate that is a morning of classes with nothing to show for the effort - a definite demotivator. You also want a language that has a printable form - so they can have something tangible to work with - not merely a bunch of files.

    If these children really are the gifted ones you say, they'll already have the basic concepts of an editor: create, change, save, so they can start creating programs much sooner.

    You also want them to become familiar with the basic syntax od computer languages - most of which are quite similar and look a lot like Perl's syntax.

    Perl also gives those who wish, the ability to develop further, after the classes finish.The large amount of freely available documentation and examples on the internet will help then learn from properly written code from other people.

    --
    politicians are like babies' nappies: they should both be changed regularly and for the same reasons
  9. HTML by grege1 · · Score: 4, Insightful

    These are kids of the 21st century. Start with simple web pages in HTML, then add picture loading, tables, etc. If they take to it, then basic javascript. Start by using a text editor then later introduce graphical tools. All free and easy to implement.

  10. JavaScript by Cyrano+de+Maniac · · Score: 5, Insightful

    I hate to say this since I don't even know the language (heck I'm barely competent with HTML) and came up through GW-BASIC, Turbo Pascal, assembly, FORTRAN, C, Tcl, C++, Perl, and some others I'm sure I'm overlooking, but...

    JavaScript

    First, it's nominally C-like, so it gives them exposure that will help them with a large variety of other languages (e.g. C, Pascal, C++, Java).

    Second, it's available to be used pretty much anywhere the kids have access to a computer. At home. At school. At a friends house where they can show off their newfound coolness. Don't underestimate this, because it's very important that they have access to the necessary programming tools in their idle time at home and elsewhere. It's also important because they don't need to learn how to use a compiler, linker, and all those other tool distractions that will get in the way of understanding programming itself.

    Finally, it's useful in a context they likely already somewhat understand -- web pages. Fibonacci sequences and prime number sieves and such are all wonderful, but an environment that allows them to build something a bit more interactive and, lets face it, relevant to their day-to-day life, will inspire some portion of them to continue the pursuit. Granted, I got a lot of personal satisfaction out of writing BASIC programs to print "x" characters in a sine wave scrolling up the screen, but somehow I think the bar has been raised for today's kids' expectations of what a computer can do.

    --
    Cyrano de Maniac
    1. Re:JavaScript by cathector · · Score: 3, Insightful

      wait, "debugging" at this level of learning should absolutely be on the order of Print Statements sprinkled throughout the code, which alert() in javascript will satisfy just fine.

      i recommend javascript as the best choice here as well.

      here's what i see as JS's big wins for young, potential coders:

      * it runs anywhere.
          this means the code you write at home is going to run identically at school.
          now, other languages also do this, but:

      * there's no intermediate steps between editing the source and seeing it run.
          no compiler, no server, no runtime library or environment other than a browser.

      * you can share your work in a web page!
          pretty cool.

      * it's a very forgiving language.

  11. Why does everyone ignore C? by WarJolt · · Score: 4, Insightful

    I always wonder why colleges start out teaching Java first. Procedure based languages are easier. You learn
    2 + 2 = 4
    before you learn
    a^2 + b^2 = c^2.

    You can learn the basics in any language. The syntax is all very similar. Lets look at the difference.
    in C explain a routine.
    int main(int argc, char *argv[]){
        return 0;
    }
    In java explain a class and a routine. Plus the string class is more complicated than a char * and an int.

    class javaprog
    {
                    public static void main(String args[])
                    {
                    }

    }

    Always start with the fundamentals.
    You should know what pointers are and what memory is before you learn what a class is.

    A programmer needs to know why if he allocates 2 million empty string classes why his memory gets chewed up. To a C programmer the answer is obvious.
    Fundamentals! Fundamentals! Fundamentals!

  12. Comment removed by account_deleted · · Score: 3, Insightful

    Comment removed based on user account deletion

  13. The Problem With Teaching Programming by tknd · · Score: 3, Insightful

    The problem with most introductory programming courses is that they drop you in the deep end and expect the student to eventually figure out how to stay alive based on all the tools they start throwing at you. And I'll be honest, I don't have an answer as to what programming language you should use or if it even matters. Let me explain.

    I first started learning programming at the age of 14 (first year in high school). So I might have been one of these kids. Prior to that I knew how to write html and make webpages. That part was easy because there is no programming there. But when I got to my introductory programming course taught in C/C++ at the time, I didn't feel equipped as a student to tackle the problems presented. For example one of the tougher problems in the course was printing a diamond (ascii art) of stars based on a given number as input. So if they provided you with an input of 5, that meant at the widest point, the diamond would be 5 consecutive * characters with the previous and next lines being 3 consecutive * characters followed padded by one space on each end, and finally the top and bottom lines having one * with 2 spaces padding the left and right sides. Keep in mind that by this point, as a student, the most I had learned was basic algebra and perhaps a bit of geometry. The real heavy math/science courses were to be taught later in high school involving trigonometry, calculus, and physics.

    Continuing on with the story, most students in the introductory programming class failed at this simple task of printing a diamond to the screen. It wasn't because of their lack of knowledge regarding programming, but their lack of knowledge regarding problem solving skills and the application of math. Had the teacher reviewed the problem at hand, by examining the necessary parts (calculations involved) on a black or whiteboard, I think all students could have implemented a solution. But the place where students were struggling was finding A solution. They would start writing 'for' loops knowing that this was a test of how well you understood 'for' loops without having a clue of why they needed the loops or what the loops were going to do.

    So if you want your students to succeed, the language of choice will be the least of your problems since you are not bothering to teach high level programming paradigms (OO, functional, logic etc). The bigger problem will be how to teach the students to apply what they already know in a fashion they've never seen.

  14. Re:Algebra I by caerwyn · · Score: 5, Insightful

    Why? I taught myself BASIC at 7 with an Apple IIgs' built in interpreter- I was a good 5 years from my first Algebra I class at that point.

    Algebra is relevant for the manipulation of expressions with variables, but is completely unnecessary for the *evaluation* of expressions with variables, which is what programming really is. Higher math is generally required for complex algorithm creation, but for introductory programming assignments it's really unnecessary.

    --
    The ringing of the division bell has begun... -PF
  15. stay far away from BASIC by Tom · · Score: 3, Insightful

    Whatever you do, never ever ever teach someone BASIC. Not QBASIC and not any other flavour. It was my first programming language, too, and it took almost ten years and a study of computer science to finally get all those bad habits you acquire in BASIC out of my system. DO NOT POISON INNOCENTS WITH BASIC.

    You can consider Pascal, which after all was designed specifically as a teaching language. There's also Oberon if you want to go more into OO and make sure that the language they learn on will never be used in an actual real-world context. :-)

    Java, Mono, C++, etc will probably all be suggested, but I wouldn't consider them suitable for beginners.

    --
    Assorted stuff I do sometimes: Lemuria.org
  16. Scratch by Jimmy+King · · Score: 4, Insightful

    I was just looking into this recently for my nephew. Scratch looks really cool. I downloaded it and played for a few minutes and e-mailed my sister to tell her to install it for her kid. She hasn't done it yet, so I don't know if it was as good of an idea as I thought, but it sure looks cool.

    It has color coded, drag and drop logic stuff that interlock like a puzzle so that kids can see how it fits together. It takes seconds to get a little animated sprite "walking" and do the fancy, whiz bang, pretty stuff today's kids will be wanting to see right away.

  17. Yes, the educational world has... by SuperKendall · · Score: 4, Insightful

    I know that I am piggybacking but I thought that the educational world had moved on from the terms bright, gifted and related words.

    Indeed, the educational world has moved well away from those terms.

    The rest of us recognize the realize the reality that some people are in fact academically gifted and prefer to recognize talent instead of trying as hard as possible to homogenize it.

    --
    "There is more worth loving than we have strength to love." - Brian Jay Stanley
  18. Re:C# is the best alternative... by ClassMyAss · · Score: 3, Insightful

    If you want to go the Java route, start with Processing instead of pure Java if you really want things to be easy - things like drawing take no work ("line(10,10,100,150);" on a line by itself in an empty Processing file will draw a line, just like any extreme beginner would expect...), and it's very easy to transition to real Java later on (and also possible to use it within Processing, for that matter, so you lose very little). There's also lots of 3D stuff and libraries for advanced students, and as an additional bonus you don't have to hit kids with something as complex as Eclipse or Netbeans when they're just trying to write "Hello, World!".

  19. Re:PHP? by lwsimon · · Score: 3, Insightful

    Like anyone on Slashdot is going to take advice from someone who calls PHP a "pathetic insult to programming", then holds on VB.net as a paragon of virtue?

    --
    Learn about Photography Basics.
  20. Re:PHP? by Samah · · Score: 3, Insightful

    To be honest, it's the algorithms and paradigms that are the most important thing to teach. The language is merely the tool. I would recommend some form of procedural BASIC (eg. QBasic, GWBasic) since the syntax is very clear and concise. No fancy braces or semicolons for a new person to worry about.

    Which of the following examples would be more understandable for someone who's barely even heard of programming?

    if foo = "bar" then print "Hello world!"

    if(foo.equals("bar")) System.out.println("Hello world!");

    if(foo=="bar") Console.WriteLine("Hello world!");

    if(strcmp(foo,"bar")==0) printf("Hello world!\n");

    if($foo eq "bar") { print("Hello world!\n"); }

    --
    Homonyms are fun!
    You're driving your car, but they're riding their bikes there.
  21. Re:Assembly by Iron+Condor · · Score: 3, Insightful

    Umm yeah ok. But if you do sum = num1 + num2, sum _does_ equal num1+num2 after the assignment. I am not sure what you're getting at. Perhaps you meant the expression x = x + 1 is counter-intuitive unless you understand the '=' operator means 'assign to x'.

    No, after the assignment the symbol "sum" DOES NOT equal num1+num2.

    The algebraic equation X=Y+5 is a description of reality. It does not matter what Y is, X is five more. The computer statement "X=Y+5" is an instruction to a machine to perform a certain operation once. It is not a statement of fact and if it were a true description of reality it would lose its validity as soon as the value of "Y" changes.

    Algebra:
    X = Y+5
    Y = 5

    What is X?
    Y = 6

    What is X now?

    [pseudo]Computers:
    X = Y+5 ;
    (possibly an error because Y isn't declared/defined yet. Depends on your language)
    Y = 5
    print X ;
    Do you really expect 10 here?
    Y = 6
    print X ;
    Do you really expect X to have a different value now?

    The fact that you imagine that the statement "Y=X+5" means the same in programming as in algebra indicates that you have a rather weak grasp of at least one of the two.

    On the other hand "take a value; add another value to it" is an operation that is the same in both cases.

    [pseudo-code; really PostScript in this case)
    5 %
    here's a number
    6 % here's another number
    + % add those two numbers.

    At no point is there an expectation that this sum will change if some "variable Y" changes. This is a lot closer to the way kids learn addition: "You have five apples, you receive six more apples, how many do you have total?"

    The point is not whether one uses letters to refer to numbers, it is whether one expresses what one expects the computer to do. There's no conceptual difference between

    [pseudocode, vaguely scheme this time]:
    (sum 5 6 7)

    or
    (sum a b c)

    in both cases what is expressed is the sum of a number of values. Which the string "X=Y+5" doesn't necessarily express.

    --
    We're all born with nothing.
    If you die in debt, you're ahead.