This post is something I've wanted to tackle for quite some time now. Having seen 100+ students graduate at DevMountain, and knowing even more who are learning to code on their own, I've noticed some common patterns that I believe are harmful to learning quickly.
I won't claim that following my advice will suddenly bring about a moment of great clarity, but I do think that if a student keeps these ideas in mind they will start learning noticeably quicker.
1. Coding is not syntax memorization!
This is by far the most common problem I see in new students, particularly once we begin delving into frameworks with robust API's. While knowing the basics of a language's syntax is crucial, remembering the exact order and nature of every Array method's parameters is not.
Now I'm not saying that a student shouldn't eventually know the basics of their chosen tools as second nature, but I believe this should come with time and repetition rather than by brute force memorization. It is not at all uncommon that I see a student in a stress spiral because they feel like they won't be able to start learning about services until they can build a controller from scratch. I would argue that it is far more important that the student understands what the purpose of a controller or service is and how to use it than it is to be able to write one from scratch.
The web ecosystem is simply too big to memorize everything, and no one is expecting you to. Even experienced developers are making silly syntax mistakes and checking the docs every day. Which leads me to my next point...
2. Your own code is your best reference
What I mean by this is that when trying to remember how to accomplish something your own past code should be the first place you check. I suggest this for a number of reasons:
- It will be much easier to read your own code quickly than to attempt to digest someone else's solution. They may follow different practices, or have a significantly different code style. You will be much more proficient early on reading your own code versus a stranger's.
- This will help build consistency in your code and your learning. If every day you are googling and possibly finding a different solution, none of those solutions will actually stick and become something you are accustomed to.
- You will gain a more solid understanding of previous learning. Perhaps yesterday you solved the problem, but didn't quite understand your own solution. Today when you look back at yesterday's code it will make more sense, solidifying that knowledge.
There are a few things I want to clarify here before moving on. I am absolutely not recommending avoiding Google/StackOverflow/GitHub Issues/etc! These are all critical tools for any developer, I am simply recommending that your own code be your first point of reference out of many.
I am also not asking that your code be stagnant and always written exactly the same. We all grow and learn best practices. If you follow this method it is important to learn best practices early, as well as being extra mindful of where you can improve. Otherwise you may get stuck in a rut of bad practices that is constantly self reinforcing.
3. Be nice to yourself.
If ever you find yourself in a thought like "Other person is learning so much more quickly!" or "I'm not cut out for this, I just don't get it!", take a step back.
Learning to code is hard. Not only are you learning one or more brand new language(s), you are learning an entirely new way of thinking. You are suddenly asking your brain to do things it has never done before. The mind works on connections, we find similarities in things and learn based on what we know already. When you start coding for the first time you don't have anything to connect to, it is fresh ground. Trust me when I tell you that it will get better after you build a foundation to work from, it is just a matter of fighting through the hard part.
If remembering that doesn't help take the edge off, take a break. Go do something you enjoy for a while. The code will still be there when you come back, and a fresh mindset solves far more problems than an angry and depressed one.