Pushing your Coding Development
Photo by Sam Moqadam on Unsplash

Pushing your Coding Development

Some time ago I struggled to find ideas and ways to improve my coding skills on a regular basis. I started a couple of side projects, like most do. A Discord bot as well as another little tool I'm still in the process of designing and not sharing any information on, because I'm adamant I'm onto a winner...

Dream's aside, finding other ways to practice my programming became a bit of a mental drag. Until I was told about coding kata's.

Aren't Kata's just for Martial Arts?

Definitely not! While kata originated from the practice of attack and defence drills within various ancient martial arts, essentially the word kata means "form". It refers to a detailed pattern of movements designed to be practiced both alone or in groups as a way to help memorise and perfect what's being executed.

Stands to reason then that we can have kata's for many things, including programming! These kata's can help us build on code, learn new ways to solve problems and importantly, hone our skills. Let's take a look at one example I did recently.

RGB to Hex Converter

A simple problem, taking three integers for red, green and blue create an RGB value, convert this to a hexadecimal and return the hex code. Here is the code I wrote initially:

No alt text provided for this image

I was quite proud of this, using what I knew about .NET string interpolation and formatting, as well as sticking in a quirky private method to check for any values outside the range of the default RGB mapping (0 - 255) and adjusting them. Happily I completed all the tests, submitted my code and it passed, earning me some reputation. Hurray!

Once a submission is done you enter into the "solutions" area where everyone discusses various other submissions. Some are marked as "best practice" others are marked as "clever" and some of the brilliant ones even get marked with both! It's exactly here where I learned about a .NET method that I'd never even heard of called Math.Clamp. Low and behold this functionality basically gave me what I was doing in my private method for checking and adjusting out of range stuff, but in easy to use built in functionality.

I revisited my solution and rewrote it as this:

No alt text provided for this image

The main point here is that I learned something and did so in very little time. Better yet I didn't need to plan out any projects or ideas, I just got fed the challenge.

Show Me!

So there are a lot of different places you can go to practice code in this manner. I've had a play around with CodeKata, Coding Dojo and Code Wars and if I'm honest, Code Wars is my most favourite. I just find the whole site much more satisfying to use and there's something quite cool about being able to earn reputation and get my ranks (or Kyu) up and tackle harder and harder problems. Plus, with Code Wars these problems are fed randomly to you by choosing to train and the higher the rank you are, the more complex the problems become, just like kata's we're intended.

Another popular one is Gilded Rose but this works a little bit differently to the others mentioned before. This is a totally different solution that comes in all manner of languages for you to explore and looks at different aspects such as writing unit tests for legacy code and constant refactoring. While I find Gilded Rose better when used in groups, both that and the sites mentioned before can be used both alone and together. I've taken part in a couple of exercises where I've shared code within a group and we've discussed solutions and debated the differences of opinions. It's well worth doing and opens up an whole new avenue of technical learning, especially when those around you are differing in their skill levels.

Ultimately whatever your level and wherever you want to take your technical career, kata's are a great way to get regular bitesize bits of programming to get your teeth into. Sure, build up some personal projects too but don't forget kata's and how much benefit they can bring you, sometimes even in such short amounts of time.






Another great article, you're on a roll! 😊. I particularly like that you explained what 'kata' means, it's so easy to get into the trap of just solving the problem and moving on without understanding the benefit of repetitive practice with small improvements. Thanks for sharing 🙂👍

To view or add a comment, sign in

More articles by James Conlin

  • Hello World

    I am what they term a "self starter" when it comes to software development. My first days of coding were back in 2009…

    4 Comments
  • Reflecting on the Year

    Self reflection is something we should all do, especially after spending a good amount of time in a new role that's…

    12 Comments
  • Feedback

    Be honest, did you shudder at the title and almost refrain from reading the article? It's a word we sometimes dread and…

    2 Comments
  • Outcome, Positive : Leavers

    I find that seeing people leave for pastures new is always a mixed bag of emotions. I've never not been happy for them,…

    2 Comments
  • Do You Drive?

    I'm very proud of the career I have today. I'm proud of the work I've put in and I'm incredibly grateful to those who…

    4 Comments
  • Outcome, Positive : Hindsight

    Did you know that hindsight bias is a real thing? It makes you look at things negatively and question "what went…

  • Antipersonal Communication

    By definition, interpersonal communication is the process by which people exchange information, feelings, and meaning…

    1 Comment

Others also viewed

Explore content categories