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?
It might be tough to actually solve a problem in assembly languages, but at least they're straightforward in the sense that it always does exactly what the documentation says it does. Each command is so simple that there's no chance you'll get hit with a language bug. Then again, maybe assembly just seems like a warm fuzzy bed of consistency since I have to use PHP at work.
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.
Unfortunately, we are saddled with the term "gifted" thanks to Louis Terman, who both created the Stanford-Binet IQ test and did the first large-scale longitudinal study of intelligence (which is still going on with the few remaining participants in their 80s and 90s). It was in that study that he classified people with an IQ of 140 or higher "gifted," and the terminology stuck. Personally, I can't stand it and try not to use it, in favor of the more straightforward and less loaded "high ability." But it will be a very long time before "gifted" goes anywhere.
BTW, that article is dead wrong with regards to grade-skipping. Over 50 years of research has shown that in most cases students who are skipped a grade have no negative social or emotional outcomes from it, and often it's positive socially. This research is summarized in the report A Nation Deceived [accelerati...titute.org].
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.
I learned Lua when I was 14, with no previous programming experience. It's a pretty simple scripting language, and it can be really fun when you make addon scripts for games you play (quite a few games use Lua these days) and see them come to life.:)
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 [ddj.com] these functional languages make excellent methods for taking advantage of multi-core processors.
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.
Seconded. You can't beat designed for the task.
It's got an extremely low learning curve, immediate feedback, and lends itself nicely to exploration. And contrary to popular belief, it's not exactly limited.
Brian Harvey at UCB has 3 downloadable books suitable for varying skill levels here [berkeley.edu].
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).
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.
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.
DO NOT, I repeat DO NOT do what many comp sci departments and high schools do, and that is "begin with Visual Basic".
I'll heartily second that. Visual Basic is totally inappropriate for a budding programmer.
Make them use vanilla Basic. I suggest using a C64 emulator (or, if you're feeling perverse, a VIC-20 emulator).
What? I had to use line numbers, so should they.
I'd also suggest making them use a cassette tape drive, or even a reel-to-reel drive, to ensure that they understand why bloated code is bad.
Oh, and while you are at it, make sure to supply them with a limitless supply of Tang (no, not 'tang, you'll get in trouble for that) and store-brand potato chips.
Finally, make sure that whatever they do, they need to write out their programs in pencil for review first, then enter the code verbatim once it's been signed off on.
Consider something like POV-Ray [povray.org], since it's a programming environment with a visual payoff.
Show someone a simple program that generates 10 randomly positioned mirrored sphere over a checkered landscape then encourage them to play with the number of sphere, assign colors to them, etc.
Much more interesting to be able to *see* the output of your program than just reading "Hello World!".
... of course, to get it to beep, you had to turn the display on and off really fast, in the hope of creating an audio carrier that the TV could understand.
Ah, ZX81... how I... well, actually I don't miss thee at all.
Nobody has more free resources available to the budding programmer than Microsoft; like it or not.
Anyone can download FREE IDEs, free Source code, videos, documentation up the wazoo.
Also, C# is almost syntactically identical to Java, and it is a good language for the beginner to discover whether or not they have a REAL interest and a knack for coding.
If I were 14 again, wanting to learn how to code, Microsoft would be nirvana with all the free available stuff out there. There really is no contest.
As always, I got karma to burn, so take your best shot....
If you want to use C# because it's similar to Java and is freely available, why not use Java? It has awesome tools available and is just as (moreso?) free as C#. Since we're talking about free, what decent programming language exists that is not free nowadays or does not have loads of free support material available?
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?
If you want to go the Java route, start with Processing [processing.org] 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!".
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 remember getting the RCX a few years ago, I think that was probably one of my first experiences programming even...
I would not recommend the default graphic programming language for 11-14 year-olds, however. There are a lot of third part languages [wikipedia.org] you can use to program it, which not only allow you to do more, but also will be more educational and feel less like a toy to the kids.
I agree with you that programming something like a robot is nice because they get to do something in the real world, but at that age, the kids should really be doing something more than sticking blocks together on a screen.
On a similar note, you may want to try Processing/Wiring. Both are based on Java, so they are pretty easy. Wiring is used in a lot of micro-controllers, so it might be interesting to try that route instead of the Lego kit if the kids are really into it.
Of the suggestions I have seen this one makes the most sense to me (with a close second being the games suggestion a bit down). Education simply works better when you are learning to DO something. The language you choose isn't as important here as what the interests of the students are. After you know the student interest you will then have a better idea of what language to write in.
Another idea would be to use Rails to design a school community website and then later design a site for a local non-profit group. Integrating programming with community outreach and provider client interaction would be great at this age.
There are versions of the book for Windows, Mac, and Linux. Although the book targets kids as young as 8, it would still be able to speak to an 11 or 12 year old I think.
Objective C gives them the ability to build applications quickly and easily using GnuStep or Xcode. If they have iPods, this also gives the them ability to develop apps for them as well. The intrigue and excitement in their ability to do that often will get them excited in developing in other languages.
It wouldn't start with any specific languages, but using Alice [alice.org] and its younger cousin Storytelling Alice [alice.org] might provide a good intro to concepts.
I would judge how quickly those concepts are being integrated and then move on to an easy-ish language like BASIC.
For kids, PostScript has the advantage of nearly instant gratification, because it allows them to draw graphics quickly. It has loops and conditionals. It uses stacks and variables and functions.
All you need to get going in PostScript is a text editor and a PostScript to PDF converter. On a Mac, it's built in. On Windows, I use GhostScript in CygWin and run ps2pdf, just like I would on Linux. Alternatively, Acrobat Distiller should do the trick.
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.
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.
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.
If only for the graphics control. It lets you draw text anywhere on the screen, and clear it, enabling quite sophisticated graphics and animations. It can also wait for user input and respond, so you can make games with it. Kids love that sort of thing.
Logo has good graphics control but poor input-response, and Python is a much better language than both Logo and QBasic, but since it can't (easily) do graphics, it appears quite boring.
Actually, I started my son off with Visual Basic at age 12. It wasn't very difficult and it may well be better to start them off with event driven programing rather than procedural. Rather than writing the answer on a command text line, put the results in a text box. Push buttons to actually execute code. The kids will really like writing a program that looks more like what they are used to than some antiquated program written for use on DecWriters. My son loved it and now at 24 he is a programming project leader for a software development company.
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!
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.
FOR $DIETY sake, don't do it!!! You'll end up surfing Slashdot ALL DAY like the rest of us.
If you're really bright, go into Physics or Chemistry! Better chance at girls than living in your mom's basement for the next 30 years till you're too old to program any longer!
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.
I was just looking into this recently for my nephew. Scratch [mit.edu] 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.
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.
I would actually go with Python. It can do OO or functional, so it's really a win-win because you can have it do whatever you want. Plus, it has the shell for you to test on.
Also, java is great because it has such a good API. For younger kids, having them look through the API might not be such a good idea though, so while java is good for entry level programmers, for kids I don't think it's the way to go.
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?
by Anonymous Coward writes:
on Wednesday December 10 2008, @08:12PM (#26068763)
Exactly. And then, if your child is reasonably bright, they will be asking why the hell you need an object if all you want to do is dump "Hello World" to the screen. OO definitely has its place, but you need to understand why it's useful. For me that came from hacking around in C and finding the need to work with more complicated data structures than you can get with int/char/float/etc. So I played with struct's. When those were worn thin, my dad brought home a couple OO/C++ books and I continued from there.
In my opinion, the best way to teach your kids to program is just to give them a couple decent reference books, a computer with a terminal, and maybe just a basic hello world kind of set up to show them how to compile their code, or work the interpreter they're using. I don't think the particular language you use is a big deal. Maybe one that you know best, so you can help them with their questions more easily. I.e., if you don't know C well, you may not be very useful the first time they encounter buffer overflow. For my case, I'd likely give them a little bit of compiled and little bit of interpreted. Some C/C++ and either Perl or Python. These are ones I'm very comfortable with. They are well supported with extensive libraries, and I already have a ton of reference material on each. They all have their problems, but to some extent part of learning to program is learning how to deal with the idiosyncrasies of the language you're working with. If your language has perfect garbage collection, will you even understand the importance of memory management when you try C for the first time?
You won't be able to force programming down their throats, so if they're naturally interested, they'll be able to take it from there. If they're not, no biggie, you gave them the opportunity.
PHP and C are an awful lot alike, minus the notion of strict data types and the clumsy string handling. PHP is pretty darn close to C with dollar signs if you just start the file with <?php and end it with ?> and don't mix it with HTML.... So I would agree that either would be acceptable.
The way I started learning C was to start with a large code base and tweak it. I studied a piece of code, figured out how it worked, and then started making changes. I started with NUTS 2.3.0, an Internet talker, and used it for chatting with friends while I hacked on the code. By the time college was over, I had reverse-engineered the NUTS 3 NetLink protocol and expanded it, added email capabilities, added games, etc. It was a fun little project, and I'd definitely recommend doing something like that as a way to get young people interested in coding. The best thing about the NUTS 2.3.0 code base is that it is straight C---no OO to make things complicated. By the time you have worked with it for a while, though, you start to see places where data structures are essentially only used with certain functions and vice-versa. Once you reach that point in your understanding, the concept of OO basically sells itself fairly readily.:-)
Assembly (Score:5, Funny)
Re:Assembly (Score:5, Funny)
It might be tough to actually solve a problem in assembly languages, but at least they're straightforward in the sense that it always does exactly what the documentation says it does. Each command is so simple that there's no chance you'll get hit with a language bug. Then again, maybe assembly just seems like a warm fuzzy bed of consistency since I have to use PHP at work.
Parent
Re:Algebra I (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.
Parent
Re:Bright vs. Hard Workers (Score:5, Funny)
I believe the currently accepted term is "stupidity challenged."
Parent
Re:Bright vs. Hard Workers (Score:5, Interesting)
BTW, that article is dead wrong with regards to grade-skipping. Over 50 years of research has shown that in most cases students who are skipped a grade have no negative social or emotional outcomes from it, and often it's positive socially. This research is summarized in the report A Nation Deceived [accelerati...titute.org].
Parent
Yes, the educational world has... (Score:5, 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.
Parent
Lua? (Score:5, Interesting)
Logo, LISP, Scala, F#, Erlang, and Haskell (Score:4, Insightful)
LOGO! (Score:5, Insightful)
Re:LOGO! (Score:4, Informative)
Parent
Re:LOGO! (Score:4, 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).
Parent
Python (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.
DO NOT (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.
Re:DO NOT (Score:5, Funny)
I'll heartily second that. Visual Basic is totally inappropriate for a budding programmer.
Make them use vanilla Basic. I suggest using a C64 emulator (or, if you're feeling perverse, a VIC-20 emulator).
What? I had to use line numbers, so should they.
I'd also suggest making them use a cassette tape drive, or even a reel-to-reel drive, to ensure that they understand why bloated code is bad.
Oh, and while you are at it, make sure to supply them with a limitless supply of Tang (no, not 'tang, you'll get in trouble for that) and store-brand potato chips.
Finally, make sure that whatever they do, they need to write out their programs in pencil for review first, then enter the code verbatim once it's been signed off on.
Parent
Look at POV-Ray. (Score:5, Interesting)
Consider something like POV-Ray [povray.org], since it's a programming environment with a visual payoff.
Show someone a simple program that generates 10 randomly positioned mirrored sphere over a checkered landscape then encourage them to play with the number of sphere, assign colors to them, etc.
Much more interesting to be able to *see* the output of your program than just reading "Hello World!".
G.
Re:Look at POV-Ray. (Score:5, Funny)
Visual payoff? Luxury. We used to dream of visual payoff. When I was young, we used to be happy if the computer beeped.
Parent
Re:Look at POV-Ray. (Score:5, Funny)
... of course, to get it to beep, you had to turn the display on and off really fast, in the hope of creating an audio carrier that the TV could understand.
Ah, ZX81... how I ... well, actually I don't miss thee at all.
Parent
C# is the best alternative... (Score:5, Funny)
11-14 years old = NO CASH.
Nobody has more free resources available to the budding programmer than Microsoft; like it or not.
Anyone can download FREE IDEs, free Source code, videos, documentation up the wazoo.
Also, C# is almost syntactically identical to Java, and it is a good language for the beginner to discover whether or not they have a REAL interest and a knack for coding.
If I were 14 again, wanting to learn how to code, Microsoft would be nirvana with all the free available stuff out there. There really is no contest.
As always, I got karma to burn, so take your best shot....
My best shot (Score:4, Interesting)
If you want to use C# because it's similar to Java and is freely available, why not use Java? It has awesome tools available and is just as (moreso?) free as C#. Since we're talking about free, what decent programming language exists that is not free nowadays or does not have loads of free support material available?
Parent
Re:C# is the best alternative... (Score:5, Insightful)
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?
Parent
Re:C# is the best alternative... (Score:4, Interesting)
*nods*
MSFT isn't the first place that I'd go.
I was *quite* pleased with my copy of Sam's "C++ In 21 Days", DJGPP, and EDIT.
Hell, while we're here, why not talk about Squeak? It has an absolutely *KILLER* IDE, is cross-platform, and is free and unencumbered. :D
Parent
Re:C# is the best alternative... (Score:4, Insightful)
Parent
Lego Mindstorm (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.
Re:Lego Mindstorm (Score:5, Informative)
I would not recommend the default graphic programming language for 11-14 year-olds, however. There are a lot of third part languages [wikipedia.org] you can use to program it, which not only allow you to do more, but also will be more educational and feel less like a toy to the kids.
I agree with you that programming something like a robot is nice because they get to do something in the real world, but at that age, the kids should really be doing something more than sticking blocks together on a screen.
On a similar note, you may want to try Processing/Wiring. Both are based on Java, so they are pretty easy. Wiring is used in a lot of micro-controllers, so it might be interesting to try that route instead of the Lego kit if the kids are really into it.
Parent
Re:Lego Mindstorm (Score:4, Interesting)
Of the suggestions I have seen this one makes the most sense to me (with a close second being the games suggestion a bit down). Education simply works better when you are learning to DO something. The language you choose isn't as important here as what the interests of the students are. After you know the student interest you will then have a better idea of what language to write in.
Another idea would be to use Rails to design a school community website and then later design a site for a local non-profit group. Integrating programming with community outreach and provider client interaction would be great at this age.
Parent
Snake Wrangling for Kids (Score:5, Informative)
I know several young people who've got hooked on programming because of this free book: http://www.briggs.net.nz/log/writing/snake-wrangling-for-kids/ [briggs.net.nz]
There are versions of the book for Windows, Mac, and Linux. Although the book targets kids as young as 8, it would still be able to speak to an 11 or 12 year old I think.
Objective C (Score:4, Informative)
Alice? (Score:5, Informative)
I would judge how quickly those concepts are being integrated and then move on to an easy-ish language like BASIC.
Try Python. (Score:4, Informative)
Scratch (Score:5, Informative)
Close to natural language is best (Score:4, Funny)
PostScript (Score:4, Informative)
I recommend PostScript.
For kids, PostScript has the advantage of nearly instant gratification, because it allows them to draw graphics quickly. It has loops and conditionals. It uses stacks and variables and functions.
All you need to get going in PostScript is a text editor and a PostScript to PDF converter. On a Mac, it's built in. On Windows, I use GhostScript in CygWin and run ps2pdf, just like I would on Linux. Alternatively, Acrobat Distiller should do the trick.
simple: use perl (Score:5, Insightful)
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.
HTML (Score:4, Insightful)
JavaScript (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.
wikipedia (Score:5, Informative)
I (and others) wrote a good wikipedia page on this topic
http://en.wikipedia.org/wiki/Educational_programming_language [wikipedia.org] . I'd look at this list
I personally love and can recommend Alice http://www.alice.org/ [alice.org] and had a great deal of success with my daughter with this.
QBasic still one of the best (Score:5, Interesting)
If only for the graphics control. It lets you draw text anywhere on the screen, and clear it, enabling quite sophisticated graphics and animations. It can also wait for user input and respond, so you can make games with it. Kids love that sort of thing.
Logo has good graphics control but poor input-response, and Python is a much better language than both Logo and QBasic, but since it can't (easily) do graphics, it appears quite boring.
Visual Basic (Score:4, Interesting)
Actually, I started my son off with Visual Basic at age 12. It wasn't very difficult and it may well be better to start them off with event driven programing rather than procedural. Rather than writing the answer on a command text line, put the results in a text box. Push buttons to actually execute code. The kids will really like writing a program that looks more like what they are used to than some antiquated program written for use on DecWriters. My son loved it and now at 24 he is a programming project leader for a software development company.
Why does everyone ignore C? (Score:5, 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!
The Problem With Teaching Programming (Score:4, 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.
Scratch is a programming language for kids (Score:4, Informative)
GET OUT NOW!!!! (Score:5, Funny)
FOR $DIETY sake, don't do it!!! You'll end up surfing Slashdot ALL DAY like the rest of us.
If you're really bright, go into Physics or Chemistry! Better chance at girls than living in your mom's basement for the next 30 years till you're too old to program any longer!
stay far away from BASIC (Score:4, 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.
Scratch (Score:5, Insightful)
I was just looking into this recently for my nephew. Scratch [mit.edu] 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.
Re:PHP? (Score:5, Insightful)
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.
Parent
Re:PHP? (Score:4, Insightful)
Also, java is great because it has such a good API. For younger kids, having them look through the API might not be such a good idea though, so while java is good for entry level programmers, for kids I don't think it's the way to go.
Parent
Re:PHP? (Score:4, 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"); }
Parent
Re:PHP? (Score:4, Interesting)
Parent
Re:PHP? (Score:5, Interesting)
Exactly. And then, if your child is reasonably bright, they will be asking why the hell you need an object if all you want to do is dump "Hello World" to the screen. OO definitely has its place, but you need to understand why it's useful. For me that came from hacking around in C and finding the need to work with more complicated data structures than you can get with int/char/float/etc. So I played with struct's. When those were worn thin, my dad brought home a couple OO/C++ books and I continued from there.
In my opinion, the best way to teach your kids to program is just to give them a couple decent reference books, a computer with a terminal, and maybe just a basic hello world kind of set up to show them how to compile their code, or work the interpreter they're using. I don't think the particular language you use is a big deal. Maybe one that you know best, so you can help them with their questions more easily. I.e., if you don't know C well, you may not be very useful the first time they encounter buffer overflow. For my case, I'd likely give them a little bit of compiled and little bit of interpreted. Some C/C++ and either Perl or Python. These are ones I'm very comfortable with. They are well supported with extensive libraries, and I already have a ton of reference material on each. They all have their problems, but to some extent part of learning to program is learning how to deal with the idiosyncrasies of the language you're working with. If your language has perfect garbage collection, will you even understand the importance of memory management when you try C for the first time?
You won't be able to force programming down their throats, so if they're naturally interested, they'll be able to take it from there. If they're not, no biggie, you gave them the opportunity.
Parent
Re:PHP? (Score:4, Interesting)
PHP and C are an awful lot alike, minus the notion of strict data types and the clumsy string handling. PHP is pretty darn close to C with dollar signs if you just start the file with <?php and end it with ?> and don't mix it with HTML.... So I would agree that either would be acceptable.
The way I started learning C was to start with a large code base and tweak it. I studied a piece of code, figured out how it worked, and then started making changes. I started with NUTS 2.3.0, an Internet talker, and used it for chatting with friends while I hacked on the code. By the time college was over, I had reverse-engineered the NUTS 3 NetLink protocol and expanded it, added email capabilities, added games, etc. It was a fun little project, and I'd definitely recommend doing something like that as a way to get young people interested in coding. The best thing about the NUTS 2.3.0 code base is that it is straight C---no OO to make things complicated. By the time you have worked with it for a while, though, you start to see places where data structures are essentially only used with certain functions and vice-versa. Once you reach that point in your understanding, the concept of OO basically sells itself fairly readily. :-)
Parent