this post was submitted on 15 Jun 2023
2 points (100.0% liked)

Programming

43 readers
1 users here now

This magazine is dedicated to discussions on programming languages, software development, and coding. Whether you are a beginner programmer or an experienced developer, this is the place for you. Here you can share your knowledge, ask questions, and engage in discussions on topics such as coding languages, software engineering, web development, and more. From the latest trends and frameworks to tips and tricks for debugging, this category covers a wide range of topics related to programming.

founded 1 year ago
 

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

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 1 points 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.