Skip to main content

Teaching Programming to Children (pt.1)

In this 21st century more than learning how to operate Buck Roger's jet-pack of yore, programming will be an indispensable tool for children. I've been researching the easiest language to learn, mostly for my own benefit, but throughout I've kept an eye on what would be the best way to teach children programming.

I learned basic programming (with BASIC actually) in high school but was completely unprepared for a transition to college level programming and stopped there. So a few years back when I ran into a need for a very simple program, I found myself baffled at the few options to learn programming on the market for kids. It seemed that children were still being showed the equivalent of the LOGO turtle drawing vectors on a computer as if that was in some way preparation toward programming.

I scouted around and it seemed the only group thinking about how to teach programming to children at the time was the OLPC group which code almost everything in Python, allowing the children to get a the 'guts' of their computer and seeing or modifying how it works. I bought a Python book and tried to teach myself but found it not easy going.

Originally programming was simply a way of getting a computer to do something, and as such programming was optimized toward the computer not the user, since there was none, and not the programmer since he was almost certainly a computer engineer or expert herself (a lot of early programmers were women). Now, programming is used mainly to design software and interact with the user, not to run the computer hardware, but early programming languages reflect the original state of computing were saving computer cycles was more important than the programmer's time. These early languages were all procedural. That is they accomplished their goal in a linear step-by-step process. The most powerful of them is C, developed by Bell labs in the 70's.

In the 90's while I was in University a new type of programming emerged called Object-Oriented Programming. This rather confusingly-named programming has nothing really to do with real objects but with the way commands are structured. While before all commands were step by step, now you could make a command instruction a "property" or a feature of all the defined "objects" in the program. So instead of telling the program: store every key press the user makes in here and map it to this variable so I can access it later. I can just say something like "ObjectName.getstring" and the feature (or correctly called method) getstring that the ObjectName "object" posseses gets executed, the key presses stored in the "object" ObjectName. A little complicated but a very different conceptually from procedural programming and way quicker that writing the whole gop of step-by-step instructions to accomplish the same thing. The first popular Object-oriented languages were C++ and Objective-C (both of which are based on C), and Java.

Java is a very powerful language that is Object Oriented but has a feature that up to this point was only available in very weak languages, and that is it did not have to be compiled. (Compilation is the step where a computer language program gets translated into machine code.) In Java this happens on the fly or when you run the program, and it's handled by a virtual machine. Before, all code had to be written natively, for the machine it which it was going to run on. But with Java you could write it and run it immediately and on any machine that ran Java. Because of this, Java is called an interpreted language. Originally Java programs were super slow compared to natives, but as the virtual machine has gotten faster so have the Java programs. Java now runs on BluRays, Blackberries, Android and almost any PC.

But even Java suffers from the bane of learning most programming languages: a steep learning curve. Though the lack of compilation makes the writing more interactive, (you can find what works and what doesn't way quicker than before), it still takes a long time before you can make sense of Java (all those parenthesis and semi-colons... BASIC had none of these..!).

Up to this point most computer languages were designed by English speakers with an extensive background in mathematics (and I mean extensive, the renowned Princeton Math Dept. was not as mathematically inclined as the CompSci Dept., I understood what the math guys said some of the time). Java programming can look like a broken language spoken by a calculus teacher stuck in robot-like never ending run-on sentences. (Another semicolon! When does this statement end...?)

A couple of languages have come that operate in a similar way to Java, but with lighter frameworks meant as a way of adding small programs here and there. These are called scripting languages. Javascript and PHP are scripting languages. Some scripting languages like Perl became full fledged programming languages. Languages that followed the Perl-model like Python and Ruby (called dynamic languages) are full fledged programming languages too, that like Java, are interpreted, object-oriented languages.

The first time I took a look at Ruby code I knew I'd found my language. Ruby was written by a Japanese guy and with the intent purpose of making programing fun. For the first time the programmer, not the user and certainly not the computer came first. I understood it even from just glancing at it, and from studying it, I finally got what a Object Oriented program (OOp) was. In all the Java, C++ and even Python books I'd looked at or owned none had explained OOp well.

Ruby is incredibly well geared towards learning because of its readability, power and softer learning curve. Concepts learned in Ruby can translate into other programs well. There are a couple of resources for teaching and learning Ruby available: HacketyHack! and Ruby4Kids which I've used and found great. But I'm surprised that there aren't more. Hopefully as more interest and more people learn Ruby (like myself) more resources will become available.

Ruby is also terribly useful (and future-bound) as I'll discuss in the second part.

Comments

  1. This is a nice article..
    Its very easy to understand ..
    And this article is using to learn something about it..
    c#, dot.net, php tutorial
    Thanks a lot..!

    ReplyDelete

Post a Comment

Popular posts from this blog

Building my own home.

I've decided. I want to build my own home. There is something special about building your own things. I built a desk for my tiny room when I first moved to L.A. My room was so small that I had to sit on the bed to use the computer so I build a high desk so I could sit on the bed and work on the computer. My roommate Trentity helped me cut the ply-wood to the right side. I still have that desk. It now sits on the living room covered by a cloth hiding the surplus of costume parts my current roommate Sean uses in his creations. Learning to build and fix things continue. And the feeling of satisfaction from fixing even small things is great. So a few years ago I heard on the NPR program the Story about a couple of educators that moved to a tent in their back-yard so they could rent their house and afford to send their kids to college. They had a special type of tent called a yurt and cooked and showered in an RV they had parked next to it. I thought I could do that. Housing in Lo

Contrasting Styles of Writing: English vs. Spanish

There is interestingly enough a big difference between what's considered good writing in Spanish and English . V.S. Naipul winner of the 2001 Nobel prize for literature publish an article on writing . In it he emphasizes the use of short clear sentences and encourages the lack of adjectives and adverbs. Essentially he pushes the writer to abandon florid language and master spartan communication . This is a desired feature of English prose , where short clipped sentences are the norm and seamlessly flow into a paragraph. In English prose the paragraph is the unit the writer cares about the most. This is not the case in Spanish where whole short stories (I'm thinking this was Gabriel Garcia Marquez but maybe it was Cortázar) are written in one sentence. Something so difficult to do in English that the expert translator could best manage to encapsulate the tale in two sentences. The florid language is what is considered good writing in Spanish but unfortunately this has lead t

My Fake Resume

Inspired by the over aggrandized bio of Joseph Rakofsky I want to write my own. If you don't know who he is; Joseph Rakofsky is a lawyer who earned a mistrial for a criminal client due to his (alleged) incompetence as reported on the Washington Post . There has been quite a few commentaries on his "Streisand-house" approach of suing all the bloggers and even the Washington Post and American Bar Association for reporting his (alleged) ineptitude. ("Streisand-house" is what happened to Barbara Streisand who wanted to have a picture of her mansion removed from the internet and she sued to have it removed. Unfortunately suing requires the filing of public documents with a picture of her house. The lawsuit had the direct opposite effect it intended. Everybody now could see legally, since it was a public document, a picture of her house.) But all that internet gossip aside I'm most impressed by his resume. Here is a quote from the website: Prior to stud