• Arghblarg ( Arghblarg@lemmy.ca ) 
    link
    fedilink
    arrow-up
    40
    ·
    1 year ago

    I feel this – we had a junior dev on our project who started using AI for coding, without management approval BTW (it was a small company and we didn’t yet have a policy specifically for it. Alas.)

    I got the fun task, months later, of going through an entire component that I’m almost certain was ‘vibe coded’ – it “worked” the first time the main APIs were called, but leaked and crashed on subsequent calls. It used double- and even triple-pointers to data structures, which the API vendor’s documentation upon some casual reading indicated could all be declared statically and re-used (this was an embedded system); needless arguments; mallocs and frees everywhere for no good reason (again due to all of the un-needed dynamic storage involving said double/triple pointers to stuff). It was a horrible mess.

    It should have never gotten through code review, but the senior devs were themselves overloaded with work (another, separate problem) …

    I took two days and cleaned it all up, much simpler, no mem leaks, and could actually be, you know, used more than once.

    Fucking mess, and LLMs (don’t call it “AI”) just allow those who are lazy and/or inexperienced to skate through short-term tasks, leaving huge technical debt for those that have to clean up after.

    If you’re doing job interviews, ensure the interviewee is not connected to LLMs in any way and make them do the code themselves. No exceptions. Consider blocking LLMs from your corp network as well and ban locally-installed things like Ollama.

    • It should have never gotten through code review, but the senior devs were themselves overloaded with work

      Ngl, as much as I dislike AI, I think this is really the bigger issue. Hiring a junior and then merging his contributions without code reviewing is a disaster waiting to happen with or without AI.

    • Rose ( umbraroze@slrpnk.net ) 
      link
      fedilink
      arrow-up
      7
      ·
      1 year ago

      It used double- and even triple-pointers to data structures

      (old song, to the tune of My Favourite Things)

      🎶 “Pointers to pointers to pointers to strings,
      this code does some rather unusual things…!”
      🎶

  • The study was centered on bugfixing large established projects. This task is not really the one that AI helpers excel at.

    Also small number of participants (16) , the participants were familiar with the code base and all tasks seems to be smaller in completion time can screw results.

    Thus the divergence between studio results and many people personal experience that would experience increase of productivity because they are doing different tasks in a different scenario.

    • Feyd ( Feyd@programming.dev ) 
      link
      fedilink
      arrow-up
      18
      ·
      1 year ago

      familiar with the code base

      Call me crazy but I think developers should understand what they’re working on, and using LLM tools doesn’t provide a shortcut there.

      • You have to get familiar with the codebase at some point. When you are unfamiliar, in my experience, LLMs can provide help understanding it. Copying large portions of code you don’t really understand and asking for an analysis and explanation.

        Not so far ago I used it on assembly code. It would have taken ages to decipher what it was doing by myself. The AI sped up the process.

        But once you are very familiar with a established project you had work a lot with, I don’t even bother asking LLMs anything, as in my experience, I come up with better answers quicker.

        At the end of the day we must understand that a LLM is more or less an statistical autocomplete trained on a large dataset. If your solution is not on the dataset the thing is not going to really came up with a creative solution. And the thing is not going to run a debugger on your code either, afaik.

        When I use it the question I ask myself the most before bothering is “is the solution likely to be on the training dataset?” or “is it a task that can be solved as a language problem?”

  • Scrath ( Scrath@lemmy.dbzer0.com ) 
    link
    fedilink
    arrow-up
    25
    ·
    1 year ago

    I talked to Microsoft Copilot 3 times for work related reasons because I couldn’t find something in documentation. I was lied to 3 times. It either made stuff up about how the thing I asked about works or even invented entirely new configuration settings

    • Senal ( Senal@programming.dev ) 
      link
      fedilink
      English
      arrow-up
      5
      ·
      edit-2
      1 year ago

      In fairness the msdn documentation is prone to this also.

      By “this” I mean having what looks like a comprehensive section about the thing you want but the actual information you need isn’t there, but you need to read the whole thing to find out.

  • Phen ( Phen@lemmy.eco.br ) 
    link
    fedilink
    arrow-up
    16
    ·
    1 year ago

    Reading the paper, AI did a lot better than I would expect. It showed experienced devs working on a familiar code base got 19% slower. It’s telling that they thought they had been more productive, but the result was not that bad tbh.

    I wish we had similar research for experienced devs on unfamiliar code bases, or for inexperienced devs, but those would probably be much harder to measure.

  • dil ( dil@lemmy.zip ) 
    link
    fedilink
    arrow-up
    8
    ·
    1 year ago

    Would ai coders even get faster over time or just stay stagnant since they aren’t learning anything about what they’re doing