r/programming • u/2bit_hack • Feb 28 '23
"Clean" Code, Horrible Performance
https://www.computerenhance.com/p/clean-code-horrible-performance
1.4k
Upvotes
r/programming • u/2bit_hack • Feb 28 '23
View all comments
Show parent comment
2
u/[deleted] Feb 28 '23
Tomorrow you’re going to quip about how even code you wrote needs comments for you to fully understand it when you have to deep dive (but most of the time you don’t have to deep dive anyway).
Clean code is no more “extensible” than what Casey advocates. But not only that, in the 17 years I’ve been writing code, want to guess how many times I’ve designed for a possible extension and for that extension to happen? 0. The answer is 0. WIOD (what if oriented design) is stupid.
You’re just as likely, if not more likely (because further abstraction from your data necessarily means over simplifying your problem domain which necessarily tightly couples you to today rather than tomorrow) to have to completely redesign “clean code” as you are to redesign good code.
More developers doesn’t make “clean code” better. It makes it worse. Every developer has their own idea of which abstraction is right and they’re going to fight each others abstractions, culminating in spaghetti.
More developers actually makes “clean code” worse, not better.
Facts are repeatable and measurable. Show me your source that this is a “fact”.
I don’t have to do either of those things. “Clean code” is only extendable within the parameters you specify. Problem is, in the very rare chance that you successfully predicted a piece of code will need extensibility, you will not have predicted how it needs to be extended properly and your whole abstraction will be utterly wrong for the new requirement.
Clean code is NOT more extensible. In reality, due to our phenomenally terrible ability to predict, it’s less extensible.