I went to the 4th Coding Dojo last night. It was a small affair with only five people (plus Joh organising). Seeing as there were so few people, it was decided to revisit the previous dojo’s code and try to get it working. The task: to implement a small adventure game containing a few items (cat; tie; house; lift; something orange).
We started with some code which had a basic structure, but clearly didn’t work. By the time we’d finished, we had a main loop that could read commands and move around a very simple world of 3 locations.
But what was really interesting was watching everybody interact. Last night, it felt like we were getting to grips with the style of coding. We learnt that you had to continue pushing forwards in the same direction as the previous person if you wanted to achieve something. Jez did a really Good Thing™ by bringing along some index cards for doing stories. That really helped maintain continuity.
The time is also an interesting constraint. A couple of times people did things that seemed exceedingly dubious coding style to me. But on reflection, it was the quickest way of moving forward. Refactoring can come later. As an example, I was suggesting that we extract the locations we had into a separate class so they could be used by bothe the main game and the tests. But it turned out to be much quicker to make the fields public in Game and reference them from the test. I’d kill anybody who did that in production code. But it seems to be the right thing here.
I’m looking forward to the next one, anyway!