News for hackers. Stuff that matters.
Re:Let me introduce: __slots__ by insertnickname on Wednesday September 13, 2017 @03:07PM (#15241539)
Please excuse this off-topic comment, but the webpage is severely dysfunctional. Unless JavaScript is enabled in the browser, the page will just display a loading screen. All the content is right there in the HTML and it would be perfectly readable if it wasn't deliberately obscured by the "loading" screen.[1] I'm sure the idea is that the page will load perfectly all at once, there won't be flashes of unstyled text and so on, but for me it just means that the real content won't load at all. Curiously, mobile users (or other users with small screens) are spared the loading page.[2] That's nice for mobile users, I guess, but as a desktop user it's just salt in the wound. If the plain page is good enough for mobile users, why isn't it good enough for me?

Please, web developers, stop doing this. It's not just the minority of people who browse with JavaScript disabled who are bothered by this, think of all the people on slow Internet connections who have to wait for your megabyte+ JavaScript program to download and execute before they can read the content of the 50 KB HTML page.

I understand that it is not feasible to accommodate no-JS browsers for Single Page Applications because JavaScript is essential to their functionality, but this page is not an application and JS is obviously not essential to it. Use JavaScript to enhance webpages, not degrade them.

- [1] Yes, Reader View in Firefox (and similar) are able to render the page properly. It's a wonderful utility, but I shouldn't have to strip away your broken web design to read your content.

- [2] https://streamable.com/b390d (no JS mirror: https://cgt.name/files/fortheloveofgod.ogv)

Re:Let me introduce: __slots__ by smrq on Wednesday September 13, 2017 @04:15PM (#15242164)
I feel like every page posted to HN that has any JavaScript gets this comment. It's usually an overreaction in my opinion.

For this page, it wasn't. Holy moly, it took a rather generous amount of time until it loaded the loading spinner, followed by enough loading time that I would have closed the tab if not for my curiosity on how long it was going to take in the end. And all that for a brief article with mild syntax highlighting.

Re:Let me introduce: __slots__ by Spivak on Wednesday September 13, 2017 @07:37PM (#15243759)
> HN that has any JavaScript

It's really only pages that use JS to create a user experience that's worse than not having it at all.

Re:Let me introduce: __slots__ by feelin_googley on Wednesday September 13, 2017 @11:15PM (#15244744)
"Use Javascript to enhance webpages, not degrade them."

That sounds like something the user could do, client-side.

Why do users have to blindly accept and execute Javascript payloads from every website?

What if the website said, "Hey I have some cool Javascript that can really enhance the content of this website. Do you want to download it to memory and run it on your computer, in your browser?"

The user might respond, "Sure, run it!" or "No thanks, I have some Javascript I wrote myself to enhance website content and would prefer to use that instead. Just give me the content."

I recall in the 1990's browser pop-ups where users were asked if they wanted to (download and) run Java applets. I believe there are still some websites out there that use Java applets. Not sure how browsers deal with this today.

Doubtful that web developers will listen to your plea although it is admirable. What they care about directly is browsers. The way to send them a message as a user is in the choice of what browser you use, what shows up in their logs.

Using a browser that enables all Javascript by default signifies your agreement with what they are doing today. Using a browser that does not read Javascript sends a message that you can do without it.

If the logs started showing a majority of user agents were browsers that do not read Javascript how would web developers respond?

User Agent header is still surprisingly influential.

Re:Let me introduce: __slots__ by warent on Wednesday September 13, 2017 @11:18PM (#15244758)
I think what you're describing is basically just RSS feeds, no?
Re:Let me introduce: __slots__ by mplewis on Wednesday September 13, 2017 @04:42PM (#15242421)
Just profiled the page via Chrome's "Fast 3G" network preset. I saw 3.5 MB download over 21 seconds before the spinner disappeared. The DOM content was ready at 7.8 seconds – still far too long.
Re:Let me introduce: __slots__ by ColinCochrane on Wednesday September 13, 2017 @06:02PM (#15243147)
I ran a performance audit from the Chrome dev tools:

  First meaningful paint: 8,820 ms
  First Interactive : 11,420 ms
Those are brutal numbers for just about anything, let alone a simple blog post.
Re:Let me introduce: __slots__ by yoodenvranx on Wednesday September 13, 2017 @06:21PM (#15243281)
Info like this should be automatically added as a flair right next to each submission on HN. Time to first interactive, download sizes, number of ads, ...

This would actually be a nice side project. Throw each link which was submitted to HN at a headless Chrome/Firefox, do performance/ads/size analysis, save everything to a database and then make it available to the HN user through a browser plugin which adds this info next to each submission. And then you can even display badges of shame for the worst offender or block links and other stuff. Any takers?

Re:Let me introduce: __slots__ by jl6 on Wednesday September 13, 2017 @07:59PM (#15243868)
This is why I always go to the comments on HN first. I can usually rely on the top comment to do one or all of the following:

* neutralize clickbait * provide an instant endorsement (worth reading) or rebuttal (not) * warn of slow/heavy/ad-ridden user experience

Re:Let me introduce: __slots__ by graysonk on Thursday September 14, 2017 @09:00AM (#15247481)
Wow it got a 15/100 Pagespeed score on Mobile https://developers.google.com/speed/pagespeed/insights/?url=...
Re:Let me introduce: __slots__ by drivingmenuts on Wednesday September 13, 2017 @03:32PM (#15241765)
What's amusing, and by amusing, I mean not amusing at all, is that there isn't any heavy content in the page - it's all text until you get to the comments, which aren't going to be seen until you get to the end of the article.

When all you have is a hammer and so on and so forth ...

Re:Let me introduce: __slots__ by Karunamon on Wednesday September 13, 2017 @06:24PM (#15243300)
Ye gods! uBlock Origin had a whopping 29 items blocked here here. I know mainstream corporate news sites with less garbage in them!
Re:Let me introduce: __slots__ by aaronbrethorst on Wednesday September 13, 2017 @03:13PM (#15241590)
I felt the same way. I was expecting an article about Python, not a loading indicator on my broadband connection.
Re:Let me introduce: __slots__ by zeveb on Wednesday September 13, 2017 @05:05PM (#15242680)
I have flagged the submission for exactly this reason: the page is not fit for purpose, and indeed appears to maliciously require code execution in order to display some text. Even after I allow one bit of JavaScript, I can briefly see the text and then … back to the loading animation.
Re:Let me introduce: __slots__ by make3 on Wednesday September 13, 2017 @03:50PM (#15241948)
let's be honest here, no company is going to make change for the 0.001% who happen to disable javascript
Re:Let me introduce: __slots__ by insertnickname on Wednesday September 13, 2017 @04:03PM (#15242063)
As I said, this isn't just a problem for no-JS browsers, it's also a problem for people with slow Internet connections. They might be able to load the HTML and CSS reasonably fast, but then they'll have to sit around waiting while megabytes of JS is downloaded and then executed before they can finally read the article.

I'm not asking developers to do extra work to accommodate no-JS browsers, I'm asking them to not do extra work to deliberately prevent sites from working without JS. The page would have worked perfectly if the author had not done extra work to add a useless loading screen. I'm asking developers to do less work, not more.

Re:Let me introduce: __slots__ by camus2 on Wednesday September 13, 2017 @04:06PM (#15242085)
No reason to generate that page using Javascript, it's just a blog post. It took 10 seconds to load on my computer by the way, when loading should be almost immediate considering the little amount of text on that page.

If you are going to show me a pre-loader at least inform me about what is about to be loaded. 1 second more of wait and i would have left that page.

Re:Let me introduce: __slots__ by jedberg on Wednesday September 13, 2017 @05:56PM (#15243098)
I have javascript on and gigabit internet. It still took over 10 seconds for this page to show me readable content.

This doesn't just apply to the people with JS off.

Re:Let me introduce: __slots__ by slowmovintarget on Wednesday September 13, 2017 @10:22PM (#15244562)
It was even sillier for me... I have broadband. The content loaded just fine and I started reading it and the loading screen came up over it and blocked it. Stupid-ware.

uBlock Origin: right-click > block element... gone.

Re:Let me introduce: __slots__ by mustacheemperor on Wednesday September 13, 2017 @04:06PM (#15242093)
>It's not just the minority of people who browse with JavaScript disabled who are bothered by this, think of all the people on slow Internet connections who have to wait for your megabyte+ JavaScript program to download and execute

For example, what about the growing population of users in the developing world for whom "slow" internet is the norm?

Re:Let me introduce: __slots__ by Ralfp on Wednesday September 13, 2017 @06:22PM (#15243291)
I've seen this point being brought up a lot, but I'm wondering how many of those people that actually lack good internet connection and live in developing world may be your target anyway?
Re:Let me introduce: __slots__ by spc476 on Wednesday September 13, 2017 @09:39PM (#15244363)
I'm currently in South Florida, that just had Hurricane Irma blow through. I have no power (but I do have a generator [1]) and the DSL is down (no dial tone on the landline). I'm currently using my cellphone as a hotspot and an iPad as a laptop. I don't have a large data plan because, frankly, I don't use my cellphone as a hotspot all that often.

But when I do, I am painfully aware of just how much crap is included on every page. Oh, Verizon makes me painfully aware. Yes, I could get the "unlimited" dataplan, but I don't use the dataplan to make it cost effective for me (the last time a hurriane knocked the power out for me was back in 2005).

And I have it good! A few of my fellow cow-orkers have even worse cell coverage than I do.

[1] Keeping the refridgerator, freezer, a couple of lamps, a few fans, and iPhone/iPad chargers going.

Re:Let me introduce: __slots__ by roywiggins on Wednesday September 13, 2017 @10:39PM (#15244618)
For bandwidth emergencies I use Opera Mini, which can run everything through a compressing proxy before you get it- lossily compressing images (or even stripping them out) and reducing my bandwidth due to casual web browsing by about an order of magnitude. It works wonders on pages that are mostly text.

You do have to not mind routing all your traffic through Opera's servers, though.

Re:Let me introduce: __slots__ by Ralfp on Thursday September 14, 2017 @04:22AM (#15245921)
I understand, but your situation is state emergency in which the very infrastructure is damaged, and not "the default" - you'll priorities will likely be different than ones people I'm targeting have and focused on recovering access to electricity/clean water, etc. ect. This will likely differ from people in so called rising markets too.
Re:Let me introduce: __slots__ by snakeanus on Wednesday September 13, 2017 @04:00PM (#15242025)
I would assume that more than 0.001% of the people use the Tor browser.
Re:Let me introduce: __slots__ by infinite8s on Wednesday September 13, 2017 @04:04PM (#15242069)
The number of people using Tor is probably less then the number if people who disable JavaScript.
Re:Let me introduce: __slots__ by joshuamorton on Wednesday September 13, 2017 @04:48PM (#15242489)
If you count bridges, then .001% is pretty close (not more than .005%). Apparently about 1/3 of people on earth have a mobile broadband connection, so approximately 2 billion of those, and ~60K tor bridge connections.