Lo yak shaving è la pratica preferita dai programmatori di tutto il mondo, soprattutto in fase di refactoring.

Volevo scriverne qualcosa perchè negli ultimi giorni mi ci sono infilato in modo piuttosto violento.

È abilmente riassunta in questo stralcio da Malcom in the Middle, serie tv sottovalutatissima (c’è anche Bryan Cranston, il Walter White/Heisenberg di Breaking Bad).

La prima referenza appare su un newsgroup — non vi preoccupate se non sapete che sono, cose da nerd, ma l’inizio di internet, per capirci — che diceva:

“Yak shaving.” Our very own Carlin Vieri invented the term, and yet it has not caught on within the lab. This is a shame, because it describes all too well what I find myself doing all too often.

You see, yak shaving is what you are doing when you’re doing some stupid, fiddly little task that bears no obvious relationship to what you’re supposed to be working on, but yet a chain of twelve causal relations links what you’re doing to the original meta-task.
Jeremy H. Brown

E il riferimento originale nasce da un filmato di Ren & Stimpy che è un WTF micidiale:

yak-shaving-day

Though not a regular viewer of Ren and Stimpy, I did see the Yak Shaving Day episode and thought it bizarre enough to be the end of a long chain of tasks. The original primary task that caused me to start shaving a yak was trying to overnight a document. Getting the AI lab to pay for FedEx or DHL was very difficult at the time!
Carlin Vieri

Per quanto ne so io, però, è diventato veramente famoso per la storiella riportata successivamente da Seth Godin sul suo blog:

Yak Shaving is the last step of a series of steps that occurs when you find something you need to do.

“I want to wax the car today.”

“Oops, the hose is still broken from the winter. I’ll need to buy a new one at Home Depot.”

“But Home Depot is on the other side of the Tappan Zee bridge and getting there without my EZPass is miserable because of the tolls.”

“But, wait! I could borrow my neighbor’s EZPass…”

“Bob won’t lend me his EZPass until I return the mooshi pillow my son borrowed, though.”

“And we haven’t returned it because some of the stuffing fell out and we need to get some yak hair to restuff it.”

And the next thing you know, you’re at the zoo, shaving a yak, all so you can wax your car.

Seth Godin

In tutto questo oggi mi sento più sereno perchè ho visto la luce in fondo al tunnel, probabilmente domani potrò passare ad altro, dopo aver chiuso la catena di task apparentemente inutili che ha sbloccato il mio problema.