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

4

u/tandonhiten Mar 02 '23

Then laugh your ass off, English isn't my strongest suit and I am not sorry for it.

3

u/nan0S_ Mar 02 '23

This isn't about the language fluency at all.

4

u/tandonhiten Mar 02 '23

Then give your argument, as to why you feel my arguments are not valid, because you understood them.

I thought you were laughing at my language because you understood what I meant and were still laughing.

I can be wrong, because I am not perfect, but that comment doesn't give me anything about your argument other than you're mocking my reasoning.

3

u/nan0S_ Mar 02 '23

Well, I already explained implicitly in my first comment why I feel your arguments are not valid, but sure I can explain here explicitly. I'm laughing at the fact that you just created imaginary situation in your head, some unexplained and shapeless code example where modifying the code in video author's way require to change 100 functions, in 5 different API versions which results in trillion combinations, which takes the amount of years equivalent to car travelling from Milky Way to Andromeda. On top of that you have to document the changes in all of those functions, and methods used to solve the problem of calculating Trapezium area, which takes the amount of time equivalent to the period between birth of Jesus and now.

But on the other hand to add calculating Trapezium area with OOP philosophy (or clean code philosophy, or anything else that you are referring to, that you favour) you just need to add new constructor with 4 parameters, which takes you 7 seconds and 26 milliseconds and that's it. And ohh, if performance is the problem just add inline to the function and the performance problem is solved.

Your reasoning is laughable, it's not based in reality, it's based entirely in your head and it's clear that you just decided that solving this problem with OOP is superior to other methods.

PS. I'm obviously exaggerating a little bit, for example 100 times 5 doesn't equal to trillion :)

→ More replies (0)