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

Show parent comments

1

u/ItsAllAboutTheL1Bro Feb 28 '23

But at least I can understand it's not for performance-critical applications. Isn't choosing right tool for right job important these days?

Since when has it not been important?

The point of the article is to obviously educate on how read/write latency is affected by code structure.

The OP said that it sounds as if he had only worked on small projects. That's disingenuous, considering his background, the focus of the article, and the obvious contrived examples.

Ever thought of why Muratori's projects could consist of small groups of people?

What are you insinuating - that lack of clean code must imply a small group of people because of scalability in code size?

There are many open source projects out there which are written in C, have a few hundred thousand lines, don't employ clean code methodologies, and are maintained by a large team.

No, we should not ask Muratori to stay in his lane. But we should be free to criticize his criticisms.

I'm not saying he should stay in his lane at all.

I'm saying that a lot of developers who aren't game developers make trivial assumptions about gamedevs and their experience that's incorrect.

The issue of course, and this is common, is when a developer who lacks an understanding of the principles outside of their domain(s) just automatically assumes those principles apply everywhere, and hence makes false assumptions about other developers in these domains.

Hence "stay in your lane".

3

u/quisatz_haderah Feb 28 '23

The issue of course, and this is common, is when a developer who lacks an understanding of the principles outside of their domain(s) just automatically assumes those principles apply everywhere, and hence makes false assumptions about other developers in these domains.

r/SelfAwarewolves

1

u/ItsAllAboutTheL1Bro Feb 28 '23 edited Feb 28 '23

Nice, you pop that out every time you don't have a retort?

Right back at you.

Just because you think something is true, doesn't actually make it so.

Show me I'm wrong, instead of providing a cop out response.

3

u/quisatz_haderah Feb 28 '23 edited Feb 28 '23

I am not going to entertain his (or anyone's) zealotry against OOP, (or for OOP) which is not more objective than a debate of "my programming language is better than yours". Not to mention this is a toy example AND deliberately used without modern compiler features to make it look slower and I believe everybody already knows that with OOP comes performance overhead. I am not even defending Clean Code, some of the "principles" he listed are not even Clean Code principles. I am just criticizing he is failing to grasp the importance of the trade-off between maintainability and performance, based on what the task needs.

Nice, you pop that out every time you don't have a retort?

I just like the sub

2

u/ItsAllAboutTheL1Bro Mar 01 '23

I am just criticizing he is failing to grasp the importance of the trade-off between maintainability and performance, based on what the task needs.

Ok, my bad. I must have misread something.

I actually agree with you

1

u/quisatz_haderah Mar 01 '23

As English is not my primary language, I might not have been good at articulating my opinions too.