Stop trying to make refactoring happen, it's not going to happen.
I went to Joy of Coding yesterday, a one-day conference in Rotterdam. Two of the talks were about refactoring. One talk called it “mending code”, and zoomed in on this rather strange phenomenon in IT: we’d rather demolish some code and write it new and fresh, than fix the existing code to make it better. The last talk of the day zoomed in on refactoring. The main argument I remembered is: if you don’t maintain a codebase, its quality will deteriorate. And a lot of developers scoff at maintaining code they have not written themselves.
I just want to use this post to rant a bit about why I think refactoring is never going to be hip.
Think about the value system that underpins the case for prioritizing refactoring over creating new and shiny code, and put that up against the values of an average human being.
The average human being values new and shiny stuff over existing stuff and repairing existing stuff. My proof for this claim is the amount of crap people buy that they for sure don’t need. Most humans are fine with being wasteful. It doesn’t even enter their minds that they can buy less stuff, or repair their stuff, find new value and joy in the stuff they already own.
I find more proof in the way we humans look after our planet. I don’t even want to think about the amount of plastic waste that covers the earth. We consume without any regard of the future.
“But that is the system we live in”, I hear you say. Never mind the fact that on a personal level you CAN decide to lessen your consumption of many things, there is a point there. The capitalist system is designed to make us consume. We have to consume more and more to keep this pyramid scheme going.
The code we write is also part of this system. Idk, maybe I’m totally crazy with this argument, but our whole culture, our whole system is not designed to prioritize refactoring. It prioritizes: speed, techno optimism (shiny new stuff, no matter if it’s useful, as long as it’s profitable), exploitation. (Was it capitalism? Always has been 🔫)
A few developers who do care about mending code / refactoring code put up a small amount of resistance and try to make the world a better place. But sorry, it’s never going to happen. The average developer is the same as the average human being. They’d rather use LLM (“AI”) assistance to more quickly write crappy code that they will squint their eyes at 1 week later, and toss away, because no one can understand that garbage as it doesn’t fit in the architecture. Code is going to be worse than it already is.
Do you think I’m wrong?
I’ll start believing in it when repairing existing items is the norm in our culture. I’ll start believing when kintsugi (金継ぎ) is a term known by everyone.
Some photos I made during the refactoring talk. No photos from the mending software talk, as it was a bunch of LLM generated pictures of corgi’s.
Comments ()