Archive for October, 2007

At the XP2007 conference, Geoff and I presented a workshop entitled “The coder’s dojo: Acceptance Test Driven Development in python”. (Geoff also presented the same workshop at agile2007). We had three aims with this workshop, the first was to use the meeting format of a coders dojo, the second was to do some coding in python and the third was to demonstrate how you can do Acceptance TestDriven Development using TextTest. We felt the workshop went well, we had around 30 participants and we were able to do a little of everything we had set out to do.

Perhaps the most important thing was what we learnt from the experience. The workshop participants gave us some very useful feedback. One thing people said was that there were too many new ideas presented to expect as much audience participation as we did, and that instead of trying to do aRandori style kata, we should have done it as a Prepared kata. There also seemed to be a view that the Kata we had chosen (KataTexasHoldEm) was quite a difficult one. Another very valuable piece of feedback was that we were doing Test Driven Development (TDD) with much larger steps than people were used to.

What I have done is to create a screencast in an attempt to address this feedback, and open up our workshop material to a larger audience. In it, I perform a Prepared Kata of KataMinesweeper, doing TDD with TextTest and python. Geoff and I have been developing this approach to testing for a few years now, and we think it deserves consideration by the wider agile testing community. There are important advantages and disadvantages compared to classic TDD with xUnit.

I will write an article about this approach and provide links to the screencast in my next post on this blog.

I’ve listened to a lot of Bob Payne’s agile toolkit podcasts and I think Bob is pretty poor at interviewing people, although he does interview some very interesting people.

Bob clearly doesn’t plan his interviews or think in advance about what questions to ask. He just seems to sit down and chat with people as if he were in a bar somewhere and happened to have a microphone on the table. He often assumes his listeners know the background of the person and what is being discussed, and doesn’t ask people to elaborate. Bob also tends to interrupt the person he interviews and presents his own opinions rather than getting them to elaborate on their views.

It’s a far cry from the other podcasts I like to listen to, where the interviewers are really professional, for example Bob McDonald on Quirks and Quarks, or Greg Galant on Venture Voice.

Anyway, as I said, Bob Payne does interview some interesting people. I listened to this podcast today, where he was talking to Dave (Smalltalk) Thomas. They rambled on at some length about different programming languages and platforms, and Dave started talking about what he called “boutique” languages, APL being a case in point. What he said about this community totally corroborated what I discovered when I met a couple of APL programmers recently. There aren’t that many of them, they mostly work for financial institutions, and they collaborate very heavily with their business users/domain experts. This article by Stephen Taylor gives a flavour of how this community works, and talks about a kind of pair programming between an APL expert and an end user. It sounds really cool, actually, and highly productive.

Bob Payne is clearly a Ruby community member, and Dave (Smalltalk) Thomas is in the Smalltalk community. I mostly count myself part of the Python community these days. Each programming language community seems to have its quirks and personalities. Of the communities I’ve hung out with to any extent, I’ve noticed that the Ruby community seems to be really friendly and welcoming to newcomers, whereas the python community can often seem very aloof and somehow intimidating. The Java community is so enormous it doesn’t seem to notice other communities exist, or have anything useful to offer, although it’s a few years now since I’ve hung out with them, and they may be moving on.

I think these “community personalities” arise partly because people move between language communities slowly and infrequently. Once you get good at a particular language it is always easier to stick to it than learn a new one. In their first book the Pragmatic Programmers advise you learn a new language every year, but I’m sure only a vanishingly small proportion of programmers manage this, and even fewer go on to get involved in more than one language community.

I am really interested to see what will happen with all this talk of Polyglot programming that (amongst others) Neal Ford has been talking about – they predict that in future your average system will be built from a number of parts written in different languages, each suited to the task in hand, running on one of the major Virtual Machines – .Net or the JVM.

If this does indeed happen, I think it should result in a major shakeup of the way programming language communities operate and interact, and I believe this will be really positive for the industry. At the moment I feel like their are pearls of wisdom hidden in each separate community, and not enough people are moving around to pick up the pearls and distribute them to the others. Dave Thomas must be one of the few who has insight into more than just one. Maybe one day more programmers will be pairing with end users just like the APL guys have been doing for years.

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.

I was really impressed by this screencast that Thomas Nilsson did of him solving KataBowling. Quite apart from the skill with which he solves the programming problem, I like the format. I have previously tried to describe how I have solved other Kata, by writing long articles on codingdojo.org, like KataPotterByEmilyBache, but these articles are much harder to digest than this screencast Thomas has put together.

I have found out that he used a piece of software called wink to create the screencast, so I am currently working on one of my own. Watch this space!