• 0 Posts
  • 21 Comments
Joined 2 years ago
cake
Cake day: June 12th, 2023

help-circle


  • IMHO, it was a mistake to make USB block storage use the same line of names also used for local hard disks. Sure, the block device drivers for USB mass storage internally hook into the SCSI subsystem to provide block level access, and that’s why the drives are called sd[something], but why should I as an end user have to care about that? A USB drive is very much not the same thing for me as a SCSI harddisk. A NVMe drive on the other hand, kinda sorta is, at least from a practical purpose point of view, yet NVMe drives get a completely different naming scheme.

    That aside, suggest you use lsblk before dd.


  • The last Windows I installed was Windows 10. I was trying to install onto a SATA SSD, while keeping my pre-existing Linux installation on the M.2 SSD intact. This took me an unreasonably long time and lots of failed attempts, and in the end, the only way I could find to make it work was to first physically remove the M.2, then install Windows, then add the M.2 back again. Which sucked a lot, because M.2s are really not optimized for easy or frequent installation and deinstallation.









  • waigl@lemmy.worldtoProgrammer Humor@programming.devUniversity Students
    link
    fedilink
    English
    arrow-up
    73
    ·
    edit-2
    8 months ago

    Writing good comments is an art form, and beginner programmers often struggle with it. They know comments mostly from their text books, where the comments explain what is happening to someone who doesn’t yet know programming, and nobody has told them yet that that is not at all a useful commenting style outside of education. So that’s how they use them. It usually ends up making the code harder to read, not easier.

    Later on, programmers will need to learn a few rules about comments, like:

    • Assume that whoever reads your code knows the programming language, the platform and the problem domain at least in general terms. You are not writing a teaching aid, you are writing presumably useful software.
    • Don’t comment the obvious. (Aside from documentation comments for function/method/class signatures)
    • Don’t comment what a line is doing. Instead, write your code, especially names for variables, constants, classes, functions, methods and so on, so that they produce talking code that needs no comments. Reserve the “what” style comments for where that just isn’t possible.
    • Do comment the why. Tell the reader about your intentions and about big-picture issues. If an if-statement is hard to parse, write a corresponding if clause in plain English on top of it.
    • In some cases, comment the “why not”, to keep maintenance programmers from falling in the same trap you already found.



  • waigl@lemmy.worldtoTechnology@lemmy.world*Permanently Deleted*
    link
    fedilink
    English
    arrow-up
    335
    arrow-down
    1
    ·
    11 months ago

    About 20 years ago, Microsoft was found guilty and convicted, because they forced their browser on their users, driving out competitors by abusing their de facto monopoly on PC operating systems. These days, they are doing the exact same thing again, just on an even broader base. I don’t even understand how this verdict took so long.





  • Dunno about ideal, but it should work.

    It does have quite a bit of overhead, meaning it’s not the fastest out there, but as long as it’s fast enough to serve the media you need, that shouldn’t matter.

    Also, you need to either mount it manually on the command line whenever you need it or be comfortable with leaving your SSH private key in your media server unencrypted. Since you are already concerned with needing to encrypt file share access even in the local network, the latter might not be a good option to you.

    The good part about it is, as long as you can ssh from your media server to your NAS, this should just work with no additional setup needed.