Defining Technical Debt

2019 年 11 月 8 日 • 12:00 AM

最近上班经常讨论到的一个词儿就是 Technical Debt。每天都能见到鲜活的例子——我们数据库的 table 没有 100% 的 primary key、foreign key 和必要的 index;同样的信息多次存在于不同的 table 里所以 query 的时候会有历史遗留的信息没有被更新……碎片化的数据依靠三个 Windows VM 的 scheduled task 每天进行装载,使用了 Perl、PowerShell、Bash 等历史工具。每天都能见到 Technical Debt 的鲜活例子,总觉得这个词不需要什么定义—— If it walks like a duck, looks like a duck, and quacks like a duck, it is a duck.

不过今天碰巧看到了这篇文章——Why You Should Learn to Stop Worrying and Love Technical Debt,对 “Technical Debt” 下了个定义——

Technical debt […] refers to the trade-off between decisions that make something easy in the short term and the ones that make it maintainable in the long term.

所以 Technical Debt 并非是坏事,就像融资借钱一样,借了钱才能有资源快速发展,之后慢慢还债就是。

想到一个在美国 Amazon AWS 的朋友说 “你们公司可厉害了,当时所有的 tech stack 都是自己做的。” 显然这是一个光辉事迹,甚至在友商那里都传为美谈。确实,要是我能从零开始把一个销售额如此的公司的 tech stack 建起来我能吹十年。不过现在该还债啦。

可惜的是这文章里并没有针对如何量化 Technical Debt 给出建议。

Technical and organizational debt are hard to model, but they’re a lot easier to think about once you have a name for the phenomena, and can treat them as just another part of the balance sheet.

Yea that’s like super helpful. 🙄️