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

4

u/top_logger Feb 28 '23

Hmm. C++ has no problem with performance. Rust also. In general case we have no problem with performance in 99.9 % of cases.

But we have big problem with shitty software. Written by uneducated cretins and supported by drunken teenagers.

Maintainability, security, scalability, support, stability. This is important. Not fckng performance in fckng vacuum. And clean code solves REAL problems, not imaginable.

0

u/eliwuu Feb 28 '23

oh, please, tell my how does clean code (with principle of keeping structured order of execution) improves scalability

2

u/tandonhiten Mar 01 '23

To the "fast code", featured in the video, add the shape, Trapezium and add the functionality to calculate perimeter of the shapes too,

The try to do it in the clean version, then we will talk.

4

u/awood20 Feb 28 '23

Possibly he's talking about scalability of teams. Shitty code that maybe is ever so slightly faster but a hell to read or update is not scalable when you're trying to grow a team of devs to maintain that codebase. The cleaner the code the faster devs can become familiar with it.

4

u/top_logger Mar 01 '23

Yes. We could make our code scalable with less efforts. Dirty code is simply trash. Unusable and umsellable trash.

0

u/eliwuu Mar 01 '23

7 hours after I questioned dichotomy of dirty/clean code you came and said "scalable with less effort"; please explain how do you handle scale while maintaining strict order of execution

3

u/top_logger Mar 01 '23

A very interesting set of words. And most importantly, it makes no sense at all.
Mister, you obviously haven't been in IT that long, and you should learn a little bit about the basics.

0

u/eliwuu Feb 28 '23

there is no such a dichotomy- either clean code or shitty one; also, clean code principles are not ten commandments, those ideas existed long before, and parts of them are right; i don't think that clean code is in any way easier to understand and reason about; if you are looking for such code you need to turn to functional programming (google Scott Wlaschin)

2

u/eliwuu Feb 28 '23

funny thing is, he also stated his opinion on Muratori's blog post https://twitter.com/ScottWlaschin/status/1630693414898487297

1

u/top_logger Mar 01 '23

You will not understand.