• ShortFuse@lemmy.world
    link
    fedilink
    English
    arrow-up
    8
    arrow-down
    10
    ·
    10 hours ago

    I treat AI as a new intern that doesn’t know how to code well. You need to code review everything, but it’s good for fast generation. Just don’t trust more than a couple of lines at a time.

    • V0ldek@awful.systems
      link
      fedilink
      English
      arrow-up
      8
      ·
      6 hours ago

      I treat AI as a new intern that doesn’t know how to code well

      This statement makes absolutely zero sense to me. The purpose of having a new intern and reviewing their code is for them to learn and become a valuable member of the team, right? Like we don’t give them coding tasks just for shits and giggles to correct later. You can’t turn an AI into a senior dev by mentoring it, however the fuck you’d imagine that process?

      • swlabr@awful.systems
        link
        fedilink
        English
        arrow-up
        6
        ·
        4 hours ago

        You’ve fallen for one of the classic blunders: assuming that OP thinks that humans can grow and develop with nurturing

      • ShortFuse@lemmy.world
        link
        fedilink
        English
        arrow-up
        2
        arrow-down
        6
        ·
        5 hours ago

        You can’t turn an AI into a senior dev by mentoring it, however the fuck you’d imagine that process?

        Never said any of this.

        You can tell AI commands like “this is fine, but X is flawed. Use this page to read how the spec works.” And it’ll respond with the corrections. Or you can say “this would leak memory here”. And it’ll note it and make corrections. After about 4 to 5 checks you’ll actually have usable code.

        • V0ldek@awful.systems
          link
          fedilink
          English
          arrow-up
          5
          ·
          3 hours ago

          But what’s the point of having that if it doesn’t result in improvement on the other side? Like you’re doing hard work to correct code and respond with feedback but you’re putting that into the void to no one’s benefit.

          Hiring an intern makes sense. It’s an investment. Hiring an AI at the same skill level makes negative sense.

          • ShortFuse@lemmy.world
            link
            fedilink
            English
            arrow-up
            1
            arrow-down
            4
            ·
            2 hours ago

            Not all projects needs VC money to get off the ground. I’m not going to hire somebody for a pet project because CMake’s syntax is foreign to me, or a pain in the ass to write. Or I’m not interested in spending 2 hours clicking through their documentation.

            Or if you ever used DirectX the insane “code by committee” way it works. Documentation is ass and at best you need code samples. Hell, I had to ask CoPilot to tell me how something in DXCompiler worked and it told me it worked because the 5000 line cpp file had it somewhere in there. It was right, and to this day, I have no idea how it came up with the correct answer.

            There is no money in most FOSS. Maybe you’ll find somebody who’s interested in your project, but it’s extremely rare somebody latches on. At best, you both have your own unique, personal projects and they overlap. But sitting and waiting for somebody come along and having your project grind to halt is just not a thing if an AI can help write the stuff you’re not familiar with.

            I know “AI bad” and I agree with the sentiment most of the time. But I’m personally okay with the contract of, I feed GitHub my FOSS code and GitHub will host my repo, run my actions, and host my content. I get the AI assistance to write more code. Repeat.

        • Mniot@programming.dev
          link
          fedilink
          English
          arrow-up
          6
          arrow-down
          1
          ·
          4 hours ago

          I’ve heard this from others, too. I don’t really get it.

          I watched a teammate working with AI:

          1. Identify the problem: a function was getting passed an object-field when it should be getting the whole object
          2. Write instruction to the AI: “refactor the function I’ve selected to take a Foo instead of a String or Box<String>. Then in the Foo function, use the bar parameter. Don’t change other files or functions.”
          3. Wait ~5s for Cursor to do it

          It did the instructions and didn’t fuck anything up, so I guess it was a success? But they already knew exactly what the fixed code should look like, so it seems like they just took a slow and boring path to get there.

          When I’m working with a new intern, they cost me time. Everything is 2-4x slower. It’s worth it because (a) I like working with people and someone just getting into programming makes me feel happy and (b) after a few months I’m able to trust that they can do things on their own and I’m not constantly checking to see if they’ve actually deleted random code or put an authentication check on an unauthenticated endpoint etc etc. The point of an intern is to see if you want to hire them as a jr dev who will actually become worthwhile in 6+ months.

          • ShortFuse@lemmy.world
            link
            fedilink
            English
            arrow-up
            1
            arrow-down
            6
            ·
            3 hours ago

            There’s a lot of false equivalence in this thread which seems to be a staple of this instance. I’m sure most people here have never used AI coding and I’m just getting ad-hominem “counterpoints”.

            Nothing I said even close to saying AI is a full replacement for training junior devs.

            The reality is, when you actually use an AI as a coding assistant there are strong similarities when training somebody who is new to coding. They’ll choose popular over best practices. When I get an AI assisted code segment, it feels similar to copypasted code from a stackoverflow. This is aside from the hallucinations.

            But LLM operate on patterns, for better or for worse. If you want to generate something serious, that’s a bad idea. There’s a strong misconception that AI will build usable code for you. It probably won’t. It’s only good at snippets. But it does recognize patterns. Some of those patterns are tedious to write, and I’d argue feel even more tedious the more experienced you are in coding.

            My most recent usage of AI was making some script that uses WinGet to setup a dev environment. Like I have a vague recollection of how to make a .cmd script with if branches, but not enough at the top of my head. So you can say “Generate a section here that checks if WinSDK is installed.” And it will. Looks fine, move on. The %errorlevel% code is all injected. Then say “add on a WinGet install if it’s not installed.” Then it does that. Then I have to repeat all that again for ninja, clang, and others. None of this is mission critical, but it’s a chore to write. It’ll even sprinkle some pretty CLI output text.

            There is a strong misconception that AI are “smart” and programmers should be worried. That’s completely overselling what AI can do and probably intentionally by executives. They are at best assistant to coders. I can take a piece of JS code and ask AI to construct an SQL table creation query based on the code (or vice versa). It’s not difficult. Just tedious.

            When working in teams, it’s not uncommon for me to create the first 5%-10% of a project and instruct others on the team to take that as input and scale the rest of the project (eg: design views, build test, build tables, etc).

            There are clear parallels here. You need to recognize the limitations, but there is a lot of functionality they can provide as long as you understand what it can’t do. Read the comments of people who have actually sat down and used it and you’ll see we’ve the same conclusion.

            • self@awful.systems
              link
              fedilink
              English
              arrow-up
              1
              ·
              25 minutes ago

              I feel so bad for the interns, and really your team in general, for having to interact with you

            • froztbyte@awful.systems
              link
              fedilink
              English
              arrow-up
              3
              ·
              3 hours ago

              christ this post is odious

              I feel quite confident in stating two things. 1) you fucking suck at your job. 2) the people reliant on you for things fucking hate dealing with you.

              the fact that you wrote this much florid effluent opinion, with as paltry examples as you bring to bear… christ

              just fucking learn some scripting languages, ffs

                • swlabr@awful.systems
                  link
                  fedilink
                  English
                  arrow-up
                  3
                  ·
                  2 hours ago

                  It’s only ad-hominem if they discredit your points by insulting you. If they read your points and use them to make statements about your character, that’s not ad hominem, that’s valid inference.

                  You probably need an example. Let’s say Alice and Beelice are having a conversation.

                  Alice: “I think seed oils are bad for you because RFK Jr. said so! MAGA!”

                  If Beelice says: “Alice, you are a real sack of potatoes, and therefore you are wrong,” that’s ad hominem.

                  If Beelice says: “Alice, if you’re going to parrot RFK Jr, then the worms deserve to eat the rotten flesh in your skull,” that’s plain inference.

                  Understand now, dear?

        • scruiser@awful.systems
          link
          fedilink
          English
          arrow-up
          6
          ·
          5 hours ago

          A junior developer learns from these repeated minor corrections. LLM’s can’t learn from them. they don’t have any runtime fine-tuning (and even if they did it wouldn’t be learning like a human does), at the very best past conversations get summarized and crammed into the context window hidden from the user to provide a shallow illusion of continuity and learning.

    • froztbyte@awful.systems
      link
      fedilink
      English
      arrow-up
      10
      ·
      8 hours ago

      you sound like a fucking awful teammate. it’s not your job to nitpick and bikeshed everything they do, it’s your job to help them grow

      “you need to code review everything” motherfucker if you’re saying this in context only of your juniors then you have a massive organisational problem

      • ShortFuse@lemmy.world
        link
        fedilink
        English
        arrow-up
        2
        arrow-down
        6
        ·
        5 hours ago

        it’s not your job to nitpick and bikeshed everything they do

        Wow. Talk about projection. I never said any of that, but thanks for letting everyone know how you treat other people.

        The point is AI can generate a good amount of code, but you can’t trust it. It always needs to be reviewed. It makes a lot of mistakes.