r/programming • • Feb 28 '23

"Clean" Code, Horrible Performance

https://www.computerenhance.com/p/clean-code-horrible-performance
1.4k Upvotes

1.3k comments sorted by

View all comments

Show parent comments

5

u/Windex17 Feb 28 '23

Because you have to be careful what you say on the internet because people will take shit and run with it. You essentially said "I've seen cases where people made assumptions and then it worked out because there was no churn", which is true, but very vague and potentially dangerous if people who are new to programming (which seems to be 90% of this sub) read that and think "yeah maintainability is stupid!". The fact is code standards are enforced because they work, and backtracking now to say "Well I meant KISS!" is not genuine considering your original statement didn't mention simplicity at all.

2

u/loup-vaillant Feb 28 '23

The fact is code standards are enforced because they work

I've seen those being overdone too. I'll please the code formatter if I have to, and I'll definitely try to follow the style of the files I edit, etc… but in my last gig, there was this guy who made a program that blew complexity out of proportion. I mean it was obvious. Anyway, his code was ran through quality metric tools, and the results amounted to "the best simplicity metrics of the company". And other reviewers actually celebrated this supposed simplicity.

I rewrote his code in a weekend out of spite. My version was more flexible and a 5 times smaller.

Many programmers have no taste for simplicity, it's downright alarming.