Live data from Hacker News

JavaScript broke the web (and called it progress)

jonoalderson.com

111–120 of 171 posts

Re: JavaScript broke the web (and called it progress)

#111

> The result? Broken back buttons. Image bloat. Inaccessible markup. URLs that don’t behave like URLs. Metadata that disappears. Content you can’t copy. Buttons you can’t keyboard to. Modals that trap you. Scroll positions that reset for no reason. Headlines that shift mid-read. Analytics that don’t match reality. Preview environments that lie. And pages that load… eventually. -- None of that is the fault of Javascri…

Javascript seems to attract the most horrible frameworks that stimulate this more than in other languages, but agreed, not the fault of the language. It's a horrible language as well, but that's another story.

This is largely because all of these frameworks are a collection of hacks to get Jacascript to do things it was never designed to do.

It seems if we want to have single page application that act like desktop apps, maybe we need a new language/technology that browsers can handle that is designed for this.

Maybe WASM is supposed to be the answer there, but it doesn’t feel like it (I haven’t really looked into it much). These JS frameworks have had way too much time to get out of hand without something coming in to fundamentally change things to make them obsolete. I worry this whole generation was raised on complexity, with nearly unlimited compute, and they lack the limitations which led to some of the more elegant solutions of the past. Though I could just be wearing rose colored glasses.

While a lot of pages would be well served by going back to a more traditional style, there are web apps that require more, and in lieu of a better alternative, people are going to keep hacking more frameworks around JS to make it happen.

Re: JavaScript broke the web (and called it progress)

#112
post #109

Earlier quoted context omitted.

Holy s@#$! You're right. I didn't catch it at first, probably because it was on the HN frontpage. But yeah, the amount of em dashes (among other things) totally gives it away. There were so many contradictions in the article, I was going to point them out. Don't see a point now.

As someone who makes a living by writing, this myth about em dashes is annoying. I have always used them. But now I have to avoid them so clients don't think my work is AI-generated. I don't believe this article is largely AI-generated. It reads to me like the work of every marketer who has learned a list of "best practices" and sticks to them rigorously. It's probably also been edited so it aligns with Grammarly's o…

I feel you. Nowadays I have to use tactical lowercasing and curses here and there to avoid AI-looking responses.

> It reads to me like typical marketing writing.

hmm maybe that's why it rubbed me the wrong way.

Re: JavaScript broke the web (and called it progress)

#113

> The result? Broken back buttons. Image bloat. Inaccessible markup. URLs that don’t behave like URLs. Metadata that disappears. Content you can’t copy. Buttons you can’t keyboard to. Modals that trap you. Scroll positions that reset for no reason. Headlines that shift mid-read. Analytics that don’t match reality. Preview environments that lie. And pages that load… eventually. -- None of that is the fault of Javascri…

Javascript seems to attract the most horrible frameworks that stimulate this more than in other languages, but agreed, not the fault of the language. It's a horrible language as well, but that's another story.

I think the fact that it's a horrible language is a big contributor to the frameworks being horrible as well. There's all these incidental sacrifices that have to be made which bleed through into everything else, like handling null and undefined.

Re: JavaScript broke the web (and called it progress)

#114
post #43

Earlier quoted context omitted.

On a wired connection? No problem. On a crowded mobile network? Or when you got only EDGE (hello Germany)? Whoops. Hacker News however? Blazing fast - one page and only the CSS is actually required for rendering the page, and it is using both a cache-buster in the URL and a 10 year (!) cache life time. The JS uses the same as well but it's only loaded at the end of the page, so after rendering is done.

> Hacker News however? While being completely useless on mobile, with tiny buttons and textarea, which could be fixed while barely making the whole thing larger.

I agree, it could become way better on mobile with just some small fixes. But in some ways I'm more afraid of a complete redesign.

Re: JavaScript broke the web (and called it progress)

#115

> The result? Broken back buttons. Image bloat. Inaccessible markup. URLs that don’t behave like URLs. Metadata that disappears. Content you can’t copy. Buttons you can’t keyboard to. Modals that trap you. Scroll positions that reset for no reason. Headlines that shift mid-read. Analytics that don’t match reality. Preview environments that lie. And pages that load… eventually. -- None of that is the fault of Javascri…

The problem is that getting those things right is 4x more difficult in a SPA app than a legacy, server rendered, app. - No native back and forward button implementation. Now you must listen to an API and emulate the legacy behaviour. - The concept of links, its also emulated via onClick events. This means that anything can be a link, so in many cases rows become links and their content is not really selectable as tex…

