Technical Debt Quadrant 技术债象限

Technical Debt Quadrant 技术债象限

28 January 2012

By Martin Fowler

There’s been a few posts over the last couple of months about TechnicalDebt that’s raised the question of what kinds of design flaws should or shouldn’t be classified as Technical Debt.

前几个月的一些关于技术债的帖子引出了这样一个问题,什么样的设计缺陷应该或者不应该归为技术债。

A good example of this is Uncle Bob’s post saying a mess is not a debt. His argument is that messy code, produced by people who are ignorant of good design practices, shouldn’t be a debt. Technical Debt should be reserved for cases when people have made a considered decision to adopt a design strategy that isn’t sustainable in the longer term, but yields a short term benefit, such as making a release. The point is that the debt yields value sooner, but needs to be paid off as soon as possible.

一个很好的例子是Bob大叔的这篇“a mess is not a debt”的帖子。他的论调是那些对良好设计实践无知的人编写的腐坏的代码不应该是技术债。技术债应当是为了用于这样的情况的:人们为了一个获得一个短期的收益,如一次发布,经过慎重考虑而采取的不适用于长期存在的一个设计策略。重点是债务快速产生了价值,但是需要尽快偿还掉。

To my mind, the question of whether a design flaw is or isn’t debt is the wrong question. Technical Debt is a metaphor, so the real question is whether or not the debt metaphor is helpful about thinking about how to deal with design problems, and how to communicate that thinking. A particular benefit of the debt metaphor is that it’s very handy for communicating to non-technical people.

在我看来,一个设计缺陷是不是一个技术债是一个错误的议题。技术债是一个隐喻,因此真正的议题是技术债隐喻是否对思考如何处理设计缺陷和如何交流思想有帮助。技术债隐喻的一个特有的好处是非常方便与非技术人员沟通。

I think that the debt metaphor works well in both cases - the difference is in nature of the debt. A mess is a reckless debt which results in crippling interest payments or a long period of paying down the principal. We have a few projects where we’ve taken over a code base with a high debt and found the metaphor very useful in discussing with client management how to deal with it.

我认为技术债隐喻在两种情况下很好用—–不同点在于债务的本质。腐坏的代码是一种轻率的债务,会导致偿还非常沉重的利息或者花很长的时间来偿还本金。我们有那么几个项目代码库中存在非常高的债务,我们发现在与客户管理人员讨论如何去处理时,技术债这个隐喻非常有用。

The debt metaphor reminds us about the choices we can make with design flaws. The prudent debt to reach a release may not be worth paying down if the interest payments are sufficiently small - such as if it were in a rarely touched part of the code-base.

技术债隐喻帮我们想起处理设计缺陷的方案。为了一个发布而谨慎引入的技术债如果需支付的利息足够的小可能就不需要去偿还它-例如如果是位于代码库中极少碰到的一块。

So the useful distinction isn’t between debt or non-debt, but between prudent and reckless debt.

因此有用的不是区分债不债的,而是区分草率的和谨慎的技术债。

There’s another interesting distinction in the example I just outlined. Not just is there a difference between prudent and reckless debt, there’s also a difference between deliberate and inadvertent debt. The prudent debt example is deliberate because the team knows they are taking on a debt, and thus puts some thought as to whether the payoff for an earlier release is greater than the costs of paying it off. A team ignorant of design practices is taking on its reckless debt without even realizing how much hock it’s getting into.

在我刚概述的例子中还有一个有意思的区分。不仅仅是要区分草率的和谨慎的技术债,而且要区分有意的和无意的技术债。谨慎的技术债是有意为之的,因为团队知道他们正在引入一个技术债,因此会去想是否一个更早的发布的收益会大于偿还它带来的成本。一个无视设计实践的团队会引入草率的技术债,甚至意识不到将会押上什么样的家当。

Reckless debt may not be inadvertent. A team may know about good design practices, even be capable of practicing them, but decide to go “quick and dirty” because they think they can’t afford the time required to write clean code. I agree with Uncle Bob that this is usually a reckless debt, because people underestimate where the DesignPayoffLine is. The whole point of good design and clean code is to make you go faster - if it didn’t people like Uncle Bob, Kent Beck, and Ward Cunningham wouldn’t be spending time talking about it.

