12
返回列表 发新帖
楼主: AlexQin

10 Reasons Why Code Reviews Make Better Code and Better Teams

[复制链接]
论坛徽章:
1056
紫蜘蛛
日期:2015-09-22 15:53:22紫蜘蛛
日期:2015-10-15 13:48:52紫蜘蛛
日期:2015-10-15 14:45:48紫蜘蛛
日期:2015-10-15 14:47:47紫蜘蛛
日期:2015-10-15 14:48:45九尾狐狸
日期:2015-09-22 15:53:22九尾狐狸
日期:2015-10-15 13:50:37九尾狐狸
日期:2015-10-15 14:45:48九尾狐狸
日期:2015-10-15 14:47:47九尾狐狸
日期:2015-10-15 14:48:45
11#
 楼主| 发表于 2018-7-2 13:51 | 只看该作者
10) Mentoring Junior Developers
If you have a junior developer starting on your team, how can you help her to grow and improve?
Of course, you can give a presentation about a technology or a module. You can host a workshop, or you can give explanations on-the-go when she touches on a new subject as part of her task.
These are all things which are helpful and are necessary to a certain degree. But she needs regular feedback on the work she delivers, meaning the code she develops.
Code reviews are a great way to do that.
When code reviews are part of the development pipeline of the team, then this also feels natural for the whole team to help the junior grow and improve as a developer. This makes it a responsibility for the whole team—otherwise, the team usually expects the team leader to do all the work for training the junior.
As code is reviewed for every team member, it is also perceived from the junior as less intimidating, even though she might get a lot of comments to make changes before her pull request finally is approved.
Next to that, she also has to review code that has been produced by other developers.
Reading code and trying to understand what it is doing is a great way to improve your own coding skills.
And if this is part of the team development pipeline, this happens daily and feels like a natural part of your job.

使用道具 举报

回复
论坛徽章:
1056
紫蜘蛛
日期:2015-09-22 15:53:22紫蜘蛛
日期:2015-10-15 13:48:52紫蜘蛛
日期:2015-10-15 14:45:48紫蜘蛛
日期:2015-10-15 14:47:47紫蜘蛛
日期:2015-10-15 14:48:45九尾狐狸
日期:2015-09-22 15:53:22九尾狐狸
日期:2015-10-15 13:50:37九尾狐狸
日期:2015-10-15 14:45:48九尾狐狸
日期:2015-10-15 14:47:47九尾狐狸
日期:2015-10-15 14:48:45
12#
 楼主| 发表于 2018-7-2 13:52 | 只看该作者
Are There Any Downsides?
Ok, you’ve heard of the 10 benefits of code reviews. Now, you might ask: Are there any downsides?
Well, usually you hear the following arguments from people who do not see the value of code reviews:
A code review prolongs the development time of a feature because after the coding is finished, another person has to review the code before it can move to the next step in the development process.
In addition, the reviewer uses the limited and expensive time at work for a review, while he could be more productive and continue to code. Therefore, code reviews result in higher development costs.
These arguments are probably true on a very short term, but I am convinced that on a long-term basis code reviews definitely pay off: you get better code quality, improved knowledge sharing in the team, fewer bugs that need to be fixed, better teamwork, among other benefits.

使用道具 举报

回复
论坛徽章:
1056
紫蜘蛛
日期:2015-09-22 15:53:22紫蜘蛛
日期:2015-10-15 13:48:52紫蜘蛛
日期:2015-10-15 14:45:48紫蜘蛛
日期:2015-10-15 14:47:47紫蜘蛛
日期:2015-10-15 14:48:45九尾狐狸
日期:2015-09-22 15:53:22九尾狐狸
日期:2015-10-15 13:50:37九尾狐狸
日期:2015-10-15 14:45:48九尾狐狸
日期:2015-10-15 14:47:47九尾狐狸
日期:2015-10-15 14:48:45
13#
 楼主| 发表于 2018-7-6 09:45 | 只看该作者
How to Implement Code Reviews
If your team does not have code reviews in place yet, there are different ways that you can implement code reviews with your team. There are four types of code reviews:
  • You can do an instant code review using pair programming.
  • You can review each task synchronously after coding is finished.
  • You can review each task asynchronously after coding is finished.
  • A long time ago, I even used to have code review sessions together with the whole team in one room about once every month
