您如何向吝啬的老板证明重构工作的合理性? [英] How do you justify Refactoring work to your penny-pinching boss?

查看:58
本文介绍了您如何向吝啬的老板证明重构工作的合理性?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您刚刚编写了一堆代码来在压力下交付一些重要功能.您已经削减了一些角落,将一些代码混入了一些过于臃肿的类中,名称类似于 SerialIndirectionShutoffManager..

You've just written a pile of code to deliver some important feature under pressure. You've cut a few corners, you've mashed some code into some over-bloated classes with names like SerialIndirectionShutoffManager..

你告诉你的老板你需要一周的时间来清理这些东西.

You tell your boss you're going to need a week to clean this stuff up.

清理什么?"

我的代码 - 它是一个猪圈!"

"My code - its a pigsty!"

你的意思是还有一些错误修复?"

"You mean there's some more bug fixing?"

不是真的,它更像是……"

"Not really, its more like.."

你想让它跑得更快吗?"

"You're gonna make it run faster?"

也许,但不是……"

那你应该在有机会的时候把它写好.现在我很高兴你在这里,是的,我不得不继续请你这个周末来......"

"Then you should have written it properly when you had the chance. Now I'm glad you're here, yeah, I'm gonna have to go ahead and ask you to come in this weekend.. "

我读过 Matin Fowler 的书,但我不确定我是否同意他在这件事上的建议:

I've read Matin Fowler's book, but I'm not sure I agree with his advice on this matter:

  • 鼓励定期审查代码,因此鼓励将重构工作作为开发过程的自然组成部分.
  • 不要说出来,您是开发者,这是您的职责所在.

这两种方法都是出于与您的经理沟通的需要.

Both these methods squirm out of the need to communicate with your manager.

你对你的老板说什么?

推荐答案

在您的原始估计中包含重构时间很重要.在你交付产品后去找你的老板,然后告诉他你实际上还没有完成,这是在说已经完成了.你实际上并没有完成可交付的最后期限.这就像一个外科医生在做手术,然后没有确保他把所有东西都恢复到它应该的样子.

It's important to include refactoring time in your original estimates. Going to your boss after you've delivered the product and then telling him that you're not actually done is lying about being done. You didn't actually make the deliverable deadline. It's like a surgeon doing surgery and then not making sure he put everything back the way it was supposed to be.

将开发的所有部分(例如重构、可用性研究、测试、质量检查、修订)都包括在您的原始计划中非常重要.归根结底,这与其说是管理问题,不如说是程序员问题.

It is important to include all the parts of development (e.g. refactoring, usability research, testing, QA, revisions) in your original schedules. Ultimately this isn't so much a management problem as a programmer problem.

但是,如果您继承了一个烂摊子,那么您将不得不向老板解释,最后一批急于将项目推出的程序员偷工减料,并且一直一瘸一拐.您可以用创可贴暂时解决问题(就像他们可能做的那样),但每个创可贴只会延迟问题的发生,最终使问题的修复成本更高.

If, however, you've inherited a mess then you will have to explain to the boss that the last set of programmers in a rush to get the project out the door cut corners and that it's been limping along. You can band-aid the problem for awhile (as they likely did), but each band-aid just delays the problem and ultimately makes the problem that much more expensive to fix.

对你的老板诚实,并明白一个项目只有完成了才算完成.

Be honest with your boss and understand that a project isn't done until it's done.

这篇关于您如何向吝啬的老板证明重构工作的合理性?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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