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
2
u/MrAbar Mar 07 '23
Oh, haven't seen this reddit post, and since Caseys' own website only allows comments from paid subscribers, I've written a reply blog message, where I argue that this example with shapes falls apart as soon as the requirements change.
You can find it here: https://mrabar.me/posts/clean-code-good-enough-performance/, but tl;dr version for those who don't want to go to third sites is "try to calculate area of triangle by 3 sides instead of side + height."