I’m imagining as years go by when/if this AI regex code breaks - nobody knows how it works or how to fix it. Am I wrong?

I’m not a programmer and I write shitty code but I can manage to write simple regex to create quick and dirty code. That’s a terrible programming choice I know but I never share my code. It’s just for me and it works.

  • FunkyStuff [he/him]@hexbear.net
    link
    fedilink
    English
    arrow-up
    17
    ·
    11 days ago

    Yeah, this is true of most things that take significant debugging and editing in lots of decorators, flags, specifiers, etc. By the time you get it working for all the cases you expect, you covered it in so many symbols that would take hours to explain to a new maintainer why they’re there.

    That being said, it’s still good to know regex if you’re maintaining a codebase that uses regex, even if you’re not gonna try to read and directly edit the regexs that the authors created, because it might be necessary for you to replace them wholesale. Having to do this with an AI that hallucinates in features that only work in certain implementations and has no concept of what kinds of inputs it’ll have to deal with… demented.

    • quarrk [he/him]@hexbear.net
      link
      fedilink
      English
      arrow-up
      2
      ·
      10 days ago

      The difference is that even if no one understands some code base right now, the source code is intelligible and able to be learned. AI just spits out the results and there is not much possibility or use to reverse engineer a result.