Photo by Dries Augustyns on Unsplash
3 min read
Doing codewars challenges for the first time can be tedious, especially if you are new to coding. When I started doing codewars, I was intimidated by the challenges and sometimes felt defeated. After doing codewars for a few months, I thought I'd share some tips I've gained along the way.
The first tip is to organize & filter which codewars challenges to do
If you haven't had much coding experience before, do not make the mistake of switching between different Kyu's. Do the 8kyu's in the beginning and solve ALL of them until you move on to the next kyu. 8kyu's will help you get down the fundamentals and will help you gain familiarity with various functions/methods. Additionally, it's best to focus on a specific type of 8kyu challenge to solve instead of constantly switching between different kinds of challenges. For example, doing a handful of fundamental challenges before switching to array-based challenges.
The second tip is to study the MDN docs
A helpful resource you can use for studying is Anki. Anki is a digital flashcard program that uses spaced repetition, a technique for long-lasting memorization. Consistently using Anki will help you effectively study these functions/methods.
The third tip is to thoroughly read the challenge description
Although it's tempting to quickly skim through challenge descriptions, skimming can lead to missing key points and potential edge cases which might prevent you from solving a challenge. It's also important to look through the challenges' test cases as they're helpful references and can hint at a potential solution. Once you get a clear understanding of what the objective is, start the challenge.
The fourth tip is to time yourself
Aim to solve the problem in 25 minutes or less. If you are clueless for the whole 25 minutes, take a break & research what you were struggling with. The point of doing codewars is to learn and grow as a programmer, you are not helping yourself if you're staring at a screen for more than 25 minutes without taking a break or googling. When you feel ready, try to solve the problem again, and if not, do a different challenge.
Furthermore, in technical interviews, you are most likely going to be timed so timing yourself is a good habit to develop.
The fifth and final tip is CONSISTENCY
Codewars can feel discouraging if you have no idea how to solve a challenge. However, being that you're consistent, a challenge that seemed nearly impossible to solve in your first week might be something you can solve a few weeks later. As you get more consistent, you will recognize patterns that you've seen in previous challenges, which will help you get better at coming up with solutions.
On a final note...
If you cannot solve a codewars challenge, it does not define all of your skills and abilities as a coder. Be patient and kind to yourself.
Good luck, and happy coding :)