Arabic numbers to Roman Kata (Ruby)

Hey guys!

I wasn’t here for a while. For those who don’t know, I closed Racoons Group and now working as a senior backend developer in a nice company in Germany.

So that’s the reason why I didn’t post anything for a long time. But now I’m ready to make a small note about a nice thing I’ve never heard before. It’s extremely old, I read about it in Uncle Martin’s book, and it’s even wasn’t invented by him. This thing is Kata. In programming term, definitely.

Here is wiki article:

Here is Uncle Bob’s article about one of Katas:

So Kata is a small exercise to help you master your typing skills. Or if you are not so dumb it can also help you learn new languages, new methodologies, new algorithms or just give you some fun because it’s amazing when you are solving smth! I already had experience dealing with fizzbuzz Kata at work, great thanks to my Brazilian friend for showing Coding Dojo principle (oh no, one more fighting term), but much more fun I’ve got when I tried to solve by my own Kata, which names Arabic to Roman numerals Kata.

I’m not big fan of using TDD in daily work process, but this exercise I tried to solve in best TDD. I implemented it for numbers from 1 to 1000, so it can be increased, but c’mon, who ever needed numbers more than 1000? No one lives so long.

I’m using Atom, Fish, Ruby 2.4, Minitest. Below you can see my screencast. It’s 10x faster than I did it. And to be honest, I did it a second time. For Katas that’s absolutely okay 😉

Feel free to comment, argue, discuss.


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.