This is not a Ruby tutorial.

I heard about Ruby some years ago. I can’t remember where it was, must have been one of those perl newsgroups or mailinglists I was reading. The description was always something like “Japanese Perl Clone with better Object-Orientation” which sounded neat. But as I was using Perl only for small scripts, it was not enough to make me look into the language. Last year the buzz around Ruby on Rails gave me the final push and I started to learn Ruby. This series of posts describes my learning process.

Tutorials

The first tutorial I stumpled upon was Why’s (Poignant) Guide to Ruby (WPGtR) which is the funniest tutorial for a programming language I ever read, but it somehow failed to teach me Ruby (I read it again later and by now I think it’s great – perhaps I just had a bad day).

But WPGtR showed me enough of Ruby to make me buy Programming Ruby. I really enjoyed Dave Thomas’ style and read the whole book in just a few days. I highly recommend this book to anyone learning Ruby. If you want some samples first, the whole first edition of Programming Ruby is online. I don’t like reading online, but I use it sometimes to lookup stuff.

Just for completeness sake, I read a few pages of the Programming:Ruby wikibook. It is still in the making, but I hope it will become a useful resource sometime.

There are countless other tutorials out there. I just skimmed through Learn To Program and The Little Book Of Ruby (LBOR) and both look pretty good at first glance. If you (like me) prefer to read your stuff offline, I recommend WPGtR or LBOR which offer pdf versions.

After these three tutorials I knew how to write Ruby. But I was writing these programs in the same way I wrote my Java or Perl programs, without using any of the interesting Ruby features.

Rubygarden

I found the first hints on how to improve my code on the Rubygarden wiki. I highly recommend reading at least the following few pages. There is a lot more to be found in the wiki, but like all wikis it’s damn hard to get to the good bits.

RubyIdioms

examples which show the difference between the naive way and The Ruby Way

examples which show the difference between the naive way and RubyStyleGuide

coding conventions and some programming conventions which I found not as useful as the idioms above.

coding conventions and some programming conventions which I found not as useful as the idioms above. RubyNuby

a link page with pointers to a lot of useful resources in the wiki

a link page with pointers to a lot of useful resources in the wiki StandartClassExtensions

extensions for standart classes, contains interesting code samples. I found this more useful than the RubyOnlineCookbook.

extensions for standart classes, contains interesting code samples. I found this more useful than the RubyOnlineCookbook. ExampleDesignPatternsInRuby

Code samples for some design patterns

The journey continues here.