Why review code?(为什么要复盘代码)

  1. The code itself. The most obvious value in code review is often framed in “catching bugs”. (能查出bug)
  2. Macro-level knowledge sharing.When you review other people’s code, you tend to learn new techniques that can benefit you later.(能学到更广泛的技术)
  3. Direction sharing. Relatedly, code review forces you to communicate to teammates what you’re doing, which helps ensure that you don’t end up going in a wrong direction for days or weeks by giving them a chance to push back.(能和同事保持沟通,确保工作方向不跑偏)
  4. Communication practice. Being able to communicate clearly, both within a team and beyond it, is one of the most important skills for succeeding at work.(能练习沟通能力)
  5. Historical record. In my experience, people tend to write much better commit messages when they know someone’s reading them. That’s often useful later when looking back at old changes.(做一些记录也会很有用)
  6. Team cohesion. When you do regular code reviews, work feels a little more like a single team working together instead of each person operating “in their own lane”.(能和团队更密切的配合)
  7. Reading practice. Getting practice reading other people’s code helps you remember how to make your own code more readable. Which leads to better code forever after. (能练习阅读代码的能力,也能让自己代码的可读性更好)

    引自:Sophie Alpert的博客

猜你喜欢

转载自www.cnblogs.com/lixiang12/p/10223087.html
Why