Yak shaving

This term emerged in hacker culture in the US as a colorful way to describe a particular type of software engineering trap.

The term comes from a cartoon bit in The Ren and Stimpy Show, in which there is a comedic scene involving yak shaving. The metaphor was subsequently adopted by the computing community to describe nested dependencies and scope creep.

To "shave a yak" means you start working on a problem, but to solve it you must first solve another sub-problem. So you start working on that sub-problem, and it turns out that it requires you to solve yet another sub-problem. You get several levels deep into nested dependencies when you realize that the effort involved in solving the deepest problem is not worth the value it provides for solving your original problem.

In other words, yak shaving is a situation where you become trapped solving increasingly tangential problems that distract from your original objective.

A classic example would be when you start to refactor a function, but doing so triggers you to upgrade a dependency, which is then no longer compatible with your runtime environment…​ and so on.