Categories
Uncategorized

Ruby Foo

ruby foo

After three years away from all but the most trivial of noodling with the Ruby programming language, I have become a Ruby Foo (as in Mr. T’s catchphrase, “I pity the foo’!”). I am severely out of practice with Ruby, and with two versions having appeared since I last made a living with Rails, even the act of creating a new project is completely different. Since Ruby is the preferred back-end programming language at Shopify and I am the Platform Evangelist, it’s time for me to “sharpen the saw”.

obie

Luckily for me, I ran into Obie Fernandez at the South by Southwest Interactive conference back in March. We sat down for a coffee and he told me about what was happening with Hashrocket and I told him that I was a hair’s breadth away from joining Shopify.

“I’ve been away from Ruby long enough that I’m probably back at newbie level again,” I told Obie between sips of latte made with overcooked beans. “I did it for a bit at the beginning using IronRuby, but between doing all the C# and PHP and the open source ‘Iron’ languages dying of neglect at Microsoft, I’m severely out of practice. I thinking of joining Shopify, and let’s face it: I don’t want to look like an ignoramus in the presence of rock stars like Tobi, Cody and Edward.”

“Give me your email,” said Obie, “and I can do something to help.” Of course he could – he’s the series editor of Addison-Wesley’s Professional Ruby series of books.

Shortly after South by Southwest, a couple of links to PDF editions appeared in my inbox. Thanks, Obie!

eloquent ruby

The first link was to Eloquent Ruby, Russ Olsen’s guide to speaking idiomatic Ruby and getting the most out of the Ruby programming language. It’s a breezy read, written in the same conversational tone that Olsen used in Design Patterns in Ruby, and the book is broken down into 31 bite-size chapters about a dozen pages in length. Each chapter’s title is some principle for programming eloquent Ruby – the first few are “Write Code That Looks Like Ruby”, “Choose the Right Control Structure” and “Take Advantage of Ruby’s Smart Collections” – and each explains that principle, provides code, shows you where you can find the principles used in actual, working projects. The book straddles the line between tutorial and reference; it’s written in tutorial style, but it’s organized so well that it might as well be a reference for those parts of Ruby that you might not use often (but should) as well as for those parts you keep forgetting (in my case, I always end up having to look up metaprogramming). I’ve been going through it at about a chapter an evening, and I’ve been getting smarter each time. Whether you’re coming back to Ruby after a hiatus like I am or if you just simply want to get better at Ruby, you should have this book in your library.

If you’d like to know more about Eloquent Ruby and its author, Russ Olsen, check out this interview with him at InfoQ.

ruby on rails 3 tutorial

I have yet to properly sink my teeth into Ruby on Rails 3 Tutorial but a quick scan of the book has shown that it’s quite promising, and the Amazon reviews are bolstering my belief.

I’ll be writing from time to time about my return to Ruby and Rails in this “Ruby Foo” series of posts, and I hope that whether you’re new to the language, returning after a break like me or aiming for “guru” status, that you’ll check out this blog regularly for notes on my explorations and what I’ve learned.

This article also appears in the Shopify Technology blog.