Cracking the code review (Part 4): Conflict management

(This is the fourth part in a series about working effectively to pass code review quickly and without missed defects.)

Photo by bert sz on Unsplash

In the last post, I discussed how proactively involving your reviewers in your design and implementation process would get your reviews approved faster. The biggest risk of proactivity, though, is that one or more reviewers might disagree with you.

If we don’t manage arguments properly, things will come to a head at review time when your reviewer is free to let loose all their criticisms yet again. Then you’ll reply in kind, and so on.

Time spent going back and forth in a code review is wasted time.

Continue reading “Cracking the code review (Part 4): Conflict management”

Cracking the code review (Part 3): Be proactive

(This is the third part in a series about working effectively to pass code review quickly and without missed defects.)

Image courtesy of Reddit user andyjerbear

In the first two parts of this series, we discussed why code reviews needed to be small, and failing that, how we could make them seem small by managing extraneous cognitive load. There is a third way to make reviews go faster, and that’s by proactively ensuring your reviewers know a bit about what you’re working on before they review it (managing germane cognitive load).

Continue reading “Cracking the code review (Part 3): Be proactive”

Cracking the code review (Part 2): Make them seem small

(This is the second part in a series about working effectively to pass code review quickly and without missed defects.)

Image source: Wikimedia

In part one, we showed that, all other factors considered, the shorter the code review, the better. It may seem intuitive that this is the case. After all, barring some entry into a code obfuscation competition, even the worst written code can still be understood if it’s short.

But you’ve probably also seen code that was easy to understand despite it being many lines long.

Examples of this phenomenon include: a class rename that spans 100 files; a host of new Factory classes; addressing all instances of a specific compiler warning; or new functionality in a system that you originally authored.

These things seem small even though they aren’t actually. So, how do we really quantify "small"?

Continue reading “Cracking the code review (Part 2): Make them seem small”

Cracking the code review (Part 1): Smaller is better

(This is the first part in a series about working effectively to pass code review quickly and without missed defects. In this series I will use Git terminology with respect to source control and branch management.)

Photo by Jon Tyson on Unsplash

Let me tell you a code reviewer’s horror story. It’s the start of a sprint and Taylor is assigned to develop a spiffy new feature. They excitedly get to work. They carefully review all the requirements, spend a few hours on a whiteboard designing a solution, and then start by writing unit tests. After just 1.5 weeks of the 2 week sprint, Taylor has a robust, performant implementation that has 100% test coverage.

(shines flashlight under face) Then… they create a pull request into master for the code to be reviewed (frightened screams erupt from code reviewers around the campfire).

Continue reading “Cracking the code review (Part 1): Smaller is better”