Categories
Parallel Desktops

Book resources for learning Ruby on Rails

I've now been using Ruby on Rails for a little over a year and have found it to be a fantastic environment to build web based applications. The last year has not been without some serious pain and learning curves and while I hardly consider myself a master of the environment I've found a number of resources that may help you if you are considering using RoR as a development platform.

Sure, you can access nearly everything you need to learn RoR online but I am personally still addicted to the dead-tree model of learning. If you are like me and prefer buying books then read on. In the last year I've bought 10 books on various Ruby/Rails topics and what follows are the ones I've gotten the most use out of.

NOTE: Ruby on Rails is a constantly evolving environment and the information below is really relevant for early June 2009. Things can change in the Rails world relatively quickly. It's a good idea to stay up on Rails developments by following the Ruby on Rails blog at a minimum.

Learn Ruby First
Before you rush out to buy a Ruby on Rails specific book first you need to learn Ruby the programming language. If you've been writing applications in C/C++/C#/Pascal (like I had) then Ruby is a relatively easy language to learn. Since it is open source getting a copy of Ruby is usually just a matter of downloading it to your machine and running it. Mac users have a big advantage here because Ruby is bundled in with Leopard.

Though you can get up and running with Rails while having a very modest knowledge of Ruby I can't stress enough that you should take the time to understand Ruby before you dive into Rails. Why? Because building a basic application with Rails is so easy that you will be tempted (as I did) to just start building. If you haven't really learned the Ruby language you will take a lot for granted and not understand why things work the way they do. You will copy and paste code rather than write it and when you do write it you will likely not write it well.

The book nearly everyone talks about for learning Ruby is "the PickAxe book" by Dave Thomas: Programming Ruby. Dave Thomas has a great conversational writing style. He makes learning Ruby almost story like, walking you through code samples while providing deep coverage of the Ruby language. At 1000 pages (3rd edition) there is a lot of material here, including a reference for the core Ruby library.

If you want to become adept at using Rails you do not need to read the book cover to cover but should get through Part I before you start doing anything of significance.

Rarely do I count on a single text book to provide my knowledge of a subject and that's the case with Ruby. Based on a blog reader recommendation I also picked up The Ruby Way by Hal Fulton. Though it's nearly interchangeable with the PickAxe book, Hal Fulton has a very different writing style. Rather than weaving a story I've found The Ruby Way to be more reference like. While I started learning Ruby with the PickAxe book I find myself grabbing The Ruby Way more often now when I need to explore an area that I don't understand as well as I would like.

Both of these books are excellent resources for learning about the Ruby language and I recommend having them in your library.

Rails References
Once you have got a good grasp on the Ruby language you can dive into Rails. Once again I have two books that I turn to frequently. One is for learning/getting started, the other is a desktop reference.

While you can find lots of excellent quick tutorials for getting your first Rails application up and running quickly on the web (such as Sean Lynch's excellent tutorial for Rails 2.0) it can't match the depth of a book. Agile Web Development with Rails (AWDR) by Sam Ruby, Dave Thomas and David Heinemeier Hansson is a good way to walk through building your first Ruby on Rails application.

The authors use a step-by-step style to build up an online bookstore, providing side roads and discussion points along the way. Some of the core philosophies of Rails are mentioned here (like DRY), though they don't go into a lot of detail. I personally found that good; what I was looking for was a relatively light-weight book that takes me quickly through building an application so that I could see results. AWDR does that and starts to show off some of the cool things you can do in a Rails application.

If you are going to use Rails for anything other than playing around you need a good reference book that helps explain things in more detail than AWDR. By far my favorite Ruby on Rails book is The Rails Way by Obie Fernandez. This book is not by any stretch a book for helping you get started with Rails; instead The Rails Way covers how things really work inside of Rails. Want to understand what's really happening with a Controller? How routing works? How to really leverage ActiveRecord? Get this book.

Obie has created a great desktop reference that you can pick up and dive in at just about any point. You don't read The Rails Way cover to cover; you keep it handy and pop it open when you need to know more about something you're working on.

So there you have it, four great books on Ruby and Rails that will help you get started building applications in that environment. As I said at the beginning, Rails is a rapidly evolving environment and it's difficult for books to keep up.

Got a book for Ruby or Rails that you really like? A web site with excellent tutorials? Please drop a note in the comments and share.

 

Visit DavidAlison.com

Categories
Parallel Desktops

iStat Server – remotely monitoring your Mac

I’ve always been a big fan of iStat menus, the freeware system monitoring utility. It’s a great way to quickly see what’s going on with my Mac, whether it’s CPU, disk or memory utilization, temperature, etc.

Bjango, the iPhone side of iSlayer (producers of iStat menus), has recently released iStat Server, a free Mac application that runs in the background. It sends your Mac’s system monitoring information to your iPhone for actual monitoring. On the iPhone side you buy the $1.99 iStat – System Monitoring application, which then connects with your Mac and displays your monitoring information on your iPhone.

If you want to remotely monitor one or more of your Macs for the ridiculously affordable price of $2 then this is a very cool set up.

The first step is to download and install iStat Server on any of the Macs you want to monitor. Once installed and running you will get the main iStat Server window:


It will display a code that you will need to enter on your iPhone once you connect; mine is currently locked so it displays as asterisks.

The next step is to download and install iStat – System Monitoring (ISM) from the App Store. Once you start that application up you can either monitor your local phone’s resources:


Or you can connect to any of the Macs you installed iStat Server on. If they are on your local network ISM will detect them automatically. If you are using remote servers you can manually add them, using the IP address and port number they are broadcasting their information on.


Viewing a server that’s running iStat Server gives you a great view of the monitors you would normally see with iStat menus, including consolidated CPU utilization, memory, disk usage, networking traffic use and every temperature that you could ever want to see.


Rounding out SSM it also includes a Ping and Traceroute utility as well as the ability to free the memory on your iPhone and send your iPhone’s unique identifier or MAC address through e-mail.

On the iStat Server side you don’t need to leave the application window open or even keep it hidden; just quit the application and it will continue to broadcast iStat server data until you uninstall it. On my Mac Pro it uses just under 3MB or real memory.

If you really want to monitor your Mac’s performance from virtually anywhere (assuming you’ve set up your Firewall / router), iStat Server Monitoring is an excellent way to do it.

Visit DavidAlison.com