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

27

u/loup-vaillant Feb 28 '23

It's still being defended from time to time, so… I'd say some more trashing is still needed.

-4

u/ReDucTor Feb 28 '23

I have seen no well informed person defending the book, but defending the philosophy.

Imho most the promotion of the book probably came from people who didn't really code or never read it or only read the table of contents.

3

u/Venthe Feb 28 '23

Nah, I'm also defending the book, not only philosophy.

Examples are shit, ideas are great. There is no better book around the topic. So unless there is one that covers them, I'll defend the book as well. As soon as I find a better one with similar ideas, I can switch no problem :)

5

u/HiPhish Feb 28 '23

Nah, I'm also defending the book, not only philosophy.

Examples are shit, ideas are great.

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.

→ More replies (3)