• 14 Posts
  • 158 Comments
Joined 1 year ago
cake
Cake day: June 2nd, 2024

help-circle








  • bleistift2@sopuli.xyztoProgrammer Humor@lemmy.mlTrue crime
    link
    fedilink
    English
    arrow-up
    33
    ·
    1 month ago

    The logic is fine. If you rename the variable to isAdmin, it makes perfect sense. Either they are an admin, or they are not an admin, or the state is unknown (here expressed as null). If you want to throw another JS-ism at this, undefined could be assigned before the check has been made.

    I regularly use variables like this. If users is undefined, I haven’t fetched them yet. If they’re a list, then fetching is complete. If they’re null, then there was an error while fetching.








  • Consistency in the settings, especially in localization. For instance, in my Linux Mint start menu, I have “Settings”, “System administration”, and “System settings” (subtitled “Control center”). Now where do I look for a setting? Additionally, some or all setting from the “system settings” are available as standalone apps. Why?

    In a similar vein, a run-of-the-mill distro is made up of lots of components, and it is not at all clear which is in charge of what. If I want to change hotkeys, who’s responsible for that? What do I need to google for? Drivers? Desktop environment? Some OS-specific settings app?

    In general, there is always two or more of everything. Sound? pulse or pipewire. Which is installed? Which should be installed? Search the web and find literally every answer. UI widgets? Gnome, Cinnamon, KDE. Graphics? Nvidia, Noveau, PRIME, Optimus. The question “How do I make this work” always is a “well, it depends… actually… you’ll need to try, and if it doesn work, try something else.”




  • If that’s the only error mechanism, sure. Exceptions in most languages tend to be relatively expensive, though, and most have a cheaper idiomatic way of returning error codes; you’d want to use those if they’re available, right?

    I think not being able to get the current time from the system is very exceptional. And I think exceptional circumstances should act that way and not “look like” normal executions. To me, that means letting hell break loose, and not “silently” return a 1 instead of a 0.

    By similar reasoning, “Exceptions in most languages tend to be relatively expensive” is a very weak argument. We don’t expect this error-throwing code to execute a lot.


  • there was a significant decrease in file fragmentation

    is that relevant for SSD users?

    With Linux servers continuing to have more CPU cores and more containers being loaded on each server, Huawei began noticing scalability issues within the EXT4 file-system driver code.

    Simply put, the fallocate operations per container per second are able to come up significantly

    So these improvements are for high-load scenarios, right? Casual users won’t notice any improvements? (Not to bash this contribution, just asking)