Pairing matrix for agile teams

      No Comments on Pairing matrix for agile teams

I work in an agile team which follows extreme programming practices like pairing programming. But with pair programming comes the problem of switching pairs. Sometimes in big teams we do see that the individuals are not able to make the decision of with whom they should pair next. To overcome this problem we generally create pairing matrix which helps us figure out who is pairing with whom and wether team is switching pairs frequently or not.

Managing the hand made pairing matrix is a pain. Also maintaining the matrix of more than a month is difficult and space consuming on the white boards. I wanted a matrix that can allow me to see the pairing data based on the time span without much effort. To solve this problem I created a rubygem which automates the generation of pairing matrix based on the git commits.


How to read this matrix?

  • This matrix is purely based on git commits.
  • Darker the line more the pair has worked together.
  • If you see a darker red circle around a name that means the person has worked alone.

How pairing matrix gem works?

The matrix is generated using the git commits presents in your local machine or github. I would suggest to point the pairing matrix to github so that everyone sees the same copy of the matrix.

Installation of gem

Add the below line to the Gemfile and run bundle install

Or install it yourself:

To automate pairing matrix you need to provide following things to pairing matrix gem:

  • Regex to extract pair name from the commit message
  • Github access token (only required for private repositories)
  • Github repos

You need to add all this information in the pairing_martix.yml file. Please refer to the below sample.

How to test the author regex?

First of all you need to follow a particular pattern in your git commit messages. Then you can write a regex to extract the dev names from the commit message. Also make sure that all the devs in the team follows the same commit message pattern for all the commits. For example:

You can choose any format as long as you are able to extract dev names from the message using a regex. To figure out if your regex is correct, you can try the regex on the commit message in irb.

Once you are ready with your regex, put it in the pairing_matrix.yml and run the below command from the same directory.

This command starts the sinatra server on the machine on port 4567. Now go to web browser and type localhost:4567/matrix. You should start seeing the pairing matrix based on the data you have provided in the pairing_matrix.yml file.

Some example of pairing_matrix.yml

For local repositories

For private repositories on github

For public repositories on github

I hope you will now be able to automate your pairing matrix. If you have any questions or feedback, please write it in the comment below. Thanks!

Leave a Reply

Your email address will not be published. Required fields are marked *