Have a day off today and just having a quick sit at the pc. Have been doing paired programming at work. Something I have been reading about in Extreme Programming Explained by Kent Beck.
I think it has been working out really well. We took it in turns to write code with one doing the the tests and the other satisfying the tests. Whilst this is undoubtedly good practice I find it strange that it has to get a special mention in programming circles in a way. When I was doing CAD and estimating work we would always sit together, work out the costs, draw it up together and talk about what we were doing ect. I think that was one of the fundamental reasons why I learnt so much about construction in a small space of time.
I definitely think the paired programming gave me a better understanding of how to approach Test Driven Development. Up to now I have approached unit testing the other way round by writing my code and then writing unit tests to cover it. I think that is the main reason why my unit tests did not have full code coverage. The other great thing about paired programming is the confidence it gives you in your code. You have written your tests, they pass and someone has looked over it at the same time. Gives you a very good feeling that nasty defects aren't going to bite you in the ass in 3 months time. I hate that question around the office "who wrote this crap piece of code" and all you can do is close your eyes and say "please don't make it me!"
I think it has been working out really well. We took it in turns to write code with one doing the the tests and the other satisfying the tests. Whilst this is undoubtedly good practice I find it strange that it has to get a special mention in programming circles in a way. When I was doing CAD and estimating work we would always sit together, work out the costs, draw it up together and talk about what we were doing ect. I think that was one of the fundamental reasons why I learnt so much about construction in a small space of time.
I definitely think the paired programming gave me a better understanding of how to approach Test Driven Development. Up to now I have approached unit testing the other way round by writing my code and then writing unit tests to cover it. I think that is the main reason why my unit tests did not have full code coverage. The other great thing about paired programming is the confidence it gives you in your code. You have written your tests, they pass and someone has looked over it at the same time. Gives you a very good feeling that nasty defects aren't going to bite you in the ass in 3 months time. I hate that question around the office "who wrote this crap piece of code" and all you can do is close your eyes and say "please don't make it me!"
Comments