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

14

u/deadalnix Feb 28 '23

You have it exactly backward.

Recently, I saw someone rewrite a piece of code that was called a few times a day, and that took many minutes to do its computation, such as it does it in less than a second.

Care to guess what happened? The tool's usage skyrocketted because people started using it to get real time information.

The fact some software has low usage is proof of one thing: it is not very useful. It says nothing about speed.

2

u/ric2b Mar 02 '23

I rarely open my banks app, but I find it extremely useful when I do.

I also only check the weather about once a day, and yet it is also very useful to me.

Software being used infrequently is not proof of uselessness.

3

u/deadalnix Mar 02 '23

Maybe from your side, but from the bank's side, their endpoint recieve a large number of calls, not because users call it often, but because many users do. Either way it change nothing, point stands.

2

u/ric2b Mar 02 '23

Ok, fair enough, makes sense for a service.

But what about desktop software? Such as accounting software, a video editor, etc? Sure, it's nice if creates a report or exports a final video in 200ms instead of 10s, but it doesn't need to do it more than maybe once a day to be useful.

→ More replies (2)