Technical Debt (Hen's Encounter)

Technical debt , which is the haste to implement a feature that breaks the existing library (pollutes the design of the codebase in the process of implementation), can seem like a mystery to some project managers/clients. Maybe they understand, they just don't want to admit it, I guess so. Anyway, I remembered a little story to tell them the next time this happens and they need to explain the cost of adding some new feature.

A farmer has 3 hens. Each hen lays one egg per day. The farmer does business with a local food store owner. The food store owner buys 2 eggs from the farmer every day and sells them in the store. All was well until one day the grocer showed up at the farmer's house:

Grocery Owner : Oops, I need some chicken today.

Farmer : Chicken? Your business with me doesn't include that.

Grocery owner : I know. But I really need some chicken. I plan to do a B2S (S is an abbreviation for stomach) model PaaS (P is an abbreviation for meat and poultry) platform.

Farmer : What?

Grocery Owner : Very important stuff. Can you provide me with some chicken?

Farmer : Well, it's not so easy to do - I'll hatch eggs, and I'll give them to you when the chicks grow up... at least a month.

Food store owner : A month? It's been too long...I thought you could give it to me now.

Farmer : Time has its own pace, you have to be patient.

Grocery Owner : But why can't you kill one of the existing hens? This way I have chicken and you can still lay two eggs a day. That's enough, isn't it?

Farmer : However, I don't think it's a good idea. This will push me into a situation where there is no wiggle room, what if one of the remaining chickens suddenly has an accident.

Grocery Owner : Don't worry, that won't happen...I really, really need chicken! Kill a chicken!

Farmer : Well, I think I can…

So the farmer took a knife and sent one of his hens to heaven. The food store owner got his chicken and returned to the food store.

A week later, the grocer came to the farmer's house again:

Food store owner : Hello, here I come!

Farmer : Hello, what's the matter?

Grocery Owner : Listen to me—your chicken is excellent. In fact, it was so delicious and sold so well that you had to give me another chicken. Tomorrow morning at the latest.

Farmer : This is impossible. If I were to kill another chicken for you, I wouldn't be able to provide you with two eggs a day.

Grocery Owner : Oh, don't be so nervous! The client wants chicken, and I have promised the client that it will be served to them tomorrow morning…

Farmer : No, absolutely not. If I do, I can't keep my agreement with you, you know? If I do, I won't be able to provide you with enough eggs.

Grocery Owner : But I really, really need chicken! before tomorrow morning! Otherwise the client will go crazy, the earth will collapse and the end of the world will come! Give me a chicken now!

Farmer : Well, if you have to want it so recklessly, take it! But from now on, I won't be able to provide you with eggs, understand?

Grocery Owner : Of course, of course. But I'm sure a very smart person, I guess you can find a way to solve this problem. goodbye!

The food store owner left and returned to the store.

the next day:

Grocery owner : Hi, how about eggs?

Farmer : What do you mean?

食品店老板: 鸡蛋。你只给了我一个鸡蛋。发生了什么事?

农夫: 发生了什么事?我有3只鸡,你拿走了两只。现在就剩下一只。一只鸡,一个鸡蛋。我认为我解释的已经很清楚了。

食品店老板: 但是合同里并没有这些!合同里说的很清楚 — 你每天提供我2给鸡蛋!你现在让我向客户怎么交代?

农夫: 哦,情况我很明白。我无能为力。

食品店老板: 好吧,好吧,不谈这事了。咱们聊点其它事情…要是能再能点鸡肉就好了。你再给我一些吧?

所以,千万别学农夫 — 坚决拒绝为了当前利益而长久的破坏你的代码库的无理要求,如果你被强迫这样做,拒绝承担这样的任务 — 也不要做食品店老板 — 不要做提出这样不合理的要求,你要为自己的决定承担后果。

[本文英文原文链接:On technical debt (now with chickens!) ]

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325489677&siteId=291194637