你们有什么理由希望在有人提交某些代码时收到通知吗?

发布于 2024-07-07 05:30:25 字数 74 浏览 13 评论 0原文

我知道有一些事情,比如进行手动检查,以确保提交的代码基本上是正确的。 但除此之外呢? 我问的原因是因为一个大项目每天都有很多提交。

I know there are things like doing manual check to make sure the codes committed is fundamentally correct. But beside that? Reason i asking is because a big project there are so many commits everyday.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(9

傾旎 2024-07-14 05:30:25

一般来说,提交通知很有用,这样您就可以了解代码中每天发生的情况。 例如,我知道何时实现了新功能,或者签入了错误修复。如果提交太多以至于在噪音中丢失,那么可能值得过滤或减少您看到的提交消息的数量(也许例如,您可以将其限制为仅适用于您正在使用的特定模块)。

话虽这么说,除了让其他开发人员有机会至少粗略地审查代码之外,它还可以通知人们:

  • 现在是从源代码管理运行更新并在需要时合并任何新更改的好时机
  • 嘿,有人发现了正则表达式解析Foo 中的错误,但忘记用它更新 Bar
  • 哦,Bob 正在开发 Baz 模块,我应该让他也看一下这个,

你明白了。 基本上,它的目的是帮助提高整个团队的透明度,不仅是为了更多地关注承诺,而且是为了改善整个团队的开发周期。

Generally speaking commit notifications are useful so that you have some idea what's happening in the code on a daily basis. For example, I know when a new feature has been implemented, or a bug fix is checked in. If there's so many commits that this gets lost in the noise then it might be worth filtering or reducing the number of commit messages you see (perhaps you can limit it only to specific modules you work on, for example).

That being said, aside from giving other developers the opportunity to at least cursorily review code, it can also notify people that:

  • it's a good time to run an update from source control and merge any new changes if needed
  • Hey, someone found a regex parsing bug in Foo but forgot to update Bar with it
  • Oh, Bob's working on the Baz module, I should ask him to take a look at this too

You get the idea. Basically, it's meant to help foster transparency throughout the group, not just to put more eyes on a commit but to improve the development cycle for the team as a whole.

另类 2024-07-14 05:30:25

上面提到的许多事情在收到签到通知时都很有用。 我通常将它用于以下几件事:

  • 如果项目以某种方式中断,有时我可以更快地解决问题,因为我已经知道已进入系统的签入。 它可能会更快地向我指出一个解决方案
  • 它提供了一组易于搜索的签到(至少因为我通过电子邮件收到它们)。 是的,您的源代码控制系统拥有所有这些信息,但搜索整个签入评论可能并不容易。 对于电子邮件,对我来说,返回并搜索用户、模块、关键字等并让 Outlook 找出相关电子邮件是非常简单的。
  • 我可以轻松跟踪年轻的开发人员以及他们在做什么。 它让我有机会了解他们何时签入代码以及他们如何处理代码。 它提供了在代码审查等其他定期安排的事情之外进行持续指导的机会。
  • 它为团队提供了一种跟踪进度并记录何时可能检查冲突的方法。

即使有很多通知,我也不觉得必须完整地阅读它们。 我浏览了很多,但这足以让我在需要更多信息时回到适当的提交。

Many of the things mentioned above are useful when getting notified of checkins. I typically use it for a couple of things:

  • If the project breaks in some way, sometimes I can more quickly hone in on the problem because I've been aware of the checkins that have been going into the system. It might point me to a solution more quickly
  • It provides an easily searchable set of checkins (at least because i receive them in email). Yes, your source control system has all that info, but it might not be easy to search the entire checkin comment. With email, it's pretty trivial for me to go back and search for a user, module, keyword, etc and have Outlook cough up the relevant emails.
  • I can easily keep track of younger developers and what they are doing. It gives me a chance to see when they are checking in code and what they are doing with the code. It gives ongoing chances to mentor outside of other regularly scheduled things like code reviews.
  • It provides a way for the team to track progress and note when they might be checking in conflicts.

Even if there are many notifications, I don't feel that they have to be read in their entirety. I skim them a bunch, but that's enough to get me back to the appropriate commits when I need more information.

瑕疵 2024-07-14 05:30:25

如果有人对您自己正在开发的一个或多个程序进行更改,这可能会很有用。 如果您愿意的话,请注意,您可能需要解决一些可能需要进一步沟通的冲突。

我见过这样的情况:程序员 A 进行了一些更改,然后几天后就去度假了。 程序员 B 也在开发相同的程序,并且在程序员 B 提交更改时存在一些冲突。 通常这没什么大不了的,而且团队成员之间应该始终保持沟通畅通。 在这种情况下,程序员 B 对程序员 A 所做的更改有一些疑问,但不得不等待一周,直到该程序员回来。 在这种情况下,一封提醒电子邮件,甚至是自动生成的电子邮件,都会有所帮助。

只是我的两分钱。

It can be useful if someone commits a change to one or more programs that you yourself may be working on. It's a heads up, if you will, that you may need to resolve some conflicts that may require further communication.

I've seen the situation where programmer A committed some changes and then went on vacation a couple of days later. Programmer B was also working on the same programs and there were some conflicts at the time Programmer B went to commit his changes. Normally this is no biggie, plus communication should always be kept open between the team members. In this case, Programmer B had some questions about the changes made by Programmer A, but had to wait a week until that programmer had returned. A heads up email, even an auto generated one, would have been helpful in this situation.

Just my two cents.

小清晰的声音 2024-07-14 05:30:25

当然,您希望密切关注所放入的代码,以便您了解团队中其他人在做什么,并且您不会仅仅编写代码而陷入困境。

即使您没有监控代码的质量,您也可以了解其他人正在做什么。

它有助于建立团队。

Sure, you want to eyeball the code getting put in so you have some idea what other people in your team are doing, and you're not stuck in a cave just writing your code.

Even if you're not monitoring the code for the quality, you can have an idea what other people are working on.

It helps build the team.

绳情 2024-07-14 05:30:25

我发现它主要用于跟踪。 一般来说,此类自动通知会被过滤到我的邮件程序中的一个存储桶中,以及“smoketest 通过,smoketest 失败”类型的电子邮件......然后,当出现故障时,您可以相当直接地将其跟踪回签到集。

请注意,人们还可以通过签入曲线的形状直观地了解项目的成熟度——每天更改的代码行数与代码库总大小的函数关系。 它实际上确实给出了您何时“完成”的合理想法......

希望这有帮助!

I find it primarily useful for tracking. In general such automatic notifications get filtered off into a bucket in my mailer, along with the "smoketest passed, smoketest failed" type email...then when there is a failure, you can track it back to the set of checkins fairly straightforwardly.

Note that one can also intuit the maturity of a project by the shape of the curve of checkins--number of lines of code changed per day as a function of total size of the code base. It actually does give a reasonable idea of when you're going to be "done"...

Hope this helps!

九八野马 2024-07-14 05:30:25

通常我们会进行更新,让每个人都知道某些内容已经更新并且需要进行同行评审。 如果您不必分配一个用户,您可以在有时间时获取并处理它。

我看到有人发布了一个系统,当他们在代码风格注释日志中提交快速简单的“正在更改的内容”时,该系统会向 Yammer 发送 twitter 风格的消息。 整洁的。 不过现在找不到链接了。

Usually we have the updates to let everyone know that something has been updated and needs to be peer reviewed. If you don't have to assign one user you can get it and deal with it when you have time.

I saw someone posted a system that sends twitter style messages to Yammer when they commit for a quick and easy "whats been changing" in the code style comment log. Neat. Can't find the link now though.

阳光①夏 2024-07-14 05:30:25

在许多公司中,代码审查是强制性的,但是在荣誉系统上进行的。 通过电子邮件发送的提交通知为这些环境实现了“信任但验证”机制。

In many companies code reviews are mandatory, but done on the honor system. Emailed commit notifications implement a "trust, but verify" mechanism for these environments.

对风讲故事 2024-07-14 05:30:25

我主要用它来衡量项目的心跳。 每个提交消息都是一个脉冲。 随着时间的推移,您会对“正常”脉搏“听起来”是什么样子有一些了解。

正常情况下,我们会收到 4 到 6 条提交消息。 随着迭代日期的到来,这个速度会减慢到 1 或 2,并在迭代发布前几天停止。 迭代后一两天,它会再次开始恢复,如果发现错误,我们每小时可以获得 1 条提交消息,因为错误已得到修复。 正常的一天提交次数很少可能意味着开发人员在某些功能上遇到了困难,或者在 stackoverflow 上花费了太多时间。

我还发现信息丰富的提交消息非常有用。 有时,经理或测试人员甚至不必询问开发人员某个功能或错误的状态 - 只需查看提交消息以查看是否已完成任何工作。

I use it mainly to gauge the heartbeat of the project. Each commit message is a pulse. In time, you'll get an some idea on what a "normal" pulse "sounds" like.

In a normal day, we get 4 to 6 commit messages. That slows down to 1 or 2 as the iteration date comes and stops about a couple of days before the iteration release. A day or two after the iteration, it starts picking up again and if bugs are found, we can get 1 commit message per hour as bugs are fixed. A regular day with few number of commits might mean a developer is having a hard time on some functionality, or spending too much time on stackoverflow.

I also find informative commit messages very useful. Sometimes, a manager or tester doesn't even have to ask the developers the status of a feature or a bug - just look at the commit messages to see if there is any work done on it.

玩物 2024-07-14 05:30:25

我的理解是,向开发人员抄送提交报告的主要原因是为了避免冲突:您会看到正在使用的文件上的提交,因此您甚至在提交之前就知道自己遇到了麻烦。 然而,这相当分散注意力,因此有一些工具(例如 Palantir、旧的 IBM Jazz)可以实际显示哪些文件正在同时编辑。

My understanding is that the main reason for CCing commit reports to developers is to avoid conflict: you see a commit on a file you are working with so you know you're in trouble even before you commit. However, this is fairly distracting so there are tools (e.g., Palantir, old IBM Jazz) that will actually show you what files are being concurrently edited.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文