Author’s Corner is a new series that spotlights Codewars community members who contribute new and exciting Kata to Codewars. Inspired by the one and only Hobovsky, Author’s Corner will give you insights into the minds of Codewars authors, their passions, and help you get to know them.
So, without further ado, our first author is geoffp. geoffp is a 1 kyu ranked Codewarrior with an honor of over 10k who has authored 10 Kata.
What inspired you to start authoring Kata on Codewars?
At the time there were not many larger kata on Codewars: 1kyu or 2kyu mini projects that a Codewarrior could spend a week or two on. I'd encountered challenges like this in programming contests and thought Codewars should have some.
Talk us through your process of creating the perfect challenge.
I usually start by thinking about the test code. I ask myself: What should a good solution to this problem be able to do, and can that behavior be recognized in an automated way? Is it possible to test without having a reference solution for comparison? How can test cases be randomly generated without making them too easy or too similar to each other? Are there ways for the Codewarrior to cheat?
Tell us about you; aside from authoring great Kata, what do you do for fun?
I'm currently working (slowly) on a program for creating Lego building instructions. The leading software of this class is a program called Stud.io, but I think I can do better, at least in certain respects.
What is the worst or most embarrassing bug you’ve solved?
I once debugged some C code that did sparse matrix factorization via Givens rotations. It turned out that everything worked fine except when a rotation angle (calculated internally, after many preceding calculation steps) was exactly 45 degrees.
In your opinion, what makes a good Kata?
It should have no obvious solution approach; the Codewarrior should have to start by reviewing their knowledge in order to figure out what to do. For a beginner's Kata, this might mean choosing between a while-loop and a for-loop. At lower kyu levels, it can mean choosing an appropriate data structure or inventing an algorithm.
How has Codewars helped your programming skills?
It's broadened my range of programming languages. While C++ is still my usual go-to, Codewars is the only place I get to practice Java or Python.
What is your all-time favorite Kata (excluding your own)?
Square Sums by metalim. It's a search problem, but it somehow led me to spend a week coming up with an algorithm that would go straight to a solution, with no backtracking. Not that this is any faster than a standard search with backtracking, but it was fun to write.
What programming skills would you love other authors to focus on when creating new Katas?
Floating point. Too many programmers avoid floats, or use them badly, because they never learned how to write floating-point code that will run safely and stably. It's a fascinating but under-served topic.