[NCLUG] Code Kata

Sean Reifschneider jafo at tummy.com
Tue Nov 13 23:42:31 MST 2012


Thanks to everyone who came, Momo Lolo for the space, Jim for the projector
and Bill for organizing this.

We were doing roman numeral conversion, and went around a bit as far as how
to do the conversion and detect errors.  Alex came up with an interesting
way of doing the conversion that enumerated the valid choices for different
combinations.

I looked at some implementations online after the kata tonight, and someone
had used this simple solution.  You do the simpler algorithm we had
earlier, but check for validity by running it through the function to go
back to a roman numeral and if it doesn't match the input then it is
invalid.

That was a clever way of doing it, and made for a VERY simple and obvious
function.

However, at the time we didn't have a function to do the integer to roman
conversion yet.

Sean



More information about the NCLUG mailing list