Today if you want to print "1 item" or "2 items", many would probably pull a library. 25 years ago, you would either build the logic yourself, or consider the logic unnecessary clutter and write snprintf(buffer, 25, "%d item(s)")
The resources available means most developers don't even consider performance until it's unbearably slow. I do think this is dumb, we could do so much more if we gave it half a consideration, but as things are, we don't.
But I totally get your frustration with how shitty web services are these days. Just to prove to myself how ridiculous it is to wait for pages to load as long as they do, I built a personal wrapper[1] for Reddit that uses static rendered HTML. reddit.com has like a 6 second page load. I'm at like 300ms at best if you have high ping to my server, and usually serve sub 10 Kb-pages (to Reddit's nearly 10 Mb-payloads).
Well that's what I am talking about. Hardware resources allow devs to be lazy, to not optimize.
But snprintf(buffer, 25, "%d item(s)") is easier than learning and setting up whatever library it is you want to pick, and thus is the lazy solution. You don't need to think about optimization to pick it. On the contrary you'd need some good reason to not pick it.
Growing hardware resources can explain the growing popularity of higher level, interpreted languages for example - they take resources and save time.
But it can't explain e.g. twitter, and that's what my question is all about. It would actually be the lazy solution to make the frontend in pure html. Yet they chose whatever unholy mess it is they chose. It took them more time and resources to build AND it takes more computer resources. So it's like anti-optimization - but it still takes dev time. And I can't wrap my head around it, why would they do this?
You'd think it works like this: you may trade features and dev time for optimizations. But they trade dev time for the opposite of optimizations, and essentially no features.
It's like if they paid a street sweeper to make streets messy. And they didn't just pay this one guy to run around the whole city throwing garbage around - they hired teams of guys to meticulously lay out litter in the streets. Nobody asked for that litter, it achieved nothing, didn't even profit the people doing it. But they spend tons of money on paying those guys, training them, team building, organizing scrum meetings...