How to do Pair Programming "By Yourself"
March 15, 2006 3 Comments
I’ve observed some code written by some guy in my day job and definitely this guy is doing pair programming although “he has no pair”. For example there is a method with 4-5 lines of code, the comment above it is generally 9-10 lines. It seems “Comment-Driven Development” is applied in this case. The interesting thing is when you read through the code, more comes out because the comment actually seems like a documentation of a dialog between two pairs. Like this one, just translated; Believe it or not it is real.
//This method is used for getting a collection of an entity in http session.
// It seems to be working, I should apply more cases.
// No! this method should not be located here, I’ve observed a utility for it in our utils package
// Let this one still be located here, I will remove it later after some more blah blah.
Here are some new practices I could derive from these,
1) Comment-Driven Development
2) Comment-First Design
3) Solo pair programming