混乱的代码是技术债吗

2023-10-26

翻译自 Uncle Bob 的 Blog A Mess is not a Technical Debt
主要是鲍勃大叔的观点:混乱的代码实现不是技术债。原文地址见超链接。


The term Technical Debt was created by Ward Cunningham to describe the engineering trade-off’s that software developers and business stakeholders must often make in order to meet schedules and customer expectations. In short, you may need to use suboptimal designs in the short term, because the schedule does not allow longer term designs to be used. As a simple example, your initial website design may need to be frames based because you don’t have time to build an Ajax framework.

技术债务一词由 Ward Cunningham 提出,用于描述软件开发人员和业务利益相关者必须经常做出的工程权衡,以满足交付进度和客户期望。 简而言之,可能需要在短期内使用次优设计,因为时间表不允许使用长期设计。 举个简单的例子,您的初始网站设计可能需要基于框架(frames based),因为您没有时间构建 Ajax 框架。

Clearly this causes a debt. If the customer is looking for a web 2.0 system, then frames just aren’t going to cut it for long. So time is going to have to be carved out of a future schedule to refit the system with an Ajax solution.

显然,这会导致债务。如果客户正在寻找一个 web 2.0 系统,那么框架就不会长期削减它。因此,必须从未来的计划中抽出时间来用 Ajax 解决方案改造系统。

In short, the business has decided that it can afford to delay release 2 in order to accelerate release 1. Is this wise?

简而言之,企业已经决定延迟发布版本 2 以加速发布版本 1。这是明智的吗?

Businesses make this kind of trade-off all the time; and there’s nothing inherently unwise about it. If the early release of 1.0 drives the business that pays for the development of 2.0 then the business has won. So this kind of reasoned technical debt may indeed be appropriate.

企业一直在进行这种权衡;它本身并没有什么不明智的。如果 1.0 的早期发布推动了为 2.0 的开发买单的企业,那么企业就赢了。所以这种合理的技术债可能确实是合适的。

Unfortunately there is another situation that is sometimes called “technical debt” but that is neither reasoned nor wise. A mess.

不幸的是,还有另一种情况有时被称为“技术债”,但这既不合理也不明智。一一一团混乱的代码。

Technical debt may be necessary, but it had also better be clean! If you are going to implement a frames solution instead of an AJAX solution, then make sure that the workmanship of the frames solution is top-notch. Make sure the design is well balanced, and the code is clean. If you make a mess while implementing that frames solution, you’ll never be able to replace it with an AJAX framework. The mess will impede your progress forever.

技术债务可能是必要的,但它也最好是整洁的!如果您要实现框架解决方案而不是AJAX 解决方案,那么请确保框架解决方案的工艺是一流的。确保设计平衡良好,代码整洁。如果您在实现该框架解决方案时弄得一团糟,您将永远无法用AJAX框架替换它。混乱将永远阻碍你的进步。

A mess is not a technical debt. A mess is just a mess. Technical debt decisions are made based on real project constraints. They are risky, but they can be beneficial. The decision to make a mess is never rational, is always based on laziness and unprofessionalism, and has no chance of paying of in the future. A mess is always a loss.

混乱的代码实现不是技术债。混乱的实现只是一团糟糕的代码。技术债务决策是根据实际项目限制做出的。它们是有风险的,但它们可能是(对项目)有益的。让编码混乱的行为永远是不理智的,它永远都是因为(开发者)懒惰和不专业造成的,而且将来你也永远还不清这种债务。混乱永远都是一种错误……

When you buy a house and take on a big mortgage debt, you tighten up all your spending and accounting. You clean up your books and your budgets. You behave with increased discipline. The same is true of technical debt. The more technical debt you take on, the tighter your disciplines need to be. You should do more testing, and more pairing and more refactoring. Technical debt is not a license to make a mess. Technical debt creates the need for even greater cleanliness.

当您购买房屋并承担巨额抵押贷款时,您会收紧所有支出和账户消费。你清理你的订单和你的预算,你表现得更加自律。技术债务也是如此。你承担的技术债务越多,你收紧得就应该越严格。你应该做更多的测试,更多的结对编程和更多的重构。技术债务不是制造混乱的许可证。技术债务创造了对更高整洁度的需求。

When you decide to take on a technical debt, you had better make sure that your code stays squeaky clean. Keeping the system clean is the only way you will pay down that debt.

当您决定承担技术债务时,您最好确保您的代码保持干净整洁。保持系统清洁是偿还债务的唯一方法。

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

混乱的代码是技术债吗 的相关文章

