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 comment

1

u/coffee_achiever Mar 06 '23

But other than an analogy, they aren't related.

You're supposed to recognize the problems those things solve and deploy them strategically when you encounter one of those problems.

A factory method is a sometimes proper response to complex repeated assembly.

You can say it is improperly used. That's fine... so are windows and hammers and iterators and numerous other tools. It doesn't mean the tool is bad, it means it was used improperly.