How reliable is AI lke ChatGPT in giving you code that you request?

  • AlteredStateBlob@kbin.social
    link
    fedilink
    arrow-up
    15
    ·
    1 year ago

    I have built several programs with ChatGPT 4 by now. From very basic Python scripts to Python webscrapers and C# in combination with Unity3D.

    In the beginning it was much better than it is currently. At the moment context is severely hampered no matter the limit and you’ll be bashing your head against circular arguments and it straight up ignoring stuff you just posted two messages ago.

    Trying to troubleshoot code it wrote a few days ago will be a slog and like dragging yourself over nails at times. Here’s what I have found to help and make life better:

    1. Be very, very, very precise in your instructions. And keep them saved, so you can reuse them later (point 4)
    2. From the very start plan to build your project with small functions that interact (good policy anyway) which makes troubleshooting and changing these functions much easier and will prevent you running into message limits.
    3. If it fails to work for you the way you need it, you’ll might have to scrap your entire code and start over with ChatGPT -> Again, the reason for point 2 being very important. Scrapping one functin is much less painful than an entire tool.
    4. Start new chats when you feel the quality degrading. Sometimes it helps and since the context is garbage at the moment anyway, it doesn’t matter much.
    5. Post the code it is supposed to fix every single time. It will inevitably refer to other code, code hallucinations, etc. otherwise. Again why point 2 is important.