随机推荐

  • Netty源码剖析之HashedWheelTimer时间轮

    版本信息 JDK1 8 Netty all 4 1 38 Final 时间轮的介绍 我们知道钟表分为很多块 每时钟滴答一次就往前走一个块 而时间轮就是使用这个思想 如下图 上图总共分为8块 每过100ms就往前走一块 然后周而复始 此时 我
  • HC32L130单片机入坑记

    解决问题的思路 经验就可提高工作效率 1 调试中遇到的问题及解决思路 1 程序debug过程中 进入hardware default中断中无限循环 解决办法 运用断点定位到程序debug出错的具体位置 程序最终执行的位置即为程序出错的位置
  • alook浏览器哪个好 夸克浏览器_夸克(Quark)浏览器的安装和使用

    前面的文章 我们大概介绍了一下夸克浏览器的 本片将着重将一下夸克浏览器的使用 下载安装 去夸克的官方网站下载安装包 上传到手机进行安装 去各大应用商店去下载安装 比如小米手机的小米应用商店 华为的华为应用商店 或者第三方的豌豆荚等应用商店去
  • flex & bison 基础概述

    1 前言 限于作者能力水平 本文可能存在谬误 因此而给读者带来的损失 作者不做任何承诺 2 本文目标 简单介绍 flex 和 bison 的基础使用方法 简要分析 flex bison 生成代码的工作流程 3 flex bison 3 1
  • 超详细讲解 H5 移动端适配方案

    目录 REM适配方案 1 前言 2 原理 3 适配代码 4 总结 vw适配方案 1 原理 2 适配代码 3 适配方案对比 1px问题 1 简述 2 代码测试 总结 REM适配方案 1 前言 设计师交付给前端开发一张宽度为750px的视觉稿
  • 重新安装ROG Armoury Crate

    文章目录 使用官方卸载工具卸载奥创 安装奥创 更新奥创之后 Aura Sync 坏了 无法调整灯光 打开 Aura Creator 提示服务运行异常 在任务管理器中随便禁用了几个奥创 Asus的服务后 再次打开 Aura Creator 提
  • 【人工智能】SVM 分类器的设计与应用(QDU)

    人工智能 Astar算法求解8数码问题 QDU 人工智能 利用 搜索的博弈树算法编写一字棋游戏 QDU 人工智能 Fisher 线性分类器的设计与实现 QDU 人工智能 感知器算法的设计实现 QDU 人工智能 SVM 分类器的设计与应用 Q
  • Linux中查看socket状态

    Linux中查看socket状态 cat proc net sockstat 这个是ipv4的 sockets used 137 TCP inuse 49 orphan 0 tw 3272 alloc 52 mem 46UDP inuse
  • 响应式布局(媒体查询+%)

    总结 核心思想 每一个最外层盒子给一个max width 盒子中的内容width全部使用 表示 使用 元素全部写在盒子里 当媒体查询满足情况是display block 注意 精确的是需要一样的 媒体查询相当于if 过渡的动画写在默认样式里
  • 读书笔记-看见未来:改变互联网世界的人们

    作者 余晨 推荐序二 未来从来不会自动地发生 世界正在重新 造物 它既是虚拟意义上的 又同时是实物意义上的 宙斯在假眠 而诸神则各逞其能 时代 曾经刊登过的一篇文章认为 今天的个人计算机革命和互联网之所以成为这样 乃是继承了20世纪60年代
  • LLVM汇编语言指导手册之指令手册

    下面是我对llvm汇编中一些不常用的指令的总结 shl 指令 语法
  • wazuh日志审计--定制规则

    日志审计 定制规则 目录布局 规则集文件夹结构如下所示 在接收到agent传来的日志后 manager会根据 var ossec ruleset decoders里面的各种规则对日志进行处理 提取到了指定字段的值之后再根据 var osse
  • 物理这一块真不好搞,

    研究了一段PHYSX 发现真是寸步难行 英文文档也不是很详细 哎 没人带着的话 还是不搞为好 继续封装软引擎吧 没法干了 心里泼凉泼凉的 哎 咋弄呢 看来只能当个兴趣爱好了 或许用下游戏引擎 看看有没有集成好的
  • TensorFlow 深度学习笔记 Stochastic Optimization

    Stochastic Optimization 转载请注明作者 梦里风林 Github工程地址 https github com ahangchen GDLnotes 欢迎star 有问题可以到Issue区讨论 官方教程地址视频 字幕下载
  • adb移植到Android平台使用

    adb移植到Android平台使用 1 工具源码 所需源码 openssl git clone https github com openssl openssl git zlib 1 2 8 git clone https github c
  • JSOUP爬取4K高清壁纸

    jsoup jar包 1 11 2 链接 https pan baidu com s 1pe3 r5 YB pGEsosfRLbsA pwd 41w5 提取码 41w5 效果 代码 import org jsoup Jsoup import
  • Java.nio.file.NoSuchFileException] - 文件未找到异常处理及解决方法

    Java nio file NoSuchFileException 文件未找到异常处理及解决方法 在日常的Java开发中 我们经常会遇到各种异常情况 其中之一就是 Java nio file NoSuchFileException 即文件未
  • 求帮助安装mysql 出现红色感叹号

  • 【python】【django】cursor.fetchall()的结果是元组

    今天做测试 用django db 的connection来执行一个非常简单的查询语句 sql str select col 1 from table 1 where criteria 1 cursor connection cursor c
  • 混乱的代码是技术债吗

    翻译自 Uncle Bob 的 Blog A Mess is not a Technical Debt 主要是鲍勃大叔的观点 混乱的代码实现不是技术债 原文地址见超链接 The term Technical Debt was created