• 0 Posts
  • 27 Comments
Joined 2 months ago
cake
Cake day: August 15th, 2024

help-circle
  • Happy Debian daily driver here. I would never ever recommend raw Debian to a garden variety would-be Linux convert.

    If you think something like Debian is something a Linux illiterate can just pick up and start using proficiently, you’re severely out of touch with how most computer users actually think about their machines. If you even so much as know the name of your file explorer program, you’re in a completely different league.

    Debian prides itself on being a lean, no bloat, and stable environment made only of truly free software (with the ability to opt-in to nonfree software). To people like us, that’s a clean, blank canvas on a rock-solid, reliable foundation that won’t enshittify. But to most people, it’s an austere, outdated, and unfashionable wasteland full of flaky, ugly tooling.

    Debian can be polished to any standard one likes, but you’re expected to do it yourself. Most people just aren’t in the game to play it like that. Debian saddles questions of choice almost no one is asking, or frankly, even knew was a question that was ask*-able*. Mandatory customizeability is a flaw, not a feature.

    I am absolutely team “just steer them to Mint”. All the goodness of Debian snuck into their OS like medicine in a kid’s dessert, wrapped up in something they might actually find palatable. Debian itself can be saved for when, or shall I say if, the user eventually goes poking under the hood to discover how the machine actually ticks.


  • Everything works the same, times of website incompatibility are long gone.

    Not completely true. It’s mostly true. I’ve daily driven Firefox for years, and the number of websites I’ve crossed that wouldn’t function in it correctly but would work just fine in Chrome was very slim… but not zero. Definitely not comparable to the complete shitshow of the 90’s and 00’s. That’s true. But it’s not a completely solved problem.

    And with Mozilla’s leadership practically looking for footguns to play with combined with the threat of Google’s sugar daddy checks drying up soon due to the antitrust suit (how utterly ironic that busting up the monopoly would actually harm the only competition…), that gap can get much worse in very little time if resources to keep full time devs paid disappear.


  • I recently had a rather baffling experience trying to preemptively avoid this by downloading the stupid app right away, only to discover I needed the website version anyway.

    I was attempting to add my Known Traveler Number to an already booked trip with Southwest Airlines, booked by someone else. I was able to link the trip to my account right away in the app, no issue. And I could see the KTN field for my ticket sitting there, empty, greyed-out, and not interactible. I opened up the moble version of their website, completely unsurprised to find it was identical to the app, except for the detail that the KTN field there was functional. Put in the information, changes reflected in the app instantly, and I was in the TAS-pre line that afternoon.

    Why did the two versions obviously built from the same codebase have two different sets of capabilities? Why was the website the more capable of the two this time? I have no clue. All I know is I never want to be a developer at a corporation where I’d have to be responsible for this flavor of trash.



  • pixelscript@lemm.eetoProgrammer Humor@lemmy.mlComenting code
    link
    fedilink
    English
    arrow-up
    21
    ·
    edit-2
    12 days ago

    I recognize three kinds of comments that have different purposes.

    The first kind are doc block comments. These are the ones that appear above functions, classes, class properties, methods. They usually have a distinct syntax with tags, like:

    /*
     * A one-line description of this function's job.
     *
     * Extra details that get more specific about how to use this function correctly, if needed.
     *
     * @param {Type} param1
     * @param {Type} param2
     * returns {Type}
     */
    function aFunctionThatDoesAThing(param1, param2) {
        // ...
    }
    

    The primary thing this is used for is automatic documentation generators. You run a program that scans your codebase, looks for these special comments, and automatically builds a set of documentation that you could, say, publish directly to a website. IDEs can also use them for tooltip popups. Generally, you want to write these like the reader won’t have the actual code to read. Because they might not!

    The second kind is standalone comments. They take up one or more lines all to themselves. I look at these like warning signs. When there’s something about the upcoming chunk of code that doesn’t tell the whole story obviously by itself. Perhaps something like:

    /* The following code is written in a weird way on purpose.
    I tried doing <obvious way>, but it causes a weird bug.
    Please do not refactor it, it will break. */
    

    Sometimes it’s tempting to use a standalone comment to explain what dense, hard-to-read code is doing. But ideally, you’d want to shunt it off to a function named what it does instead, with a descriptive doc comment if you can’t cram it all into a short name. Alternatively, rewrite the code to be less confusing. If you literally need the chunk of code to be in its confusing form, because a less confusing way doesn’t exist or doesn’t work, then this kind of comment explaining why is warranted.

    The last kind are inline comments. More or less the same use case as above, the only difference being they appear on the same line as code, usually at the very end of the line:

    dozen = 12 + 1; // one extra for the baker!
    

    In my opinion, these comments have the least reason to exist. Needing one tends to be a signal of a code smell, where the real answer is just rewriting the code to be clearer. They’re also a bit harder to spot, being shoved at the ends of lines. Especially true if you don’t enforce maximum line length rules in your codebase. But that’s mostly personal preference.

    There’s technically a fourth kind of comment: commented-out code. Where you select a chunk of code and convert it to a comment to “soft-delete” it, just in case you may want it later. I highly recommend against this. This is what version control software like Git is for. If you need it again, just roll back to it. Don’t leave it to rot in your codebase taking up space in your editor and being an eyesore.







  • Fellow tattooless here. Uh, neither?

    I simply don’t see the appeal of putting on something I can’t easily take off if I wanted to, for its own sake. Yeah, tattoos aren’t permanent, a removal process exists. But they cost money and require an appointment to be rid of, on top of the investment of time, money, and pain to buy in. The barrier to entry and the barrier to exit are both too high for my liking.

    Ideally you get a tattoo and enjoy it for life. I can’t commit to that kind of decision. Not for a funny body picture. If I need a memento to cherish memory of a thing or event I’ll get a tchotchke or something.

    I have no complaints about others’ tattoos. They’re more often than not incredible works of art.


  • There are exactly three kinds of manpages:

    1. Way too detailed
    2. Not nearly detailed enough
    3. There is no manpage

    I will take 1 any day over 2 or 3. Sometimes I even need 1, so I’m grateful for them.

    But holy goddamn is it awful when I just want to use a command for aguably its most common use case and the flag or option for that is lost in a crowd of 30 other switches or buried under some modal subcommand. grep helps if you already know the switch, which isn’t always.

    You could argue commands like this don’t have “arguably most common usecases”, so manpages should be completely neutral on singling out examples. But I think the existence of tl;dr is the counterargument.

    Tangent complaint: I thought the Unix philosophy was “do one thing, and do it well”? Why then do so many of these shell commands have a billion options? Mostly /s but sometimes it’s flustering.





  • Either:

    • continuing to languish in obscurity with its rough-around-the-edges UX that fails to draw in anyone except self-sufficient computer savvy types who smugly proclaim they like it that way while impatiently tapping their feet and glancing at their wristwatches waiting for mainstream socials to collapse already, or
    • wildly thriving, but dominated by an oligopoly of major breakout platforms that dominate the rest of the ecosystem, subtly altering it over the course of many small, tolerable nudges to the point that it hardly resemble what anyone who is currently here liked about it in the first place.

    My money is on the former.


  • I would say the defining characteristic that sets Breath of the Wild apart from its contemporaries is its “chemistry engine”, as they call it. That meticulously programmed system of interactions where absolutely everything in the world affects everything else in ways that are intuitive. Wooden objects burn, lightning strikes metal things, fire will melt ice, electrified objects will conduct through metal and water, etc. That, in tandem with its cel-shaded artstyle, minimalist piano flourish soundtrack, and general lonely, somber vibe in a mechanically lush but socially empty world. That’s the identity of BotW.

    I haven’t played Genshin Impact so I don’t know how deep the similarities are. It sure superficially resembles BotW if you squint and look at it from a distance. Big open world, vibrant cel-shaded graphics, live in-overworld combat, you can climb walls and soar with glider physics, they got the high fantasy plus inexplicably advanced magitech thing going on… definitely some marks on the bingo card, but not really things particularly unique to BotW, either. I have no idea how much Genshin Impact actually resembles BotW up close.


  • The other day I learned that you can just grep an unmounted filesystem device. It will read the entire disk sequentially like it’s one huuuuge file. And it will reveal everything on that disk… whether a file inode points to it or not.

    Used it to recover data from a file I accidentally clobbered with an errant mv command. It’s not reliable, but when you delete a file, it’s usually not truly gone yet… With a little luck, as long as you know a unique snippet that was in it, you can find it again before the space gets something else written there. Don’t even need special recovery tools to do it, just use dd in a for loop to read the disc in chunks that fit in RAM, and grep -a for your data.