Pair Programming
Today I had my first experience with Pair Programming. Going in to it, I didn’t really know what to expect. My co-worker, Ryan, has experience with Extreme Programming(XP) techniques, and is an advocate of us adopting elements of XP to help in our development.
He and I had worked together to develop a piece of software that is being used internally. For the initial part of the development my role was to define the requirements, basically acting as the client, and Ryan’s role was to architect and develop the software that we needed. I felt like we had a good rapport and communication in this phase of the project. Now that the base requirements of the software are in place it is time for me to dig a little deeper into the code that runs the software. It’s written in Ruby and uses XML for data layer. I’ve worked with XML quite a bit in the past so I’m comfortable working with that, but I haven’t had too much experience with Ruby. I’m messed around with Ruby on Rails a little bit, but I certainly don’t have expertise with Ruby. Ryan, on the other hand, has been writing Ruby code for years and is very comfortable. So this pair programming experience was a great opportunity for me to learn and see some XP principles in action.
I was able to see how unit and acceptance testing work in action. Testing is a major part of feedback which is a core value of Extreme Programming. Ryan and I worked together to write tests and then write just enough code to make the test pass, and then move on the next test. I was able to see the value in writing these tests. They allow the developers to see, on a very granular level, when and where a piece of code in an application are not working as they should. Testing also gives the developers confidence in writing new code on top of legacy code. If testing is used all along the developer can see that legacy code remains valid even when they introduce new code on top.
I would say that my first experience with Pair Programming was definitely a good one. I feel like I was able to learn and also contribute to the project.