确定由于遗留应用程序而增加的代码工作时间?
如果我们确实没有使用非遗留代码进行比较的基准,那么您将如何确定由于使用遗留代码而不是用于成本分析的测试代码而增加了多少时间。
How would you go about determining how much time was added due to working in legacy code as opposed to tested code for cost analysis if we really don't have a benchmark of working in non-legacy code to compare it too.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
真的很难说如果代码是可维护的,您可以节省多少时间。您在这里尝试比较的是“再次开发相同的代码需要花费多少钱?”与“解决剩余问题需要多少钱?”如果你这样争论,你通常会失败:从头开始开发某些东西的成本通常远高于维护成本。
为什么?因为维护费用可以分摊到很长一段时间,而其他费用则必须提前支付。因此,即使维护成本是原来的五倍,也不会产生这种感觉。最重要的是,您的新代码需要成熟,直到它像您现在的代码一样稳定。而且,你很少能够提出这样的论点。你的老板已经决定一切保持原样,所以你必须首先让他相信这个重大改变。
为了使旧的废话变得可维护,我通常在修复错误时开始添加测试。这使我能够使代码变得越来越可维护,同时也分散了成本。它使维护成本更高一些,但在这种情况下,您总是可以争辩说您正在努力做好工作。
It's really hard to say how much time you could save if the code was maintainable. What you try to compare here is "how much would it cost to develop the same code again?" versus "how much does it cost to fix the remaining issues?" If you argue this way, you usually lose: The cost of developing something from scratch is usually much higher than the maintenance cost.
Why? Because maintenance cost can be spread over a long time while the other cost has to be paid in advance. So even if maintenance costs five times as much, it won't feel that way. On top of that, your new code would need to mature until it is as stable as what you have now. Also, you're rarely in the position to make that argument. Your boss already has decided that everything stays the way it is, so you'd have to convince him of the big change, first.
In order to make old crap maintainable, I usually start to add tests as I fix bugs. This allows me to make the code more and more maintainable while also spreading the cost. It makes maintenance a bit more expensive but in this case, you can always argue that you're trying to do a proper job.