I mentioned in a previous post that we were planning to attempt KataMinesweeper at a GRUG meeting. That meeting actually happened on 19th September so I am a bit late reporting on it, but never mind. There is a summary of what we did here.
I had never really seen RSpec or Behaviour Driven Development (BDD) before and I was quite fascinated by it. It’s basically Test Driven Development but with different words for everything, and much more human readable tests, or “examples” as they are known.
One of the other challenges we faced at this meeting was that we were developing on a Mac, which is an unfamiliar environment for most of us. There was one participant, Håkan, who was particularly fased by this. He obviously usually touch types on Windows and is very familiar with that keyboard layout. He persistently kept hitting what his fingers thought was the “home” key, that on this Mac had the effect of making all the code disappear from the screen. He must have done it a dozen times in five minutes, which was very frustrating for both him and us.
I thought it was a good analogy for how I felt faced with RSpec, when I have been working with xUnit for so many years. I must have said “let’s run the tests now” or “that test is failing because…” a dozen times. In BDD they are not tests they are examples! By about the 5th time I said it people just got fed up with correcting me.
So it seems to me that if Håkan wants to start writing code on a Mac regularly, he’s in for a frustrating time while he teaches his subconcious new habits. Likewise if I am going to learn BDD. The question is, is it worth the effort?
For Håkan, my immediate reaction is that learning a Mac keyboard wouldn’t be worth it for him. I don’t see the Mac keyboard as giving any great leap in productivity over a Windows keyboard, so the cost of switching would be prohibitive.
The potential benefit for me to switch from TDD to BDD is less clear to me. Would this change in language actually significantly improve the way I do software development? For the moment I plan to keep an open mind on the subject.