Quality Code Reviews
Code reviews are among the most important aspect of professional software development. We spend large portions of our time doing code reviews. Because they are one of the most effective forms of ensuring cohesiveness and incrementally staying up to the date with the state of a project and system.
Lately I have been wondering why our team has been so effective with code reviews, until an old friend of mine sent me a link to a video on doing effective code reviews.
Without realising it, we had already been following practices outlined in this video.
While these aren't rules and are more akin to guidelines or principles. Our team has come to focus on the following:
- Save other's time, by reviewing your own code first
- Do not be on the offensive or defensive
- Ask questions
- Avoid the condescending "why didn't you just...?"
- Try to add references (ie. external documentation, studies, etc)
Part of this is because we have been following the ideas found in the video Does a developer need to be nice?. The video refers to a study by Google on how to build great teams. Google found the key to a great team is not whether it has good or great developers. Instead it is more important that the team has a factor of psychological safety. To quote an article from The New York Times referencing Google's study:
Psychological safety is "a sense of confidence that the team will not embarrass, reject or punish someone for speaking up," Edmondson wrote in a study [...]. "It describes a team climate characterized by interpersonal trust and mutual respect in which people are comfortable being themselves."
The purpose of the team is to release great products for the customer. Since software developers are usually introverted, creating a healthy work environment is essential to accomplishing this goal.
The team should have a culture of being "nice". Having a "superstar" cast of developers becomes secondary.
Of course, this does not mean individuals need not be talented and willing to learn, both at work and during their time outside of work. There is a degree of skill and grit required to produce the quality of software demanded by today's consumers. However, code reviews and being generally pleasurable are key assets. They contribute to quality just as much as technical abilities. Every developer has his or her own method of practicing their technical skills, but they sometimes choose to ignore learning other practices that may be beneficial in their workplace. Sometimes it's useful to take a step back and work on improving daily tasks that may seem mundane, but are actually important to quality.