Learning Ruby and eventually Rails

November 17, 2008

RubyIt has finally begun. I am finally diving deeper into my greatest passion. Web Development. Sure I’ve done some web work that people would likely consider development but not the extent that I’ve wanted. This time, I’ve actually decided on the language and platform to develop with. Ruby on Rails.

I searched high and low for a “magic” answer (which doesn’t exist), read numerous testimonials and developer comments and went back and forth between which path to pursue. There was PHP which was the logical choice since I’m an avid Drupal user and love the platform. There was Python which was the organized choice due to its indentational syntax. And there was Ruby was the creative choice due to its expressive nature. (Obviously there are others, but these where my three finalists.)

Now before I go any further, I know these topics/posts always drive criticism, so I’ll go ahead get this out of the way. My descriptions of each technology are solely based on my first impressions of them. For all I know they are completely off-base, so it is important you know that my opinions have been derived from a very small subset of code that comprise these vast languages.

Having already professed my faith for Drupal above, I had to take a look at PHP. After digging deeper, I decided against it because the syntax seemed to change to often from code block to code block. The Drupal codebase is known to be very streamlined and well written but the PHP language I read just seemed too cryptic. This seemed to be a theme in some of the more advanced examples I looked at as well. If I had to describe it in a single word, it would be “dated”.

When I looked into Python, I thought I was sold. Initially this is where I was going to start. Many said it was a great first language due to the shallow learning curve. As I started reading tutorials I fell in love with the indentation rules, which oddly enough, many seemed to portray this aspect/feature of Python as a negative. I found it to be an obvious choice since that’s how the majority of all code is written anyway. So why didn’t Python end up being my language of choice? The answer lies in the lack of support my web host has for Python. After doing some digging, I realized finding a host that offers Python support isn’t an easy task. Sure they exist, but I had all ready paid for 2 years of hosting through HostMonster so switching wasn’t really an option. This put me in a situation to look elsewhere and so far I’m glad it ended up this way. But if I had to describe Python in a word, it would be “clean”.

When researching Ruby the excitement of the community hypnotized me and on top of that everyone was/is raving about the Rails framework. This excitement made me want to latch on just to see where it would take me. At first I was hesitant due to the fact that in Ruby, there is several ways to accomplish the same task. I thought this would be cumbersome and too difficult to learn for a first language. I also assumed that each and every book would provide totally different ways to do things and I wouldn’t be able to pick up on the best way to solve my issue. It turns out that my assumptions were correct, to some extent.

Having read and gone through Learn to Program (by Chris Pine) and being a third of the way through Beginning Ruby (by Peter Cooper), the code examples are, indeed, quite different at times. The misconception I had was that this would be a bad thing, but it’s quite the contrary. Learn To Program really laid out the basics and Beginning Ruby is hammering them home while also showing me shortcuts. In Ruby there are some best practices but there is not a “right” way to do something. Instead, there’s only an individual’s “preferred” way. For instance, you can write out an if…else statement in 5 lines or use the ternary operator (?:) and write it in 1! What’s a single word to describe this? Awesome.

In the end, the choice wasn’t easy, but my decision to use Ruby and eventually Rails furthers my skills in web development and allows me to be creative. And creativity in an arena that tends to favor the über geeks and nerds is a nice breathe of fresh air.

Do you have a similar story when trying to figure out what language to learn? If so, I’d love to hear any insight regarding your decision process, even if you chose a different language/framework.

Leave a Comment

Previous post:

Next post: