Why Ruby on Rails?
My personal road to Ruby
Making my way down the stack
I’m a front-end developer and designer in my day job and freelance life. That term, “front-end developer” can mean different things depending on who you ask. We’re an odd breed.
All FEDs write CSS and HTML. In a small shop, some FEDs are expected to do some UI and design work as well. In a traditional agency those are typically separate roles.
Rewind: The infamous DHH blog-in-15-minutes video
Many years ago, (I think around 2005) DHH made (a video) where he demonstrated how to create a simple blog application in 15 minutes, using something called “Ruby on Rails.” Keep in mind, it was a different time back then. This demo struck a chord with me in a few ways:
- This guy is on a Mac? I thought only designers used those. Man, it would be nice to be able to use my Mac for programming too. (Back then, most “real” programmers I knew used Windows.)
- “Look at all the stuff you’re not doing!” I remember that line even years later.
- He really did build a working prototype in 15 minutes.
- Ruby seemed readable and, as he put it, “beautiful.”
I should learn this stuff. Someday.
I promised myself I would check out Rails at some point. I bought DHH’s “Agile Development with Rails” second edition. The book came. I put it off again. Then the third edition. I bought that one. I put it off again. Now the fourth edition for Rails 3.2 will be released soon.
Now, years later, I’ve learned my lesson about buying books about a piece of software that is evolving as fast as Rails. They just can’t keep up. But that’s okay, because there are a lot of other options for learning Rails online. Some free, some pay-for.
Reason #1: Evolution and improvement
Although I never found the time to dive in, I kept an eye on Rails. As the framework matured, there are some milestones that stood out to me.
Rails 2 and sexy migrations
I remember checking out watching a RailsCasts screencast on this and thinking WOW! Admittedly, 5 years ago I didn’t know what I was looking at, but I remember watching this with a .NET developer friend. This is the feature that put Rails on his radar as well.
Rails 3.1 changes
Rails 3.1 brought about some changes that felt pretty significant to me. There’s a great rundown of the large ones here.
Rails ♥ Merb
From the Merb history page on rubyonrails.org:
This, to me, seemed like a sign of a healthy project with good leadership. As frameworks grow and get battle tested, better patterns often emerge and it becomes necessary to stop and reconsider some of the core pieces. John Resig did the same thing when he announced that the selector engine in jQuery was being extracted from jQuery and moved into its own project: Sizzle.
SASS and CoffeeScript
Among front-end developers, SASS is a game changer. CSS feels stupid sometimes. To anyone writing CSS all day, SASS a blessed relief. When DHH announced that it was going to be native to Rails 3.1 (and indeed, the default) I thought it was an excellent move. At the time, the change was controversial but I personally think the Rails team got it right. It also made for the most epic GitHub comment thread… ever.
Reason #2: The community
That’s my impression at least. It seems that whenever I meet a freelance programmer or one that works at a web startup, there is a solid chance their preferred back end language is Ruby, PHP or perhaps Python.
In most cities where there’s any sort of web tech scene, you’re likely to find a Ruby and/or Rails meetup. Here in San Diego, there is a growing web tech scene. I’ve attended the SDRuby group that meets at UC San Diego a few times now and it’s a blast. Last month it was “Newbie Night” and there was a healthy showing of new programmers who hadn’t even installed Rails yet. Now that is newbie-friendliness.
Events like Rails Rumble show that there’s a community of developers that are still excited about building things. Even if they use Rails in their day job, they still build things with it for fun. This isn’t specific to the Rails crowd but I’ve personally seen this time and again. Rails developers like Rails in a way that other developers don’t.
The excitement about the next version of Rails is common among Rails devs I’ve talked to. I just haven’t personally seen .NET developers, for example, get really excited about the next MVC framework Microsoft is working on.
Reason #3: Ruby reads well
As a non-developer type, when I look at a massive block of C# or Python it takes me a while to figure out what’s going on. I’m a little better at PHP only because I’ve has some experience with it. When I look at a chunk of Ruby, I feel like it “reads” better. This is what initially attracted me to jQuery. People have called jQuery “expressive” and I’ve heard the same word used to describe Ruby.
Reason #4: Many resources for learning
At the local bookstore there’s generally an entire row of books dedicated to Ruby and/or Rails. There are behemoth reference books for every language out there, but when it comes to PHP and Ruby in particular, there’s also a large array of smaller topical books that really fill out the shelf. They don’t feel like textbooks — they feel more “entrepreneurial” in nature. If that makes sense.
Then there are the online resources, which is what I’ll be focusing on as I learn. Here are a few of the biggies:
- Ruby on Rails tutorial by Michael Hartl
- Ruby on Rails Guides at rubyonrails.org — I love that these are maintained to be compatible with the latest stable and edge Rails.
- Code Academy Rails track
- Code School — That looks fun.
- RailsCasts — I’ve watched a few of these now and Ryan Bates is really great at explaining concepts.
- TryRuby.org — Another Why creation.
- Ruby Source .com — Full of tutorials.
Reason #5: All the cool kids are doing it. …still
As of 2012, Rails is now 8 years old. When it started getting traction years ago, some more cynical bloggers (this was pre-Twitter… which itself was originally a Rails app) took issue with the fanboy-like craze that ensued that lasted for a year or two. After all, there are new programming languages and frameworks emerging all the time. This was surely another flash in the pan.
It’s telling to me, that after all these years and after significant changes to the framework, it still feels like there is momentum behind Rails. Again, I speak as an outsider and as a font-end developer who’s only dabbled in back-end programming.
I recently posed this question to a group of web geeks at a local meetup:
“Do you think Rails is still relevant or do you think it’s lost its way in some respects?”
Reason #6: Jobs
About once a week I’ll get an enthusiastic email or call from a tech recruiter with an “awesome opportunity” for a “Rails Rockstar™.” Okay, so most of these recruiters, God bless them, are totally clueless about technology. But the fact is, there is a lot of good Ruby and Rails work out there. Especially if what you’re interested in is web technology.
In my sleepy beach town of Carlsbad California (30min north of San Diego) there’s not a large tech scene. I know of only four .com’s who, at some point, have tried to find local developer talent. One of them is the company I work for, HireAHelper.com, which is a .NET operation. The other three are Ruby shops.
What about Python & Django?
The only other community I’ve seen that comes close to what I’ve described above is the Python and Django community. Django has also been around for years now. From what I gather, the software is mature and the momentum is still strong.
Warning: This is going to be highly subjective.
Django’s growth has seemed more deliberate and focused. As of this writing, the stable release if version 1.4.2. That, of course, is just a number. But when I look at the history of the Django project, I see steady, incremental changes with a focus on stability and documentation. Unlike Rails, where things have changed quite a bit between the major releases and you need to be sure that the tutorial or book you’re reading was written for the exact point release of Ruby and Rails your running.
I suppose this comes down to what type of project you like. Since I’m learning Rails mostly for enjoyment, I don’t mind that it’s quicker paced and much more opinionated. I like my meatballs spicy.
The other intimidating thing about Python is that the Python developers I know (all of whom love Django) are real computer scientists. Books on Python and Django love to point out that NASA and Google love Python. In my own experience, Python devs are some of the smartest programmers I’ve ever met and they most certainly came from the bottom of the tech stack. I do know of one Django dev who came from a design background, but in my circle, he’s the outlier.
Does this mean that using Django requires that you be a proper hacker to use it? Of course not. I’ve just noted that the men and women I’ve met who are really into Django are a lot (a lot) smarter than me. And I’ve met some Rails developers who made me think “Well if they can do it, I’m sure I can figure it out.” I’m not trying to work for NASA. If Rails is perceived as bumper bowling for non-programmers, that’s fine by me.
When it really comes down to it, I think Ruby is strong on my radar and it has been for years now. Developers I meet, articles I read, projects I hear about, useful scripts I discover on GitHub throughout my day… it all points to Ruby. SASS and Compass are written in Ruby. Some of my favorite startups and websites are built with Rails. There’s no shortage of Ruby jobs. My local Ruby meetup is fun and interactive.
So, for myself, it’s Ruby or bust!