In episode 18 of iDeveloper.TV Live I was discussing test-driven development with Scotty and John. I suggested that a great way to get started with TDD was to start adopting it in baby steps in your code. Got a bug report from a user? Create a new test target, and add a test that demonstrates the existence of this bug. Fix the bug, then prove to yourself that your new test now passes.
OK, but what if you don’t want to change the way you write production code, just to try out a new style? What if you’d have to make too many big changes just to support that one small test? What if you’re a fan of building one to throw away?
I’ve been thinking about those cases too, and looking around to see what the rest of the industry does in such a case. It seems the best fit to this case is a Coding Dojo. There’s a video guide to coding dojo, but the TL;DW version goes like this:
- Define your requirements.
- Take it in turns to pair-program a way toward implementing the requirements.
- Evaluate what happened.
The requirements don’t just define the product you’re trying to make; the point of a dojo is to focus on practice for its own sake so you could require a particular language, framework etc. be used. When developers aren’t directly involved in pair programming, they’re offering advice or writing up parts of the problem to be addressed: there’s only one IDE, and one pair of people at the keyboard.
This looks like it could be a great way to learn new stuff and become a better developer in the company of fellow iOS programmers. But as a group activity, it needs more people than just me involved:
- Would you participate in a Cocoa dojo in your local area?
- Would you participate in one at a conference like NSConference, WWDC or Voices That Matter?
- What would you want to learn about at a dojo?
- What would you be willing to teach people at a dojo?
- Is the coding dojo the most appropriate format? I’ve also been finding out about Corey Haines’ Code Retreat, which puts less emphasis on the solution and more on the practice. Is that better? Something else?
Answers on a postcard, or you could just use the comments field below.
I’m a big fan of Code Dojos. I’ve participated in them for .NET and Ruby, and I think doing it for Objective-C / Cocoa programming would be a great idea.
Code Dojos are a great way to let advanced programmers teach younger programmers, and for everyone to participate in the design (when they are at the wheel).
My only concern is that the testing tools in the Objective-C world are pretty terrible (compared to Ruby) but as long as everyone knew how it was all set up, the dojo could be successful.
I’m suggest this at our next iPhone meetup in Houston and gauge the interest.
Please do, and report back here with your results :). I’m thinking that in addition to training, it could be a good way to share expertise among experienced developers. For example, if one of us has been working in AVFoundation for a project, that person could mentor others in an AVFoundation dojo.
I’ve never heard of or been in one before, but it sounds interesting. :) I think it will also prevent the idle talk and force more sharing of knowledge. Many of our NSCoder meetups end up being full of non-coding activities.
I’ll also suggest this at the next CocoaHeads here in Raleigh and see how it goes. Even if it becomes a seperate event, it could be a good thing.
There was a code retreat up in Boulder, CO recently that I had the misfortune to miss. It wasn’t focused on any language in particular, which was a great way to share ideas across platforms.
I’d like to try to get something like this going out here in Colorado. Since the tools in ObjC are a little hard to get used to, it would be great to have a simple iOS Coding Dojo so we can focus on one tool, and helping to share testing methods for iOS developers. Are there any other developers in CO that would be interested in this?