Coding Dojo #5: Uno
We ran our 5th coding dojo on Thursday night, writing the card game Uno in Java. We didn’t all know the rules so this video explained it - surely a parody but you never know!
We used the Randori approach again with 6 people participating for the majority of the session. Everyone paired with everyone else at least once and sometimes a couple of times.
We had the pair driving at the front of the room and everyone else further back to stop the tendency of observers to whiteboard stuff.
What We Learnt
- Modeling games is really good for practicing design skills. Most people had played the game so we had domain experts who could use their knowledge to help drive out the API of the various classes. We didn't get to the scoring part of the game in the time available but it was quite cool to see our code with all the terms detailed in Wikipedia's entry on the term.
- We managed to drive the design much more effectively than we have done on previous sessions. The flexibility to move between classes depending on where it made most sense to test from next was finally there and we didn't end up with the problem we've had on previous sessions where we ended up with coarsely grained tests and then tried to code the whole application in one go.
- It was quite painful for me personally having to manually perform operations on collections in Java rather than having the selection of functional operators that are available in C# 3.0.
- It wasn't a new learning but I've noticed in my project work that I've become a lot more keen to keep the steps really small - there is a bit of pressure on you to do this in a dojo situation and I think it's just continued over from there. Every time I try to be too clever and take a big step something inevitably doesn't work and I end up doing the small steps anyway. It's also a lot of fun coding in this type of environment and watching how others approach problems and how they pair with each other. If you get a chance to attend a dojo I think it'd definitely be worthwhile.
Other Dojo Thoughts
- Some ideas for future coding dojos that we discussed were:
- I notice there are a couple of sessions of coding/coding dojos planned for Jason Gorman's Software Craftsmanship conference. It will be interesting to see how those work out, especially if there are high numbers of participants. We've always had a fairly small number of people involved which I think has helped to keep everyone involved. I'm not convinced it would be effective with many more participants.