是“您打破它,您购买它"吗?最好的政策? [英] Is "You break it, you buy it" the best policy?

查看:64
本文介绍了是“您打破它,您购买它"吗?最好的政策?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有一个微妙的原因,它可能不好:有时候,真正破坏某件事的责任应该归咎于那些编写没有自动测试的易碎代码的人,而不是那些因应做而破坏代码的人. -与其他地方无关的更改.

There is a subtle reason why it might not be good: Sometimes, the blame for breaking something really should be placed on the individual who wrote fragile code without automated tests, not the one who broke their code by making a should-be-unrelated change somewhere else.

一个可以想象的例子是,有人以某种方式针对接口进行编程,该方式假定特定于实施的行为,但不受现有合同的保证.然后,其他人对适合合同的实现进行了更改,但破坏了相关代码.没有测试失败,因为没有为依赖代码编写任何测试.真正应该责怪谁?

One imaginable example is when someone programs against an interface in a way that assumes behavior specific to the implementation du jour, but not guaranteed by existing contracts. Then someone else makes a change to the implementation that fits in the contract, but breaks the depended-on code. No tests fail because no tests are written for the depended-on code. Who's really to blame?

这样做的目的不是要责怪别人,而是要了解责任,如果破门而买"确实是一个很好的政策.

The purpose of this isn't to blame people, but to understand responsibilities, and if "You break it, you buy it" is really such a good policy.

我确实措辞很差.我的意思是关于如何针对依赖项(包括隐藏的依赖项)编写正确的软件.我的意思是,这是程序员避免错误的责任,而不是发现意外错误时的责任.但是,由于已经给出了这么多答案,我将让问题保持原样并相应地指出答案.

I really worded this poorly. I meant it to be about how to write correct software with respect to dependencies, including hidden dependencies. I meant this to be a question of what a programmer's responsibility is to avoid bugs, not what to do when a surprise bug is found. BUT, since so many answers have been given already, I'll let the question stand as-is and indicate an answer accordingly.

推荐答案

修复此问题的目的不是要怪罪.假设脆弱代码的原始作者已经发展了,谁来负责这个问题?假设他或她只是被分配到另一个项目?遇到问题的人必须是拥有它的人,直到问题得到解决为止.他或她是当前在那里并且当前被分配执行对应用程序进行更改的任务的人.

Fixing it is the purpose not laying the blame. Suppose the orginal author of the fragile code has moved on, who would own the problem? Suppose he or she is simply assigned to another project? The person who ran into the problem needs to be the one who owns it until it is fixed, he or she is the person currently there and currently assigned to the task of making changes to the application.

现在,如果您知道代码是由将来应避免的问题创建的,并且原始开发人员仍在那儿,那么最好让他/她知道该问题及其原因,这是一件好事. ,但是最终遇到该问题的人是需要修复该问题以使其新代码正常工作的人.

Now if you know the code was created with a problem that should be avoided in the future and the orginal developer is still there, it would be a good thing to let him or her know about the issue and why it caused a problem, but ultimately the person who ran into the problem is the one who will need to fix it to get his new code to work.

这篇关于是“您打破它,您购买它"吗?最好的政策?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