In this Codewars review, I talk about the pros and cons of using it to improve your programming skills. I also offer some tips for ranking up quickly.
If you're interested in playing Codewars to become a better programmer, and you want to know if it will be a good use of your time, that's what I want to talk about in this video. I'm also going to give you some tips on how to rise up quickly through the Codewars ranks.
Codewars is a website where you can practice your programming skills and earn ranks by completing challenges. You rank up depending on how many challenges you solve, and how difficult those challenges are.
It has a Japanese martial arts theme, and they use some strange lingo to go along with that theme, but you pick it up soon enough. You play the part of a code warrior who trains on Kata, which is what they call each programming challenge. By being more active on the site you earn honor, and by completing Kata rated above your current rank, you work towards that next rank.
To get registered, you must first complete a simple Kata in the language of your choice. If you can't get past this first step, then you probably aren't ready for Codewars yet, and you should spend more time learning the basics.
Once inside, you can do the suggested Rank Up challenge, which is a random Kata from a higher rank than your current level, or you can switch the focus to Fundamentals to do challenges from your current rank.
The Kata themselves are created by other users of the site. There is a review process for getting Kata approved, but I still find that the question quality is pretty inconsistent. I've come across spelling errors, and just plain confusing instructions more than once. But there doesn't seem to be any penalty for skipping questions, so skip away until you find one you like.
The general workflow is this: you'll read the instructions, write your solution, run the sample tests, and if those pass: you can press "attempt" to run your solution against the official unit tests. If you pass them all, you'll get full credit once you lock in your answer.
You aren't penalized for submitting an incorrect solution, so there's no reason to be shy about submitting. To debug your code, you can use print statements, even when just running the sample tests, and those will appear in the output. So use that to your advantage if you don't have a separate IDE to develop your answers in.
These coding challenges only focus on the algorithm part of development, so as long as you can pass the unit tests without timing out you'll get full credit. Properly commented code, and code readability, don't count for anything.
Here's what I like about Codewars.
It's free to play. The site is supported by ads, or you can pay $5 a month for premium, which removes the ads and your code will be executed faster.
There's a low barrier to entry, meaning there's nothing to install, no environment you need to setup to get started. The code you write runs on their servers, so all you need is your web browser.
They support a lot of programming languages.
You get to see other people's solutions and comment on them. And seeing other people's answers is really the best part of Codewars in my opinion. You should definitely take the time to review other people's solutions, and research the things you haven't seen before, to get the most out of this site.
It's good for quick practice in small chunks, at least at the lower kyu.
It's gamified to encourage your progress.
And now for what I don't like.
It encourages leetcode, not readability. You get no points for comments, and the promoted solutions are often so concise that it would take you just as long to unravel them as it would to rewrite your own solution. Don't always trust the voting on what people say the best solutions are.
It ignores validating input parameters, logging errors, and raising exceptions. These can be dangerous habits to get into, ones that you don't want to carry over when you're writing production code.
The discourses about each Kata aren't segregated by programming language, which can be confusing if you only know one language. You might not realize someone's talking about a different programming language that looks a lot like the one you're learning.
Finally, I feel code challenges like these narrow your focus on the wrong things. Practicing on this site doesn't really reflect, nor prepare you for, what most developers do all day. It doesn't teach you anything about architecting projects, documentation, version control, utilizing libraries... it's really just hyper-focused on algorithms.
Who it's not for
With that in mind, here's what I don't think you should use Codewars for:
Learning as a brand new programmer. The site doesn't explain any programming concepts to you at all, or any syntax. I think Codewars would leave most beginners completely lost.
Interview prep. As programmers, we can get too focused on the coding part of the interview process. The chances that you'll see the exact same question in both Codewars, and during your interview, are basically zero. If you're interviewing for a programming job, then you should already know how to code, so it's better to just be confident and trust your skills. You'll do fine when you get there (and if you don't, that job probably wasn't a good fit).
Performance evaluation. I think coding challenges are a really bad way to evaluate a potential hire, or team of programmers, because they only measure one facet of what makes someone a good developer. I would go so far as to be wary of candidates that over-perform on these kinds of challenges. Because leetcoders, from my experience, often lack vision of the broader picture. They may dismiss things like user experience and code maintainability as not important, and they tend to gravitate to the hardest challenge inside a project, while ignoring all the rest. So unless you're looking for someone like that, and usually you're not, you could end up hiring someone who does more harm than good.
Who it's for
So who should use Codewars?
If you're self-taught and have never taken an algorithms course, then it's worth spending a couple of days on Codewars to get a sense for that style of thinking. Your future coworkers will likely have done challenges like this before, and you want to be able to relate to that experience.
If you're preparing for a coding competition, then Codewars is pretty good practice, because it reflects the sorts of questions usually asked at those events.
If you're an experienced programmer who's switching languages, then Codewars can be a good way to get a little more practice in.
Or if you just enjoy puzzles and Codewars keeps you engaged, it's definitely not going to hurt to keep doing it. If you're doing self-learning, as long as you're combining Codewars with full projects, it can help you to log more hours writing code.
So if you are going to spend some time on Codewars and you want to rank up quickly, here's what you should do. Instead of doing the suggested Kata, go over to the browse feature. Set the difficulty level to at least 1 level better than your current rank. The "kyu" count down, so if you're just starting at level 8, you need to select level 7 or higher. You need to complete 10 Kata one level above your own to rank up. Or you can complete Kata multiple levels above your own to rank up faster.
Now I want you to sort by "Most Completed". The ones that have been completed often are either easier than their peers, or they have a trick to them that make them easier than they first appear.
If you're doing Python, become familiar with: map, filter, and reduce for easy shortcuts.
Browse up through the difficulty levels until you find Kata that look like they might be too much trouble. Once you've figured out what level that is for you, step back 2 levels and focus on doing the most completed Kata at that difficulty. That way once you've worked up to that difficulty, you still have some of the easier Kata left over in the next difficulty level for you to progress on. For example, the level 2 kyu looked pretty challenging to me, so I've been doing the rank 4 kyu to level up quickly. And when I get there, I'll still have all the easier level 3 kyu left over to get past that rank, too.
The purple level Kata are more like mini-projects, so be prepared for those to take several days to complete if you get to that level.