I wholehartly disagree - all of the mentioned problems are problems created by the developer. All these things work with the common SPA frameworks - developer just tend to forget what an anchor or a button is and use a span or div for it.

Having the proper tool and using the tool properly are two different things - and the web is a place where people forgot to do things the proper way.

Re: JavaScript broke the web (and called it progress)

#116
post #76

In 2010, Facebook was one of the best websites to browse. It was everything you wanted a central social media platform to be. You could stay updated about your friends, family and even host pages for your business on it. Everything was just so simple - because they respected what a "hyperlink" actually meant. Fast forward today, I click on a dropdown on a post with barely 3-4 options, there's a spinner, a dozen reque…

Until last year, you could still experience that thanks to the "mbasic" version of Facebook. It was truly blissful, like the good old times. But it was increasingly buggy and they killed it for good last year.

Re: JavaScript broke the web (and called it progress)

#117
post #7

Saying JS broke the web when your website loads 754kB of JS across 13 separate requests makes me wonder if you're very serious about the problem.

I find your argument disingenuous, the website is still usable with JS disabled and it's obvious the article is talking about JS-heavy websites that could do without it, not advocating for a complete anti-JS stance. It also uses HTTP3 is seems, so making 13 separate requests isn't much of an issue, it has a good performance score which is almost surprising for a Wordpress website.

Re: JavaScript broke the web (and called it progress)

#118
post #99

These articles always suggest that minimal HTML and jQuery is enough. Like, I guess for a blog, but like, not for web apps? That's the other weird thing - they're always framed like the entirety of the internet is blogs or whatever. How many software engineers are working on blogs? Everything is a webapp now, the vast majority of the time most users spend interacting with the internet is through complex applications…

You might not be able to make your web app with zero, but chances are it needs a lot less. Look at Old Reddit for example; it used Javascript for inline comment reply textboxes and for expanding sections of the tree. With it turned off, everything else still worked. Of course, that's gone now. Do you really need three megabytes of JS to replace the whole page with the video player when I click on a video, or is enoug…

I mean obviously it depends, a lot of that 3mb is probably doing all sorts of ad and tracking stuff which, well, welcome to the internet. There's a point where trying to avoid JavaScript and build tools is just plain harder (especially with large teams) than like, a basic react app with typescript. You can use astro or just render out HTML and serve that. No reason to not use the tools you're already familiar with. If it's a webapp, the demands of complexity on the app mean you almost certainly need a framework (especially working with a team) to manage that. If it's a blog, if you make the active choice to make it slow and painful to load as a developer and put in the work to add all that bloat, it doesn't matter that much anyway?

Re: JavaScript broke the web (and called it progress)

#119
post #91

Earlier quoted context omitted.

Well, you may need to worry about them now. It's a well-known issue with the mainstream LLMs. Every few days, you see a new post on reddit from people asking how to get rid of em dashes from ChatGPT, etc. Even when they are not a telltale-sign, folks are afraid of using them now because of AI. I'm not saying em dashes are bad. Our books are littered with them, and that's why LLMs spit them out consistently. https://m…

The funny thing is, I wasn't even thinking about the em dashes when I made the initial comment. I had been concentrating on the usage of English in general in the article, which to me is a far more obvious sign of AI generation than the usage of em dashes is.

yup, "em dashes" was just easier for me to type to give an example/heuristic. Everything else would require a tad more effort to explain.

I was scratching my head pretty much the whole time during the first read.

Re: JavaScript broke the web (and called it progress)

#120

The problem is the web sucks. CSS sucks. HTML sucks. Javascript is perfectly fine, actually. Browser security sucks. CORS sucks. CSP sucks. SVG sucks. Favicons suck. Shadow DOM sucks. Video controls suck. Web audio sucks. WebGPU sucks. W3C sucks. Chromium sucks. You know what I'd do to be able to build a website using SwiftUI or GTK? Given the terribleness of the web, naturally people will use bloated UI frameworks a…

HTML5 is Okay (maybe need an upgrade). Scss is Okay. Svg is Okay. JavaScript is Okay. The rest do suck, but aren't the reason why we use bloated framework.

I personally use React because i like reducers reacting to state changes (I think finite state machines are the best thing since sliced bread), and my bosses don't like it when I create my own. Also having builtin, easy to use memoization is great (I avoid looking how it's done so I can keep the illusion that it's done extremely well and optimized).

Post reply on HN