The problem isn’t the problem; coping is.
Virginia Satir
Throwing food in the trash feels wasteful. Sometimes I feel compelled to eat the food instead. Then I feel lethargic, I gain weight, and everything I do is slower.
Sometimes waste isn’t a problem. The world is not better for that food passing through my digestive system. Sometimes it’s preventing waste that hurts us.
Inefficient code uses compute and costs money. Even when the response time and throughput don’t impact the user, that’s still wasteful, right?
Waste that speeds you up
Say we optimize all our code. But then it’s harder to read and to change. We slow ourselves down with our fear of waste.
Duplicate code takes time to write and test. Maybe many teams use some handy functions for formatting strings and manipulating lists. It’s a waste to maintain this more than once!
Say we put that in a shared utility library. Now every change I make impacts a bunch of other teams, and every change they make surprises me. To save a bit of typing, we’ve taken on coupling and mushed up the code ownership. Everything we do is slower.
Waste that slows you down
On the other hand, duplicated business logic means every future change takes more work and coordination. That is some waste that will bite you.
In Office Space, there’s that one person who takes the requirements from one floor to another. His salary is a waste. Much worse: he wants to preserve his meager responsibilities, so he’ll prevent the people who use the software from talking to the developers. Everything is slower forever.
When you spot a distasteful waste, ask: does this waste speed me up, or does this waste slows me down forever?
I can be wasteful, and it’s okay sometimes. I’ll waste compute for faster and safer code changes. I’ll spend time on utility code to skip tripping up other teams.
Some waste is just waste. It is time spent once, or money spent ongoing, and that’s it. Some waste makes us more effective, saves us cognitive load of having to think about another thing. Some inefficiencies let us be more effective.
Other waste is sticky. It drags you into spending more time in the future. It pulls you into handoffs and queues and coupling.
Fight the sticky waste that spirals into more drag in the future. Let the other waste be. Throw the extra food in the trash; your future self will move lightly for it.