You were new to Rails, Web Development, or even programming. But you decided to give Rails a try. You thought it might be challenging but doable, like climbing a hill.
Unfortunately, as you spent more and more time with Rails, things got more and more confusing. Each time when you were stuck and searched for a solution, you encountered some new words: Bundler, MVC, ERB, TDD, ActiveRecord Associations... There were conventions after conventions. You felt all you did was googling and copy-pasting and had trouble gluing all the components together. You started to lose confidence and wonder if you would ever learn Rails or Web Development.
I know how you felt because I was you couple years ago. There were bugs I spent days debugging, made me want to bang my head against a wall, and turned out all I missed was a trailing
s for pluralization.
Let me tell you something: you are not alone feeling frustrated or overwhelmed. It's not your fault feeling this way. We have all been there. Learning Rails is NOT easy, but you are already on your way. You should be very proud that you are still sticking around.
In the remaining parts of the post, I will explain:
1. why is learning Rails so hard
2. what should you do
Why is Learning Rails SO HARD?
First of all, if you were new to Web Development, you were not just learning Rails. You were learning a lot of things in the land of Web Development that are not specific to Rails. For example, when you were struggling to get some data presented on a view, you were learning both how to tell Rails to do that and the Model-View-Controller pattern. Part of the challenge might be related to the fact that you didn't know the correct syntax for Rails. But most likely, because you were unfamiliar with the Model-View-Controller pattern, you put the piece of logic in the wrong place which made the task much more difficult. Similarly, when you were struggling with ActiveRecord Association, you were not just learning all the "magic" that came with Rails but also how to correctly model data. Data modeling is an entire subject on its own.
Secondly, if you were new to Ruby, you were also learning Ruby along the way. Ruby is a fun and powerful language. There are books and courses that focus solely on Ruby. Mastering Ruby is by no means a trivial task.
Thirdly, unless you were a senior engineer with couple years of industrial experience, you were also picking up many best practices while trying to be a Rails developer. To name a few: Test-Driven Development, Domain-Driven Design, Object-Oriented Programming...
You should be convinced by now why you deserve a round of applause for sticking around ??? . There were other topics I didn't list above, such as SQL, Relational Database, and GIT. But you get the idea.
Learning Rails is hard for a beginner because you are essentially learning a lot other hard topics in the land of Web Development and Software Engineering. You are not climbing a hill, you are climbing a mountain of doom.
What Should You Do?
1) What ever resource you used to build your first Rails app, either the Get Started page from the Rails Guide or Rails Tutorial by Michael Hartl, you should go through it again. I guarantee that it will be easier this time and you will still learn a lot. As you are going through the materials for the second time, keep a list of all questions you encounter: the "magic" you see but don't quite understand, the places you stumble upon and need to google around, or just things you don't feel comfortable about. If you have a blog, you should make a post for each question on the list. (Spoiler Alert: you will come back and answer these questions later. )
2) Start building a small project on your own. Following tutorials should have given you enough foundation to start working on a small project. By small I mean really small-as small as a todo list. Working on your own project is more fun, more exciting, and more educational. As you work on your project, you will get stuck. Add the issues you encounter to your list or blog. Then google around and move on. Leverage resources like the Rails Guide, StackOverflow, and Reddit (/r/rails and /r/Learn_Rails). Your goal is to finish your simple app. So don't get too worried about not able to fully understand everything you read.
3) At this point, you should have a good list of questions. Many of them are related or repetitive. Group them into categories. For example, there might be a category about ActiveRecord Associations, a category about setting up Rails environment (Bundle, Gems, RVM...), a category about ERB syntax... Pick a category you interested in the most or bugs you the most and try to understand the questions you have. Again, leverage resources like the Rails Guide, StackOverflow, and Reddit.
You also have at least two working apps. While you are learning about a topic, play around with your apps: try different syntax, try different ways of modeling, try to break it and fix it.
As you learn, go back to the blog posts you wrote and answer your own questions. Your future-self and others learning Rails will appreciate your effort. And you will be seen as a Rails expert as well 🙂
Now you get a plan of attack, it's time to execute and have more fun (and more struggles)!
If you find this article helpful, I will really appreciate it if you can share it around!
I will talk more about learning Rails next time. Don't forget to subscribe 🙂