Tip 1: Plan
Yes I know it sounds pretty obvious, but hear me out..! The first thing I wanted to do when I started playing with Rails was to simply create an application that would help out at work. I opened up a terminal along with Sublime Text and started coding away. I built feature after feature, however when I looked back on what I’d built, none of it really integrated as well as it should have, key features and elements were missing, the interface was horrible and the code was all-around crappy. Learning points: Know exactly what you’re going to build and what it’s going to look like. You dont need photoshop mockups of everything, but at least draw some sketches on paper and think about how each piece of your application works with one another.
Tip 2: Build by TDD (Test Driven Development)
With all my past backend-coding experiences being based on PHP, I’d been used to building stuff then testing to see if it worked (not particularly uncommon). Whilst this is an okay way of doing things (certainly better than not testing!), there’s definitely a better way. Imagine writing the tests before you code and having a popup come up every time you save a file to let you know if you’re application is still working. This sort of active approach to testing not only makes sure you write code that works, it gives you confidence in learning the language, it gives focus to what your building and it saves time down the track (as you know the minute something is broken in your application). Need another reason? I thought not! See this nettuts primer for a basic overview and get this book if you want to test like a boss.
Tip 3: Absorb Yourself
The online ruby community is pretty amazing; Why wouldn’t you wan’t to be a part of it? Join the irc channel (#RubyOnRails), read as many ruby/rails blogs as you can and follow a ton of rubyists on twitter. The help people are willing to give (particularly in IRC) still amazes me and in surrounding yourself with clever people, you set yourself up (hopefully) for building clever applications. Oh, and the cool kids go to RailsCamp
Tip 4: Be Aware
Be wary that books / guides you may be reading may have been written for versions of Ruby/Rails that don’t match up to what you’re using. Be aware that there may be differences in syntax or solutions to problems in code may have changed significantly.
Tip 5: Jump in at the deep end
At the end of the day, there’s just no substitute for just getting down and dirty with some code. Jump in at the deep end, try and build an application (after planning it of course!) and enjoy learning.