• Glitchvid@lemmy.world
    link
    fedilink
    English
    arrow-up
    12
    arrow-down
    1
    ·
    20 hours ago

    I keep getting told that AI is good at boilerplate code, and like, so is eclipse – if you know the kb shortcuts to autogenerate method stubs, classes, etc.

    • FizzyOrange@programming.dev
      link
      fedilink
      arrow-up
      5
      arrow-down
      1
      ·
      18 hours ago

      AI is good at more than just generating stubs, filling in enum fields, etc. I wouldn’t say it’s good at stuff beyond just “boilerplate” - it’s good at stuff that is not difficult but also isn’t so regular that it’s possible to automate using traditional tools like IDEs.

      Writing tests is a good example. It’s not great at writing tests, but it is definitely better than the average developer when you take the probability of them writing tests in the first place into account.

      Another example would be writing good error context messages (e.g. .with_context() in Rust). Again, I could write better ones than it does. But like most developers there’s a pretty high chance that I won’t bother at all. You also can’t automate this with an IDE.

      I’m not saying you have to use AI, but if you don’t you’re pointlessly slowing yourself down. That probably won’t matter to lots of people - I mean I still see people wasting time searching for symbols instead of just using a proper IDE with go-to-definition.

      • Glitchvid@lemmy.world
        link
        fedilink
        English
        arrow-up
        5
        arrow-down
        1
        ·
        17 hours ago

        Writing tests is a good example. It’s not great at writing tests, but it is definitely better than the average developer when you take the probability of them writing tests in the first place into account.

        Outside of everything else discussed here, this is something I disagree with on a fundamental level, flawed tests are worse than no tests, IMO.
        Not to get too deep in to the very contentious space of testing in development, but when it comes to automated testing, I think we’re better off with more rigorous[1] testing instead of just chasing test coverage metrics.


        1. Validating tests through chaos/mutagen testing; or model verification (e.g. Kani) ↩︎

        • FizzyOrange@programming.dev
          link
          fedilink
          arrow-up
          3
          ·
          13 hours ago

          flawed tests are worse than no tests

          I never said you should use flawed tests. You ask AI to write some tests. You READ THEM and probably tweak them a little. You think "this test is basic but better than nothing and it took me 30 seconds. You commit it.

        • ulterno@programming.dev
          link
          fedilink
          English
          arrow-up
          0
          ·
          16 hours ago

          I guess, it would be useful as a kind of fuzzer with a high price to performance ratio.
          Making tests to try and find vulnerabilities.

          For normal functionality testing though, better off making it yourself.

      • ulterno@programming.dev
        link
        fedilink
        English
        arrow-up
        1
        ·
        16 hours ago

        instead of just using a proper IDE with go-to-definition

        I have seen people use an IDE that has the functionality, but searching it instead.
        And then not finding it because it is in an out of project header, even though the IDE provides an F1 help (documentation) for that symbol.

      • technocrit@lemmy.dbzer0.com
        link
        fedilink
        arrow-up
        1
        arrow-down
        2
        ·
        edit-2
        15 hours ago

        It’s seems pretty obvious that crappy automated testing would be better than no testing. That’s not much of a challenge. Nor is it “AI”.

        • FizzyOrange@programming.dev
          link
          fedilink
          arrow-up
          3
          ·
          13 hours ago

          It absolutely is a challenge. Before AI there weren’t any other systems that could do crappy automated testing.

          I dunno what you mean by “it’s not AI”. You write the tests using AI. It’s AI.