• dan@upvote.au
    link
    fedilink
    arrow-up
    10
    arrow-down
    2
    ·
    edit-2
    12 days ago

    At work, I use AI for some things. Right now I’m rewriting some legacy spaghetti code that’s had a bunch of things hacked into it over the years. I spoke to the person most familiar with the expected behaviour and used AI to combine his info plus the existing code and unit/integration tests into a list of requirements.

    I wrote the new code and tests based on the requirements rather than based on the old code. After each commit, I used AI to check for parity between the old and new code, and keep a Google Sheet up to date with the progress (which features were fully implemented, and which ones were missing or had gaps). I had AI write some tests cases too - given the list of requirements, write integration tests for them based on the style of a few tests I wrote by hand.

    It has some quirks (eg for tests it loves over-mocking even though our skills tell it to mock as little as possible) but it definitely speeds things up.

    I use AI for small side projects at work too. Tweaking and adding features I want to shared libraries, internal tools to help our team debug stuff and automate triaging of bug reports (they’re all still reviewed by a human), etc.

    The entire reason I can trust its code is because I can read it and tweak it myself. I sometimes need to go through a few iterations to get AI code into an acceptable state. AI writing machine code directly, like what’s been talked about recently and what this post is referencing, is such a dumb idea.

    • luciferofastora@feddit.org
      link
      fedilink
      arrow-up
      2
      ·
      10 days ago

      I think that’s the distinction between an expert using a tool diligently and responsibly, and a lazy person using it haphazardly as a crutch.

      If that tool ever gets ripped out from under you, you’ll possibly suffer a loss in performance, but you’ll still be able to perform and do your job.

      If their crutch is kicked out, they’ll crash.