A Beginner's Journey with Ruby on Rails

by Dan DeMeyere - @dandemeyere

thredUP uses Ruby on Rails (also known as RoR or Rails) for their development language of choice...and it's awesome. I'm more of a Front-End developer than anything else, but I have a degree in Computer Science and Engineering that gave me a head start on things like Model View Controllers (MVC) and other Back-End architecture patterns. I can't say I actually enjoyed the back-end classes in my degree and therefore I was somewhat skeptical as to whether or not I would enjoy working with Rails. Reading the Rail's Wikipedia page was rather intimidating, tossing around unfamiliar terms like agile development and scaffolding. I knew there was only one way to proceed - jump into the deep end and see if I can swim.

What I quickly learned is that Rails takes care of a lot of the ugly work behind the scenes. A lot of things 'just worked'. I didn't thoroughly understand how they were working, but I grasped enough to continue, which is what's important in the beginning; take manageable, bite-sized tasks and just focus on what's ahead. Those little goals can go a long way in terms of confidence and motivation to continue learning.

I think a lot of beginners (such as myself) wonder what will be challenging at first. Well, if you're a back-end layman like myself, and most of your experience lies within basic server-side scripting languages (PHP/ASP/etc), the first challenge you will encounter is the syntax barrier. When I went from C++ to PHP, the jump wasn't hard at all; however, unless you're familiar with Python, Ruby will be confusing at first. There are no semi-colons to end lines of code, everything is dictated by formatting, functions becomes methods, and everything you create is an object. It was a completely refreshing experience to start from scratch. I relate it to moving from one city to another. A fresh start is good if you embrace the situation - you can kick bad habits and have a clean slate to work with. Once I became familiar with the syntax, I started to really enjoy the clean formatting and easy readability of the code. So after you get a handle on the syntax, what's next?

Resources: surrounding yourself with the right ones is key. I happen to work for an amazing CTO who is very patient and able to help me whenever I come to a dead end. When he's not around or occupied, online resources become my best friend. Rails has great online documentation. For example, if you're looking to install Rails, look here. Ready for a couple of guides to get your feet wet? Try the official Rails guides. If you're ready to start building your own app from scratch, this Rails API is great for looking up Classes and supported methods. I happen to be a 'learn-by-doing' person as opposed to the 'study first, do second' type. If you're like me, then get your environment set-up and start going through guides - it's the quickest way to feel comfortable working in a Rails environment. If you're working on an app that's already built, try building off previously built models/views/controllers instead of building your own. Seeing working code in action and modifying it is a great way to understand the intricacies of Rails. If that's not your style, and you'd rather read up on Rails/Ruby first, it's not a bad idea. Rails has it's own way of approaching problems and it's probably best to have a basic knowledge of principles like DRY (Don't Repeat Yourself) before you develop any bad habits. Supplementing your hands-on learning with studying is probably the best idea, but to each their own. 

As I'll be purchasing a new computer in the next month, there will be a series of posts pertaining to getting the environment up and running, what apps to use (TextMate, Coda, GitX, etc.), useful snippets of code, epic failures I'm bound to cross (and how to protect yourself from doing the same), and other fun things like bundles, syntax highlighting themes, command line tips/shortcuts, and useful gems/technologies/implementations that I come across along my journey.

Dan
Front-End Developer and Ruby on Rails Newbie
dan@thredup.com