Ruby, irb & Rails
Last month, I started learning the Ruby programming language. So far I find it elegant and easy to pick up, and one of my favorite things about it is irb, the Interactive Ruby Shell.
The great thing about irb is that it allows you to test out code on-the-fly, by typing in anything you could put in a ruby code-file. irb is a powerful tool for testing out ideas and receiving immediate feedback from the program. Things I don’t like about it are that if you make a typo, the code block you are testing out often has to be scrapped. Additionally, I can’t find a way to output/pipe the code from your irb session to a file, which would be useful for recycling code that I particularly liked.
Having spent about two weeks on Ruby, I was amazed to discover how automated the Ruby on Rails framework is. The book I’m using Head First Rails (O’Reilly) is designed for fast absorption and caters to multiple learning styles. The one caveat: it is slightly out of date, using the older ‘ruby script/server’ and ‘ruby script/generate’ commands instead of ‘rails server’ and ‘rails generate’. Also the ‘rails new project’ command has supplanted ‘rails project’ (and so on…).
In the next few weeks I plan on sitting down and developing a few apps in Ruby and/or Rails to demonstrate some of what I’ve learned.