Methods, Not Methodology (I): Validated Code Review

See Also: AntiPattern: Batch Code Review


Code review, specially daily code review, is considered a good practice. I've participated lots of code review meetings, and something concerns me. It's the low efficiency. Usually it takes longer time than scheduled, while gains less benefits than expected.

Lacking of guideline to facilitate reviewers' thinking is one of the reasons for low efficiency. All comments come randomly. The harvest really depends on reviewers' mental state, tired or energized. What kind of guideline we could use? a checklist for something? It could make things better, but today I'm going to apply the "validated learning" idea to code review.

The goals for code review are:

  • Gain knowledge for both business and technique.
  • Improve the design.
  • Try to find some bugs

So, to be able to achieve the goal, or to make sure we can achieve the goal, we could always use the following questions to validate the review. During the review meeting, for every code change, we can ask:

  • What's the domain knowledge behind of the change?
  • What's the technical knowledge behind of the change?
  • Is there any bad smell?
  • Is there any potential bug?

And yes, everybody should embed the code smell list in mind.

Use these four questions as a guideline to improve the efficiency of code review meetings. It works for me. Hope it's helpful for you.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值