# Yak Shaving - What is it and why you probably do it!

# Before I Start
You can find the podcast episode around this topic below!
<iframe src="https://anchor.fm/workingunittests/embed/episodes/13-Yak-Shaving---What-it-is-and-why-you-probably-do-it-e1df4m6" height="300px" width="100%" frameborder="0" style="overflow:hidden; min-height: 300px; margin-bottom: -8rem;" allow="autoplay; clipboard-write; encrypted-media; fullscreen; picture-in-picture"></iframe>

# Introduction
I shall begin with a quick story of something I went through this past week.

I had a task to create analytics events for a few new key features that we wanted to track usage of - as part of our measurements of how successful that new feature was in the short term.

A few hours later - I found myself taking a look at half our integration tests after a brief change to our login page. 

How did this happen?

# What is Yak Shaving? 
Yak shaving is when your current goal is overridden by multiple recursive sub goals that aren't absolutely necessary - but minor enough that you should just handle it now while you're there. After some time - this leads to the original goal not being met and all is **not** well.

You can find my absolute favorite visual aid for this [here](https://www.youtube.com/watch?v=AbSehcT19u0)! 

So while developing, it can be easy to get distracted with little "nice-to-have's" that are equally important as they are distracting.

# How to avoid Shaving Yaks
Honestly - I don't think it's a bad idea. If you have the time for it - go for it. But there is a better method of **how** then what was visualized above.

Follow this rule of thumb and your yaks should all be shaved in no time:
1. If you find a yak that needs shaving: write it down somewhere and come back to it when you're done what you are doing.

And that is it. Do this - and you should see much success! (and some shaved yaks along the way!)

Have a good one! You can reach me at hello@workingunittests.com **or** https://workingunittests.com


