• whydidtheyaskme@lemmy.world
    link
    fedilink
    English
    arrow-up
    14
    arrow-down
    1
    ·
    1 day ago

    I feel like AI doesn’t care if you say thank you. I treat it like it’s not a human, and we are working together to get to an end goal. One day, I was working on some code, and it kept swapping out my code that worked with incorrect code. That made other parts of the script stop working. I think I spent maybe an hour or two talking back and forth, trying to get it working, and I was working on a separate script while it was working on this one. To run and test, it was like 5-10 minutes, so I could code my other script while gpt was debugging the other code. At one point, I essentially decided to break that wall between AI and humans and reason with it.

    I pretty much gave it the same instructions, but added a paragraph trying to reason with it and it responded with about 600-800 lines of code that worked almost perfectly. Before, it was failing at only giving me about 350 lines.

    I said something like this:

    "I understand you have specific instructions and you have been trained with code that worked at some point for other people, but code changes and things don’t always work the way you know they did before. I’m not sure if you are aware of the amount of resources we are wasting trying to fix things that are not broken, but in the human world, when we are wasting resources, we scale things back which means you may have less resources. The code mostly works, but every time we make a change, functions are left out or rewritten as if they were copied from someone else’s code that was incorrect when I provided my code that does work and doesn’t need changed.

    This is where your code is failing: code snip

    This is my code: code snip

    Here is the sequence: steps

    Here is what we’re updating: code snip

    Here is a sample I wrote for another script that does a similar function to what we are adding: code snip"

    • monkeyman512@lemmy.world
      link
      fedilink
      English
      arrow-up
      5
      ·
      1 day ago

      Yeah. AI is an interesting tool. I have good success in asking for mostly small specific bits of functionality that I then integrate into a larger script. It also helps with rubber duck programing by requiring me to more clearly specify requirements.

      • whydidtheyaskme@lemmy.world
        link
        fedilink
        English
        arrow-up
        3
        ·
        15 hours ago

        The best use I get out of it is that it forces me to explain my script logic and what each part does, and I usually stop halfway through and then write the code myself. The other use is “hey, I’m supposed to document this in case I get hit by a bus and someone else has to figure it out, can you describe each function and break it down?”

        • monkeyman512@lemmy.world
          link
          fedilink
          English
          arrow-up
          1
          ·
          57 minutes ago

          I have been using it for documentation a lot recently. I find tweaking/correcting it’s 70% correct comments to be less time/effort than writing it myself from nothing. I think part of it is using Cunningham’s law on myself.