Learning Ruby

3:10 pm PHT

One of my mid-term goals is to learn the Ruby programming language and then quickly move on to Ruby on Rails, a web application framework that lets you develop database-driven websites in a fraction of the time it takes to do it using traditional methods (like through PHP).

The more in-depth story is that I was first deciding between Ruby and Python as the language to learn. Python is another popular programming language that’s often compared with Ruby. I’ve been doing Perl for like eight years now (my first project in that language was to create a really simple web forum software that uses flat text files for its database back in 1999) and Perl is still my web language of choice (this blog and Lakbayan were written in Perl). The problem is that Perl’s age is showing and the itch to learn a new language is growing. Among the languages worth learning, it’s Ruby and Python that are currently the most-mentioned, and so I restricted my choices to those two. It also helps that both Python and Ruby heavily borrowed concepts from Perl so the transition won’t be a problem.

Between the two, Python is easily the more popular. Python, along with Java and C++, is one the “official” languages of Google. Python was also promoted by Mark Pilgrim, one of the popular tech geeks on the Web, through his free book, Dive Into Python. Also, Python has a more mature community and has more third-party code libraries than Ruby.

Despite that, I chose Ruby over Python. What convinced me are the anecdotal stories that Ruby is a more beautiful language, is easier to learn because it espouses the principle of least surprise, and because of its ultra-popular Ruby on Rails (RoR) web framework. (In fact, it was RoR that single-handedly pushed Ruby to the forefront of web developers’ consciousness.) Another reason that pushed me to choose Ruby is that I found the Ruby adventures of Tim Bray—a tech blogger (and co-author of the XML specification) whose blog I read regularly—quite enlightening.

So last week, I read Migs Paraz’ blog entry about him practicing Ruby. That post spurred me to get off my proverbial chair and to take the first step in crossing out “Learn Ruby” on my mental to-do list.

Anyway, I already checked out Why’s (Poignant) Guide to Ruby, possibly the most popular tutorial on Ruby, and I quickly dismissed it because it’s too disorganized. The writing style and and the cartoon foxes were admittedly humorous, but they were too distracting. I settled instead with the now-free 1st Edition of Programming Ruby: The Pragmatic Programmer’s Guide, also known as the Pickaxe book. While the 2nd Edition is vastly updated, you have to buy the book, and being the cheap bastard that I am, I think I can make do with the 1st Edition especially since I just want to pick up the language.

I haven’t done any actual coding since I have yet to download the Ruby interpreter, but I’ve finished reading the first several chapters of the Pickaxe book and I must say that Ruby is indeed pretty. I haven’t written a single line of Ruby code and I’m already falling in love with the language. Hehehe.  :)

Filed under

Add your comment | 10 comments


[an error occurred while processing this directive]