Skip to main content

Teaching Programming to Children (pt2)

The open source movement and the creative commons revolutions have brought a lot of power to regular people by sharing the underlying code and logic of programs and other knowledge. To take advantage of this freely available knowledge and to truly partake the power of open source, one must be able to code.

Thus began my search for good resources for learning to code, and for good resources to teaching coding or programming to children. This search led me to Ruby, a programming language particularly suited for teaching children code.

But why is Ruby so great? After all learning coding is like learning a new language, a time consuming and challenging proposition, and Ruby is not as famous or as popular as other languages such as Java. The answers lies in what you should teach to children.

Teach something fun to learn.

The first step in making learning fun is not balloons or clowns but a good learning curve. If the student feels his mastery of the subject increasing, it becomes more and more fun. Frustration, unnecessary complication and extremely long delays in gratification are things to be avoided. What you want is the student to feel that what looked impossible at the beginning quickly becomes easy and hopefully fun too.

Java is not exactly simple. Let's look at Java code.
"Hello World" in Java
It's not pretty. Here is the a simple "Hello World" program in Java. Typically the first program taught.
Can you tell what this does? What is a "public static void"? Sounds like something in a black hole movie; scary.


Now here is Ruby code for the same thing. Yes just one line.

"Hello World" in Ruby
A lot more readable, and way more fun to code. After a little looking you realize that "puts" may be short for "put string" or "output string." Frustration is reduced. Suddenly this complex programming thing appears attainable.

But here is the thing, this may appear simple but once you start grasping the concepts, it scales up in complexity and allows you to understand more complex languages like Java easier.
Can you tell what this does?
Additionally Ruby has a interactive ruby prompt (irb) that allows you to see in real time what a piece of code does and outputs. This provides instant feedback, provides instant gratification when you get it, and allows you to practice 'talking' in Ruby.
What's that 5 doing there? I don't know, but now I want to know.

Teach Something real world useful.

Many beginning programming languages like BASIC, Scratch or LOGO are so simple or limited that they're basically useless in the real world. They were in a way designed for the world of academia and that hampers their development outside of it. (There is Visual Basic, but that is neither free, nor able to play well outside Windows, thus not super useful. )

Ruby, on the other hand, is very useful right of the bat. It's a full-fledged programming language, not a simplified set of one. It can be used to code real programs that function in real-situations right now. It's also the basis of the web framework Ruby on Rails, that allows for speedy development of web applications. In fact, Rails is what has made Ruby popular this days. Ruby has many extensions, like graphic libraries, that allow you to quickly add functionality to your program without having to build it from scratch.

Ruby is actually used in real world applications. Twitter ran on Ruby (on Rails) originally and the User Interface (UI) still does.

Ruby is also very portable. That means it runs in many places, be it a web server, Windows, Mac OS or Linux. So what you learn in one place is applicable in many. Mac OS X even comes with ruby built-in. Unlike proprietary (company-owned) languages like Visual Basic, Ruby is open source, so support or development is not dependent on a company's whims or desires and can continue indefinitely.

Teach something future-bound.

In the ever changing world of technology it's important to look toward the future and see what's over the horizon. Ruby is a language moving forward. Not only is Ruby a good basis for other languages but also can be used for web development (Ruby on Rails), for simple Android and iPhone App development (Rhodes Framework) and with a version of ruby called MacRuby (the Scottish cousin) Mac OS applications.

Additionally, MacRuby integrates with Mac OS Xcode  and can be used as a spring board to learn the far more complex world of GUI programming with Cocoa. And MacRuby is not a second cousin, it's development has been officially supported by Apple and in some cases MacRuby code can run slightly faster than native Objective-C code.



Comments

Popular posts from this blog

What Medieval Economics can teach us about tariffs.

As a teen, I used to play Dungeons and Dragons (D&D) with my friends. This started an interest in the medieval period that led to me taking a medieval history class in college just to understand the period more. Over the years I've also read great books like " Dungeon, Fire and Sword " about the crusades (I recommend the book) and yet with all that knowledge it wasn't until recently that it occurred to me I had a completely wrong understanding of economics in the Medieval Period. "Viking helmets, sword and footwear" by eltpics is licensed under CC BY-NC 2.0 In my D&D games, players who are adventures battling monsters and creatures would need equipment and on the trips to town, they'd get resupplied with their adventuring necessities. I'd run these moments referencing my imagination of what it must have been and fantasy books I'd read. There be an inn with a raucous bar, a gruffly black-smith, if a city also a weapon and armor sm...

Great iPhone Apps

As a companion to my blog on Windows utilities, here are two paid apps on the iPhone that I consider so fantastic that are must buys in my opinion. -Easy Calendar ( $1.99 ) The iPhone Calendar is one of its weakest features in my opinion. I miss the clear Black Berry calendar on my pearl whenever I had to use it. This app makes the calendar not only easy to use but way more useful, I see my week laid out for me with an easy ability to push things to other days (rather than having to re-enter the appointment). This app has completely re-made the way I organize things. I'm way more organized and rarely miss appointment now. This app is a steal at it's prize. No other app adds such simple functionality to the iPhone like this one does. It's like my secret organizer helper. -Sleep Cycle ( $.99 ) I tried out this app because it was recommended on Tim Ferriss's books . I had seen this app before when it came out and thought it was intriguing, but it was way expensive. N...

Indie Games

I've played a few really great indie games recently and would like to share a bit about them. None of these games are brand-new and all are available in both Mac and PC versions. 1. Aquaria Aquaria is a gem of a game for those that loved the original metriod games. In Aquaria you play a young mermaid creature that decides to explore her world beyond her home waters. In doing that you guide her through many adventures that reveal a bit about her world. The game is visually beautiful and the game mechanics, though simple, are very nice. You can play the whole game with a mouse if you wish though gamepads are supported too. In the game you access special abilities by singing different songs. It is a neat concept.  The game was made by an indie outfit of mainly two people out of Canada. But it feels much more than that. It's very big like an underwater version of Castlevania: Symphony of the Night, with multiple treasures to collect and many secrets to uncover. It is available for ...