the ryan king

The blog of the ryan king.

Yak Shaving

Posted at — Feb 18, 2021 | Updated at Feb 18, 2021

Yak Shaving is among the more colorful sayings used by software engineers. And it is an idea that, once you know it, you see everywhere.

I worked on a team at Twitter that went so far as to have a Yak as our team mascot.

But what is yak shaving? According to wiktionary, it is–

Any apparently useless activity which, by allowing you to overcome intermediate difficulties, allows you to solve a larger problem.

or

A less useful activity done consciously or subconsciously to procrastinate about a larger but more useful task.

The first definition describes a perception problem. The second sounds like wasting time.

When should you shave the yak?

These definitions point us towards a rule for when to “shave the yak”.

I posit that you should embrace yak shaving if and when the new task would make the original one disappear along with a whole cluster of others. And avoid using it as a way to procrastinate.

Example from my work day today-

I was working through a bunch of automatic pull requests that had been created to update dependencies on one of my projects. I noticed that they were each broken in a simple and straightforward way. Fixing each one would take a max of 1-2 minutes. And there were only 5 of them.

However, I saw that I could automate the fix. I have been working on that automated fix for an hour and am not done. This is definitely a yak shave, but it will mean that I will never have to do this manual fix again. There is no guarantee that this will pay off, but it is in the right category of things to consider.

Meanwhile, instead of working on that automated fix, I am writing this blog post, which will definitely not help solve the problem and is therefore the kind of yak shave to avoid.