Hacker News new | ask | show | jobs
by hippich 5188 days ago
friend of mine recently asked "do you do rails?", I answered something like "nope, going to learn it only if it will be paid well". "well, you can get $150/hr on the project I am working on"...

After this conversation I became really interested :) My question - having no background in ruby or rails, should I just start from latest one? I.e. how compatible it with all code deployed already?

3 comments

You'll catch a bit of unease with that motivation from some quarters, for what it is worth, but I generally applaud people making microecon 101 work for them.

There are two main branches of Rails in use today: 2.3.x and 3.x . Many of the idioms involved in day to day coding are strikingly similar, but the internals are incompatible in many ways. As a workaday Rails programmer you'll typically spend 95% of your time working far away from the internals, so a solid background in MVP design and Ruby / object oriented programming gets you pretty far on both Rails 2 and 3. Their magic incantations for doing some things are different but they can be cheat sheeted or Googled at need.

In general, you would expect greenfield development to be on Rails 3 but a lot of the money in the ecosystem is still in Rails 2 apps.

In this vein, there's actually still a Rails 2.3 version of the Rails Tutorial online:

http://railstutorial.org/book?version=2.3

Don't sweat it. Try to get involved in a project that is from scratch, that way it won't be an issue.

I'll share my own story, having gone thru just this recently.

First I went thru Michael Hartl's tutorial back in Dec:

http://ruby.railstutorial.org/ruby-on-rails-tutorial-book

I believe it was in 3.0 at the time, now been updated to 3.2. No matter. I found a local business who needed something done but had never done more than Wordpress sites. I offerred my services pro-bono w/ a small equity share on the condition I could be mentored by a very sr. guy. At first they said "no, we want just one engineer solo on this". I said good luck with that and they got back to me two weeks later with a very sr. guy to give direction.

Beyond Hartl's excellent tutorial, which in printed form is probably 500 pages or so and will take maybe 40 hours of dedicated work, I highly recommend the Rails guides themselves. Just the getting started guide alone is chock full of info on getting a basic blogging platform together. In doing this project I have reviewed the majority of the Rails guides back and forth, read countless Stack Overflow threads, blog posts, rails casts, etc, and generally spend about 20-30 hours per week above and beyond my day job. The magic in this is that you will have to filter through a bunch of examples that may be several years old and are targeted at various versions of Rails, so you will sort of distill the differences in versions/idioms by osmosis in a way. If I had to take on a 2.3 code base at this point I doubt it would hinder me much.

Where do things stand now? Well, my current project is about to hit customer beta and my mentor has asked me to come along with him on another project for a client in NYC. Also I applied to a local early stage startup and despite having only 3 months under my belt they're considering bringing me on (they were looking for someone with 3+ years, but I learn quick and am very motivated :). If I get the job I'll likely take it (it's something I really believe in, potentially world changing stuff), say goodbye to the Windows enterprise world forever, and forgo doing further contract work for the time being as I won't likely have the time. My main interest now is getting good as quickly as possible. Long term, maybe this company will take off and I'll have the time of my life, maybe I'll strike out on my own startup, or maybe I too will pull $150/hr on contract. Who knows.

> you will have to filter through a bunch of examples that may be several years old

No need for that now, search for "rails examples" and you'll find the RailsApps project with useful example apps, all up to date (Rails 3.2) and kept current by a growing community of contributors: http://railsapps.github.com.

Rails 3.2.3 is compatible with Rails 3.1 and later versions. The main difference is a change in the default security settings (made in the wake of the recent GitHub mass assignment vulnerability—and, IMHO, long overdue).

If you want to get started with Rails, I suggest reading the Rails Tutorial, which I just updated to use 3.2.3:

http://railstutorial.org/book?version=3.2

If you're going to be working on a Rails 3.0 project, you can use the first edition of the book instead:

http://railstutorial.org/book?version=3.0

Screencasts for the 3.0 version are available at http://railstutorial.org/screencasts, and I'm planning to start on the 3.2 screencasts later today.