• 0 Posts
  • 49 Comments
Joined 1 year ago
cake
Cake day: June 12th, 2023

help-circle


  • 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.










  • Several years ago now. On at least two of those tries, after maybe a month or some of daily driving, suddenly the fs goes totally unresponsive and because it’s the entire system, could only reboot. FS is corrupted and won’t recover. There is no fsck. There is no recovery. Total data loss.

    Could you narrow it down to just how long ago? BTRFS took a very long time to stabilise, so that could possibly make a difference here. Also, do you remember if you were using any special features, especially RAID, and if RAID, which level?


  • Out of interest, since I’ve not used the “recommended partion setup” for any install for a while now, is ext4 still the default on most distros?

    I recently installed Nobara Linux on an additional drive, because after 20 years, I wanted to give Linux gaming another shot (works a lot better than I had hopes for, btw), and it defaulted to btrfs. I’ll assume so does Fedora, because I cannot imagine Nobara changed that part over the Fedora base for gaming purposes.




  • Pro tier is for Enterprise customers who need extra-long term support and are willing to pay for it. Canonical is meeting a market demand so they can remain competitive for use in those environments, which is good for everyone. It’s benign

    Then please show me the button (and I mean button, not command-line exclusive settings or config file entries in /etc, and certainly not unofficial trickery like third party repositories that replace Ubuntu advantage packages with an empty decoy) that says “Thank you, I don’t need Ubuntu Pro, please stop nagging me about it”.


  • waigl@lemmy.worldtoLinux@lemmy.mlSwitched from Ubuntu to Debian yesterday
    link
    fedilink
    English
    arrow-up
    4
    arrow-down
    1
    ·
    5 months ago

    Depends a lot on what kind of user. I specified “non-technical” with a reason. I have, in the past, recommended Ubuntu to a small number of friends and family members. These are people who aren’t particularly comfortable using computers in the best of times. They very much don’t need the newest, best and most shiny versions of everything. They need to do billing, taxes, correspondance, email and various other tasks related to their small business, they need that to work reliably, and if at all possible, to work exactly the same way as it did the last five years. And if there is any pop-up they don’t immediately understand (for example because it’s in English instead of their native language, yes that still happens in Ubuntu quite a bit), they will call me on the phone.

    I don’t know if you’ve ever had to support non-technical end-users, but for some of them, even something as seemingly trivial as a menubar that has moved from the top to the side can be issue that needs explaining and training. For that kind of user, I really do want to postpone all updates beyond pure bug and security fixes for as long as reasonably possible. Five years sounds reasonable. Six months does not.