I personally prefer the option to review each task asynchronously, which is basically the experience on GitHub: When the coding is finished, the coder creates a pull request. Sometime later, when the reviewer has time he will perform the code review asynchronously based on his own schedule.
In contrast, the synchronous code review happens immediately after the coding is finished. The reviewer stops with his current work and joins the coder at his desk to review the code together.

使用道具 举报

回复
论坛徽章:
1056
紫蜘蛛
日期:2015-09-22 15:53:22紫蜘蛛
日期:2015-10-15 13:48:52紫蜘蛛
日期:2015-10-15 14:45:48紫蜘蛛
日期:2015-10-15 14:47:47紫蜘蛛
日期:2015-10-15 14:48:45九尾狐狸
日期:2015-09-22 15:53:22九尾狐狸
日期:2015-10-15 13:50:37九尾狐狸
日期:2015-10-15 14:45:48九尾狐狸
日期:2015-10-15 14:47:47九尾狐狸
日期:2015-10-15 14:48:45
14#
 楼主| 发表于 2018-7-6 09:45 | 只看该作者
Get Started on Code Reviews
No matter which code review method you think is the best fit for your team, the important part is that you have code reviews in place as an integral part of your development process.
If you don't have them yet, then I encourage you to start a discussion with your team and explain them about the benefits of code reviews as you have just learned.
You don't need to convince the whole team at once. In the beginning, it is enough to convince only one of your colleagues and you can get started to review each others code. Over time, as your coding skills improve and you write more robust and clean code, other team members will get curious and eventually join in as well.
Alright, that's it for today. In case your team does not have code reviews in place yet, I hope you got some ideas on what you can do to get started. If you have any strong opinions about code reviews, please let me know in the comments.
Ok, stay tuned and take care.

使用道具 举报

回复
论坛徽章:
1056
紫蜘蛛
日期:2015-09-22 15:53:22紫蜘蛛
日期:2015-10-15 13:48:52紫蜘蛛
日期:2015-10-15 14:45:48紫蜘蛛
日期:2015-10-15 14:47:47紫蜘蛛
日期:2015-10-15 14:48:45九尾狐狸
日期:2015-09-22 15:53:22九尾狐狸
日期:2015-10-15 13:50:37九尾狐狸
日期:2015-10-15 14:45:48九尾狐狸
日期:2015-10-15 14:47:47九尾狐狸
日期:2015-10-15 14:48:45
15#
 楼主| 发表于 2018-7-6 09:46 | 只看该作者

使用道具 举报

回复
论坛徽章:
1056
紫蜘蛛
日期:2015-09-22 15:53:22紫蜘蛛
日期:2015-10-15 13:48:52紫蜘蛛
日期:2015-10-15 14:45:48紫蜘蛛
日期:2015-10-15 14:47:47紫蜘蛛
日期:2015-10-15 14:48:45九尾狐狸
日期:2015-09-22 15:53:22九尾狐狸
日期:2015-10-15 13:50:37九尾狐狸
日期:2015-10-15 14:45:48九尾狐狸
日期:2015-10-15 14:47:47九尾狐狸
日期:2015-10-15 14:48:45
16#
 楼主| 发表于 2018-7-6 09:46 | 只看该作者
good to learn

使用道具 举报

回复

您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

TOP技术积分榜 社区积分榜 徽章 团队 统计 知识索引树 积分竞拍 文本模式 帮助
  ITPUB首页 | ITPUB论坛 | 数据库技术 | 企业信息化 | 开发技术 | 微软技术 | 软件工程与项目管理 | IBM技术园地 | 行业纵向讨论 | IT招聘 | IT文档
  ChinaUnix | ChinaUnix博客 | ChinaUnix论坛
CopyRight 1999-2011 itpub.net All Right Reserved. 北京盛拓优讯信息技术有限公司版权所有 联系我们 未成年人举报专区 
京ICP备16024965号-8  北京市公安局海淀分局网监中心备案编号:11010802021510 广播电视节目制作经营许可证:编号(京)字第1149号
  
快速回复 返回顶部 返回列表