You’ve just finished working through Hartl’s Rails tutorial. Now what? Time to start working on something bigger and better, right? Except as soon as you do, you get stuck. Was I supposed to create the model or controller first? Which way do the has_one and belongs_to associations point again? How do I write a custom validation?
Take a step back. You’ve made one key mistake here, and that’s thinking that bigger is better.
Bigger isn’t better, better is better. #coworking— Alex Hillman (@alexhillman) June 3, 2015
Work on something smaller
The Rails Tutorial walks you through pretty much EVERYTHING you need to build a Rails application. That’s a lot of stuff to take in! No wonder you can’t remember it all. And the truth is, you aren’t supposed to. You’ve got the big picture, and now it’s time to take little pieces of it and put them into practice.
Don’t stress that you can’t write something more complex than the tutorial app, because it’s already pretty complex (you just don’t realize it yet). Just work in small pieces…
- Make ONE page, and have it display some dynamic output
- Make ONE model, and figure out how to display it on the page
- Make ONE form that lets you add new things to the database
That’s how you get things done – one idea at a time (and one line at a time!)
So what do you do when you’re done with the tutorial? You know the answer to that by now…
Move on to something smaller and better. Keep doing that, and you’ll eventually create something bigger and better. But you have to start off with smaller and better. You have to build up your program in small pieces, one idea at a time.