• x74sys@programming.dev
    link
    fedilink
    arrow-up
    3
    ·
    1 day ago

    Honestly, I think what you consider „good code“ is just shifted from what the previous commenter considers „good code“. Prompting is about giving enough information so the AI can solve the task without needing to reconstruct a lot of context. Most people using AI somewhat regularly will have figured out to write good enough prompts. I‘ve never seen AI generate perfectly good code beyond hello world and the fibonacci sequence. And by perfectly good I mean I wouldn’t change beyond 30% of what it produces, which is not a high bar.

    • Lovable Sidekick@lemmy.world
      link
      fedilink
      English
      arrow-up
      1
      ·
      17 hours ago

      The last thing I had it do was create a filesystem using Discord as the storage medium. Don’t ask me to justify the approach or tell me it breaks Discord’s rules - that’s irrelevant to my point. It was a fun idea to explore a way to host a bot for public use without also hosting other people’s data. The data is pretty minimal but does involve several small tables with relational links. I thought it would be interesting to store it as a few Discord messages in a private channel.

      As sample data I gave the AI the JSON file I had been using locally, and discussed various aspects of the design with it. It came up with the scheme of splitting up the data using a channel for each table and a message for each row. I don’t remember the interaction in detail but it asked me a bunch of questions - for example, it commented that Discord’s limit of 2000 characters per message didn’t seem to be a problem given the sample data, but wanting me to confirm. I had it generate the code as a node module with complete CRUD functionality, and refactor my existing code to use the module instead of the JSON file. What it gave me worked perfectly right away.

      Now of course this isn’t “Write me an accounting system,” but it’s far more complex than Hello World or Fibonnacci. Whether or not you code with AI is your choice, but deciding my notion of quality isn’t up to someone else’s because my results aren’t “AI sucks” is just pure denialism.