Monday, December 10, 2007

The Proactive Pair Programmer

It has been a little over three weeks since the MediaLogic software developers have decided to adopt pair programming. Team work has always been a very important part of the software developer culture at MediaLogic. I like to think that we have created a culture where no one person is the super star. We all have our particular strengths and weaknesses. When faced with a difficult or seemingly impossible problem it is comforting to know that you can simply ask for help. This open environment coupled with the right people can help you produce amazing code.

While pairing with various developers I have realized that one must be focused and proactive. Pair programming can be very difficult at first. I found that the most difficult part of pair programming was paying attention when I did not have the keyboard in my hands. Secondly, I learned that the inactive pair must be proactive and think ahead. Being proactive and forward thinking will greatly improve your focus and concentration. When we pair at MediaLogic we do a little thing called ping-ponging. The steps are as follows:

  1. Adam writes a test.
  2. Mo makes the test pass.
  3. Refactor if needed.
  4. Run tests and check for green bar.
  5. Mo writes a test.
  6. Adam makes the test pass.
  7. Repeat steps 1 through 6.

During the first step my pair must be thinking about how to satisfy the test and what the next test is. Furthermore, the inactive pair must be constantly challenging and questioning the design. You and your pair must keep in mind that it is the code being attacked and not the developer.

In my experience pair programming forces you to write better code. When pairing it is more difficult to suggest taking a shortcut. However, I must admit that this mentality to produce quality is solely based on the team. For example, if two weak programmers who take shortcuts pair together the quality of the code will be poor. On the other hand if at least one of the developers is strong short cuts will be less likely and quality will be up. I consider myself lucky as I work with a small team of very exceptional software developers. Over the last few weeks I have cut very few corners as a result of pair programming. As a result we are producing higher quality code that will more maintainable down the road.

Another benefit of pair programming is cross training and exposure to new ideas and ways of thinking. After one week of pair programming I feel like I have learned more than I normally do in one month of working on my own.   

Lastly, I have noticed that I am no longer distracted by email, instant messenger and my urge to read blogs. When pairing you do not have the luxury of checking your email or favourite blog. Let's face it, it would be poor etiquette to read your email with your pair sitting beside you. Pair programming is a very exhausting and rewarding experience. Paring requires that you try and stay one step ahead of your partner. At times this will require an immense amount of brain power to figure our your partners next move. Hopefully this will help you develop a passion to yell out "I know what your doing" or "I know where you are going with this". This passion or skill of active thinking can spill over into other parts of life too. Another benefit of pair programming is that it allows you to share success and failure. Failure or frustrating problems are never fun to deal with. Pairing allows you to attack problems together as a team. No two people think alike. This diversity allows each person to contribute different ideas and perspectives as to how a problem should be solved. A pair also allows you talk your problem out. Some times its just good to have someone to bounce your ideas off of. The process of explaining your problem out loud can be a very helpful tool. Other than over coming problems pair programming allows you to share success. I find that shared success is much more rewarding. This may be a paradigm shift but pair programming allows for human interaction to be a more pervasive element in the software development industry.


marko said...

When you achieve the point of confinement on one card, the other one is dependably there to be utilized. This goes ahead till the start of the following month when the card charge discovers its way to your home and the bill sum makes you actually hop out of your seat. payday loans chicago

marko said...

At the pinnacle of the cycle banks may have borrowers that are profoundly presented to a sharp value decrease. These borrowers are known as the most recent contestants in the land markets and they are particularly defenseless, since they have acquired when costs were near the pinnacle and potentially expected that the value rally and pattern would proceed. Check Cashing

Justin said...

Yet, notwithstanding for military veterans, there are conditions that must be met before they can fit the bill for a VA home advance to manufacture their own fresh out of the plastic new home. Check Cashing

Justin said...

Conclusion: An accomplished Commercial Finance Broker can help you isolate the myths from the money related realities. They can locate the best SBA credits. Check Cashing