yak shave
/yak shayv/ · noun · Hacker Culture · Origin: 1991
Definitions
A seemingly pointless task that is actually a necessary prerequisite for a chain of tasks that eventually leads to your original goal. The canonical example: you need to update a document, but the printer is out of ink, but the car to get ink needs gas, but first you need to return a library book to get to the gas station, but the book is at your friend's house, who asked you to shave his yak. Each step is rational; the chain is absurd.
In plain English: A chain of tasks where each one is needed to do the next, leading you far from your original goal — you started fixing a button and ended up reconfiguring a server.
Example: I sat down to fix a CSS bug and four hours later I'm compiling a custom font renderer because that's where the yak shave led me.