Comment by highfrequency

20 hours ago

Engineering is a continual lesson in axe-sharpening (if you have 6 hours to chop down a tree, spend the first 4 sharpening your axe).

My favorite framing, from Kent Beck: “first make the change easy, then make the easy change.”

I recently got assigned to enhance some code I've never seen before. The code was so bad that I'd have to fully understand it and change multiple places to make my enhancement. I decided that if I was going to be doing that anyway, I might as well refactor it into a better state first. It feels so good to make things better instead of just making them do an extra thing.

  • Just be careful that 'better' doesn't just mean 'written by me'. I've seen that a lot too

    • More often than not I've seen this be the case. Refactoring as "rewrite using my idiomatic style, so that I can understand it", which does not scale across the team so the next engineer does the same thing.

This approach is also what I'm still missing in agentic coding. It's even worse there because the AI can churn out code and never think "I've typed the same thing 5x now. This can't be right.".

So they never make the change easy because every change is easy to them... until the lack of structure and re-use makes any further changes almost impossible.

  • This is a great observation. I've noticed the same pattern with AI-generated code and deployment configs. Ask it to set up a Node.js service and it will happily write a new PM2 ecosystem file every time rather than noticing you already have one with shared configuration.

    The "make the change easy first" mindset requires understanding what already exists, which is fundamentally a compression/abstraction task. Current models are biased toward generation over refactoring because generating new code has a clearer reward signal than improving existing structure. Until that changes, the human still needs to be the one saying "stop, let's restructure this first."

I don't think you spend all 4 hours up front, friend.

In my experience you're going to want a sharp axe later in the process, once you've dulled it.

Not sure if that ruins the analogy or not.

I have mixed feelings here because on one hand I prefer the “axe” when programming (vim with only the right extensions and options). But for trees… chainsaws are quite a bit easier. Once it is chopped down, maybe rent a wood splitter.

Most of my colleagues are content to spend 50 hours chopping up the tree with a pipe. We don't have time to spend making things work properly! This tree has to be finished by tomorrow! Maybe after we've cut up this forest, then we'll have a bit of spare time to sharpen things.

  • As Charlie Munger used to say “show me the incentives and I’ll show you the outcome”.

    What are the incentives for these developers? Most businesses want trees on trucks. That’s the only box they care to check. There is no box for doing it with a sharp axe. You might care, and take the time to sharpen all the axes. Everyone will love it, you might get a pat on the back and a round of applause, but you didn’t check any boxes for the business. Everyone will proceed to go through all the axes until they are dull, and keeping chopping anyway.

    I see 2 year old projects that are considered legacy systems. They have an insurmountable amount of technical debt. No one can touch anything without breaking half a dozen others. Everyone who worked on it gets reasonable rewarded for shipping a product, and they just move on. The business got its initial boxes checked and everyone who was looking for a promotion got it. What other incentives are there?

    • It's not about incentives; it's just bad management. As you said, the business just wants trees on trucks, so good management would realise that you need to spend some time sharpening axes to get trees on trucks quickly. It just seems to be something that a lot of software managers don't get.

      I don't think every company is like this though. E.g. Google and Amazon obviously have spent a mountain of time sharpening their own axes. Amazon even made an axe so sharp they could sell it to half the world.

      2 replies →

It's not always that, uh, clear-cut...

Sometimes sharpening the axe means breaking it completely for people still trying to cut down trees on WinXP, but you don't know that because you can't run those tests yourself, and grovelling through old logs shows nobody else has either since 2017 so it's probably no big deal.

Sometimes it's not clear which part is actually the cutting blade, and you spend a long time sharpening something else. (If you're really unlucky: the handle.)