How to level up your coding skills by using the ‘brute-force’ method
Sometimes, coding concepts don’t come easily.
Sometimes you do everything you are supposed to do — you build side projects, you watch videos, you subscribe to newsletters, and you still feel like things are in one ear and out the other.
I feel this way most of the time when I am trying to learn a new technology or level up on an existing one. Learning a concept once and then moving on just doesn’t stick in my brain, no matter how much I would like it to.
Whether you are starting out or trying to level up, here is a system that I have been using since I started my coding journey that I have found to be very helpful — I call it the brute-force method.
At a glance
Remember in elementary school when you had to write out multiplication tables? That is how I know that 9x9 is 81, and that is how I learned how to use a reducer in javascript (among many other concepts).
Is it fast ?— no
Can it be frustrating? — yes
Does it work? — for me, yes.
How do you do it?
Let’s say you are solving a coding problem. And try as you might, you just cannot solve it. The temptation is already there to google it and find the answer, so what is the harm?
The harm is that if you start with a copy + paste mindset, you will eventually trap yourself in it (trust me, I did and have been working to dig myself out ever since).
But let’s say you do go and peek at an answer because your frustration levels are beyond high and you just want this to be over. Then go ahead and do it.
Now really look at that solution. Try to take it apart like a clock and then put it back together. Is there syntax in there that is new to you? Look it up and try to use it independently so you can understand that as an isolated concept. Figure out why this particular solution has been written this way.
Now, close your new-found answer key/solution, and try to solve it.
If you get stuck and you have to look at the solution, there is one rule: You have to start again from nothing.
After this, keep going. Try to get to the end of the solution line by line. Every time you reference that answer key, erase your file and start fresh. By the time you successfully solve the question you will have internalized more than you would have by just glancing at a solution and walking away.
How do you level up?
1- Docs > Stack Overflow
I love a good stack Overflow solution, but try as best you can to find some primary documentation before going to it. It would be like writing a paper on Romeo and Juliet by only reading other people’s blog post feelings about the play. Sure, you’ll get the gist of it, but you may miss the purpose of it.
Bonus points: If you end up in docs, my rule of thumb is to read the entire page, even if it covers more than the concept you are trying to learn. Trust me, this is a tactic that has helped me more than most.
2- Improve your code by looking for more solutions
Okay, so now you have a functional solution. But can it be better? Now is the time to dig into discussions (maybe even on good ol’ SO) and find someone else’s solution that is a bit better than yours. Go through it line by line and try to learn it the same way that you might have already done in the first step of this.
3- Try to write your code without autocomplete extensions from your IDE
There are a lot of cool tools around that help you by autocompleting your code for you. If you are newer to development, then my best advice is to try to code without them. You’d be surprised at how many devs can’t write a function without the help of autocomplete. Once you feel like you have it down, you can bring them back in.
4- For the love of goodness, revisit your old code
This one is the game changer for me: In a week, try to recreate your new “better” solution that you looked up without referencing the solution in your code. If you aren’t able to solve it, go back to the system you previously used to get it to stick in your brain.
In conclusion…
Yes, this is tedious. And yes, this can be used to simply memorize patterns without really understanding them — but my argument is that you would otherwise potentially never be exposed to some of the cool things that you can learn through this method, so it is up to you to dig deeper than basic memorization.
There are absolutely other less painful ways of learning new concepts and coding skills. But if you feel like you are stuck and need some easy wins, this method is a surefire way to make that happen.