Hacker News new | ask | show | jobs
by account42 38 days ago
> There are studies out there, that sometimes it is even benefitial to be slow and show a loading indicator because it could increase trust from users, because they think "Hey look... the application is calculating something to fullfil my needs", instead of showing the answer instantly.

Users being susceptible to dark patterns doesn't mean that dark patterns are something an engineer should see as acceptable.

> Always benchmark the application and work on the bottleneck only.

That's how you end up with software that's slow due to a million abstractions. Easily bench-marked bottlenecks can give you quick wins, but that doesn't mean you should stop there or not have any foresight to optimize things ahead of time where it makes sense. Your cost benefit calculation also needs to take into account that optimizations decisions (both architecture and lower implementation details) are much more costly to do after the code has already been written, which is why with today's YOLO software they often don't get done at all.

1 comments

> Users being susceptible to dark patterns doesn't mean that dark patterns are something an engineer should see as acceptable.

I think it is not even an engineers job to define the UX/UI. I would rather consult an expert on that matter. But from my personal experience I can relate to that. When I see applications that seem to be too performant I often get the feeling that they might be phishing pages because they don’t do any actual work under the hood. So my first instinct is to avoid those kind of pages, even though it might be legit.

> That's how you end up with software that's slow due to a million abstractions.

How is an abstraction related to benchmarking? Those are too completely distinct topics.

> Easily bench-marked bottlenecks can give you quick wins

They can... but most of the time it is not a quick win. But the question is not about if it is quick win or not. The only thing that matters is if your are optimizing on the bottleneck or on something that has no measurable impact. Without benchmarking you are blind.

> but that doesn't mean you should stop there or not have any foresight to optimize things ahead of time where it makes sense

Yes, it does. When the bottleneck is gone, and the performance becomes good enough there is no further need to optimize. I am happily quoting Donald Knuth here "Premature optimization is the root of all evil."

> Your cost benefit calculation also needs to take into account that optimizations decisions

This is true. But it doesn’t only apply to optimizations. This applies to any kind of change you want to make to the code. So this has also been to considered when you want to build a new feature. The answer to that is: Optimize for change. Which is basically the fundamental idea working in an agile way, but most people don’t do this correctly. Optimize for change means you need a lot of test automation and clean code, so you can make any kind of code or architecture change quickly with low cost and low risk and without fear. I am practicing this since over a decade now and it works pretty good.