Last night I went to the Melbourne Alt.Net meeting. This month we had a coding dojo, it was the first coding dojo that I (and most of the attendees) and been to before, and it was an interesting experience.
We all paired up, so I joined forces with Nick Josevski. After we were all paired up we were given our coding Kata. To write an application that would take a number and output the correct Roman Numerals for it. E.g. 2 = II, 4 = IV, 15 = XV, etc.
I found the whole thing quite interesting, it was great working with Nick as I just picked up little coding techniques here and there and small environment settings (like the Visual studio power tools). Nick and I tackled the problem in ping pong TDD fashion. Sharing one laptop, I would write a test that would break. Then we’d swap and Nick would write the minimum amount of code needed to make that test pass, then he would write the next test that would fail, then he’d pass the keyboard back to me and it was up to me to make the code work again. We wrote around 40 tests in the end.
The entire event was 2 x 40minute coding sessions (with a pizza break in the middle). We were keeping it disciplined up until 15mins before the time was up. We found that how we had written our code worked fine for 90% of cases, but not 1990, because the format of large numbers is different… So we had to throw all the logic out and start again, I quickly worked out on paper a new algorithm. We quickly coded it, re-ran all our tests and they now all passed except for the number 4 (IV). Unfortunately time was up so we couldn’t handle that edge case.
I enjoyed doing this, pairing up with someone that I hadn’t before and talking and figuring out the problem was a great exercise. I am really looking forward @abienert organising the next event, I hope it is run again!
Next month Melbourne Alt.Net is doing lightning talks and I volunteered. Now to find a topic to present on…