草率的技术债可能不是无意造成的。一个团队也许知道良好的设计实践,甚至有能力去实践它们,但是却决定“快而烂”的干,因为她们支付不起编写整洁的代码所需要花费的时间。草率的技术债通常是因为人们对设计偿还期限的估计不足,在这点上我同意Bob大叔。良好设计和整洁代码的全部要点是让你走的更快。如果不是这样,像Bob大叔,Kent Beck, Ward Cunningham这些人就不会花时间去讨论它了。

Dividing debt into reckless/prudent and deliberate/inadvertent implies a quadrant, and I’ve only discussed three cells. So is there such a thing as prudent-inadvertent debt? Although such a thing sounds odd, I believe that it is - and it’s not just common but inevitable for teams that are excellent designers.

把技术债分为草率的/谨慎的和有意的/无意的隐含了象限的概念,我前面仅讨论了3个。那么有没有谨慎-无意的技术债呢?虽然听上去有点怪,我相信是有的-不那么常见但对于卓越设计者的团队是不可避免的。

I was chatting with a colleague recently about a project he’d just rolled off from. The project that delivered valuable software, the client was happy, and the code was clean. But he wasn’t happy with the code. He felt the team had done a good job, but now they realize what the design ought to have been.

我最近和一个同时聊起他刚离开的一个项目。项目交付了有价值的软件,客户高兴,代码整洁。但他对代码不满意。他感觉团队干得不错,但是他们刚意识到应该怎样去设计它。

I hear this all the time from the best developers. The point is that while you’re programming, you are learning. It’s often the case that it can take a year of programming on a project before you understand what the best design approach should have been. Perhaps one should plan projects to spend a year building a system that you throw away and rebuild, as Fred Brooks suggested, but that’s a tricky plan to sell. Instead what you find is that the moment you realize what the design should have been, you also realize that you have an inadvertent debt. This is the kind of debt that Ward talked about in his video.

我常常从最优秀的开发人员那听到这个。重点是当你在编程序,你在学习。情况往往是在你理解最好的设计方案应该是什么时,你已经在项目上编了1年的代码。也许人们应该这样规划项目,花一年的时间搭建一个系统后扔掉燃火重新搭建,就像Fred Brooks建议的那样,但是这个棘手的方案卖不出去。在你发现在你意识到设计应该是怎样时,你也意识到了你有了一个无意的技术债。这就是Ward在他的视频中提到的。

The decision of paying the interest versus paying down the principal still applies, so the metaphor is still helpful for this case. However a problem with using the debt metaphor for this is that I can’t conceive of a parallel with taking on a prudent-inadvertent financial debt. As a result I would think it would be difficult to explain to managers why this debt appeared. My view is this kind of debt is inevitable and thus should be expected. Even the best teams will have debt to deal with as a project goes on - even more reason not to recklessly overload it with crummy code.

在决定是支付利息还是支付本金时,隐喻对这种情况仍是非常有帮助的。然而技术债隐喻用于这种情况的一个问题是,我不能构思一个谨慎的-无意的金融债务的类似的情况。结果是,我认为很难向管理者解释为什么会产生这种债务。我的观点是这种债务是不可避免的,因此应该能料到。即使最好的团队随着项目进行也会有债务需要处理-即使足够理智地不去草率的堆叠糟糕的代码。


 http://qszhuan.github.io/translation/2012/01/28/Technical_debt_quanrant

https://blog.csdn.net/lxgwm2008/article/details/8801720

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 158,736评论 4 362
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 67,167评论 1 291
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 108,442评论 0 243
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 43,902评论 0 204
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 52,302评论 3 287
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 40,573评论 1 216
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 31,847评论 2 312
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 30,562评论 0 197
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 34,260评论 1 241
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 30,531评论 2 245
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 32,021评论 1 258
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 28,367评论 2 253
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 33,016评论 3 235
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 26,068评论 0 8
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 26,827评论 0 194
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 35,610评论 2 274
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 35,514评论 2 269

推荐阅读更多精彩内容

  • rljs by sennchi Timeline of History Part One The Cognitiv...
    sennchi阅读 7,102评论 0 10
  • **2014真题Directions:Read the following text. Choose the be...
    又是夜半惊坐起阅读 8,574评论 0 23
  • 你看过台湾美食剧集《孤独的美食家》么?赵文瑄扮演的男主每当吃到美食,总是习惯地赞叹:“嗯,好吃好吃。”吃到好吃的猪...
    椬yi阅读 258评论 0 0
  • 将项目打成war包然后发布,考虑到打包的速度以及发布的速度(因为可能不止一个项目同时启动,而每个项目中可能都存在相...
    阮江涛阅读 1,751评论 0 0