• 0 Posts
  • 46 Comments
Joined 1 year ago
cake
Cake day: July 1st, 2023

help-circle


  • Your dad is right. On desktop, navigation is on the left. On tablet, you shrink it to a rail. On mobile it should be a dismissible nav drawer.

    The top menus, especially the flyover(on mouse hover), are bad for accessibility because they convert a non-committal action (hover) to a context changing one (focus). It’s a uniquely web-only invention and thankfully falling out of usage. (Unless you mean menubar/toolbar. Those are fine but extremely rare on Web.)


  • Yeah, that’s a big simplification and I get it. But the async syntax itself syntax “sugar” for Promises. It’s not like C# or Java/Android where it will spawn a thread. If you take a JSON of 1000 rows and attach a promise/await to each of them, you won’t hit the next event loop until they all run to completion.

    It’s a common misconception that asynchronous means “run in background”. It doesn’t. It means run at end of current call stack.

    Prior to that, the browser had window.setTimeout and its callback for delays and animation and such - but that’s it.

    And you STILL have to call setTimeout in your async executions or else you will stall your UI.

    Again async is NOT background. It’s run later. async wraps Promise which wraps queueMicrotask.

    Here is a stack overflow that explains it more in detail.




  • ShortFuse@lemmy.worldtoProgrammer Humor@lemmy.mlSTOP DOING ASYNC
    link
    fedilink
    arrow-up
    4
    arrow-down
    1
    ·
    5 months ago

    Async prevents locking a thread during this wait.

    That’s a very common misconception. async is just a scheduling tool that runs at the end of event loop (microtask queue). It still runs on the main thread and you can still lock up your UI. You’d need Web Workers for actual multi-threading.


  • async/await is just callback() and queueMicrotask wrapped up into a neat package. It’s not supposed to replace multi-threading and confusing it for such is dangerous since you can still stall your main/UI thread with Promises (which async also wraps).

    (async and await are also technically different things, but for the sake of simplicity here, consider them a pair.)



  • Years (decades) ago it wasn’t uncommon to create self-signed/local CAs for active directory, but it’s really uncommon today since everything is internet facing and we have things like Let’s Encrypt.

    It’s so old, the “What’s New” article from Microsoft references Windows Server 2012 which is around when I stopped working on Windows Server. I kinda remember it, and you needing to add the server’s cert to your trusted roots. (I don’t know about Linux, but the concept is the same, I’m sure. I never tried generating certificates, but know all the other client -side stuff. Basically you need a way to fulfill CSRs.)

    https://learn.microsoft.com/en-us/windows-server/identity/ad-cs/

    What you’d want to do it in Windows is all there, and Microsoft made that pretty easy back then to integrate with all their platforms and services, but I’d caution, do you really want to implement 10+ year old tech?







  • I don’t understand the article. They either aren’t clearly explaining the issue or just heavily misinformed.

    I have Google One and PIA. Both do the same thing, which is add a key to the top right of the screen. To me, that’s like a persistent notification.

    PIA has never needed to use the actual persistent notification API. There’s no reason to. Persistent notification is for application that don’t want their UI Window to terminate when Android gets memory pressured, or when wanting to use a local service (eg: Location or Orientation) when not the main foreground application. I can kill the PIA Window (swipe up from recent apps) and the VPN is still running.

    If Google One were able to activate VPN without changing my status bar, that’s a different story, and that’s not the case.

    Edit: DNS66 as well


  • That’s a strawman. I don’t need 1000s of lines of JS to swap a UI. I can do it in 1 line with Web Components: oldElement.replaceWith(newElement). And those modules can be lazy loaded like anything else.

    This is just DX in name of UX, which is almost never a good idea.

    And maybe you’re fine with throwing a server computation for every single UI change, but I’m not made of money and I much rather have stuff on a CDN.




  • I just recently worked on fixed point 8.8 and basically the way fractional values work, you take an integer and say that integer is then divided by another one. So you represent the number in question with two numbers not one. 0.3 can be presented in a number of ways, like 30 % 10, or 6 % 20.

    The problem is the way 0.1 is represented and 0.2 represented don’t jive when you add them, so the compiler makes a fractional representation of 0.3 based on how 0.1 and 0.2 were expressed that just comes out weird.

    That’s also why 0.3 + 0.3 is fine. When you wrote 0.3, the compiler/runtime already knew how to express 0.3 without rounding errors.