ICode9

精准搜索请尝试: 精确搜索
首页 > 其他分享> 文章详细

现代源代码管理工具——重点描述TFS

2021-05-30 22:34:08  阅读:266  来源: 互联网

标签:code 代码 team 管理工具 they review 源代码 your TFS


视频链接:https://channel9.msdn.com/Series/Visual-Studio-2012-Premium-and-Ultimate-Overview/Visual-Studio-Ultimate-2012-Using-Code-Review-to-Improve-Quality

 

视频原话:

As a developer on your team,you write code to address tasks that are signed to you.Of course you build frequently and checked all your units passed.And at any point you can use visual studio's pending changes features to review exactly what changes you've made.You're almost ready to check in your code, but your team uses Code Reviews to improve code quality.With Visual Studios Code Review feature,you can request and perform code reviews without ever leaving the IDE.Within the Code Review page, you can add one or more of your team members as reviewers, it often helps to have someone make sure that the code you've written does what it's supposed to do and that it does it efficiently.It's also great to have a second set of eyes to look for problems that are difficult to see when you've been looking at the same code for too long. You can increasing transparency by choosing meaningful titles and by adding descriptions to your code reviewer quests.Tell your reviewers a little bit of about what you are asking them to look at.In some cases,you might provide a brief explanation of a feature you have permitted or how you fixed about it.When you submit your review quest,your code doesn't even have to be checked in.It can be active in your workspace,or it could be suspended.You can configure team foundation server to notify reviewers by e-mail so they know right away that they have a code review waiting for them,even if they aren't runnning Visual Studio for currently logged into TFS.

In addition to the e-mail,each viewer will see the request appear in their own My Work page where they have the option to decline the requests or they can accept.To provide a thorough review,they will likely want to see a side-by-side comparison of the changes that you've made.Visual Studio also supports Inline, Left-Only and Right-Only views to compare files.Reviewers can add comments to a specific block of code or make a comment about a specific file.Or they can send an overall comment that applies for the review as a whole.When you complete a review,it just takes a single button click to send all those comments to TFS,where they could be shared with the rest of your team.Another reviewer may choose to comment on your comments.In other words,a team can engage in a dialogue about a new feature or bug fix and all the comments are stored right alongside the relevant code.Each reviewer indicates when they are finished with their view and of course this information gets recorded in Team Foundation Server.At all times,the original requester can view the current status of the review.They know which reviewers have accepted or declined and they can participate in the discussion surrounding the changes made.

The Code Review feature in Visual Studio 2021 helps you to collaborate with your team to improve code quality and get valuable feedback,all from within Visual Studio.

为什么要进行code review?

代码审查是保证代码质量的重要手段。软件缺陷可能隐藏在各个地方,测试是发现缺陷的重要方法,但专业的测试人员更多的可能是黑盒测试,他们不去关注代码内部的逻辑,只去关注代码实现的功能,有人说测试代码中的逻辑需要开发人员进行单元测试,一方面,单元测试覆盖率基本上不可能达到100%,另一方面,毕竟是单元测试,测试场景简单,有些复杂的场景有可能会测不到。各种测试完成后,如果还有缺陷,那只能让客户充当我们的“终极测试”了。抱怨会接踵而来,客户满意度会越来越低。所以,我们要想出一切可以使用的方法来进一步提高代码质量的方法,还有代码审查么,测试发现不了的问题,通过代码审查也许你能够发现。

代码审查是熟悉软件架构,了解软件业务逻辑的好方法。学习代码是需要切入点的,一个上百万行代码的系统,从哪里开始着手,只能一个模块一个模块,一个组件一个组件的来熟悉,掌握。实现一个比较大的功能,你应该不会是唯一的开发人员,从系统架构师输出的系统设计,然后到各个团队中技术Lead输出的component级别的设计,到开始实现时,应该会把功能分为不同的模块有不同的开发人员协同实现。这是个学习的机会,不要只局限于自己这部分,为了了解这个大的功能,甚至和这个功能相关的其他已经实现的功能,你同样需要关注其他人的工作。有目的的看代码和漫无目的的浏览效果是不一样的,你已经对新功能有所了解,审查代码之前,你认为代码会怎么写,别人哪里和你想的不一样,旧功能和新功能是如何相互影响的等等,心里怀着问题,你的学习速度会更快,记得更加深刻。

代码审查是你提高自己的好方法。前提是team中有经验丰富的开发人员的存在。也就是大牛,不要错过让他看你代码的机会,不要害怕他会为你写的代码挑出一大堆问题,有人说你自己写的代码就像自己的孩子,见不得别人说半点不字,不要固执,要内心平静的,客观的去看待你所写的代码,发现并解决问题才能提高你自己。也不要错过去review大牛代码的机会,看看大牛写出来的代码是怎样的,你可以取其精华。

选择TFS进行code review的好处:

无缝结合VS,两者结合紧密进行项目管理非常方便,从需求分析、开发、测试、维护,几乎可以贯穿软件开发的整个生命周期。TFS是一个应用程序生命周期管理解决方案,SVN和Git仅是源代码控制。TFS能进行源代码控制以及问题跟踪,文档管理,报告,持续集成,用于测试的虚拟实验室等。TFS的Source Control和SVN是集中式源代码控制,Git是分布式的。

 

标签:code,代码,team,管理工具,they,review,源代码,your,TFS
来源: https://www.cnblogs.com/zjw1980/p/14829434.html

本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享;
2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关;
3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关;
4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除;
5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有