Hi guys,
Some aftermath impression after yesterday's code retreat meeting (as
Mike Bria suggested). Sorry for the length of the email, I squeezed it
as much as I could.
First of all, a little presentation of what we did.
The problem to solve was Conway's game of life. Each iteration was one
hour long, pair switch happened (or should have happened) each 10
minutes. There was no TDD in the beginning, as the organizers
considered it was too much for a first time session of pair
programming, also some of the people had never done unit test, let
alone TDD. We also had several rules to respect when writing the code:
- meaningful method and variable names
- each method should have at most 6 lines
- no comments in the code
Now, my impressions.
Pair programming was a little different than I thought. The fact that
my pair and I had somewhat different styles of coding (and I'm not
talking about the place of the curly braces, but rather the structure
and organization of the program) wasn't that nice. There were times
when I felt I wanted to erase pretty large chunks of my pair's code.
It wasn't because he's way of doing things was worse then mine,
because mine wasn't that effective after all. He was pretty much an
algorithm guy, while I was pretty much an API/DSL guy and I believe
here laid the problem. These differences made things a little bit
harder. At some point we didn't even respect the pair switch interval.
Some other thing that I noticed. If you're coding with someone, you're
in a team, and a team is judged by its combined result, especially
when you're switching pairs inside the same code retreat iteration.
That means if you don't like something about your pair way of doing
things, you have to tell him. I didn't really do that and as a result
I didn't like when the organizers (masters in the software craftsmen
parlance?) pointed out flaws in our program design. My final sentiment
was that I'm not that much of a team guy, which probably has to do
with the fact that I'm the only programmer at my day job for over an
year and a half.
I liked thought the fact that I could bounce ideas with my team mate.
Especially related to the algorithm. He pointed out some nice ways of
doing things, while I came with others. As I thought before, and now
saw with my eyes, a program developed within a pair is likely to have
less bugs then one developed on your own.
Being a first time session of code retreat we only planned for 3
iterations, from which the last one was what I believe you guys call a
carousel. We got a projector connected to one of the laptops, and one
of the masters began the iteration. He wrote the initial test method
after which he implemented the method to pass the test. All in the
spirit of red, green, refactor. Next, someone else came and wrote a
test, then someone else came and wrote some code to make the test
pass, and so on. This was quite nice because we were only 6 people and
we could easily share ideas. The other thing is that we used C# for
this final iteration, while my colleague and me don't have that much
knowledge of the language (we can read it, but we feel sloppy when
writing it), but we were helped when writing the code and in the end
everyone was equal. This final part proved to be enjoyed by everyone.
Someone even asked why didn't we start with it.
In the end I liked the meeting and I discovered that I also have to
hone my social skills in order to have great pair programming
activity. Knowing *just* about TDD, DSLs, patterns, naming
conventions, algorithms and such won't help me much when pairing.
We're planning the next meeting somewhere in the mountains. We want to
rent a chalet or something and spend a full weekend doing pair
programming, code retreat and the like. So if someone wants to see the
Romanian Carpathians and do some pair programming here in Romania,
drop me a line and I'll let you know when we're going to do it. I know
Corey Haines wants to spend some time pair programming here. Oh, he's
the one that sparked all these, when he evangelized about pair
programming, code retreat and other concepts at a previous meeting of
ours, so a big thanks goes to him.
Also, thank you guys for the previous emails, about ping-pong TDD and
other ideas. I'm going to try out the ping-pong part the next time.