Information Technology Dark Side

Struggles of a Self-Taught Coder

Information Technology Dark Side header image 2

20/10 Hindsight: 5 Things A Rails Noob Should Do From the Very Beginning of Your Rails Project

February 5th, 2010 · No Comments

Lo-Glo as You Go
Globalizing and localizing a Rails app isn’t hard work, but it’s mind-numbingly tedious if you have to do it all at once. Trust me. You’ll be happier if you lo-glo as you go, so just do it if there is the slightest possibility you’ll need to later on.
REST Along the Way
I’m not talking about naps (never been a fan of those). I’m talking about how you structure your controllers and views. If you don’t understand REST at the beginning of your project, just take a little time to learn it. I wish I had. Now, every time I touch something that’s not RESTful, I re-factor it. I lourve the cleanliness, but I wish I’d just done it this way from the very beginning. Even the mistakes I would have made would be easier to clean up now if I’d used REST.
Get Crazy about Plugins: Don’t re-invent the garbage truck, let alone the wheel. It’s sometimes surprising what has already been done for you, from authentication to calendars, there are Rails plugins galore.
Watch the Freakin’ RailsCasts: I was about a year into TroopTrack before I watched my first RailsCast by Ryan Bates. This is one of the best Rails resources on the web and will open your mind to a lot of stoof you wouldn’t think of on your own.
When in Doubt, Pick the Rails Way: Let’s say you had a choice between using cascade deletes at the DB level and using :dependent => :destroy in the model. You might be tempted by cascade deletes, depending on your back-story as a coder. Don’t do it. GO WITH THE RAILS WAY. Later on, when you’ve been around the block a few dozen times, you might feel comfortable with deviating from the Rails way, but … try the Rails way first.

If you enjoyed this post, make sure you subscribe to my RSS feed!
Stumble it!

Tags: Uncategorized

0 responses so far ↓

  • There are no comments yet...Kick things off by filling out the form below.

Leave a Comment