Team Code Reading

 

One of the very old practices in the software industry is Code Reviews. The general process is, a senior engineer providing feedback on how a code is written by another engineer. There are many issues we have observed with this approach and we have adopted something called Team Code Reading.

Approach of Team Code Reading

  • Trust: We trust the team members that they have written good code and they are free to check-in their code without someone’s comments. Although this is validated by our functional tests and Unit tests.
  • Team Code reading: We meet as a team to read/go through to each of the lines of code to understand it and try to be critical about it, irrespective of who has written it. The person who wrote the code would normally explain the business and technological background behind it.
  • TODO’s /User Stories: Outcome of code reading is mostly a TODO on the code or a user story on the product backlog.
  • No Finger pointing: Being Critical is fundamental about the code reading session. There are no fingers pointed at the person who wrote it originally. The team takes collective responsibility for the code.

Benefits of code reading:

  • Knowledge Normalization: Since all the team members are part of the code reading session, the product and technology knowledge gets normalized/spread across all the team members. For example, A junior/fresh grad will get lots of technical best practices from the code reading session.
  • Team bonding: Since there is no finger pointing, the team owns the problem in the code, it helps team bond well along with the code.
  • New ideas: Code reading session becomes a platform for brainstorming for new ideas as everyone is in thinking on critically about the product and code. Some innovative ideas come out and have become great product features.

It isn’t all Rosy                                             

There is a cost associated with each of the approaches. Below are the few costs that you have to pay if you are doing Team code reading.

  • The complete team’s time is required to do the team code reading. This is the cost that team members need to spend to get the product/business knowledge.
  • Distraction: There are chances that team gets distracted by some idea/problem. Scrum master or one of team member need to re-align the team towards code, every time there is a distraction.

Concluding remarks

There are always many ways to improve product and code. But the process that is followed drives the effectiveness of the outcome. I believe Team Code reading can greatly help improve the effectiveness of the team.

 

Leave a Reply

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