Hacker Newsnew | past | comments | ask | show | jobs | submit | blainelewis1's commentslogin

I wonder if a good distinction is user initiated actions versus system initiated. If the user begins the action, the changes are immediate and buffered to the interface that appears next.

But when the system initiates it (eg. notifications, popups), then the prior interface remains active.

There's this paper studying this, and I think more work on it too.. https://dl.acm.org/doi/full/10.1145/3660338


This is not the only distinction, but it is one of them, and I think that one is a good idea. Another distinction is the results of the user initiated action, of whether the result is expected or unexpected, and that distinction is not always so clear.


Dan was my masters advisor and he’s Canadian, they used the French “spelling” because it’s a French paper.


I also really enjoyed your poems :) I aspire to have an interesting website like yours. I came back to read them again and your website was down though :(


thank you!

> I aspire to have an interesting website like yours

let me know if you need help / inspiration!

> I came back to read them again and your website was down though

sorry about that, i was moving & my server came with me :)


The ceremony is caused not by typescript but your misuse of map. You don’t need to create perserverid as an object first. Instead you could flatten fe.blocks, and then filter by b.serverId and then map to a key,value array and use Object.fromEntries to turn this into a keyed object.

Something like:

    const perServerId = Object.fromEntries(uploaderFiles.flatMap(fe => fe.blocks).filter(b => Boolean(b.serverId)).map(b => [b.serverId,b]))
And typescript infers the types correctly. But I still wouldn’t write it as one line, and I’d use lodash instead.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: