今日推荐英文原文：《The Dirtiest Word in Software》
The Dirtiest Word in Software
Better wash your mouth out with soapI swear a lot. Imagine a sailor in a bad mood, with Tourettes. That’s me. I’ve concocted swear words that would peel the paint off the Sistine Chapel. Alas, even with my repertoire of riotous racket, I can’t come close to this word. Prepare yourself.
The word is… prediction. Wow, look at it. Ten letters, all lined up in a particular order. Screw it, I’ll say it again. Prediction!
Why exactly is it such a bad word? Why does it strike fear into the hearts of engineers all over the world? Why is it that even typing this word sends shivers down my spine?
Predictions Are Always WrongTrue. The accuracy of predictions in software leaves a lot to be desired. Every single day we see this: deadlines go unheeded, estimations fall to pieces, meetings are overrun, and budgets are maxed out. Many of us have been burned so often that whenever we’re faced with a date, we panic. “It will be done when it’s done!” we screech, with no hint of past trauma at all.
What Can We Do?We know software isn’t predictable — it’s fraught with variance and hidden complexity. We first need to accept that fact. Things go wrong, and things break. However, much like when we guess the weather, we have tools at our disposal. Tools that can limit the variance, change our perspective, and fine-tune our predictability.
My next articles are going to be on predictability. In them, I will explore the key components of software prediction: the misconceptions, the dysfunctions, the successes, and the outright failures. We’ll go from batch sizes to Poisson distributions to Little’s Law and all the way back. And because I love you guys, we’ll get started right now.
Batch SizesNo doubt, an agile coach has chased you down a hallway by now. With their arms full of Post-its, they’ve howled, “Beware the batch size!” If you’re smart, you would’ve hidden in a cupboard and waited for them to get tired. But what the hell is a batch size?
Imagine a road. That road has got cars flying up and down it all the time. Small coupès dance in and out of the lanes. But one day, a series of lorries pile into the road. Ten of them, all at once. We’ve all likely seen this before — it forms a traffic jam. Why?
Motherfreaking batch sizesThe road can handle lots of small cars that zip in and out of the lanes. However, when a collection of 16-wheeler trucks appear, trouble begins to brew. A large batch of work will suddenly slow other things down. Those little cars are now stuck behind the trucks.
And how does this relate back to predictability?A key element of predictability is ensuring that things can flow through your system of work. Your team should be able to quickly pick up a task, ascertain a solution, and deliver it. Large tasks take a long time to solve and deliver.
I know what you’re thinking. Half can do the big task, and half can do the small task. Easy! Yet, for a moment, think of the road. The more tasks you kick off in parallel, the more cars on the road. More cars mean longer queues. Teams are almost always disrupted by large batch sizes.
So How Do We Improve This?When we’re refining our backlog, make sure that the tasks closest to the top are nice and small. The thinnest possible slice is the phrase I keep hearing. Shave the feature down to its purest form. Reveal the essence of the task, the spirit of the story.
With a collection of small stories, there are no lorries on your road. The team can regularly build and deliver working software at rapid intervals. Regular delivery forms a rudimentary kind of predictability. You know that if this small task appears first, it’s very likely to be done sooner.
The next time you’re stuck behind a lorry, or infinitely worse, a stray tractor, remember this. Large batches cause queues. Queues delay work. Delays are the number one cause in unpredictability and missed deadlines. Break down the batches.