I've gotten a few requests to share how this paradigm shift happened. By trade, I'm a designer. Have been for many years. But how did I learn how to code a basic Rails product and get Qio.me out the door?
The four things that screwed me up:
- Learning what MVC is and how it works
- Learning how Rails has_many & has_one relationships work
- Learning what a string, boolean and integer are
- Learning what a method, object and hash is
My first venture into a product was MyZeus, where I admit I learned a whole lot from sitting down with my awesome co-founder Brandon Weiss. I sat inside the code base because at that time I was designing and building the front-end inside the Rails application. Anyone with moderate knowledge of using WordPress or any CMS should easily understand how Rails organizes views (similar to how many platforms theme content). Every time I looked in the controllers and tried to do something, he would explain it well for me.
First lesson: Find a friend who can show you a thing or two and who has massive amounts of patience.
One of the biggest initial hurdles was understanding how an MVC framework operated. It sounds simple once you understand it and becomes second nature. But like many others, I had so many questions about it. Models send information to the database, Controllers retrieve that information through the accessible model and Views give you the front-end power to display it (MVC). But, I was mostly confused about what type of code goes where. Rails for Zombies helped me with that most immediately. I didn't learn advanced skills through Rails for Zombies, but I did learn what MVC was and how it worked.
Second lesson: Try every single tutorial out there until you find one that works. I suggest Rails for Zombies and even just playing with Railscasts
Rails is definitely not the best framework out there. But it is great for beginners. You can bundle gems which will let you extend functionality with little to no knowledge and really move quite quickly. You can even scaffold (scaffolding a test application and deleting it taught me more than the Rails guides ever did) a few test ideas to learn how it all works.
One of the other tricks I learned was using GitHubs advanced search. Search for what your looking to learn or extend and choose Ruby as the preferred language. This is often times better than searching RubyGems.org because it will fuzzy search and try to pinpoint interest better. Look for gems or code that have high stars to them so you know other programmers thought it was interesting as well (use it as validation).
Third lesson: If your stuck, use StackOverflow or ask a friend. Remember that you do have friends you can ask.
Everyone says it's going to be trial and error. That is correct but it's not very encouraging or useful. Know that it's actually pretty easy to get a Ruby environment setup and with Rails integrated (probably about 1 hour of time). If you don't have the environment set up at all, this post seems to detail it pretty well. Although I'm not sure you need to do every single step in that writeup.
Use open source code to help you as well. I found that the Stripe API documents confused the hell out of me. Instead, I took my own advice with GitHub search and found Monospace Rails by the Stripe team. That allowed me to learn how to integrate Stripe way better than any tutorial. Purely looking at code.
Overall tips: If you have a full-time job, sit with the programmers. Ask them questions. If you have contract gigs, go to the offices and hang with their programmers. Continue to ask each programmer different questions, you'll be surprised how well they can help. If your using a gem and can't figure out a complex problem, either put it in their GitHub issues or send them a really nice email* saying how great their work is and that your stuck. If you just can't seem to grasp any of this and really want to take it seriously, my friends have created The Starter League. It's very comprehensive curriculum that will place you in Chicago for some number of weeks to learn everything you need to know (I've sat in on classes and have learned a lot in one sitting).
*= Don't be fucking rude. They coded something for you, for free. And they don't want to do more of your work (again, for free).
I'm a designer, why should I learn?
Because you will:
- Learn better terminology to communicate with other programmers
- Understand what is simple/complex, time consuming or basic
- Utilize design as engineering power not a visual layer
- Dream bigger and bigger (Be cautious: don't let your knowledge of programming cloud your dreams)
The success? Well, I launched Qio.me just this week and it's closing in quickly on one thousand Web sites created.
Starting with Ruby
Brandon Weiss suggests starting with Ruby first then beginning to learn the extent of Rails. Unfortunately I didn't take this route and I wish I would have. He suggests reading The Well-Grounded Rubyist. I'll be picking up this book as well.
Resources in this article