• flamingo_pinyata@sopuli.xyz
    link
    fedilink
    arrow-up
    25
    arrow-down
    10
    ·
    2 days ago

    Looking up how to do something, as an improved stackoverflow. Especially if it provides sources in the answer.

    Boilerplate unit tests. Yes, yes, I know - use parametrized test, but it’s often not practical.

    Mass refactoring. This is tricky because you need to thoroughly review it, but it saves you annoying typing.

    I’m sure there’s more, it’s far from useless. But you need to know what you want it to do and how to check if done correctly.

    • mmddmm@lemm.ee
      link
      fedilink
      arrow-up
      30
      arrow-down
      2
      ·
      2 days ago

      Boilerplate unit tests.

      It will generate bad tests, so you will have lots of tests blocking your work, but won’t actually test the important properties.

      Mass refactoring.

      That’s an amount of trust in the LLM capacity to not create hidden corner cases and your capacity to review large-scale changes that… I find your complete faith disturbing.

      • Scrubbles@poptalk.scrubbles.tech
        link
        fedilink
        English
        arrow-up
        4
        ·
        2 days ago

        I mean, it’s not like it ships it to production. You can read code it writes and modify it if you don’t like it, or choose not to use it.

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

        As always, the specific situation matters. Some refactors are mostly formulaic, and AI does great at that. For example, “add/change this database field, update the form, then update the api, update the admin page, update the ui, etc.” is perfectly reasonable to send an AI off to do, and can save plenty of programmer time.

        • Lucy :3@feddit.org
          link
          fedilink
          arrow-up
          6
          ·
          2 days ago

          Until you don’t properly check the diff, a +/- or </=/>/<=/>= was reversed, and you now have an RCE in test, soon to be in prod.

          • Pennomi@lemmy.world
            link
            fedilink
            English
            arrow-up
            3
            ·
            2 days ago

            What kind of moron doesn’t check the diff? Plus, modern AI coding tools explicitly show the diff and ask you to confirm each edit directly.

            I wouldn’t let a human muck about in my code unchecked, much less an AI. But that doesn’t mean it’s useless.

    • Lucy :3@feddit.org
      link
      fedilink
      arrow-up
      13
      ·
      2 days ago

      I very rarely find result summarizers useful. If I didn’t find something normally, there won’t be anything in there.

      I sure love tests and huge codebases with errors in them. In the time I read and understood an LLM’s output, I could write it myself. And save on time later when expanding/debugging.

    • vala@lemmy.world
      link
      fedilink
      arrow-up
      6
      ·
      2 days ago

      I am so far from trusting and LLM to do mass refactoring even with heavy review. Refactoring bugs can be super insidious.