Pitfalls of pair programming
Pair programming in some sense resembles pair patrols when you have a comrade who, watching the situation from a different side, can cover your back and save lives. At the particular service, as with the workplace, an extra pair associated with eyes along with a clever mind is rarely superfluous, because agile-evangelists got a clue timely. Plus now, the two at the rear of the pc are no lengthier parasites, but adherents concerning the new movement, which usually, on the one hands, is designed to boost the quality of development, but one the other side of the coin, leave space for questions. When turn to pair programming? Will be it profitable? Do we need it at all?
Pair programming is when two employees are sitting at the same computer: one is coding (driver), the second is controlling (observer). They may change places from time to time. Kent Beck gives a simpler definition: “All production code is written with two programmers at one machine.”
In theory, this practice allows developers to achieve several things:
Improve the quality of the code. The second pair of eyes, if not sleeping, then catch the errors still “warm”. Uncovering a crime without delay is easier and faster than after, so in this case, pair programming allows you to save time.
Improve the design of the application. As a rule, two make more successful architectural and design decisions. Especially when it comes to complex tasks that require a non-standard, creative approach. At the same time, judging by the research conducted in one Spanish company, pair design is not as effective as pair coding.
Adopt experience. First of all, it concerns the junior developers, for whom it is important to learn how to think like an experienced programmer. In this case, pair programming is essentially a mentor-student relationship.
Get knowledge. Even for a confident developer, “entering” a new project takes some time. A developer can, naturally, code alone or frequently flood questions with co-workers, but it could be more effective to conduct several pair-programming sessions that will reveal which components everything revolves, where crutches are and exactly what cabinets with skeletons must be avoided.
For an employer, there is an advantage in pair programming, which is at the same time a disadvantage for a developer – this is spreading knowledge about the project through the team. In order to remove irreplaceable developers. Also, we can say about additional team building and motivation for employees to find common ground.
One more benefit is sometimes called the particular increase in labour efficiency. They say that if a developer has a mentor behind his back, then he will not surf the Internet visiting blogs and forums, but will be doing his work. This misconception can be exposed simply by two randomly examples: in case you put in two lazybones, their productivity will never boost, but fall; when the presenter is used to visiting chats and Facebook, then he will do the same anyway. Especially if the mentor has a lower position. So, with performance, everything is not so simple, as it depends on people.
“A friend’s help” is not a new idea of organizing the workflow – the same pilots and cops have long been working in pairs. But among programmers, this idea is still relatively fresh and uninhabitable. So it’s time to shed some empirical light on the features of this practice, so as not to break the firewood ahead of time.
What should be considered before starting pair programming:
More man hours per task. For a programmer, this means nothing: a soldier is sleeping – the service is on. But for an employer, these are increased spending on the work of a couple of people instead of a single (on average, pair-programming is usually 15% more expensive). Although the result in the form of fewer bugs and a more successful design, which in the end can compensate for the increased number of man-hours spent and even reduce the price of the product, is not always obvious.
Different tempers. On the one hand, it may seem that if the colleagues do not agree, then the friendly relations that help in pair programming cannot arise between them. Or that a person who simultaneously opens dozens of windows and tabs and tries several options at once will not get along with a “slow programmer” who has been researching a single method regarding a long time just before writing a solution inside one sitting. But a new study on the effect in the characters of fellow workers issues work in a new pair asserts there is zero problems as such:
“Personality may be a valid predictor for long-term team performance. However, we found no strong indications that personality affects pair programming performance or pair gain in a consistent manner, especially when including predictors pertaining to expertise, task complexity, and country. ”
If we add the fact that typically pairs change regularly, in addition to a limited time frame functioning together, then the function in the characteristics of typically the characters becomes even more compact.
But there are other opinions on this score: programming in a pair is hard for some people because it requires a certain maturity and courage, not to mention the fact that often nobody wants to give their code.
Different skill levels. The coarse division of developers into novices and experts gives three options for combinations: expert-expert, expert-novice, novice-novice.
Expert – Expert. On the one hand, it may appear that two mega-brain working on the same task is the ideal mixture for solving any problems. But research by the Hong Kong Polytechnic University suggests that this is not completely true. A creative approach in such a pair may suffer since experts usually do not question conventional practices.
Expert – Beginner. In fact, this is a mentor-student relationship, which, however, will be useful not only for a junior developer, but also for the mentor. The beginner will be trained by asking questions, and the teacher will be trained by passing on experience. In addition, June will ask a lot of “stupid” questions, pushing the expert to be more creative in solving problems.
Beginner – Beginner. This pair usually not only works much faster and more qualitatively than a lonely beginner, but also more effective than even a couple expert-expert.
Employee hygiene. Not every person will want to sit next to a sweaty colleague who smells bad from his mouth. Of course, the public today is slowly becoming more civilized, discovering shampoo, soap, deodorant and a toothbrush, but dinosaurs are still found in offices. At the same time, the issue of hygiene here can also have the reverse side by means of excessive outrage for other’s fat fingertips that cringe your harmless keyboard.
Limited time. According to research released in 2009 in the journal IEEE Transactions on Software Engineering, the ideal time for you to work in a pair is from one. 5 to four hours. Or else, mental exhaustion occurs. Within this case, the set should be regularly shuffled.
The difficulty of concentration. It isn’t really so easy to think, talk and type code at the same time. Pay attention to somebody’s speech and code – the same. If one partner is plainly more skilled than another, then the second one may also be nervous, believing that this individual is working too gradually, taking extra time from the expert. This anxiety, coupled with the necessity to process anyone’s speech, can make it difficult to concentrate.
Not for all types of tasks. Pair development works well only for a certain kind of complex problems that require a creative approach. In the case of a standard task, for instance, an insignificant CRUD, pair work manages to lose its effectiveness. It’s unbecoming of a cannon to fire on sparrows.
The main indication that something is incorrect in some is quiet. Silence can speak about two things: either one of the developers bows to the master and is afraid to even say anything, or else what is happening to your pet is absolutely violet, and he passes the time. Someone should always speak and comment on what is happening. This is particularly important in working with the junior developer, which, through the voiced by the guide, will commence understanding his way of considering. It turns out almost like a personal programming session, for which additionally they pay extra.
It is not essential to become a Agile adept in order to practice pair programming – you can put it to use even on Waterfall, even where. Another thing is important: to be aware of the fact that this type of programming requires a certain coherence of the team (it will grow by the hour), and that it is not a panacea for all the ills of the project.