Pair Programming
Just one month ago, I came to know about the concept of Pair Programming. Before this, I used to write code in solo and therefore I had some misconceptions like working in pair might result in the reduced production because of the possible differences in work pace of the two programmers. Also, I was in a delusion that two people investing their time and energy on the same project might result in the wastage of skill and efforts and therefore it seemed inefficient and twice cost for the same work.
Now, as I proceed, it became easier for me to get in hands with pair programming and now, I perceive it as a competent way of achieving the long term goals. It has numerous benefits and the above stated problems can be easily eradicated.
As I have been involved in effective pair programming, my own experience is that it is not just a technique where one person programs and the other just watches. It is a collaborative effort in which both programmers work closely together, sharing their approach the whole time, making notes and reminders of things to do, and discussing every single step of the code. ( My screen used to covered with greasy finger-marks by the end of the day :-P). Pairing brings several benefits like, parallel code review, reduced maintenance effort, early problem detection. In my opinion, the most important benefit is knowledge sharing, in fact paring itself a knowledge sharing.
Additionally, while programming in pairs, the output is the refined one because of the possible difference in opinions in the approach and vision of the two programmers. The task gets its polishing when one of the two opinions is selected on the basis of reasoning and logical interpretations which is always better than one person applying a single approach to the task.
In pair programming there is a concept of ping pong where programmers use to switch to keyboard alternatively. Suppose there are two programmers A and B then ping pong means
- A writes a new test and sees that it fails.
- B implements the code needed to pass the test.
- B writes the next test and sees that it fails.
- A implements the code needed to pass the test.
And so on. This method helps to keep both the programmers in focus. It also helps to understand the other’s approach and concept as very often one of them take turns at the keyboard, usually swapping over with a phrase like, “No, let me show you what I mean.”

There is another concept in Pair programming which is called the Driver and the Navigator.Driver is the one who writes the code according to the navigator’s specifications, holds the computer and the keyboard, listens intently to the navigator’s instructions and the Navigator(as the name suggests) is the one who dictates the code to be written, Check for syntax/type errors as the Driver drives, and reviews the ongoing code.
In conclusion, Pair Programming is a productive method especially when long term goals are considered. In my opinion, it is a great way of learning with a whole new experience.
Pair Programming has some set of rules to be followed while practicing and for the same I am posting a link below to refer.
Happy coding :)