Hacker News new | ask | show | jobs
by xg15 3225 days ago
> Developer time is expensive, and optimization is hard.

In the case of front-end development also "Developer time is paid by the company while hardware is paid by the users."

This is basically a nicer way to put the "lazy developers" point from the article, but I think that's actually important.

The problem is that this seems to create all sorts of anti-patters where things are optimized for developer-lazyness at the expense of efficiency. E.g., adding a framework with layers of JavaScript abstraction to a page that shows some text - after all, the resources are there and it's not like they could be used by something else, right?

2 comments

There are many kinds of efficiency, and some of them matter more than others.

We as a society have voted with our wallets that yes, we really really want a process that is efficient on creating more features within the same amount of developer-time instead of a process that creates more computationally efficient features.

The increased hardware capacity has been appropriately used - we wanted a way to develop more software features faster, and better hardware has allowed us to use techniques and abstraction layers that allow us to do that, but would be infeasible earlier because of performance problems.

It's not an anti-pattern that occurred accidentally, it accurately reflects our goals, needs and desires. We intentionally made a series of choices that yes, we'd like a 3% improvement in the speed&convenience of shipping shiny stuff at the cost of halving the speed and doubling memory usage, as long as the speed and resource usage is sufficient in the end.

And if we get an order of magnitude better hardware after a few years, that's how we'll use that hardware in most cases. If we gain more headroom for computational efficiency, then we've once again gained a resource that's worthless as-is (because speed/resource usage was already sufficiently good enough) but can be traded off for something that's actually valuable to us (e.g. faster development of shinier features).

There is a cost to the company for non performant front end code though. If the front end preforms poorly users are less likely to use it.
If that were the case, I think there wouldn't be that much discussion about the "website obesity crisis". E.g., see this post from another thread: https://news.ycombinator.com/item?id=15028741
Users who aren't using an up-to-date phone are probably not an audience websites are likely to make money from. If a website's performance isn't "good enough" on a modern phone, that will hurt the site.

Dark thought: maybe sites actually profit from a certain level of "bloat", if it drives away less lucrative visitors while not affecting the demographics that are most valuable to advertisers.

I don't disagree, but the counter is also true. If the developers didn't care about front end performance there wouldn't books on the topic.