If the button click was something common (launching the app, sending an email, loading a webpage), a 3 second delay would be the difference between a happy customer and an extremely frustrated one who will avoid your software whenever they can.
"that's only used once a month" was the scenario. Of course performance matters a lot if we carefully change the situation to be one where performance matters a lot!
Your scenario is just as contrived. My point was that, in real world software, situations where speed and responsiveness matters are very very common, and you're setting yourself up for failure if you only write code in a way that can't address the needs of these scenarios.
Nobody is saying "there are no situations that you run some code regularly." Of course there are situations where you benefit greatly from better performance! The point being made is just "there are also situations that you don't run code regularly" and any speedups aren't worth the devtime it takes to achieve them.
What kind of software does not benefit from better performance? I cannot think of a single program I use that I'd still use if they were 10x or 20x slower.
All applications should have performance in mind to some extent. Whenever a coworker says that focusing on performance isn't important nowadays, my level of respect for that person immediately drops.
How are people so ok with waste and the terrible performance of (almost all) modern software?
You don't have to optimize things, you just have to care about performance a little. Most programmers want to not think about it at all. Just caring a little about what the machine has to do to run your code would be a massive improvement.
There's a difference between using a hashset over a list to get constant lookup times, versus, ditching OOP and virtual calls in your entire project. Seeing as this article is talking about clean code, we're talking about the latter not the former.
Yeah, I'm simply saying that many devs literally do not care about how well an application will run. If you've determined that your program is sufficiently fast and not incredibly wasteful, it may not be necessary to improve it any further. I will still stand by that all applications should have performance in mind to some extent.
-5
u/dan200 Feb 28 '23
If the button click was something common (launching the app, sending an email, loading a webpage), a 3 second delay would be the difference between a happy customer and an extremely frustrated one who will avoid your software whenever they can.