Published
- 6 min read
Automated Yak Shaving

Yak Shaving
As CTO I don’t often get to write code much anymore, but after some excitement with the hosting company that I used for my activelylazy.co.uk website I decided to have a look at static site generators. This is where the yak shaving began…
For those that haven’t heard the term, “yak shaving” is a metaphor for a pointless activity undertaken in the hope that it will help you solve some greater, more important problem. I.e. it’s all the pointless crap that gets in the way of the “real work”.
Imagine you go to change a light bulb, but when you go to the cupboard for a new bulb you realise the cupboard shelf is broken - so first you should fix the shelf. You check the garage, but you don’t have any spare shelf brackets, so a trip to the DIY store is necessary. While driving to the DIY store, you drive over a nail and puncture the tyre - rather than drive around on the emergency spare, you might as well head to the tyre fitters and get a new tyre, while you’re out. So there you are, sitting in the coffee shop, waiting for the tyre fitter to finish when your other half calls:
Where are you? I thought you were changing the light bulb?!
How do you explain that as soon as your coffee is finished you’ll collect the car from the tyre fitters, then on to the DIY store to pick up the shelf bracket and head home to fix the shelf. At which point you can finally change the light bulb.
Software Development
So much of software development ends up being yak shaving - pointless crap that’s getting in the way of what you’re supposed to be doing. Once I’d decided the solution to my hosting problem was to build a new website and that maybe it would be a good opportunity to explore static site generators, that’s when my yak shaving began.
I’d played with Gatsby at work a while back, so thought that might be a good place to start. But I couldn’t run Gatsby because the node version in my WSL instance was too old. Fine, I’ll remove the existing node version and install nvm. All good, except the latest node version doesn’t run because of some weird glibc error. A quick google suggests I need to upgrade my Ubuntu 18. So I run the upgrade command, but after a few minutes that fails. Another google suggests there’s an issue with snapd, so I remove snapd and try again. Success! My WSL setup is now running Ubuntu 20.04. Double success! My new node 20 installation also works. At which point I finally get to start using Gatsby. After 5 minutes experimenting with it I decide its too much work and move on to something else! Literally an hour or more yak shaving for 5 minutes learning that Gatsby wasn’t what I was looking for.
AI
I’m very bullish on how much AI is going to change… well… everything. The incredible hype cycle is dying down again now (thankfully), but I can’t see how advances in AI aren’t going to bring about huge changes. I’ve used Github Copilot and I’m a big fan: it’s not always the right thing, but being able to very quickly get a starting point for a function or automate making some code change can make a huge difference to your minute-by-minute workflow. A friend of mine described pairing with someone that doesn’t use Copilot as like pairing with someone that doesn’t touch type.

There are different types of software development, some days it’s just about writing knowable code in small increments - on these days its easy to see how Copilot fits in to the workflow; but sometimes it’s about exploring a new library or pattern or approach, Copilot might be able to help with some of the code writing - but the real problem here isn’t writing code but actually understanding. It’s as you start dealing with libraries and third parties that you’re most likely to run into yak shaving.
Levelling Up Copilot
I think this will be the interesting question of how much more of software development becomes automated via AI. So far Copilot helps speed up the kinds of workflow that I’ve always liked to use TDD to mechanise: write a function to do X given Y. Copilot also helps with the exploratory “how do I call library X to do Y” type problems. But the result of exploratory coding is understanding. When it doesn’t work, when the output isn’t what you expect, when it doesn’t integrate with whatever systems you need it to - that’s when real thinking has to happen, when understanding has to happen.
So far tools like Copilot are great at automating the small, minute-by-minute tasks. Definitely an efficiency gain, but it still needs an intelligent agent to direct the activity. The software developer is still deciding which functions to write, in which order, which libraries to integrate etc.
The next leap in capability will, I think, be in a tool like Copilot being able to describe, briefly, a sequence of steps it would take to achieve some desired outcome. This will take Copilot from the level of Junior Developer to Mid-level Developer: able to describe a long-ish sequence of activities, which a more Senior Developer can review and provide feedback on. “Have you thought about X”, “What about Y”.
I’ll be intrigued to see how AI copes with the inevitable “yaks” that this throws up. As soon as you’re making a reasonable sized change, there’s a chance that something unexpected happens. This is where yaks live. As a Junior Developer, this is one of the things you learn quickly: I’ve started on the work I agreed with my Senior, but now I’ve hit a problem and I have a yak to shave: upgrade some dependency, refactor some other piece of code which we hadn’t considered. When an AI can identify these side quests at the very start, maybe we’ll finally eliminate yak shaving. Or at least, have trained Copilot to identify and shave all the yaks.