Wednesday, December 4, 2013

Teach Real Programming, Please

Maybe this belongs at Fleex's Lab, but it seems that's a place for technical documentation; things pertaining to computers that are nontechnical can be here.

I'm all for the Week of Computer Science and the Hour of Code and all manner of other in-school programs that teach kids basic coding and computer science skills. In fact, I've done some teaching on it myself from time to time.

I'm a little bit lukewarm as to "programming languages" designed to help people learn to code. Stop: Yes, the B in BASIC stands for Beginner's. Microsoft just keeps the name because it's catchy; VB is far beyond beginner's tinkering. Things like Scratch are kind of programming in that they require you to think about program flow. However, these usually - still looking at you, Scratch - are fully visual and are a pretty bad example of pretty much any modern programming style. In Scratch, you're presented with tools that are better suited for silly slideshows. Variables are considered advanced. No. Scalar variables are some of the first things students should be learning, right after the obligatory console-outputting one-liners.

Slideshow programming is not programming at all. Get the kids into an IDE with a debugger, a compiler, and some syntax highlighting. (IntelliSense wouldn't hurt either.) The main issue is that it associates action with visual change, which is not usually how stuff works in the real world. When there's an error in the program logic, visual symptoms will usually happen considerably later in execution. We need to see the state of all the variables at each stage to really understand what's happening.

Code Academy does it very well. They use a real language, JavaScript, and provide easy-to-follow instructions. It might be a little too restrictive for those who want to jump ahead, but it's amazing for beginners. It would be great if it was offline-capable and taught OOP sooner.

Other things, like that one that lets beginners "code their own games" online, are not so good. First, it overwhelms the newbies with all manner of infrastructure that will cause scary errors if accidentally perturbed. Then, it doesn't explain what all this fancy stuff is - it just orders them to place a mysterious line in some special place that will cause awesome stuff to happen. If I had started programming with this, I never would have made it to where I am.

So, to all the lower school teachers and CS-spreading enthusiasts, please, please take the time to understand what the kids are going to learn. Teach them binary if it will help. Teach them how networks work when you start teaching how to create networked programs. Teach them, at every stage, why what they're doing works. This is what we need for a bright, technology-integrated future.

No comments:

Post a Comment