Code Kata - Roman Numerals: Intro
I'm going to write up my experiences with the Roman Numerals Ruby quiz. I'll first summarize the problem here and then tackle this first in C#, then, I hope in other languages, perhaps even as a language learning exercise (thinking back to my aims for the year!).
The softwarecraftsmanship site posts screencasts of the solutions, which is an excellent way of showing everything in action. A large part of the exercise is in showing the entire process and how one gets from A to B rather than simply showing the final working code.
I'm however a little more low-tech – and these screencasts clearly take a lot of practice let alone a good deal of skill. So I will simply be posting code snippets at relevant parts of the process with descriptions about some of the thinking as I develop a solution.
Write a program that can take either an Arabic or Roman numeral string and return the opposite format, for example if the method is given an Arabic number, the Roman numeral equivalent should be returned. The API should take the form:
RomanNumeralConverter.Convert("29") which would return the string
RomanNumeralConverter.Convert("XXXVIII") which would return the string