If you want to walk fast, walk alone; if you want to walk far, walk together

When I talk about pair programming, I am confronted with things like return on investment, efficiency etc. The arguments which come against are with very simple programs and simple domains where it does not matter you pair to program or test drive the code. Beyond the fibonacci and measurement problems there are complex domains which people get involved to solve problems and pair programming helps there.

A good analogy is racing. Racing falls into circuit racing and rallies, if we note that circuit racing like Formula-1 or driving around in circles like in NASCAR has only one driver. These ones are repetitive with relatively very few unknowns and parameters for the driver to take care. The moment you know about the car condition and the track conditions and few laps taken then the driver’s mind is on autopilot. Rally unlike circuit racing has lots of challenges, we just roughly know the route and it could be riddled with lots of surprises and obstacles. There is no way that a driver without a co-driver (navigator) could win the race.

Pair Programming

Programming at work is like rally driving, many of the examples which people take up for classroom sessions are similar to Formula-1 or NASCAR driving; which is the primary reason that most of them fail to see the potential benefits of pair programming. Depending on the nature of the task at hand we should be able to decide if we need work in pairs, group or alone to find a solution to the problem. Having a blanket rule to always program in pairs or avoid pair programming will force us to fit into one of the styles of work which may prove counter productive. Always failures are taken as strong examples than successes and if we fail in choosing the wrong approach, chances are high that the approach itself will be called a failure.

Image courtesy of patrisyu / FreeDigitalPhotos.net

It is around 6:47 am, Novi’s wristband detects that he is about to wake up and it gently vibrates to indicate that it is time to wake up. It wakes him up at the right time and at a natural point in the sleep cycle that he is able to start his day immediately without the grogginess that usually follows an alarm call wake up. He collects data about his physical activity and finds that he has had enough of physical activities last week throughout to maintain a healthy lifestyle and he could afford to skip the exercise today. He switches on the TV just to find that the last month bill wasn’t paid, so he logs into his mobile app to pay the bill and the TV programmes come back to life. He also sets a recurring instruction to pay the bill automatically. A while later his phone alerts that his car pool mates have started and are about to reach his place in 30 minutes, he gets ready on time and reaches office. The office is equipped with a great canteen; it has multiple automated vending machines, automated trash collectors, state of the art coffee machines giving a perfect latte or cappuccino at a press of a button.

All this easy lifestyle stops at home and the cafeteria for Novi. Once he at his desk, the scene changes. There are around 20 developers in the team, they have been trying to integrate their code for the last one week and they had not been able to do so. Meanwhile the previous release had way too many bugs in production and it had to be rolled back which earned lots of bad reputation for the company. Every one in the team were angry, frustrated but still trying very hard to get through their day. People fell sick easily and there were not many people who could read another one’s code to fix bugs. The environments were not consistent in setup; it required long term context and undocumented knowledge to set an environment from ground up. People wished that the day at the office gets over soon so that they could go back home and rest.


CD

Why this difference in lifestyle between personal and work place. Is it possible to have a cool and easy lifestyle at work? Yes it is possible, with some effort; just like how you have to invest in some gadgets and software to make your personal lifestyle cool. That lifestyle which can make our life cool and easy at workplace is “Continuous delivery”. Continuous delivery is a lifestyle choice for software projects, it requires upfront investment in learning the methods, practicing with discipline and using the appropriate tools (software and hardware).

In one of the recent projects we completed, we were having lunch with the product owner. He said  “for around 10 years, a software release meant a tough long week at the office and now things have changed so much that I am able to have lunch peacefully while a release is going on”.

When beginning to work out for the first time, the first exercise I tried to do was to use the dumbbells to build up my arms. That is when the instructor caught hold of what I am doing and explained the difference between useful core strength and body building. I should first look to build my core strength before I could bulk up the muscles and flex it, also there is a risk of muscle detachment or broken bones if done wrong. My idea of building up muscles to flex was wrong and counter productive if taken the most obvious and easy route.

The scenario is also similar when I look at the choice of technologies when choosing to implement a new software project. The technology choices are often a trade off after considering so many concerns, some of the concerns may not even be technical in nature. If we chose a technology only because it is cutting edge or the latest one, then once the development hands over to maintenance; they may face lots of trouble because of the choice made.

The choice of technology should never be something that is analogous to flexing the muscles. It is always context specific, if the project’s main goal is to show case technical prowess and the software may be replaced within a short period of time with another one written from scratch; then there is no problem to use the latest and state of the art technologies so that we can flex our muscles.

There are too many questions to ask ourselves and consider the trade offs before we settle on technology decision. We have to consider maintenance team’s capability, fault tolerance, performance, life time of the software, scaling, frequency of maintenance and enhancement releases, which country and kind of internet connections will users use. There is no one size fits all or new kid in the block to address all the concerns at once, the choice is always a trade off.

Image courtesy of clker.com | Clipart