Mine is that the useState hook is an actual plague on the entire React ecosystem. Regardless of your opinions of React, if you wanna use something then use it right.

  • mlg@lemmy.world
    link
    fedilink
    English
    arrow-up
    28
    ·
    15 days ago

    The entire modern web tech stack should be thrown in a dumpster, ignited with gasoline, and blown up with a nuke for good measure.

  • JackbyDev@programming.dev
    link
    fedilink
    English
    arrow-up
    19
    ·
    14 days ago

    I’ve talked about it before, but I really hate PDFs. Specifically the things PDFs are used for. If you aren’t planning to print something and will only ever look at it on a screen, HTML is better. It’s so frustrating when you’re going to a website, you know, a thing that serves content in HTML, and then some piece of information is in a PDF.

    • thevoidzero@lemmy.world
      link
      fedilink
      arrow-up
      2
      ·
      14 days ago

      If you’re sharing graphical elements then I prefer pdfs when you know it’s final, and you want to make sure people see it how you intended, and you want it to be vector format. Similar thing if the information is some complex format/layout. People can zoom in instead of having their device messing it up.

      But I agree on simple contents like documents, tables, and such

      • iglou@programming.dev
        link
        fedilink
        arrow-up
        2
        ·
        14 days ago

        A PDF file being “final”, displaying the same everywhere, and being reliable is a myth.

        I have never worked with a messier file format, and I have seen many PDFs displaying in as many ways as I have applications able to view PDFs.

  • Chloé 🥕@lemmy.blahaj.zone
    link
    fedilink
    English
    arrow-up
    15
    arrow-down
    1
    ·
    16 days ago

    if you’re making a user-facing program, you should always design with the possibility that it will be run on some truly dogshit hardware and you should make sure that they still have a good experience. good computer hardware is a luxury on the world scale, even before the rampocalypse

    related, but the answer to the question “who still uses {x} these days?” is almost always way, wayyyy more people than you think

  • Wirlocke@lemmy.blahaj.zone
    link
    fedilink
    arrow-up
    13
    ·
    14 days ago

    If you don’t prematurely optimize your code you’ll never optimize your code.

    I know people are advised against premature optimization because it risks you wasting time on something that ends up unused.

    But let’s be honest, once you get something into a working state will you ever be afforded the time to go back to it? Even if you are, are you really gonna choose to uproot code and do a refactor on it and potentially everything relying on it?

    Rather than waiting until your hacks and workarounds run out and you absolutely have to do a refactor, I would prefer spending more time upfront to make sure it is efficient and flexible before moving on.

    • gastroglizzy@piefed.social
      link
      fedilink
      English
      arrow-up
      2
      ·
      16 days ago

      I don’t like working with them any more than you do, but they’re necessary to enforce read/write-level security. Without them, there’d be no differentiation between reading a variable and writing variable from an external class, which kinda defeats the point.

      From a development standpoint, they’re an extra hurdle to clear. From a security standpoint, they’re a necessary evil.

      • Ephera@lemmy.ml
        link
        fedilink
        arrow-up
        4
        ·
        16 days ago

        Moreso correctness, not security. In the end, your user is shooting themselves in their foot, if they mutate a variable that they shouldn’t, and by making the variable private and only offering a getter, we document that.

        Having said that, there’s also big differences between languages and paradigms, though.
        In object-oriented / garbage-collected languages, you often pass around references to an object into so many places that you need to code defensively versus your own codebase. That’s why getters/setters were taught religiously during the height of OOP.

        In other paradigms, you often just have one place that uses an object and then you can …simply not shoot yourself in the foot there. When you control both the definition and the access, you don’t need to protect yourself from yourself. In particular, you would probably think twice before mutating an object anyways.

        • klankin@piefed.ca
          link
          fedilink
          English
          arrow-up
          0
          ·
          16 days ago

          Damn, I was gonna disagree but you bring up some good points.

          I really need to get into functional programming.

          • Ephera@lemmy.ml
            link
            fedilink
            arrow-up
            1
            ·
            15 days ago

            Functional programming is definitely worth a look in this regard as well, but what really drove this home for me is Rust.

            Its ownership+borrowing concept is exactly that, it enforces that you’ve got one place where an object is managed and in particular mutating can only be done in at most one place.
            Obviously, there’s also ways to get out of that, in case you do want some memory managed centrally, but it just isn’t the default.

    • UnfortunateShort@lemmy.world
      link
      fedilink
      English
      arrow-up
      1
      ·
      16 days ago

      That’s why people invented properties / auto generated getter/setter - in at least 95% of cases they are just busywork.

  • philipp_@discuss.tchncs.de
    link
    fedilink
    arrow-up
    11
    arrow-down
    1
    ·
    15 days ago

    systemd does a lot of things very right and a mayor reason that linux is in a way better place than 15 years ago. 27 unmaintained tools are not better than one that is professionally developed.

    • Allero@lemmy.today
      link
      fedilink
      arrow-up
      4
      ·
      15 days ago

      systemd has me in two places. Like, on one side, it’s just SO much better and easier than the rest - at least to me, someone who doesn’t work in IT and just wants his stuff to work. On the other, init freedom is essential, and we need the alternatives to stay alive.

      • Excel@lemming.megumin.org
        link
        fedilink
        English
        arrow-up
        2
        ·
        15 days ago

        APIs generally don’t need many alternatives, only implementations do. There’s no reason devs should be trying to provide init files in multiple formats. If the systemd team actually did something bad, then people could just make a different implementation of systemd without requiring a different format for init files. Arguing for more init systems is like saying we need more APIs to compete with both Wayland and X11, instead of just talking about implementations of those protocols.

    • marcos@lemmy.world
      link
      fedilink
      arrow-up
      4
      ·
      15 days ago

      Systemd solves a very important problem that was defined extremely well.

      It also solves it badly, and solved a whole lot of other badly defined problems that it shouldn’t.

      • kalpol@lemmy.ca
        link
        fedilink
        arrow-up
        2
        ·
        15 days ago

        This is my argument. Do init. Don’t pull in literally everything else because you think you know better, like system logging.

        • philipp_@discuss.tchncs.de
          link
          fedilink
          arrow-up
          3
          ·
          15 days ago

          Init needs to do system logging when you want to collect it from the daemons stdout, which is the logical place to collect it from. Havin apps handle their own log files is a bad time at best and dangerous at worst.

          • kalpol@lemmy.ca
            link
            fedilink
            arrow-up
            2
            ·
            15 days ago

            You are correct ,but again you can just send it to syslog. Just one example of the overwhelming scope creep of systemd.

    • sudoer777@lemmy.ml
      link
      fedilink
      English
      arrow-up
      1
      ·
      15 days ago

      Recently I’ve been doing scripts on top of systemd to do hacky things with my system and so far I really like it

  • SethranKada@lemmy.ca
    link
    fedilink
    English
    arrow-up
    13
    arrow-down
    3
    ·
    15 days ago

    Rust is the easiest programming language to learn.

    Granted, I’m autistic, but still. I found it far more intuitive than JavaScript or Python.

    Bonus: HTML and JavaScript are evil and I hate webpages that use it. Thats pretty much all of them, to be fair, but markdown websites do exist and I love them

  • WappleFF27@feddit.online
    link
    fedilink
    English
    arrow-up
    14
    arrow-down
    4
    ·
    16 days ago

    Using LLMs are not the same as using intellisense or compilers and there are a myriad number of reasons not to use it that could fill an entire book and I will look down on any company or freelance developer that uses it.

    Yes I’ll fight Linus over this and yes I’ll be right.

    • razen@lemmy.world
      link
      fedilink
      arrow-up
      6
      arrow-down
      1
      ·
      15 days ago

      Fight me (Not literally) LLMs used to give garbage output but nowadays they are actually good and if given in the hands of right person, it can increase the productivity.

      You might say productivity increases but salary dosent but that is a mangement issue and does not make LLMs bad.

      • AVincentInSpace@pawb.social
        link
        fedilink
        English
        arrow-up
        2
        ·
        7 days ago

        “LLMs are non-deterministic and often create bugs that weren’t there before with no accountability, and are therefore different from compilers.”

        “Well, they used to do that a lot, but they hardly ever do it anymore. And besides, the bugs aren’t hard to spot.”

        “That doesn’t change what I – whatever. LLMs cause your skills to atrophy.”

        “Not if you use them smartly. Like I do. I’m proud to say I haven’t written a single line of code in over a year. In fact, I barely even read it anymore. But I make all the architectural decisions, and therefore, even though I haven’t even verified that the code does what the LLM says it does and blindly trust the unit tests it writes to catch any bugs, I understand the code perfectly and have not lost any skill. I could stop using it tomorrow if I wanted to. But why would I, when it’s so useful?”

        “Datacenters burn natural gas and pollute the environment! OpenAI and Anthropic both give their technology to the military to make self guided bombs! The number of suicides directly attributable to LLM interactions is climbing by the day and none of the LLM companies care!”

        “You really can’t accurately speak on whether LLMs are good or bad unless you’ve used one in the last six months.”

        “…”

        “They’re really useful now.”

      • WappleFF27@feddit.online
        link
        fedilink
        English
        arrow-up
        3
        ·
        14 days ago

        Every issue I have with the tech has nothing to do with how “useful” it is.

        I’d even argue it’s only useful in the short term, and extremely harmful in the long term. Not just because of it’s fascist origins, but because developing it further is accelerating climate change unnecessarily when we direly need to do the opposite. Climate change will rapidly undo any of the good LLMs manage to accomplish.

      • psud@aussie.zone
        link
        fedilink
        English
        arrow-up
        2
        ·
        10 days ago

        No one’s salary went up when we obsoleted all the people calculating stuff. Actually I’m pretty sure salaries go down when work is automated

        They have to go down, it increases the supply of workers, reduces the bargaining strength of people seeking work

      • WappleFF27@feddit.online
        link
        fedilink
        English
        arrow-up
        2
        arrow-down
        1
        ·
        16 days ago

        It’s the most common internet opinion, but IRL people use it without a second thought, and will get annoyed if you call them out on it.

        EDIT: I don’t think this post was talking about laymen to begin with.

      • db2@lemmy.world
        link
        fedilink
        arrow-up
        4
        arrow-down
        4
        ·
        16 days ago

        It’s also the opinion of people who don’t make a habit of drinking the special koolaid.

      • Venator@lemmy.nz
        link
        fedilink
        arrow-up
        0
        ·
        15 days ago

        Most likely LLMs. Most people only warn against intellisense for initially learning coding, or if they work in academia.

        • Orygin@sh.itjust.works
          link
          fedilink
          arrow-up
          1
          ·
          15 days ago

          Why would anybody be against intellisense? Even for those use cases, it’s helpful. (Excluding the code completion from LLMs included ofc)

  • randombullet@programming.dev
    link
    fedilink
    arrow-up
    9
    ·
    15 days ago

    I remember on Reddit several years ago I said that automatic bitlocker is the curse of installing W11 on a laptop.

    I got down voted so hard. One comment even said you should be thankful because encrypting by default should be the norm.

    But yet if I add any thunderbolt device to my windows before I boot it, it requires me to input my 25 character bitlocker key… that’s hosted online within my Microsoft account.

    Bitlocker enabling by default without user input is horrible. Hosting the keys online is also horrible. It could be so easy to socal engineer into your Microsoft account.

    • SaharaMaleikuhm@feddit.org
      link
      fedilink
      arrow-up
      13
      ·
      16 days ago

      If a browser does not support unlock origin it is worthless. So Firefox wins by all opponents willfully exiting the race

      • sunbeam60@feddit.uk
        link
        fedilink
        arrow-up
        3
        ·
        edit-2
        13 days ago

        You know what, I’ve been a Firefox user since the days of beta Phoenix. I’ve expressed your view for years now - Firefox was great, but held back by a commercial org that wanted fancy SF offices, fancy SF compensation etc.

        But I tried out Helium a little while ago and in truth, I’m not sure Firefox is all that good these days. Helium is basically ungoogled-chromium + extension support + super lean UI.

        The upside is that you no longer have to contend with sites that have given up on Firefox testing. The downside is manifest v3. But all in all, I find it a better browser. Firefox is so busy telling its story, and finding revenue, that it just seems to have left behind product market fit.

        • Ethan@programming.dev
          link
          fedilink
          English
          arrow-up
          4
          ·
          15 days ago

          Mozilla has totally lost their way. But using any chromium-based browser is still bowing down to Google’s near monopolistic control over web ‘standards’.

    • psud@aussie.zone
      link
      fedilink
      English
      arrow-up
      2
      ·
      10 days ago

      I do have to put up with an unsupported browser banner on government websites (which work perfectly)

      • noahm@lemmy.world
        link
        fedilink
        arrow-up
        3
        ·
        14 days ago

        Specifically I hate it as a prefix. It’s even worse when else clauses become involved!

        x = "this is great"
        y = "this is awful"
        z = false
        
        unless(z)
          puts(y)
        else
          puts(x)
        end
        
          • noahm@lemmy.world
            link
            fedilink
            English
            arrow-up
            1
            ·
            edit-2
            10 days ago

            yes, and? Having to translate unless to if not is basically exactly why I hate it. Just write if not

        • historicaldocuments@lemmy.world
          link
          fedilink
          arrow-up
          1
          ·
          13 days ago

          Despite this being the perfect spot for one, I’m not a fan of ternary operators but syntax isn’t supposed to matter…

          Since we’re going for unpopular opinions or hills to die on: if syntax didn’t matter we’d all be using Ada.

  • ducktumn@lemmy.zip
    link
    fedilink
    arrow-up
    10
    arrow-down
    1
    ·
    edit-2
    15 days ago
    • C++ is an awful language overall.

    • Linus is just some guy with good programming skills and not an authority over anything tech.

    • There aren’t any good text editors in the wild. VSCode is awful apart from extension support. Kate is close to being perfect but lack of extensions are pulling it back. Vim, Helix, Emacs, NeoVim are all flex toys. nvm just tried zed with AI disabled

    • AI bad

    • im_fine_sandy@nord.pub
      link
      fedilink
      English
      arrow-up
      7
      ·
      16 days ago

      Linus is just some guy with good programming skills

      I somewhat agree. Most celebrated personalities in tech aren’t programming geniuses - they were in the right area at the right time and had some luck. Zuckerberg is a good example.

      I think kernel maintainers and rendering engines (browsers and others) have a higher base skill level. Like some web developers are clever and some are stupid, but I don’t think there are stupid kernel maintainers.

      The thing with Linus is that he’s been involved, and at the pointy end, for decades. You or I may not agree with him on every issue, but you can acknowledge that he has experience and he has connections.

      • ducktumn@lemmy.zip
        link
        fedilink
        arrow-up
        5
        ·
        16 days ago

        I have massive respect for the guy. He did so much for the open source community. But for some reason everything he says is interpreted as inarguable truth by most tech guys.

        For example his opinions on AI are pure trash and bootlickery. Which is fine anyone can think anything. We just have to think for ourselves a little.

        • im_fine_sandy@nord.pub
          link
          fedilink
          English
          arrow-up
          3
          ·
          16 days ago

          I agree that everyone needs to think for themselves, absolutely.

          However, I struggle with this and it’s kind of what I’m getting at:

          his opinions on AI are pure trash and bootlickery

          Firstly, you’ll be hard pressed to find someone who hate’s AI more than me. It literally keeps me awake at night. I hate the environmental impact. I hate the people it’s enriching. I hate the work it’s stealing. I don’t often use the word “hate” but it really does apply here.

          That said, I always try to defer to the opinions of people with more experience than me, and as regards kernel maintenance and Linus, that’s certainly true.

          You’ve probably heard of the Dunning-Kruger effect. I know a bit about code, a bit about FOSS, a bit about linux, AI, and communities. So it’s easy to underestimate the yawning chasm of experience and knowledge between myself and Linus.

          That doesn’t mean we have to blindly accept the opinions of others (I honestly haven’t accepted Linus’ opinion myself), but I’m aware of the profound discrepancy between my opinion and his and it concerns me.

          All that aside, is it possible to acknowledge that something is the correct course of action even if it’s not the ideal? I haven’t been following the Linus / AI thing, but as I understand it a project like that kinda has to allow AI bug reports because threat actors will certainly be using AI to find exploitable bugs.

    • marcos@lemmy.world
      link
      fedilink
      arrow-up
      3
      ·
      15 days ago

      Zed sucks in many of the ways that modern editors suck.

      Autocompleting on characters that appear in code, and autocompleting in a way that overwrites the code you have already written are two incredibly stupid decisions that put a mark over any tool that adopts any one of them.

      But then, Zed almost working, but in a way that still sucks was enough to motivate me into setting my Emacs properly, in a way that doesn’t suck. So Zed gave me a good editor.

    • calcopiritus@lemmy.world
      link
      fedilink
      arrow-up
      2
      ·
      16 days ago

      I wouldn’t say that vscode is awful. It’s not good though. Even while being the best.

      To add: jetbrains IDEs are awful

    • explodicle@sh.itjust.works
      link
      fedilink
      English
      arrow-up
      2
      ·
      14 days ago

      All authorities are just some guy with good programming skills. The giants on whose shoulders we stand were mostly rich guys who had the privilege of screwing around. I prefer the original definition of genius - not a quality that a person possesses, but an external spirit that comes and visits you.

        • Pomal@sh.itjust.works
          link
          fedilink
          arrow-up
          3
          ·
          16 days ago

          Not a slop fork, they wrote their own rust graphics compositor, 10/10 will shill until they go shit heel

          • UnfortunateShort@lemmy.world
            link
            fedilink
            English
            arrow-up
            2
            ·
            15 days ago

            It really is remarkably better than Code. Single-window, multi-repo, multi-worktree support? Not a problem. Want a closer look at the diff? Why stop there, you can maximize every single panel. The Git integration is also so much better, no extensions required. Lots more stuff is integrated, yet less setup is required and somehow it is still much faster than Code.

            You can really tell that a ton of thought went into this IDE

            • Pomal@sh.itjust.works
              link
              fedilink
              arrow-up
              1
              ·
              15 days ago

              I’ve not even gone that deep with it, just writing code to keep my trash can purring along. It’s smoooth, responsive, everything is intuitive, and the language server support is 🤌

      • sudoer777@lemmy.ml
        link
        fedilink
        English
        arrow-up
        1
        ·
        14 days ago

        I just tried out Zed and the way it does extensions and services is so awful from both a security and configurability standpoint I ended up immediately switching back to Helix. At least Gram is an option if you want one that’s GUI-first and it doesn’t automatically download random shit.

    • tomjuggler@lemmy.world
      link
      fedilink
      arrow-up
      1
      ·
      16 days ago

      That information about text editors is out of date - we now have Zed. Just ignore the “AI integration” bs, it’s entirely optional

      • ducktumn@lemmy.zip
        link
        fedilink
        arrow-up
        2
        ·
        16 days ago

        Do they collect data though? This is important. If not I might give it a shot.

        And also when you don’t use AI, can you disable all AI UI features.

        • tomjuggler@lemmy.world
          link
          fedilink
          arrow-up
          1
          ·
          16 days ago

          Zed is totally open source, and the AI “features” are optional. When you set it up - at least when I did - it’s one checkbox to disable. I don’t remember about the telemetry you will have to have a look, I’m usually ok with that myself.

          I came from VSCode and haven’t found anything I miss. I especially don’t miss the poor performance of VSCode, Zed is extremely lightweight!

      • sudoer777@lemmy.ml
        link
        fedilink
        English
        arrow-up
        1
        ·
        15 days ago

        Right now I use Helix and I’m trying to decide whether to switch to Zed. Because it almost looks like a better editor at this point, except its configuration is not as declarative as I’d like and its AI service uses a bunch of closed providers.

    • onlinepersona@programming.dev
      link
      fedilink
      arrow-up
      0
      ·
      16 days ago

      Agree with half of that. C++ is last century stuff and should be replaced. Any new code in C and C++ is immediately a vulnerability.

      • ducktumn@lemmy.zip
        link
        fedilink
        arrow-up
        1
        arrow-down
        1
        ·
        16 days ago

        Atleast C is easy to understand which makes it easier to find and fix vulnerabilities. C++ feels like it’s duct tape holding it together.

        • onlinepersona@programming.dev
          link
          fedilink
          arrow-up
          1
          ·
          16 days ago

          C is easy to understand and find vulns? AI is uncovering decades of vulns in C code that humans hadn’t seen since the code’s inception. And they aren’t logic errors but memory management errors. Not a single day goes by without a CVE in a C/C++ project about memory management.

          Both languages are walking vulnerabilities.

      • iusemybrain@sh.itjust.works
        link
        fedilink
        arrow-up
        3
        ·
        14 days ago

        The intention of C++ was to be C’s replacement by adding objects into the programming language while also maintaining the fast compilation and runtime that came with C. In the end it resulted in longer compilation and runtime times (from the millisecond scale to seconds scale), which made it generally unappealing for embedded systems.

        On a production code standpoint, if were comparing it to something like python, it is debatable, but there’s just a large learning curve associated with the language that could otherwise be avoided with a different OOP language. By trying to accomplish everything, it fails to implement everything well to compete with other languages.

      • IEatDaFeesh@lemmy.world
        link
        fedilink
        arrow-up
        2
        ·
        edit-2
        14 days ago

        It’s painful to learn and set up. Looking at other people’s code is horrifying. I looked at a portion of Godot code and the amount of headers defined is actually retarded. A lot of the c++ function names are a remnant of not well thought out ideas. It’s also normal to have thousands of lines of code for a small portion of a small project?? The only way I see it being used is through vibe coding. You can’t tell me it’s easier to look at someone’s C++ than their Python project.