Hacker News new | ask | show | jobs
by w_t_payne 4574 days ago
Great post.

We use Gerrit code review, with side-by-side reviews. I.e. the developer pushes to Gerrit, then sits down with the reviewer and walks him through the code. 99% of the bugs are found by the original developer -- after he is forced to explain what he did (and why) to a colleague. I think that this gets you at least some of the benefits of both approaches.

2 comments

This is an interesting practice, thanks for sharing. I'm really curious about different sorts of hybrid approaches being used in the wild.

I'd be curious to hear how the day-to-day schedule ends up working out between developers, since the review process is synchronous in this case.

The synchronous aspect is a problem, although not a huge one. The issue is mitigated to a certain extent by excluding non-customer facing research & testing components from the review requirement. Also, the architecture of the system is such that people tend to work very independently, with little-to-no overlap, so reviews can be postponed with little impact on velocity. As our team grows in size, we could also think about instituting a rotating code reviewer responsibility, with team members taking it in turns to act as the designated reviewer for the day.
Unfortunately the explanations aren't left as code comments, so they may be lost.

One ting nice about code review is that the code must stand on its own to pass. That means that it's likely to be understandable a year from now.

Written documentation does have the advantage of being persistent, and supports an unlimited producer-to-consumer fan-out. However, documents have a pretty lousy bandwidth and knowledge retention rate compared to face-to-face communication. If you are working in a small team with low staff turnover, face-to-face beats written docs hands-down as a knowledge transfer mechanism. On the other hand, if your staff turnover is high, or if your team is huge, then you absolutely need to write everything down. I am working in a small team, with low turnover, so face-to-face works best for us in this particular instance. (We still document what we do pretty well, though, with both regular source commentary and tools like Doxygen, but as a matter of professional pride rather than necessity).