As a brand new user of ChatGPT, I have never been so incredibly impressed and rage-inducing frustrated at exactly the same time with any new tech I’ve ever tried.

I was using it to help create some simple javascript functions and debug some code. It could come up with working functions almost immediately that took a really interesting approach that I wouldn’t have thought of. “Boom,” I thought, “this is great! Let’s keep going!” Then, immediately afterwards, it would provide absolute shit that couldn’t and wouldn’t work at all. It couldn’t remember the very code it just outputted to me on multiple occasions, and when asked to make a few minor changes it constantly spouted brand new very different functions, usually omitting half the functionality it had before. But, when the code was directly typed in by me in a message, every time, it did much better.

Seems with every question like that I had to start from scratch every time, or else it would work from clearly wrong (not even close, usually) newly generated, code. For example, if I asked it to print exactly the same function it printed a moment ago, it would excitedly proclaim, “Of course! Here’s the exact same function!” and then print a completely different function.

I spent so much time carefully wording my question to get it to correctly help me debug something that I ended up finding the bug myself, just because I was being so careful in examining my code so I could ask it a question that would give me a relevant answer. So…I guess that’s a win? Lol. Then, just for fun, I told ChatGPT that I had found and corrected the bug, and it took responsibility for the fix.

And yet, when it does get it right, it’s really quite impressive.

  • LittleLordLimerick@lemm.ee
    cake
    link
    fedilink
    arrow-up
    9
    ·
    11 months ago

    It usually isn’t much good at writing new code from scratch. You have to be so specific on what you want that by the time you fully described the code you need, you could have written it yourself.

    What it’s really good at is refactoring or finding bugs in existing code. I will frequently paste in some ugly function that I’ve written and say “can you make this more readable?” and 100% of the time it produces clean, readable code that’s nicer than what I gave it.

    • loaf@sh.itjust.works
      link
      fedilink
      English
      arrow-up
      3
      ·
      11 months ago

      I do this as well. I’ll ask it to check for potential issues, and say, “can you make this more concise?” I’ve actually learned a little by how it will shorten my code.