Skip to content

Comment on Why you should never ask permission to clean up code.parent

Comments

Thanks. Regarding 'dirty code' though, you've reminded me of another point I believe in.

4. All code is temporary. I said du jour for a reason. It's all wonderful for a little while, but there's no such thing as "Okay, that's been refactored now", in an lasting sense. We're building and maintaining sand castles. Either the world around the code changes, or our opinions about it do. "dirty" code doesn't exist to me, at least not in some conveniently boolean state. The half-life of a piece of code depends on a number of variables, but there's no such thing as code that doesn't start decaying the moment if leaves your keyboard.

So yeah, it's all dirty, pretty much.

But code can be dirtier if its implementation was poorly thought out, half of it was modified to reflect new assumptions while the other half was worked around and left intact, etc.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.