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.

  • WappleFF27 ( WappleFF27@feddit.online ) 
    link
    fedilink
    English
    arrow-up
    124
    ·
    22 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.

  • ducktumn ( ducktumn@lemmy.zip ) 
    link
    fedilink
    arrow-up
    69
    ·
    edit-2
    21 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

  • Chloé 🥕 ( carotte@lemmy.blahaj.zone ) 
    link
    fedilink
    English
    arrow-up
    64
    ·
    22 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

  • 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 ( Allero@lemmy.today ) 
      link
      fedilink
      arrow-up
      12
      ·
      21 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 ( excel@lemming.megumin.org ) 
        link
        fedilink
        English
        arrow-up
        10
        ·
        21 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.

  • Current AI tools are excellent productivity and quality enhancers, but only for people who are willing to adjust their workflows and guide it to give good quality output.

    The damage is done by Capitalism running the AI industry and the over financialization of the market.

    Don’t be anti AI, be anti unregulated Capitalism.

    • I am anti commercial capitalistic LLMs which, coincidentally is ALL of them.
      “B-But Axo the open weigh—!” They are NOT open, it’s the equivalent of giving you the executable of M$ Edge or a Windows ISO and calling it open, fuck this shit

    • Avicenna ( Avicenna@programming.dev ) 
      link
      fedilink
      arrow-up
      19
      ·
      edit-2
      22 days ago

      I agree on their usefulness but as long as you don’t use local and open LLMs you are unfortunately part of the ecosystem that does the damage. Luckily open models are catching on and hopefully some reliable companies take up on this business model.

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

          Won’t happen unfortunately. Unless you want to run a 1U with 6 GPU, requiring a custom water-cooling system, and which sips like 10kW/h of electricity while idle. It’s all integrated hardware born to be trash. The ram, cpu and GPU won’t be usable on consumer hardware without hard modifications.

          • We also don’t need frontier models. The type of models that run on $5000 Mac studios can do today what the frontier models did 1 year ago.

            We just need the Mac studio class hardware to come back to $2000 where it used to be.

            Also, do not underestimate the ability of Chinese BGA rework shops from being able to salvage AI chips and install them on board that will fit in standard hardware. They proved they could do it with the Crypto only chips, they will figure it out for the AI chips if the supply is there.

            The main reason these units use water cooling is for deployment density.

              • Was it?

                Not the point - this isn’t about secondhand servers, it’s about RAM being artificially scarce. Possibly as a deliberate measure to make cloud services sound less wasteful. If a 3090 with 32 GB was only a thousand bucks then OpenAI’s revenue would be even worse.

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

                  I have an old server with lots of DDR4 which I can for the most part just plug into my PC. The CPU can be put into another motherboard, and the GPU are discrete cards. Most of that hardware can be re used by consumers.

                  Most new AI datacentre deployment won’t be like that. An Nvidia Blackwell server has everything soldered. Good luck desoldering the CPU or GPU, the ram is either LPDDR5X which I never saw consumer motherboard use, the GPU is HBM3e and not a discrete card anymore. Whole package is unpractical for even a enthusiast to run.

                  The original point was that once the AI bubble bursts, we’ll have hardware to use for local inference. My claim is that no, it’ll probably be too specialized. Unless some maniac in China figures out a way to make new consumer hardware for it, but they probably won’t since Nvidia hardware is technically illegal (both export and import at this point). Even then, I don’t see Nvidia or others go back to making consumer hardware at a level where we can do serious inference locally.

          • 1 of those GPUs can probably run 90% of what a small team would need, so you don’t need the full thing.

            That’s about 600w of draw and 150w idle. Or about the same as a 5090. You don’t need exotic power or cooling for that.

    • orca ( orca@orcas.enjoying.yachts ) 
      link
      fedilink
      arrow-up
      12
      ·
      edit-2
      21 days ago

      Work has forced us all to adopt it, so everyone did. It was either that or suddenly be the slowest person at work, which eventually gets you canned. People will evangelize all day long about how they refuse to use AI, how it’s dog shit, etc. Meanwhile I’ve managed to dial in my AI workflow so that it never deviates from our code standards, it never tries to invent its own components or styles, and I still manage to review it with experienced human eyes. It’s the reason I can start my work day at 10:30am, walk away from my desk at 4:30pm and still be well ahead of schedule. I’ve malicious-compliance’d the fuck out of my job, it has made my life easier, and I don’t give a fuck what some nerd still devoted to the “art of code” says. We live in a capitalist hellscape and I’m a survivalist.

      With all of that said, I’d still wipe this capitalist shithole fever dream of a tool off the planet because I’m tired of data centers and AI companies fucking up the entire industry, the planet, and people’s lives. I’ve already witnessed firsthand what it did to my industry and I’m lucky to even still have a job (especially one that pays as well as it does—it helps to be in the industry just shy of 20 years).

      • That sounds useful. Id like to find a good place that is for optimizing use of this shit (esp locally) while not going full “hey check out my slop project”, or people going “the ai are our gods / will cause an apocalypse”

        • I use it to corral data a lot of the time. Stuff that is already verified by humans. It’s great for getting quick metrics, or pulling info about something into one central place. I’ve also given it an instruction to use the STE writing rules. It makes it speak more technically and deliberately, as opposed to always trying to sound like my friend.

          I’m absolutely not one of those AI worshipper types, but I’ve found ways to harness it (hopefully thoughtfully) at work.

      • tyler ( tyler@programming.dev ) 
        link
        fedilink
        arrow-up
        2
        ·
        21 days ago

        It was either that or suddenly be the slowest person at work, which eventually gets you canned.

        turns out, you can just refuse to do so and you’ll still be just as fast as everyone else (source: me). Turns out that you’ll actually do the same amount of work and you don’t have to babysit a robot all day long losing your mind.

        • I know for a fact that I am not as fast as this. I had it build out entire page flows and pull together Vue components while connected to Figma’s MCP, and it was done in 1 hour. Tests, types, services, everything. I can’t compete with my own AI flow. I had it finishing 5-6 Jira tickets in one go.

          Refusing also has its own caveats. Like painting a target on my back for layoffs.

    • Ooops ( Ooops@feddit.org ) 
      link
      fedilink
      arrow-up
      4
      ·
      22 days ago

      but only for people who are willing to adjust their workflows and guide it to give good quality output

      … and competent enough to actually evaluate the output properly.

      Instead they spend a lot of money to push the fairy tale how anyone can now code without having a clue.

    • Yeah on one hand the field of evolutionary algorithms is fascinating and I can see potential. But on the other hand it’s being run into the ground by people forcing it into everything. It’s also not human-readable so people might think they know what they’re getting but really don’t because of the black box nature of it.

  • abc ( abc@suppo.fi ) 
    link
    fedilink
    arrow-up
    31
    ·
    22 days ago

    PHP sucks and every attempt at defending it is pathetic.

    I get warm and fuzzy feelings that people here are not even talking about it. Perhaps I should follow that trend.

    • I am with you all the way. For a high level programming language it’s incredible how close to C it is at times AND how many footguns the entire language has.
      And you always hear the “a poor craftsman blames his tools” analogy when someone says PHP bad. But PHP is a hammer that’ll blow your arm clean off when you hit a nail at a slightly off angle.
      There is no defending it, and it should have been replaced with better languages several times over.

      Ok I need to stop myself now I can rant about this language for hours

  • jason ( jason@discuss.online ) 
    link
    fedilink
    English
    arrow-up
    26
    ·
    21 days ago

    OOP dogma isn’t just bad, it’s actively harmful. OOP leads to unnecessary boilerplate. Any boilerplate that is not absolutely necessary is noise and bad. Full stop.

    Private (Getters/setters): Strictly not a necessity in any sense of the word.

    Short functions everywhere.

    Short files everywhere.

    I prefer to see the steps of execution that are actually happening in the real world on hardware. Not an ivory tower of code that happens to execute.

    • danhab99 ( danhab99@programming.dev ) OP
      link
      fedilink
      arrow-up
      3
      ·
      21 days ago

      A bunch of weeks ago the CTO of my company calls me up to ask about my prejudice against the useState hook, I’m guessing I’ve just been giving my team too much shit in code reviews about them using useState hooks and they went to complain to him and he asked me to explain what the value of the useReducer hook was.

      His background is Java, Microsoft Java, C++, and not much else.

      So I was able to explain to him the value of the useReducer hook is a lot like the common class object. In useReducer you’re expected to write discreet state mutations and the state could potentially have more than 1 primitive field that gets mutated, and that’s just what object classes are! In an object class you’re writing methods for mutating the underlying state, the reason I think most people don’t feel like these two things are the same is because of the functional appearance of the reducer function and how in object classes you have the this as a variable just like any other, so you’re not returning a new state.

      So just like in react where they’re installing REDUX (like three generations of their families would be massacred if they didn’t) just to write a switch case statement that puts the action in variables in the state. Bad programmers are just bad.

    • leMe ( leMe@lemmy.dbzer0.com ) 
      link
      fedilink
      arrow-up
      3
      ·
      21 days ago

      generally agree, probably most devs nowadays do. otherwise there wouldn’t be stuff like @data in lombok.

      i think the word ‘dogma’ is pretty good: it takes a good idea (encapsulation) too far. i am not old enough to have been coding when OOP was the new and hot stuff. but i imagine it comes from the idea that it is a good idea to protect private members where needed.

      public class Account {
        private Integer balance;
        public Integer getBalance() {
          return new Integer(balance);
        }
      }
      

      that is not such a bad idea to protect balance from stupid sideeffects.

        public String getName() {
          return name;
        }
      

      is a nothing burger, as it returns the same reference and does not protect from accidental sideeffects.

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

    • danhab99 ( danhab99@programming.dev ) OP
      link
      fedilink
      arrow-up
      24
      ·
      22 days ago

      React works by maintaining a virtual representation of the DOM. When you dispatch state changes into the virtual DOM react can determine which components depend on the change and which side useEffects run.

      My gripe is that YouTube tutorials teach that the useState is the equivalent of a variable. This encourages average developers to problem solve solutions that end up using React’s Virtual DOM for business logic. The YouTube tutorials have react devs planting 100s of useStates - some of which don’t directly induce a visible-on-screen rerender - and then ⅒ as many useEffects to bind these states together. This means that for the Virtual DOM to come to the conclusion as to what html elements need to be changed and how it has already mutated 20-50-100s of times and the CTO tells me the react app is slow and they’re mad.

      If 2 states have the opportunity to mutate each other back and forth then the truth is that you have 2 perspectives of the same state. And React gives you solutions for that - proper solutions - the useReducer hook is for defining these complex state mutations and the Context API for communicating that state to any component.

      And this has me quintuple pissed off because these same tutorial grade react devs install REDUX as compulsively as a pack-a-day smoker (that’s #3). They use Redux to file variables in JavaScript memory (that’s #4) like it’s a global variable and rarely if ever use it for the complex state mutations they need instead I’ve seen react devs write components pull state out of redux into a component just so it can mount useEffect and process the state and dispatch the result back into redux. Let’s not even bring up how the react-redux binding library literally uses the React Context API (that’s #5).

      • As someone who’s worked with react for years, I’m convinced that react itself is the problem and there’s no way to educate new people on the proper way to use it without essentially teaching them everything the abstraction is intended to do for them. Why should newbs have to care about mutations and state dependencies when the api is apparently designed to help them forget about those things?

      • jtrek ( jtrek@startrek.website ) 
        link
        fedilink
        arrow-up
        12
        ·
        22 days ago

        As a tutorial grade react developer (please return me to the backend where I am mediocre instead of bad), having more senior developers take the time to explain why my code was bad was really helpful.

        Also I think I just kind of hate JavaScript. It always feels like everything is more complicated and booby trapped than it should be.