Pair Programming - My Personal Experience

In this article, I will try to share my views about pair programming what I have experienced in last one month

 · 2 min read

Pair programming typically means coding done by two people together on a single machine sitting side by side. When one person writes code, the other person reviews the code continuously, and thinks about the next move. And they generally switch their role after approximately 30 minutes to 2 hours.

In this article, I will try to share my views about pair programming what I have experienced in last one month. Here, in erpnext, we always try to adopt better and innovative ways to work (thanks to Rushabh). Sometimes it works, sometimes it does not. This time, we tried "Pair Programming". Anand and myself paired for  redevelopment of "Manufacturing Module" and "Stock Reconciliation".

At the beginning, there were many questions in my mind:

1. Is it worth to invest two developers' time to finish one developer's job?
2. How day-to-day technical support will be managed?
3. Pair programming will succeed only if you can make the right pair. Will it work?

Keeping those questions in mind, we decided to give it a try. In pair programming, it is always better to have complementary skills. And in our case, Anand has very good technical knowledge and a decent taste in UI design, and on the other hand, I have enough functional knowledge.

After finishing our first task (Manufacturing module redesign), we were quite satisfied. We found that the workflow and the forms have been significantly simplified, the code is looking nice and number of bugs have been reduced after release. We took more than expected time to finish the task, but it was due to lack of clarity and scope of projects kept expanding with our progress. So, we decided to do more ground-work and discussions before actual coding from next task.

So, in our next task, redesigning of Stock Reconciliation, we started with detailed discussion and writing down all possible cases in white board. After that we started with UI design (which ideally should have been done in the end) and then moved to writing testcases and actual logic. And believe me, this time we enjoyed more because of initial "White Board Discussion" and enough clarity in mind.

It is always pleasure to work with Anand and I learned a lot during pair-programming. Good coding practices and how to dare to rewrite the existing ugly code. Most of the time, Anand was doing coding, because of my slow typing speed which led me to practicing ten finger typing. I have already increased my speed a bit :)

After one month's experience, I think pair programming is always better for difficult and medium sized tasks. It provides better code, fewer bugs, simpler design and better productivity. Two heads really are better than one.

Fingers crossed for our next assignment "Account Inventory Integration".

Nabin Hait

Nabin is a Software Developer at ERPNext and specializes in Accounting and Inventory.

No comments yet.

Add a comment
Ctrl+Enter to add comment