Skip to main content

Command Palette

Search for a command to run...

Staying in shape

Updated
4 min read

As echoing a previous statement I made in another post, and that I've taken to heart, if it was worth learning, it's worth reviewing.

To emphasize this point, when I'm practicing code, I don't necessarily just submit what I'm doing and forget about it once I find a working solution. Instead, I'll elect to take note of the solution and tuck it away, after making sure I thoroughly understood how and why it works, and what's good or bad about it. I'll then choose to forget about it and try and re-code it the next day without referencing what I found out the day before unless I really get stuck.

You will worry, and that's ok You're going to feel worried you won't remember anything, and that you won't be able to solve or understand the problem again. That's fine. That's supposed to happen, and that ensures you're actually making progress towards truly learning the concept. Not just in being able to reiterate an explanation of it, but how to feel and utilize it. You will also be surprised by how much you actually do remember despite not putting any effort into it. Trust your brain. Remember how it was when you were a very small child and just did stuff and didn't even think about having to remember what you learned. You just did stuff, and it worked. The actual truth is that if you don't do it, you will definitely forget it. It's the same now as when you were a kid, it's just that constant hammering of bad habits from things like the pressure of the school system to memorize for upcoming exams have beaten that instinct for true learning out of you and even made you averse to it. Well, that's what I experienced anyway. I felt like I had to unlearn the wrong way to learn, and it was because of such systems. Maybe I'll do a post on that, too, sometime... The point to take away from this is to trust your brain. It does a lot for you in the background. I'm very grateful I studied a foreign language seriously over the past year because if you don't learn this, and don't learn to accept ambiguity and that it takes time and reviewing to actually be able to effectively work with something you've learned, and that you can't force the process and must let it happen passively, you'll fail. That reality hits you very fast if you try to learn a foreign language that's very distant from your native language.

How many times have I learned something, only to promptly forget it because I never really reviewed it? Too many times, honestly. This is instrumental in preventing that anxiety-inducing phenomenon and raising my confidence in problem-solving in general. Depending on how quickly the topic can be covered, or if I have good cheatsheets or otherwise notes made, too, I'll even use an SRS (spaced repetition system) app like Anki and add it to my reviews. Either way, I'm making sure I remind myself of it, at least somewhat regularly and efficiently.

I'm currently doing this with a course on advanced JavaScript and just today was really drilling in how things like scope, hoisting, arguments, and environments actually work in JavaScript under the hood.

Because of what I was reviewing today, I recalled fixing some of the first code I ever wrote, after realizing I hadn't declared my variables inside of a for loop. At the time, I knew it was bad conventions, but I didn't know why it still worked. What I was reviewing reinforced my knowledge of why it still worked, and the real reason as to why it's not a good practice. It was because of how, unless you're writing JavaScript code under 'use strict' conditions, there's a concept known as "leaking of global variables" where if you initialize a variable without actually declaring it within a function, JavaScript will declare it for you in the global scope. Nowadays I know this clearly isn't something we should be doing if we can help it, as it can cause memory leaks when those variables are not needed, or perhaps it can interfere with code trying to use the same variable names elsewhere.

These are all concepts I've understood to varying levels over the past few years, maybe I still understand now, but did I ever really make sure my knowledge of them was tightly secured? Not really, which is why having a solid review system is important. In reviewing them and in going into practice after doing so, I'll find that I can think about things a lot quicker and envision things that I wouldn't have otherwise. It just makes things easier and the confidence it builds goes a long way in extending what you're able to achieve.

What you'll find naturally coming from your mind will seem magical when you've fed it well.