Rediscovering Codewars

Rhys Evans - 11/09/2020
Back in late 2017, a handful of Kiandra developers decided to try - a website that challenges you to complete coding exercises in a variety of languages. We dug into it and had some fun, but as time went on, I ended up putting it to the side as something that I’d often think about, but never make the time for. 

Recently I have been thinking more about my coding skills and finding ways to stay sharp – and more importantly, work on improving. I am not a novice by any means, but I know I have a lot of room to grow and more techniques to master. I’ve got a few new and older side-projects on hold  because most of my time is spent in the world of C# and JavaScript so, any of the other languages I have under my belt barely get any time to shine. 

Enter Codewars - a community that is built around developing programming skills. Users are tasked with completing ‘kata’, inspired by Japanese martial arts practice. A ‘kata’ in Codewars is a bite-sized challenge intended to implement a specific piece of functionality. Typically you get an input and the start of a function and you’re tasked with processing it and return the expected output. The size and nature of these challenges mean that users can focus on solving a specific problem – perfect for warming up the mind or to challenge oneself. Each kata is graded from 8th to 1st kyu and most can be attempted in a variety of languages. Not every language can be used on every kata and the rarer the language the fewer challenges. 
Here are the languages I’ve selected for training at the moment. You can also use this as an opportunity to dabble in languages you’ve always wanted to try out. I’ve been focused on my C# and JavaScript skills, but I’ve been very tempted to dive back into Python – it’s been years!

Once you’ve written up your solution to the problem, you can then run the kata’s built-in tests. If your solution passes those tests, then you can submit your solution. You’ll earn points for your efforts and then you can triumphantly take a look at how other users have approached the solution. You’ll also see different categories, like ‘Best Practice’ (good clean code) and ‘Clever’ (usually solutions that condense everything down as compactly as possible) which users can nominate. Here, you can learn from others and see how they did it.  Just resist the urge to peek at solutions before you’ve finished as you won’t earn any points! If something is a bit too tricky, you can always bookmark it and come back later. 
You might be wondering – what kinds of problems do you get to solve? Most problems are intended to be solved within a single function, so you won’t be programming anything too big, but most problems focus on algorithmic skills. Depending on the level of the challenge you’re up against, you might find something like string manipulation or finding the mean of an array down at the 8th kyu. Higher kyu challenges will find you working to stretch the limits of your language – have you ever had to build your own language within your language of choice or simulate a feature found in one language in another? Sometimes it’s not enough to just pass the tests, your code must be efficient. At other times, your language of choice will be missing certain add-ons or be on a version that is missing certain features that might otherwise trivialise the problem at hand. Times like these really test your knowledge of what is possible in your language of choice. My JavaScript array manipulation skills have certainly improved while working on speed tests – something that I have then been able to apply to later kata for a cleaner result.
Of course, as a community-focused website, these code kata don’t come from thin air. Users can build their own challenges and submit them, allow contributors to help with ironing out any issues and after it passes beta testing, others can train on it. One of the best ways to validate your own understanding of something is to teach it, so there’s something to be said about challenging others to solve problems you’ve developed yourself. 
So what keeps people coming back? The challenge? The sense of community? The fun of solving problems? I imagine most developers will have their own reasons, but I’d say it's the gamification. You are awarded points as you complete each kata or when you participate in the community which helps to make your progress feel more tangible. The training helps me feel like I’m keeping myself sharp and I can pace myself based on how much of a challenge I’m seeking, so I’m never too overwhelmed or underwhelmed and keeps my interest at the right level. Your ranking is also broken up by programming language, so you can pick and choose which language to train as you go. Signing up to the site requires passing a basic challenge too, which is an interesting gamified take on on-boarding new users! Enter if you dare…
After revisiting Codewars over the last few months I’ve built up my score and ranked up a few times, too. With new challenges awaiting me, I hope to push my skills further so I’m ready for whatever task comes my way.

We're ready
to help.

Give us a call, send us an email or fill out a contact us form to speak to your friendly, local Kiandrian.