# What Is Yak Shaving? Advice for Software Developers on Staying Focused

DevFeed: [What Is Yak Shaving? Advice for Software Developers on Staying Focused](<https://devfeed.tech/articles/what-is-yak-shaving-advice-for-software-developers-on-staying-focused-24971.md>)

Original publisher: [Read original article](<https://codeahoy.com/2017/02/13/yak-shaving-the-less-you-do-the-better/>)

Author: umer

Published: 2017-02-13T00:00:00Z

Content type: opinion

Language: en

Sources: [Code Ahoy - Articles](<https://devfeed.tech/sources/code-ahoy-articles.md>)

Topics: [Development](<https://devfeed.tech/topics/development.md>), [Software Engineering](<https://devfeed.tech/topics/software-engineering.md>)

Tags: [advice](<https://devfeed.tech/tags/advice.md>), [developers](<https://devfeed.tech/tags/developers.md>), [software](<https://devfeed.tech/tags/software.md>), [software-developer](<https://devfeed.tech/tags/software-developer.md>), [software-development](<https://devfeed.tech/tags/software-development.md>)

## AI overview

The article explains "yak shaving," a chain of distracting prerequisite tasks that pulls developers away from their original goal. Using a fictional software-development example, it advises finishing the initial task, then separately evaluating and prioritizing related improvements such as upgrading Hibernate.

## Source excerpt

Yak shaving is defined as: 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. Fun-fact about the origin of the term 'yak shaving': The term was coined at the MIT AI Lab in the 90s. Its scientists got inspiration from an episode of the Ren and Stimpy show called "Yak Shaving Day". A picture is worth a thousand words. A video, perhaps billions. A well-known sitcom scene captures it perfectly: a man sets out to change a lightbulb, and one prerequisite errand leads to another until he is doing something entirely unrelated. To understand it more clearly, suppose you are required to perform a task. We'll call it task A. As you start working on task A, it leads you to another task, e.g. task B. Task B leads you to Task C, and so on. Before you know it, you are working on Task Z, completely distracted from your original goal of completing task A. Here's an example dialog in the world of software development. Manager: "Did you fix the issue where we had to update the column name in our code because someone changed it in the DB? " Software Developer: "Ah, not yet. I'm still working on it." Manager: "What happened? It was a one-line change." Software Developer: "As I looked into the code, I realized we were using a really old version of Hibernate. I tried to upgrade it but there were some breaking changes in the new version. They recommended switching to the Repository pattern so I refactored a few classes but now the DB is throwing errors. I'm debugging." In this fictional scenario, the developer 'went down a rabbit hole,' which had nothing to do with the original task of changing the column name in code. The key is staying focused and not letting distractions pull you away from the main goal. Assuming the developer was right that the code needed to be upgraded, he mixed the two unrelated t