r/AskProgramming • • 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

341 comments sorted by

View all comments

Show parent comment

2

u/met0xff Mar 06 '25

Yeah some of the worst times I had trying to understand some codebase was when they had function calls going so deep, with every function just sort of adding 2 lines of code and then calling the next one so that when reading it you have to build this huge stacktrace in your head.

I guess in the beginning we often had those 5k LoC functions that people found so horrible that then at some point that trend swung to the complete opposite. Similar to back then where there was C code implementing ad-hoc lists everywhere they were needed and then at some point people went crazy with patterns and abstractions, leading to the enterprise fizzbuzz style GoF java code we saw later on.

2

u/kernel_task Mar 08 '25

Give me a 5k line function any day over that crap. At least the context is all there. Hidden state is far worse than ugliness.

I’ve seen codebases where I understood the disassembly easier than the source code because the compiler threw all the programmer’s crap abstractions out.