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.
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.
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.
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.
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 |
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 |
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? |
What's that 5 doing there? I don't know, but now I want to know. |
Teach Something real world useful.
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.
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
Post a Comment