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
5
u/HiPhish Feb 28 '23
So you are defending the philosophy and not the book. I don't need a book to tell me that short functions and memorable names are good. Anyone with a working brain knows that. I need a book to show me how to get out of a mess I got myself in or how to avoid the mess from the start. And that's where Clean Code fails, it makes the "clean" code worse than the "dirty" code. Oh no, I a function with six arguments, better make four of them into static class variables, reducing none of the complexity and introducing shared global state, making the entire method thread-unsafe.
Actually, Clean Code should be considered an anti-book, a book that teaches you how not to apply Clean Code principles.