Skip to Content
先整理?
book

先整理?

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

第 25 章 今天一美元 > 明天一美元

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

多就是多,少就是少,对吗?看情况。对于钱,这取决于:

  • 何时

  • 如何确定

如果我今天给你一美元,你,你可以把它花在你想要的东西上,或者你可以用它来投资,让你以后得到更多的钱。如果我答应你明天给你一美元,它的价值就会低于我今天给你的一美元。为什么呢?

  • 你花不出去,所以它就不值钱了。

  • 你不能投资它,所以当你拿到它时,它的价值会低于你今天拿到的那一美元。

  • 我可能不会真的给你。我不会我完全值得信任。但其他人,是的,你必须做好他们不会给你美元的准备,这样 "明天的美元 "就不值钱了。

少多少?这是一个复杂的问题。现在,重要的事实是,所有美元的价值并不相同。举例来说,如果我们想把它们加起来,那么我们就需要给每一美元附加一个日期。

如何评估软件系统的价值?假设你有一个软件系统,我想购买它。我应该付你多少钱才合理?

什么并不重要。它是一个支付系统。它由无数服务组成。它有 140 万行代码。它的平均函数循环复杂度为 14(开个玩笑,幂律分布值的平均值毫无用处)。但作为购买者,这些对我来说都不重要。

作为购买者,我想知道资金是如何流动的。"Gazinttas and gazouttas,"我的父亲会这么说。为了对软件进行估值,我可以将其建模为一组现金流,有的流入,有的流出,但(这是关键点)每个现金流都与一个日期相关联。

这里有一个练习,可以帮助你提高对时间/金钱的直觉:未来 10 年花费 1 千万美元却能带来 2 千万美元收益的软件系统,与花费 1 千万美元却能带来 1 千 2 百万美元收益的软件系统,哪个更有吸引力?

这是个陷阱问题。"未来 10 年 "在经济上等同于 "直到宇宙热死"。当你看到这些数字时,你的直觉会马上问:"是的,但什么时候,有多确定?"

感受一下 "我今天支付 1,000 万美元,10 年后我将获得 2,000 万美元 "和 "我今天获得 1,200 万美元,10 年后我支付 1,000 万美元 "之间的差别。第一笔交易让我紧张。是的,这似乎是一笔不错的投资,但我将在这 10 年里挥汗如雨。第二笔交易毫无悬念。我保证从第一天起就能获利 200 万美元,再加上这 10 年的投资收益。我对这 10 年感到兴奋,而不是害怕。

在本书的范围内,金钱的时间价值鼓励事后整理而不是先整理。如果我们能实施一种行为改变,让我们现在就赚钱,之后再整理,我们就能早赚钱,晚花钱。(如前所述,有时先整理意味着先整理+行为改变的总成本低于不整理的行为改变成本。在这种情况下,一定要先整理)。

就我们讨论的规模(几分钟到几小时)而言,现金流贴现可能不会产生巨大的经济差异。但它确实会产生影响。练习使用时间值将有助于我们在以后的书籍中使用更大的规模。

接下来我们来看看软件经济价值的另一个来源:选择性。这是一个有趣的时代,因为时间价值和期权价值经常发生冲突。

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