Saturday, January 10, 2009

Learning Ruby

I began learning the Ruby programming language by using a problem I had already solved one way and rewriting the solution in Ruby. Taking a domain that I had great experience in and fitting Ruby into it made the process of exploring the syntax and rules of the language a comfortable one. To use a sports metaphor, it gave me home field advantage.

I blogged about it. In fact, the blog entry was another Ruby learning opportunity for me. The pretty syntax highlighting for the Ruby source code I included in my blog was colored by a Ruby library (gem) called syntax. I found it helpful to create a Ruby script to take the source code I had written and generate syntax-highlighted HTML (yet another learning experience).

At some point early on, I got a great reference book and dove into it as needed. Other books followed, as well as adding *many* blogs to my blogroll. As I learned, my appreciation of the language grew and I spent time working on things that would help me write Ruby.

Over time, I wrote more Ruby code as well as more about Ruby and sought opportunities to learn Ruby by teaching it. I have also been fortunate to have a patient and knowledgeable mentor to ask questions to and learn from.

The learning stage changes eventually in to the doing stage. Much like a fusion chef, I discovered ways of mixing expertise I had in other areas with Ruby. An ingenious Ruby & Swing library (or is it a framework... you decide) called Monkeybars reignited my passion for rich-client user interfaces. I dug-in and started contributing to the project and later recorded a screencast demonstrating how to use it.

Fool that I am for the fun I have writing Ruby, I wrote a Rails website to host the screencast (as well as another I recorded for yet another Ruby/Swing library). All this is to say that learning something (like Ruby) can be a rewarding and enjoyable journey. Though I have travelled a fair distance, there are still so many new directions to go. As I write this, I stand at the beginning of a new trail. At my side I have the project I will re-write, a trusty reference book on the delivery truck and a patient mentor (who doesn't blog -- looking at you, Dave Giovannini) to hold my hand when I need it. And what do you know (I think I have seen this picture before...) there is even a fusion restaurant that makes stuff I have a feeling I will like.

<broad-grin/>