Roman Numerals Kata

I figured I’d start doing some of the coding Katas, but to add a small twist, I’d only do them in MonoDevelop on Ubuntu in order to get more familiar with Linux and Mono.

My attempt can be found here on github: https://github.com/ChrisAnn/Roman-Numerals-Kata

I have to say that I found some of the MonoDevelop defaults to be quite irritating.  I prefer the Allman style when it comes to the placement of braces in C#, while MonoDevelop defaulted to K&R style automatically moving my braces and would not allow me to manually alter their position.  I don’t mind that it defaulted to something I’m unaccostumed to, but I found the fact that it ignore my repeated hits on the return key to move it down a line to be extremely frustrating – if you’re going to move my braces, at least let me move them around to my liking!

With some digging around in the preferences, I managed to set up my own custom profile and it finally ceased tampering with my braces. (Edit > Preferences > Code Formatting > C# Source Code > C# Format > Edit > Change ‘Category’ to ‘Braces’ > Change ‘Method Declaration’ to ‘Next Line’.  Simples…)

Another thing I did not like was its habit of inserting spaces between the method name and the brackets to look like:

myMethod (parameter);

This is non-standard in C# and I had to go back and remove all the spaces, at least it let me do this without me having to amend my custom profile.

These complaints may seem trivial, but suppose I was to work in MonoDevelop and the rest of my team used Visual Studio, we’d create messy files with competing formatting – preventing this is why coding standards are employed.  Surely, MonoDevelop should default to the standards of the language being used?

I had no idea how to run my unit tests in MonoDevelop – I wasn’t expecting a test runner, there isnt one in VisualStudio unless you pay for the higher levels, but I was stumped until I discovered that you can install the NUnit gui via apt-get using the following command:

$ sudo apt-get install nunit-gui

I also made a point of not checking any existing completed roman numeral katas, but having looked a couple after I completed it, it seems that that I arrived at a solution very similar to that of other people, which gave me a good sense of validation.

I shall endeavour to complete more katas using MonoDevelop on Ubuntu as I found it to be a fun experience.