Live data from Hacker News

The Case of the 50ms request

mysteries.wizardzines.com

41–50 of 88 posts

Re: The Case of the 50ms request

#42

JavaScript is required. Please enable it to continue. No

Congratulations, you have free will. Of course so does the creator of the site, and they have chosen (a choice I would make also, FYI) to construct the game this way, so you have to part ways.

I browse with JS switched off. I don't mind a web site using JS, if it's needed. Clearly, here it is needed.

The main beef I have with this site is that when I go to it with JS switched off, all I get is a message telling me to switch it on. There's no information about why I should switch it on - what will I get in return for switching it on, and what will the site take as a result of me switching it on. What am I missing by having JS switched off.

So, instead of the site just saying "JavaScript is required. Please enable it to continue." instead it should say something like "This web page contains an interactive game that requires JavaScript to function. Please enable it to continue." Then I know that there's actually something interesting being done with the JS, and not just a lazy webmaster who can't be bothered to display a blog post correctly.

Re: The Case of the 50ms request

#43

Earlier quoted context omitted.

Congratulations, you have free will. Of course so does the creator of the site, and they have chosen (a choice I would make also, FYI) to construct the game this way, so you have to part ways.

> Of course so does the creator of the site, I find it very debatable that putting information on the internet does not come with associated mandatory responsibilities

What responsibility are you wanting the site to be held to here?

Accessibility could be a valid concern, though many accessibility tools cope with common JS patterns so if your concern really is accessibility (rather than "jcelerier is entitled to have all content without running JS") then please show what you think the problem is there.

Re: The Case of the 50ms request

#44
I got it straight away, but I have a telecoms engineering and networking background. This just goes to show how poorly networking is taught in most courses (as are databases), and specially in boot camps. Self-taught programmers are also very unlikely to be exposed to this kind of topic.

One thing that was not offered as an option was to use a packet analyzer like tcpdump or Wireshark, even though that is the most reliable and systematic way to get to the bottom of many performance problems. You'd think the popularity of the network tab in Chrome's dev tools would make this less scary.

Re: The Case of the 50ms request

#45

Earlier quoted context omitted.

Congratulations, you have free will. Of course so does the creator of the site, and they have chosen (a choice I would make also, FYI) to construct the game this way, so you have to part ways.

Why is a game "News"?

It is a new little toy that appeals to hackers. That makes it valid "hacker news" IMO.

Not earth-shattering by any account, but not everything has to be.

As a side note: the question isn't relevant to the comment you replied to, your reply would have been better posted at top level where the people seeing it is not filtered by taking out those who have decided to skip the thread about JS complaint complaints.

Re: The Case of the 50ms request

#46

Earlier quoted context omitted.

I very much understand your frustration. Hate JS web page as well, but this kinda game multipage logic type of thing SPA is better. Just wish I can only give authorization to certain JS api.

> Just wish I can only give authorization to certain JS api. This is already implemented in any browser I know, but for some reason it is available only to some functionality (microphone, camera etc.) but not for eg. Ajax, Cross-Origin Things, Websockets, Canvas2D, WebGL etc. Also before executing any Javascript browsers should ask if you want this website to execute (potentially malicious) code on your computer!

JS is pretty well sandboxed — are there any examples of websites doing anything outside of their own JS context?

Re: The Case of the 50ms request

#47
post #32
post #28

Earlier quoted context omitted.

It wouldn't have split the request over separate sends. That's what flushHeaders() is doing; it does a separate send for headers vs the body of the request. https://nodejs.org/api/http.html#http_request_flushheaders

Ok, I think that would have helped me learn that the client can some how trigger the bug but I don't think it would have allowed me to narrow it down to flushHeaders.

There is no such thing as flushing a TCP socket which is why that function jumped out at me. curl would have confirmed the server isn't misbehaving. Googling flushHeaders shows it's a node implementation specific thing and the docs explain that it has to do with the way node buffers http headers. Which makes sense because you don't want to call socket.send() for every http header you add to your request. But you also don't want to send() in between your headers and the body, because then you violate TCP package size expectations.

Re: The Case of the 50ms request

#48

All due respect, this is a neat advertisment for the "storytelling" Javascript library she is using, but I learn much more by reading W R Stevens' books. There is more to TCP/IP than what one can do through Berkeley sockets. Plus reading Stevens' books does not require Javascript.

[deleted]

Re: The Case of the 50ms request

#49
post #44

I got it straight away, but I have a telecoms engineering and networking background. This just goes to show how poorly networking is taught in most courses (as are databases), and specially in boot camps. Self-taught programmers are also very unlikely to be exposed to this kind of topic. One thing that was not offered as an option was to use a packet analyzer like tcpdump or Wireshark, even though that is the most re…

I was afraid of using tcpdump until I learned that the ip and tcp packet has a very specific structure. I had to use tcpdump+wireshark for debugging recently and it felt like having a mini-superpower.

Re: The Case of the 50ms request

#50

Earlier quoted context omitted.

Congratulations, you have free will. Of course so does the creator of the site, and they have chosen (a choice I would make also, FYI) to construct the game this way, so you have to part ways.

I browse with JS switched off. I don't mind a web site using JS, if it's needed. Clearly, here it is needed. The main beef I have with this site is that when I go to it with JS switched off, all I get is a message telling me to switch it on. There's no information about why I should switch it on - what will I get in return for switching it on, and what will the site take as a result of me switching it on. What am I m…

That is a fair point.

Also for sites where JS is not required but is used to enhance interactivity a note to say that the difference is with/without JS would be useful ("without JS this site will work, but be slower due to more round-trips to the server" or "without JS this site will be less pretty") then you can choose if you care enough about the difference.

Post reply on HN