Does solving kata make sense?
Codewars won’t teach me how to build applications, it won’t replace the experience gained from working on a real-world project, and it likely won’t make me a better architect. And yet, I keep solving more katas.
For some time now, I’ve been regularly solving challenges on Codewars . Recently, I started wondering why I actually do this—after all, I could just ask ChatGPT.
I paste the problem, wait a moment, and get a solution. Sometimes it’s a really elegant one—the kind I might never have come up with myself. Other times, it looks great—until I start asking, "Why?" In a way, it’s just like code written by a human, only faster. 😀
So, what’s the point of spending half an hour on a single problem, scratching my head over why my "brilliant" idea isn't working?
I suppose it’s simply because I enjoy solving these kinds of things.
I’ve always liked crosswords and Sudoku. I have this strange urge to look at a problem that initially seems nonsensical, only to watch the pieces suddenly fall into place. That’s probably why Codewars fits so well into my list of hobbies.
It’s actually quite funny, though—a few years ago, I associated programming primarily with writing code. Yet, the longer I work as a programmer, the more I feel like I’m writing less and less of it.
And that’s not even because of AI.
More and more often, before I write a single line, I sit and think. What does this problem actually look like? What’s the core issue, and what’s just a symptom? Do I really need another component? Should this state live here? Or am I just trying to fix something I designed myself five minutes ago?
Sometimes, the bulk of the work happens before the first line of code is even written.
Perhaps that’s why I’ve become more interested in "katas" than I was when I first started.
Compared to a real-world project, a kata is simple. You have a problem, an input, an output, and a fairly clear idea of when you’ve succeeded. You don’t have to worry about whether someone will want to tack on five more business cases three months down the line, or whether someone else will inherit your code and struggle to figure out what the original author intended. There’s also no project manager claiming, “it’s just a small change,” only for it to turn out that half the application needs to be rebuilt.
Yet, the underlying way of thinking is somewhat similar.
You’re faced with a problem, and you have to break it down. You need to determine what’s actually required, explore various solutions, and discard the ones that don’t make sense. Sometimes, you arrive at a solution that works—but when you look at it the next day, you think, “Good God, what was I doing here?”
That last part is also an essential aspect of programming. 😀
I’m not sure if solving coding katas actually helps me with architecture; I don’t have any data to prove it. I can’t say, “I’ve solved 87 tasks, and as a result, my architectural decisions are 23% better.”
In fact, I suspect that’s not how it works at all.
But I have noticed one specific thing: when I was asked during a job interview to “write some code that…,” I didn’t panic.
I simply started working through it.
For me, that’s a significant achievement—not long ago, the mere prospect of “writing code live” would have left my mind completely blank. You suddenly forget what `map` or `filter` are—you might even forget your own name!
Now, I still might not know the solution. I might still end up writing something silly. I still sometimes get a task and think, "Seriously?"
But I’ve grown more accustomed to the actual process of arriving at a solution.
And I think that’s exactly what Codewars gives me.
It’s not that I can write every function from memory—after all, I’m not learning how to build full applications there. Instead, I’m practicing that brief moment between "I have a problem" and "Okay, let me try to do something about it."
AI complicates things a bit, though, because I could easily skip that moment altogether.
But if I do that, I lose all the fun.
It’s a bit like Sudoku. I could look up the solution on Google, or ask someone to tell me exactly where to put each number—but then... why even bother with the Sudoku in the first place?
I feel the same way about Codewars.
I don’t solve these challenges because the world needs another function that reverses a string; the world will get by just fine without my solution.
I do it because I love that moment when I’m working on something and suddenly: "Aha! Okay, I’ve got it."
And, well, partly because I like feeling smart.
Am I actually smart?
I don’t know.
But yesterday, I solved a kata and, for about five minutes, I was convinced I was an absolute programming genius.
Then I saw someone else’s solution.
It was only three lines long.
Maybe I should have just asked ChatGPT after all. 😀