DEV Community

Discussion on: My Experience with Pair Programming

Collapse
 
skaterdav85 profile image
David Tang

Great post! Have you ever ran into a situation in pair programming where one person wanted to follow TDD and the other didn't?

Collapse
 
raulavila profile image
Raúl Ávila

It hasn't happened to me so far. The thing is that I work in consulting, and our clients assume we're going to work using TDD and Pair Programming, as learning them is one of the main goals why they hire us :) Apart from this, IMO TDD and Pair Programming are a killer combination, and somebody reluctant to do TDD would be easily convinced of its benefits after a couple of weeks.

Collapse
 
skaterdav85 profile image
David Tang

Interesting. I can see that if you were hired as a consultant to teach TDD, then everyone is open to learning it and changing their workflows. What type of development are you typically doing? My latest pair programming experience was on a single page JS application. I've changed my workflow over the past ~1.5 years to follow outside-in testing. Not too long ago I was in a pair programming situation for a couple days, and I found that my partner was not very experienced in testing, but had been doing frontend development for awhile and was pretty set in their ways. Needless to say, pair programming didn't work out and we went back to developing on our own so that we could follow our own development styles. I found it extremely challenging trying to convince them of TDD, when testing was already new to them and testing isn't as common in the frontend world as in the backend world.

Thread Thread
 
raulavila profile image
Raúl Ávila

In the last couple of years I've worked mainly in the backend world. Interesting story, changing the way somebody has been doing things for years is not easy. How long did you tried pair programming before going back to soloing?

Thread Thread
 
skaterdav85 profile image
David Tang

Probably a few days a week for ~2 months. We were working on the same project and tasks were broken out in such a way that there was lots of overlap, so we were sort of forced to work together and pair. A big challenge I found was sometimes my partner would come in earlier and start cranking on tasks and not follow TDD. Lots of changes would be made targeting many tasks instead of focussing on one, resulting in lots of broken tests. Then I would get to work and we'd have to backtrack and fix the broken tests and write news tests after the fact. After the 2 months, I suggested changing the team structure so that we could work on different things at the same time, allowing each of us to use our own workflows.