Preferences

yuchi
Joined 1,412 karma
Venice based lead of front-end engineering and UX analysis @ SMC (https://www.smc.it)

[ my public key: https://keybase.io/yuchi; my proof: https://keybase.io/yuchi/sigs/iHLqZwLH8F262yODwR0xQa6RSxGBb4-BmsSMyUkiHY0 ]


  1. While the reasoning holds generally, that specific example is wrong. The type the author presents is not the “User Profile” but a “User Profile Load Resource” (or something in those terms).

    When you actually design interfaces you discover that there are way more states to keep in mind when implementing asynchronous loading.

    1. There’s an initial state, where fetching has not happened yet

    2. There may be initial cached (stale or not) data

    3. Once loaded the data could be revalidated / refreshed

    So the assumption that you either are loading XOR have data XOR have an error does not hold. You could have data, an error from the last revalidation, and be loading (revalidating).

  2. As good as a script element with type application/json.
  3. Just as a small note I did not get that too.
  4. The output looks terribly similar to what sci-fi movies envisioned as 3D reconstruction of scenes. It is absolutely awesome. Now, if we could project them in 3D… :)
  5. Posted it few days ago but didn’t get any traction. All Linus’ work on retro computing is fenomenal. Please have a look at its channel, a lot of awesome content there.
  6. A lot of calculations may happen on the client. And the server may be written in JavaScript.
  7. I think you got it wrong. Now is a namespace for functions that retrieve the actual values, such as Now.instant()
  8. Since the dissertation by Ken Thompson about compiler trustability was quoted today, I thought it would be a good idea to bring this short novel back from the archive. Loved it years ago and still is very enjoyable.
  9. Also have a read of this fabulous short web from 2009: https://www.teamten.com/lawrence/writings/coding-machines/
  10. “…now it can implement Doom!”
  11. And only very malformed URNs may be actually valid URLs
  12. I think a custom renderer for react would much more powerful. Currently JSX is just used as syntax sugar. Wasn’t some react ink project that more or less made this?
  13. Let’s say you have a rich text where you want to highlight all occurrences of some token or syntax. When you have tree data structures you cannot use regexps or a simple parsers, since the full text may be split in different nodes.

    With attributes strings it’s trivial, you just need to move attributes accordingly and to normalize stuff at the end.

  14. In the era of DOM documents (see notion, gitbook) I very often resort to attributed strings to do magic stuff with text parsing and manipulation. It’s such an elegant structure and I don’t understand why is so unknown.

    Incredible article btw

  15. The UI breaks pretty easily with a “zalgo” amount of diacritics.

    That said, very interesting. A cool tool to have in your belt.

  16. By definition, no. Use strict was a subset of JS.
  17. The adage is that if we didn’t die of age we would simply not cross the street, the odds may look slim in our short lifespan, but if you extend those to a thousand years getting hit becomes a facto of when, not if
  18. Per day? I intrpreted the number as 6–11 cups “in the last year”.
  19. Local DNS cache?
  20. You can see that issues’ numbers are through the roof.
  21. By definition, no. JSX is syntax sugar to some underlying function that transforms a JSX element (made by tagName, props, children) into something else. That could be a string, but usually it produces an abstract node representation, an object that collects those three parts.
  22. Even better, you can just use a single listener and on click verify the element under the cursor with document.elementFromPoint
  23. The actual size may change a lot depending on the font, but there’s a nice Unicode symbol for that:

    ——— <redacted> ———

    Update: apparently HN doesn’t like some characters…

    Anyway these are the characters: https://unicode.org/charts/nameslist/n_2700.html

    - 2700 Black Safety Scissors

    - 2701 Upper Blade Scissors

    - 2702 Black Scissors

    - 2703 Lower Blade Scissors

    - 2704 White Scissors

  24. Another interesting fact is the difference in quality of the armours exchanged. One was incredibly valuable (gold or bronze if I’m not mistaken) and the other one was relatively poor.

    Xenia was such a powerful social norm that for a warrior, in the heat of battle, is perfectly fine to temporarily be nude, exchange your finest armour for a lower grade one, and still be happy about it.

  25. The solution from literature is “use color as much as you want (within the limits of sufficient contrast for readability) but nether rely exclusively on it, always add some other visual device, such as icons or (even better) textual additions”.

This user hasn’t submitted anything.

Keyboard Shortcuts

Story Lists

j
Next story
k
Previous story
Shift+j
Last story
Shift+k
First story
o Enter
Go to story URL
c
Go to comments
u
Go to author

Navigation

Shift+t
Go to top stories
Shift+n
Go to new stories
Shift+b
Go to best stories
Shift+a
Go to Ask HN
Shift+s
Go to Show HN

Miscellaneous

?
Show this modal