Arranging invisible icons in quadratic time (2021)
randomascii.wordpress.com
randomascii.wordpress.com
What's up with Microsoft these days?
Most software out there has very little to do with algorithms, and the problems with it couldn't be solved algorithmically.
Cutting corners for profits is the big issue.
The problem at hand is a terrible algorithm, but you are going for the root problem of corner cutting everywhere thats leads to bad devs writing things hastily without thinking about the algorithms they write.
Despite arguably not having a monopoly, the competition is still just as bad so they get away with it. The entire society has forgotten how to make good software.
And Apple is not immune but my impression is that they have more issues with intermittent bugs & annoyances and less with performance or overall stability.
I told him that was cool. I asked him where the screen was that could draw a million rows, and after my confusion was sorted it turned out there wasn't one and I probably should have guessed as much. The screen was a regular screen and could only display 60 or so rows legibly and that is life, so the other million (minus 60) were streaming "invisibly" into the bitbucket that was maybe the user will scroll this into view within the next second before the data is going to change again, but almost certainly won't, because well, a million a second is actually quite a lot.
So I thought for a minute and asked him why he didn't just send 60 and he quickly said well that wouldn't be as fast.
And I still think about that.
They've got a good trick: Send the velocity of the scrollwheel instead of what the client thinks its y-position is. Fast mice can give this to you at 100hz, but most USB mice are delivering data much slower. Remember the server knows what time it is and what the RTT is so it can compute the correct row number and send frames at frequency.
You can also send a little bit more than 60 lines to help hide the latency at the start of scroll, and if you need more you're probably scrolling so fast you wouldn't notice some deliberate motion blur.
I guarantee if the server can send a million rows a second, it can definitely receive one sample and send 100 rows 100 times a second no problem, and you know what? You can also scale that down under less-than-ideal network conditions trivially helping those users who would absolutely prefer to get the result on the screen faster once they've stopped scrolling than to be waiting for TCP buffers to uncork.
Like I said, I still think about this...
He was talking about thousands of icons, half a second would still be overly excessive, that should be milliseconds at most
The civilized way of finding whether an unknown function is quadratic is to do a log-log plot; first verifying that it's a straight line, and then finding the slope of the line. If it's not a straight line, it's not of the form f(x) = x^n.
This works as as log(x^n) = n log x
If we also plot the x-axis with a logarithm, any polynomial will just be a straight line with the slope of n.
Pretty sure I've seen this on HN at least once before.
Earley parser quietly smoking, and looking away