You want to learn that new language or library or framework as soon as possible, right? That’s understandable. Fortunately, there are a handful of tips that can help you to better retain all of that heavy programming information that keeps flying in one ear and right out the other.
No More Cram Sessions
Nobody wants to hear it, but cramming is the worst way to learn how to program. If you’re anything like me, cramming was your modus operandi all throughout school and university. It’s the only way you know how to study.
But learn from my mistakes: the more you try to cram, the less you’re going to remember. That’s pretty much true for any knowledge-based subject, but it’s especially true when it comes to programming.
Review, Review, Review
Another reason, why cramming is antithetical to long-term knowledge retention is because memory fades over time. This isn’t always true — I’m sure we all have a few childhood memories that will never disappear — but it seems to be the general case for memories that aren’t tied to emotion.
There is some debate whether memory itself decays due to time (decay theory) or simply gets pushed out and replaced by new memories over time (interference theory). Whichever theory you subscribe to, the result is that older memories are more likely to fade away.
Use Several Different Resources
The toughest aspect of programming — at least for brand new coders — is the sheer breadth of details and nuances that need to be internalized. Until that internalization happens, you’re going to be in a perpetual state of head-scratching.
Depending on the language, you’ll need to memorize hundreds of syntax rules (e.g. keywords, semicolons, whitespace). Some languages are stricter, others are less so, and still others have their own unique approaches to syntax that aren’t used anywhere else. All of this can be confusing if you have no prior coding experience.
Teach Concepts as You Learn Them
There’s a beautiful concept in programming called rubber duck debugging, which describes the technique of explaining one’s code, line by line, to an inanimate rubber duck. It’s used when a particular segment of code is broken, but there’s no obvious reason for it.
Strangely enough, most programmers have a “Eureka!” moment in the middle of explaining the code as they suddenly see where the error in coding logic occurs. Verbalization triggers a different area of the brain, forcing you to see the problem from a new angle.
If you can’t explain it simply, you don’t understand it well enough.
Deliberate Practice Makes Perfect
The notion of talent is complete rubbish. Nobody exits the womb as a world-class violinist, wrestler, or programmer. Sure, some people might be more inclined towards certain disciplines, but talent without experience is useless. Similarly, hard work is always more valuable than talent.
Experiment With Personal Projects
For me, homework was the worst part of school. It just seemed like an elaborate ploy to kill fun and keep students busy — which, to be fair, was sometimes true. But now that I look back, the importance of homework finally makes sense. It forced me to apply newly acquired knowledge in an active way.
If you’re enrolled in a programming class don’t underestimate the efficacy of homework. Take it seriously, always treating it as a chance to further cement what you’ve learned into long-term memory.
Relax & Bookmark Everything
The truth is that no programmer remembers everything they’ve learned. Even after you’ve been working with a particular library or framework for a while, it’s not uncommon if you can’t recall every function or variable off the top of your head.
In fact, trying to memorize everything might just end up being a huge waste of time and effort. Reference sheets exist for a reason. Why commit an entire encyclopedia to memory when you can just flip it open whenever you need it? The same is true for programming APIs.
Final Thoughts
I’ll repeat it a million times if I have to: programming is hard and it’s okay if you struggle with it.I’ve been programming as a hobby for over a decade and I still find myself intimidated when I have new concepts to learn.
Don’t beat yourself up if you can’t remember everything right away. The above tips will hopefully prove helpful to you, and even if they don’t, you can always rely on bookmarked references as a last resort.