Skip to Content
先整理?
book

先整理?

by Kent Beck
May 2025
Intermediate to advanced
124 pages
1h 7m
Chinese
O'Reilly Media, Inc.
Content preview from 先整理?

第 27 章 期权与现金流 期权与现金流

本作品已使用人工智能进行翻译。欢迎您提供反馈和意见:translation-feedback@oreilly.com

在这里,我们看到了经济上的拉锯战,正是这种拉锯战使得 "先整洁吗?"成为一个如此有趣的问题:

  • 贴现现金流告诉我们, ,越早赚钱的可能性越大,越晚花钱的可能性越小。不要先Tidy,那是早花钱晚赚钱。也许之后或以后都不要整理。

  • 期权告诉我们现在花钱是为了以后赚更多的钱(即使我们现在还不知道具体的方法)。首先(创建期权时)绝对整洁。Tidy after and later too.

Tidy first?是的。也不是。

现在,有时间肯定要先整理。什么时候?

成本(整理)+ 成本(整理后的行为改变)< 成本(不整理时的行为改变)

那么绝对要先整理。还是很容易得意忘形,收拾得太多,但设定并保持自己的底线,你会没事的。

当出现以下情况时,情况就会变得更加复杂

成本(整理)+成本(整理后的行为改变)>成本(不整理的行为改变)

尽管短期经济效益让你望而却步,但你可能还是想先整理一下。你可能会实施一系列行为改变,所有这些改变都会从 Tidy 整理中受益。在所有改变中摊销 Tidy 的成本,甚至对现金流进行贴现,可能都是合理的。

尽管有贴现现金流,但如果所创造的选择权的价值大于更早、更有把握地花钱所损失的价值,那么先 Tidy 可能具有经济意义。在这里,我们要坚定地做出判断。你的嗅觉可能会告诉你:"这里还有更多好东西,但我需要 Tidy 才能看到"。这可能是更多 Tidy 的充分证据。

或者,既然软件设计是一种人际关系的练习,而我们在整理的尺度上谈论的是我们与自己的关系,那么你可能会先整理一下,只因为这会让随后的行为改变更令人愉悦。这种 "将整理作为自我保健 "的小,是有道理的。只是要认识到,你的做法与你的经济动机背道而驰。

Tidy 的规模从几分钟到几小时不等,我们无法(也不应该试图)精确计算整理的经济效益。我们是在行使两种重要的判断力,为以后更大的事情做准备:

  • 习惯于意识到影响软件设计时间和范围的激励因素("我想花更多时间进行设计,但却遭到了反对。这是怎么回事?")。

  • 在自己身上练习关系技巧,以便日后与直接同事和较远的同事相处时使用这些技巧

一旦我们把赌注提高到 ,产品的存活和兴衰就岌岌可危,我们就会庆幸自己有一种直觉,知道什么时候该设计,怎么设计,什么时候不该设计。

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

超越Vibe编程

超越Vibe编程

Addy Osmani
Go程序设计语言

Go程序设计语言

艾伦A. A.多诺万, 布莱恩W. 柯尼汉

Publisher Resources

ISBN: 9798341656949