• Potatos_are_not_friends@lemmy.world
    link
    fedilink
    arrow-up
    76
    ·
    1 year ago

    I feel bad because while I don’t reach for react (I usually pick Vue or vanilla), people’s comments about react is really depressing.

    There’s a LOT of shitty react code. And when you see beautiful react implementation, it’s like a work of art.

    Unfortunately, react projects have been given to by bootcamps grads with 6 months of experience and it’s like the blind leading the blind…

    I wonder if it’s like PHP. Lots of people shit on it because they had to futz around in a garbage project written by garbage developers, fully unaware that it can be elegant in the hands of a professional team who cares about code quality.

    • TherouxSonfeir@lemm.eeOP
      link
      fedilink
      arrow-up
      30
      ·
      1 year ago

      PHP is great for building APIs to use with React or Vue. I’m happy I have so much back end experience with both good and bad code.

      My motto: if a Junior dev can’t figure out what I’m doing after two weeks of training, I’ve failed.

    • killeronthecorner@lemmy.world
      link
      fedilink
      arrow-up
      23
      ·
      1 year ago

      I wonder if it’s like PHP. Lots of people shit on it because they had to futz around in a garbage project written by garbage developers, fully unaware that it can be elegant in the hands of a professional team who cares about code quality.

      You can apply this reasoning to any [web] technology. The reason it’s so visible for react, and previously PHP, is simply popularity.

    • sheogorath@lemmy.world
      link
      fedilink
      arrow-up
      9
      ·
      1 year ago

      Yep, finding people who understand React is hard. The majority of people who say they’re an expert in React are either coding bootcamp fresh grads or someone who’s entrenched in writing shitty React so by having them join there’s basically no difference in skill with a fresh grade hire or a fourth year college student intern.

      • Osnapitsjoey@lemmy.one
        link
        fedilink
        arrow-up
        1
        ·
        edit-2
        1 year ago

        What’s wrong with bootcamps? Honest question, as I’ve been learning to code from a python book and an “expensive” udemi course that was on sale for 20 bucks

        I’d never tell people I know how to program though. I’m definitely still learning

        • sheogorath@lemmy.world
          link
          fedilink
          arrow-up
          2
          ·
          1 year ago

          Sometimes, if all you know is how to use a hammer, everything will look like a nail.

          That’s the impression that I got from working with several bootcamp graduates. Most people who enroll are usually people who think that there’s a lot of money to be had being an SWE. However because usually bootcamps are 3-6 months max you’re just being taught how to use a specific tool to accomplish a general use case that’s already been solved many times. However, as an example in my workplace, we deal with a lot of R&D PoC projects and develop our own internal solutions due to security or law requirements from our clients. So if you’re stuck when working in one of our projects due to something, there’s no post related to that in StackOverflow.

          In one case, during development I found a bug in one of the third party libraries that we use and after creating an issue in their GitHub, even the library’s maintainer is stumped. We decided to create a new internal library that solves the specific problem we’re having.

          If you’re a bootcamp graduate working on that kind of project, it can be shocking.

          Having a college degree can help set up your mindset work in a software engineering project.

          Although it’s not necessary, because I’ve known a lot of great dev with no CS degree. But it’ll take a lot of time working in projects with a lot of different cases. Maybe it’s just that my workplace doesn’t really have a suitable kind of project for people with not a lot of experience. However lately we’ve hired a lot of fresh grads with good grades and it’s been a breeze when onboarding them to our engineering standards.

          We’ve had several hires from bootcamp but there’s only one who’s a good engineer.

          Take this with a grain of salt though, as lots of people can testify that they had a good experience with bootcamp grads. So maybe I’m the one who’s unlucky. YMMV.

          • Osnapitsjoey@lemmy.one
            link
            fedilink
            arrow-up
            1
            ·
            1 year ago

            Ah. See, I’m using bootcamps as a intro type of learning. I’ve also been just doing my own thing by learning how to make scrapers and all that (even though that’s kind of cheating because it’s just scrapy) but I’m trying to learn the fundamentals of the language so that I don’t need to just Google “how to do this” I want to be able to just do it

        • ramjambamalam@lemmy.ca
          link
          fedilink
          arrow-up
          1
          ·
          1 year ago

          Not necessarily “wrong” but a weakness is that they tend to focus on concrete language syntax and skimp on abstract software design, and data structures and algorithms. The result is a programmer who knows how to write code, but may struggle on larger projects or more complicated problems, compared to a computer science or software engineering graduate.

          Of course I’ve met developers from applied courses and boot camps who are driven, passionate, and gifted who have gone on to make excellent system designers and software architects, but generally speaking, knowing how to code alone does not make one a software developer.

    • DrQuint@lemm.ee
      link
      fedilink
      arrow-up
      7
      ·
      1 year ago

      The problem with some of the comments here is that even “properly” written React CAN hit a performance bump, and optimization is a rather rare skill no matter the programming context (kinda due to little time given to it, so everyone is out of practice).

      But I don’t know which ones are the ones talking about that, and which ones are just people annoyed at anything Node in general.

    • kameecoding@lemmy.world
      link
      fedilink
      arrow-up
      9
      arrow-down
      2
      ·
      1 year ago

      I find react stupid because of JSX, Vue is much cleaner easier.

      ofc you can create a mess with any tool or framework

    • AtHeartEngineer@lemmy.world
      link
      fedilink
      English
      arrow-up
      1
      ·
      1 year ago

      If you like vue, try svelte(kit). Not that it’s better, but another tool in your toolbox. Svelte stores are pretty nice.

  • bitsplease@lemmy.ml
    link
    fedilink
    arrow-up
    56
    ·
    1 year ago

    Tbf, “learned a language” is a hard thing to pin down in any case.

    I’ve been building enterprise software with python for almost a decade now. I still occasionally find stuff in the stdlibs that I didn’t know about, or even sometimes some subtle feature of the language that I never had reason to explore until now.

    If someone asks me if I “learned” python, id say hell yeah - but there’s always still plenty to learn

    That being said, no reasonable definition of learned includes what you could do in 2 days, even as an experienced dev lol

      • phorq@lemmy.ml
        link
        fedilink
        arrow-up
        15
        ·
        1 year ago

        “cool”: that sinking feeling that there’s so much you could go back and optimize, but that you probably will never have the time to…

    • Aceticon@lemmy.world
      link
      fedilink
      arrow-up
      7
      ·
      1 year ago

      It’ basically the Dunning-Krugger curve - you’re well enough into the last part of it so you are well aware of how much there is to learn about it and how you will never know all of it, thus you don’t have and never will have the same kind of cocksure belief that “I know this shit” as somebody who knows just a bit but not yet enough to understand how much there is to know.

      It’s all perfectly normal, IMHO.

        • Aceticon@lemmy.world
          link
          fedilink
          arrow-up
          1
          ·
          edit-2
          1 year ago

          More precisely, the more you learn the more you are aware of all you have yet to learn.

          You do know more after you’ve learned something, but that also includes the realisation it’s but a drop in an ocean of things still tomlearn.

    • jarfil@beehaw.org
      link
      fedilink
      arrow-up
      3
      arrow-down
      1
      ·
      edit-2
      1 year ago

      Define “reasonable”…

      Something like 20 years ago, I learned PHP in 2 days… meaning, I could write better PHP than anyone else on the team.

      (not to diss on the team, one was a Java guy who left shortly afterwards, the others were a couple interns, while I had the power of something like 10 years of coding experience… and a PHP cheatsheet-booklet)

      • bitsplease@lemmy.ml
        link
        fedilink
        arrow-up
        1
        ·
        1 year ago

        That sounds less like you learned the language to a high standard, and more that you were already a good programmer in general terms and everyone else on your team barely knew what they were doing.

        Ultimately if you can write good code in one language, you can probably also do it in another (especially with access to cheat sheets), but I still wouldn’t call using a cheat sheet having “learned” a language.

        Of course it’s all relative and subjective - which is the whole point , one person may consider just being able to write syntactically correct statements as having “learned” a language. Where others might expect a deep knowledge of the language features, standard libraries, and best design practices (this is the side that I personally lean, which I maintain can’t be done in 2 days)

  • RGB3x3@lemmy.world
    link
    fedilink
    arrow-up
    48
    ·
    1 year ago

    React definition: React (also known as React.js or ReactJS) is a free and open-source front-end JavaScript library for building user interfaces based on components.

    Guys, I’ve learned React in 1 minute!

  • UllallullooA
    link
    fedilink
    arrow-up
    31
    ·
    edit-2
    1 year ago
    import React from 'react';
    import ReactDOM from 'react-dom';
    
    ReactDOM.render(
    	<div>
    		<h1>My Site</h1>
    		<p>Welcome to my cool site. 😎</p>
    	</div>,
    	document.getElementById('root')
    );
    

    Me too. I’ll take my salary now, please.

    Edit: Lemmy stripped out my rickroll. :(

    • WackyTabbacy42069@reddthat.com
      link
      fedilink
      arrow-up
      9
      arrow-down
      1
      ·
      1 year ago

      Sucks that your rick roll got taken from you. I understand how hard it must feel, so please know that I’m never gonna give you up, never gonna let you down, never gonna run around and desert you

  • Steeve@lemmy.ca
    link
    fedilink
    arrow-up
    23
    arrow-down
    5
    ·
    edit-2
    1 year ago

    React is a library, when do you consider a library “learned”? If they already knew JavaScript why couldn’t they “learn” React in two days?

    I’ve been using Python regularly for a decade and I’m continuously using new libraries and learning new things, I can’t think of when I would have considered Python “learned”.

    • TherouxSonfeir@lemm.eeOP
      link
      fedilink
      arrow-up
      24
      ·
      1 year ago

      “Learned” means you can make code for production that other people won’t go “wtf are they doing, this isn’t how react works”

      • Steeve@lemmy.ca
        link
        fedilink
        arrow-up
        20
        arrow-down
        1
        ·
        edit-2
        1 year ago

        That’s just how we look at eachothers’ code, and even our own code that we forgot we wrote lol.

        • Zikeji@programming.dev
          link
          fedilink
          English
          arrow-up
          8
          ·
          1 year ago

          Whenever I have to dredge up an old project to make a change or just to check something, I’m hit with the temptation to rewrite the entire thing. I’m constantly learning, and I subscribe to the notion that there are endless ways to do something and none of them are right. Hell, I’ve brought 3 fairly large Vue projects to term and all of them were done the “right way” at the time, but completely differently. There’s what, 3 different approaches in Typescript for components?

          • Aceticon@lemmy.world
            link
            fedilink
            arrow-up
            1
            ·
            1 year ago

            Being faced with maintaining your own code in Production months after moving on and after having forgot about its structure is one of the best learning experiences for a programmer, IMHO.

            It’s a great way to learn at an emotional level (through self-inflicted pain and suffering ;) the real point of a lot of good practices that previously looked like “a waste of time” and design principles that before “made no sense”.

            Personally that’s one of my requirements when hiring technical types above Junior level.

            • Zikeji@programming.dev
              link
              fedilink
              English
              arrow-up
              1
              ·
              1 year ago

              I’ve rarely actually had much trouble coming back to a project I started / played a large role in after a few months (or even years). I’ve experienced what you describe on other projects though, especially if they’re way outside my field of expertise.

              Somewhat off topic, I’m searching for a new job soon - are there any good guides or information on design practices you’d recommend? I’m self taught with no college education, and a majority of the work I’ve done has been for SMBs on (mostly) solo projects where I determine the direction to take. I like the flexibility of working for SMBs, however there are a lot of cons as well. I sometimes worry I’m shooting myself in the foot listing just under a decade of experience, but none of it “junior level on a team” where I’d pick up some of those skills.

              • Aceticon@lemmy.world
                link
                fedilink
                arrow-up
                4
                ·
                edit-2
                1 year ago

                Working directly with “the business” (such as end users in an SMB) is actually a highly valuable skill for a programmer, because ultimatelly we’re paid to make the software to be used by normal users as part of their business and people who combine programming skills with (proven, genuine) experience in working directly with users and stakeholders in the business side delivering software for their needs, are quite rare.

                This is especially valuable in any large company whose core business is not Tech but makes heavy used of Technology and has custom systems serving their business side, such as, for example, investment banks - the user and business oriented programming areas (not just frontend but basically anything that’s tightly coupled to the nature of the business of the company) value “understanding the business” and “figuring out the software that needs to be done to serve user and the business needs” as much or more than technical proeficiency.

                (It’s all nice and neat to, say, be a “guru” who came up with his or own programming language, but actual companies whose actual business needs have nothing to do with programming languages, couldn’t care less, though such techie “chops” definitelly impress young and naive techies)

                I don’t think “junior level on a team” matters if you have almost a decade experience - in my experience by that point nobody gives a rat’s arse about what you did as a junior unless it’s something you’ve never done since and are trying to leverage in an interview - but having done projects professionally as part of a team does matter a lot, because big projects can’t be done solo in a reasonable amount of time and hiring manager do want people who have proven they can work well as part of a team. Only way I can see to make up for this if you don’t have it is to participate in larger Open Source projects.

                Also being self-directed and capable of working without lots of supervision is highly valued: somebody whose input is “there’s this (non-techie) thing we need solving” and whose output is the implementation of the solution is worth his or her weight in gold, not just in the kind of small company which can’t afford dedicated technical managers (to go around supervising the less self-directed kind of dev) but also in larger companies as it saves lots of time and problems all around when a programer can just take ownership of figuring out the details of the problem and delivering the solution.

                Maybe you might’ve been ignoring some of your greatest strengths by looking only at the technical side of your experience.

                • Zikeji@programming.dev
                  link
                  fedilink
                  English
                  arrow-up
                  2
                  ·
                  1 year ago

                  Wow, thanks - your response offers quite a bit of fresh perspectives and insight I hadn’t considered. Yes, my main pain point was my ability to work on a team - I have done so but not at scale and mostly in the micro-managing kind of way. But I’ve been letting that impact my motivation by a good deal.

                  I also hadn’t realized being able to convert layman input into usable output was a valuable skill for larger companies, assuming they’d have project managers to handle that. I wonder how difficult it would be to take on a more managerial role - that has been another pain point, I find I get burnt out on large projects fairly fast, but that’s usually me doing all of the heavy lifting.

                  Thanks for the feedback, I appreciate it. I think I’ll try and revise my resume some and start looking with some fresh perspective.

  • ______@lemm.ee
    link
    fedilink
    arrow-up
    11
    arrow-down
    1
    ·
    1 year ago

    I learned about how much I didn’t understand react on my 2nd dev job. I had like 2yoe with react previously. There’s a lot about it. Mostly tricks. hacks and work arounds for it’s abysmal performance.

      • ______@lemm.ee
        link
        fedilink
        arrow-up
        8
        ·
        1 year ago

        There many ways of doing things in react and some are faster than others. I would abuse state and use effect at my old job but at this job my sr dev doesn’t allow me to use useffect unless the situation warrants it.

        • TherouxSonfeir@lemm.eeOP
          link
          fedilink
          arrow-up
          3
          ·
          1 year ago

          Ahh yes, abusing state can be temping. Just a little tweak here, it’s ok… no one is looking… oh crap!

          • TitanLaGrange@lemmy.world
            link
            fedilink
            English
            arrow-up
            2
            ·
            edit-2
            1 year ago

            I’m relatively new to React (about 8 months in with React Native). Can you give me some examples of abusing state?

    • Potatos_are_not_friends@lemmy.world
      link
      fedilink
      arrow-up
      3
      ·
      1 year ago

      I’m not at all a React fan, and prefer vanilla or Vue.

      But what is happening where you’re hitting abysmal performance?

      Are you blaming the implementation or the tools because while I can achieve faster performance with vanilla… In no way is abysmal a word I’d used.

  • jarfil@beehaw.org
    link
    fedilink
    arrow-up
    10
    ·
    1 year ago

    Bah, 2 whole days? I learned React in 1 day!.. then another, and another, and then I got a book, and a few years later… I learned how to fix whatever ChatGPT spits out in React in 2 days!

  • Notnotmike@beehaw.org
    link
    fedilink
    arrow-up
    10
    arrow-down
    1
    ·
    1 year ago

    Probably the hardest part of React, for me, was getting used to the callbacks. Passing data up to the parent component using a function. It’s a little difficult to get used to if you haven’t encountered it already

    • TherouxSonfeir@lemm.eeOP
      link
      fedilink
      arrow-up
      8
      ·
      1 year ago

      Just shove it in the state! I watched a few react videos over the last TWO WHOLE DAYS, it works!! ;$

      • DrQuint@lemm.ee
        link
        fedilink
        arrow-up
        3
        arrow-down
        1
        ·
        edit-2
        1 year ago

        If there’s a parent component that has some data that it expects to always receive from its children, then that data should be in the parent’s state and the children should receive it and maybe some relevant methods as props. Even if it’s an unknown number of children. Don’t muck with useContext for basic inheritance stuff, you’ll mess with the render cycle for no good reason.

        Now, if we’re talking about a very distant “top” component, that’s fine, it’s what it was made for. Although many people end up using stores if it’s some data with broad impact (like user data)

  • Auzy@beehaw.org
    link
    fedilink
    arrow-up
    9
    arrow-down
    1
    ·
    1 year ago

    I thought I learned it… Then I got screwed for ages until I worked out how UseEffect worked.

    To be clear though, I still suck, and am probably doing a lot wrong

    • TherouxSonfeir@lemm.eeOP
      link
      fedilink
      arrow-up
      6
      ·
      1 year ago

      That’s the true spirit of development. I’m probably still doing it wrong, but it functions most of the time and no one seems to notice my bugs! Paycheck!!

        • T (they/she)@beehaw.org
          link
          fedilink
          arrow-up
          2
          ·
          edit-2
          1 year ago

          I always use MDN if I need to check anything JS related. For React, I don’t see why use anything else other than the official documentation. If you’re learning I’d suggest Full Stack Open or even Odin Project which are courses that at least bother to explain a little of best practices.

        • DNAmaster10@lemmy.sdf.org
          link
          fedilink
          arrow-up
          2
          ·
          1 year ago

          Generally I’m not against w3 schools for quickly checking the syntax of something or how to use a specific method, but I always try stay clear of their larger code examples.

          I was learning PHP a couple years back for some hobby side projects I was working on. They provide some code here about how to connect to an SQL database. I ended up using this code for almost a year on some publicly hosted sites.

          The code they provided isn’t secure, though. It can output database errors to the client, and give away information about your database which a random user shouldn’t have access to.

          Additionally, the beginning few pages for their SQL insertion examples doesn’t mention anywhere that you should be using prepared statements. There is a page slightly further down, but for the average person learning the language, there’s no reason for them not to just copy parts the extremely insecure code and use it in their projects.

          W3 schools imo is great for quickly checking up on something, but generally it’s probably better to avoid their examples and look up the language standards somewhere else.

  • peopleproblems@lemmy.world
    link
    fedilink
    arrow-up
    5
    ·
    1 year ago

    Does anyone else read this and think “goddamn I hate my career choice” and simultaneously think “goddamn there isn’t a lot you could pay me to do”

    • TherouxSonfeir@lemm.eeOP
      link
      fedilink
      arrow-up
      4
      arrow-down
      1
      ·
      1 year ago

      Yeah. I wish I had another career at this point, but every other job I’d just be like “I can write this entire job in a python script in under a week”