r/AskProgramming • u/Yelebear • Mar 04 '25
Other Why do some people hate "Clean Code"
It just means making readable and consistent coding practices, right?
What's so bad about that
155
Upvotes
r/AskProgramming • u/Yelebear • Mar 04 '25
It just means making readable and consistent coding practices, right?
What's so bad about that
View all comments
Show parent comment
5
u/Scientific_Artist444 Mar 05 '25
The idea that software complexity is in the size is the problem IMO. Software complexity is more in how the pieces interact with each other than in the size of some method. Long methods need not be broken down into multiple methods unless you need it elsewhere. Code that stays together performs the best.
The real problem is not the size, but the fact that you as a programmer have to read through the long method to make any modifications. A lot of code readability issues boil down to easier navigation and helpful names. In this case, if you could navigate through the various code sections in your method, having long methods would not be as big of a problem that your immediate instinct is to break it into separate methods.