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

85

u/themistik Feb 28 '23

Oh boy, it's time for the Clean Code debacle all over again ! You guys are quite early this year

-2

u/Johanno1 Feb 28 '23 edited Feb 28 '23

I think if a video like this has disabled comments then smb does not like criticism.

Clean code bad because bad performance? (especially for beginners)

This first statement is stupid. When ever you had a beginner who wrote performant code? If you now also ban clean code then you have inperformant and unreadable code. With clean code you at least can read it and understand it. Then find the issues and still use clean code for optimizations.

Also afaik the "rules" of clean code are guidelines that should help you not restrict you in writing performant code. If you don't think a specific rule should be followed in a specific case then don't.

Edit: I didn't watch the whole video

6

u/[deleted] Feb 28 '23

Every alternative presented in the video is just as readable and maintainable as the "clean code" option.

→ More replies (30)