But first, let me back up a step. If you don’t know anything about programming, your first question may simply be why should kids learn a programming language at all?
The benefits of learning how to program a computer
The popular answer these days, especially amongst the larger organizations pushing STEM education, is that the demand for programmers is growing and that computer science is a high-paying career field. That’s true, but one could make a similar argument about nurse practitioners and pharmacists. Glaziers and plumbers are in high demand as well, and their incomes aren’t offset by potentially massive college loans.
However, if we only did things that would likely tie in to our adult careers, few kids would ever play football or chess, go fishing or camping, play an instrument, collect coins, or bother with drawing or painting.
Programming a computer (or coding, as it’s more informally known), isn’t for everybody. Like crossword puzzles, some people find it incredibly frustrating or boring (or both). But for others, it becomes an engaging pursuit that challenges their creativity and knowledge.
Programming is, at its heart, the process of solving a problem with a finite set of resources. The challenge (and fun) comes in not only finding a solution to that problem, but coming up with the most elegant solution that works the fastest or operates in the simplest manner. Failure is frequent — written code seldom works exactly as intended the first time — but it is seen as a learning process leading to success.
In short, it can become a passion that drives kids to further self-improvement and learning. Along with it comes knowledge of why computers work the way they do and the self-confidence that they can be masters of the technology rather than subject to its whims. Even if they go on to do completely different things as adults, these are useful skills and lessons.
Choosing a programming language
Hundreds of programming languages have been developed since the mid-20th century. Many are incredibly specialized, intended only for a specific type of machine or task. Some languages have changed so much over time that programs written in their earliest versions are no longer compatible with their current implementation. Finding a practical starting language usually boils down to looking at which ones are the most widely used and have the greatest amount of learning resources available.
The C programming language is consistently in the top 8, along with Java and Python. All are used throughout the computer industry: in financial and scientific institutions, in gaming, in the defense industry, and in the telecommunications and aerospace fields. Universities usually select one of the three for their Programming 101 course.
A Process of Elimination
In my opinion, two things are critical if you’re teaching something: applicability and engagement.
Applicability is straightforward: is this topic something that will be of use to the student? If you’re looking at programming as a path to a STEM-related career for your child, any of the previously-mentioned programming languages would work.
Engagement is getting the student involved in the learning process: it’s hands-on, active participation. The sooner a student goes from listening to doing, the better. Lectures are fine for college students, but any parent can tell you that they’re the quickest way to sap the life out of a kid.
Any serious course for first-time programmers, regardless of language, is going to start with a boring explanation. Even if you gloss over most of the technical jargon at first, at a minimum you’ve got to get the students to the point where they can reconstruct everything they need outside of the classroom, so they can experiment, play and review what was previously covered. If you don’t allow students to have that independence, you’re doing them a disservice.
For languages like C and C++, that involves covering the installation of compilers (which convert human-readable code into something the computer understands) and development tools (which make code easier to read and write). For a 9-year-old, you might as well be discussing home loan rates and stock prices; she’s daydreaming about something far more interesting. A 16-year-old isn’t too far behind her. You’re no longer engaging them, and getting them back will be much harder.
Java and C# are slightly less off-putting since a couple of downloads will get both the language and a development tool to program in. Both, however, require a subsequent discussion about how to use the development tool and a cursory discussion of object-oriented programming. Again, you’ve probably lost most of your kids (who are wondering why it’s taking so long for them to do something), and if you’re teaching C# your students have to own a computer running Windows unless you want to make set-up even more complicated.
Visual Basic presents a similar problem to C#: a longer development environment discussion and students are restricted to computers running Windows. Its ease of use is offset, in my opinion, with its increasingly niche applicability as a front-end builder for Microsoft Office applications and other business software. Snooze-time for kids.
PHP, though widely used, is almost exclusive to website development so it loses out in terms of applicability to other languages. Ruby is in the same boat; though the language has made great strides in breaking away from the web-only paradigm, that’s its specialty.
Perl I’ve rejected outright, mostly because Perl code looks like a cat has walked across your keyboard. I say this with love: Perl was one of the first programming languages I ever learned, and I still have a first-edition copy of Programming Perl by Wall and Schwartz on my shelf. It’s powerful, but not at all welcoming to the age range we’re teaching.
Both languages do very well amongst programmers in debates over the ideal first language for kids. Neither language requires a compiler, so the kids are spared a few minutes of that discussion. A simple text editor (found on any operating system) is all one needs to write the code, so the development tool lecture has been avoided.
Python is used all over the place: in standalone programs, in web applications, and embedded in other programs. It enjoys tremendous popularity with programmers, even among those who primarily use a different programming language in their day-to-day jobs. It excels at number-crunching and text parsing.
With both languages being about equal in terms of applicability and ease of use, we looked more closely at engagement: once you’ve got everything ready to go on a student’s computer, what then? Every Python tutorial aimed at kids I’ve come across essentially covers the same thing: do some math and print out some words to a command-line interface. That’s solid stuff for teenagers with a desire to code, but is it enough to capture the attention of younger kids?
Obviously, at some point building things in Minecraft via code will lose its luster. What then?
After all, if a bad first-programming-language experience could wreck a potential programmer for life, the industry would be dead by now.Social tagging: ScriptCraft