[HN Gopher] Arranging invisible icons in quadratic time (2021)
___________________________________________________________________
Arranging invisible icons in quadratic time (2021)
Author : fanf2
Score : 55 points
Date : 2025-03-07 09:42 UTC (4 days ago)
(HTM) web link (randomascii.wordpress.com)
(TXT) w3m dump (randomascii.wordpress.com)
| Proofread0592 wrote:
| The article doesn't mention it, and a comment poses the same
| question, but does this still happen if you have "Auto arrange
| icons" and "Align icons to grid" disabled?
| munchler wrote:
| (2021)
|
| Pretty sure I've seen this on HN at least once before.
| gnabgib wrote:
| Probably this discussion in 2021? (376 points, 111 comments)
| https://news.ycombinator.com/item?id=26152335
| andrelaszlo wrote:
| A few days ago Teams got insanely slow when I was writing a
| comment on a Planner task. I ran a profiler and it seems like it
| was running some kind of sanitizer for every key press and that
| each call took over a second. They also seemed to get slower the
| more of them were queued up. Typing a sentence (blindly) would
| freeze the whole app for about five minutes before doing the
| first draw.
|
| What's up with Microsoft these days?
| lionkor wrote:
| People who only learn leetcode are designing everything, it
| seems
| kevinventullo wrote:
| I feel like this is the one type of thing grinding leetcode
| would prevent.
| codr7 wrote:
| I'd say most skills needed to create quality software have
| very little to do with algorithms.
| henry2023 wrote:
| This kind of thinking is what got us where we are.
| codr7 wrote:
| I don't agree at all and have pretty extensive experience
| from writing different kinds of software professionally
| in different companies to back that up.
|
| 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.
| kevinventullo wrote:
| I think it depends heavily on the software.
| codr7 wrote:
| Agreed, I'm talking about most of it, I realize there are
| obscure corners where it's all about algorithms.
| exe34 wrote:
| I'd place most of the blame at the feet of modern agile tbh
| (as practiced by the majority of actual software companies).
| it makes you pay the cost of agile (so much communication)
| and makes worse products than waterfall, because now nobody
| ever has the whole context when writing something. you have
| to focus on the tiny little ticket you've been given or face
| the wrath of the team and having to defend your decision to
| work on something else.
| thrance wrote:
| They have a monopoly. The quality of their products has become
| irrelevant to the short-term well-being of their stock, which
| is all that matters in our hyper-financialized economy.
| immibis wrote:
| The whole software world is writing shit software now.
| Microsoft, Google, Facebook, Amazon. Apple seems more immune
| but I don't use their products so I can't say for certain.
|
| 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.
| alpaca128 wrote:
| The industry managed to convince people that they are just
| bad at using computers, and when everything is slow and
| buggy then that's what people expect.
|
| 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.
| nextts wrote:
| They love open source so much they'll push you towards it
| Aardwolf wrote:
| > Expected behavior: Explorer should rearrange the icons so that
| the conform to the new desktop layout and it should do this in no
| more than half a second.
|
| He was talking about thousands of icons, half a second would
| still be overly excessive, that should be milliseconds at most
| dgan wrote:
| > quadratic.. are unacceptably slow for most real-world problems
|
| _Earley parser quietly smoking, and looking away_
| deredede wrote:
| In many cases Earley parsers are linear though.
| geocar wrote:
| Once upon a time someone showed me an amazing demo of streaming
| over a million rows a second into a table in HTML.
|
| 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.
| Aardwolf wrote:
| I don't know man, I really feel the difference when natively
| scrolling in a webpage that has everything rendered already, vs
| things that load and change as you scroll. I have a free-flying
| scrollwheel. Native feels much better, faster and responsive.
| geocar wrote:
| Do you play video games?
|
| 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...
| marginalia_nu wrote:
| Post goes to a really roundabout way of finding whether the
| function is quadratic.
|
| 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.
___________________________________________________________________
(page generated 2025-03-11 23:02 UTC)