This is part of a Tech Jargon Defined series focused on de-mystifying common tech jargon terms. Originally posted on DEV.to
'yak shaving', a unique piece of tech jargon, had its origin in an MIT lab, and means executing sub-tasks that seem unrelated to the task at hand but are ultimately necessary to accomplish it. Basically, it's when writing software tickets takes on a 'If You Give a Mouse A Cookie' vibe, but less recursive, and based on needs, not desires.
For example, say you had to write a new component for a React project, but the css styles were broken because a dependency was out of date, and to update the dependency you had to update your node version first, and to do that you had to install nvm -- congrats, you're yak shaving. Better leave out the CSS for now and bang out the state logic first.
Resource: seths.blog/2005/03/dont_shave_that