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…
The Case of the 50ms request
51–60 of 88 posts
Re: The Case of the 50ms request
#52Earlier quoted context omitted.
Thats what cookies are for.
What's with all the griping going on regarding javascript? Twine is made for these "choose your own adventure" type games, and it's faster to use it than handcode everything while serializing all your app state to a cookie. What's next, a bunch of complaining that electron apps are slow? That people are writing video games in managed languages?
It's just so frustrating to watch how having loads of Javascript on websites that absolutely don't need it has been normalized. I don't think people should be blamed for using Javascript (or Electron, .NET, whatever), especially for hobby projects. But I also think users shouldn't be silent about it, especially since there are young developers who actually don't know software could be better. It's just such a massive waste of resources and breaks accesibility way to often.
Re: The Case of the 50ms request
#53I wonder how many of us are able to judge how long something should take? Not me, except anecdotally.
Re: The Case of the 50ms request
#54Earlier quoted context omitted.
> 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?
There are many documented browser-exploits and basically all newer ones that are actually a danger to users involve Javascript. It's also not reasonable to assume that people only visit trusted sites.
Re: The Case of the 50ms request
#55Pretty fun puzzle, but this kind of debugging is alien to me. Without going into too much detail, it's pretty easy to see something suspect is going on, and this hunch can be easily tested. This debugging tour takes you to strace, wireshark, all sorts of other low level debugging techniques, when really all you had to do was simulate the client with curl -d and the problem would have been pretty obvious. And in this…
That's the first thing I wanted to do after seeing the JS; since it was a simple request / response, check to see if it's a problem with the client vs the server by replacing the client with a known good piece of code. This effectively bisects the search space without first diving into low-level details.
Re: The Case of the 50ms request
#56Re: The Case of the 50ms request
#57Earlier quoted context omitted.
That's the first thing I wanted to do after seeing the JS; since it was a simple request / response, check to see if it's a problem with the client vs the server by replacing the client with a known good piece of code. This effectively bisects the search space without first diving into low-level details.
Exactly. If anyone has ever seen The Price Is Right, this is the optimal strategy for the “higher / lower” game: cut the options in half each time.
Re: The Case of the 50ms request
#58A comment from the inventor of Nagle’s algorithm: https://news.ycombinator.com/item?id=9050645 (tl;dr Try turning off delayed ACK first, especially if you can’t update the code.)
Re: The Case of the 50ms request
#59I 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…
Re: The Case of the 50ms request
#60Really nice game/tutorial. The best job interview I ever had was framed like this. The interviewer told me there was a bug in the system and had a stack of pages he'd printed out that would provide successive clues as to what caused it. I could ask them questions, in effect using the interviewer as a search engine/debugger. It was the closest an interview has ever come to simulating the day-to-day of a web developer.