5 ms·
Ask HN: Have you got ChatGPT to output gibberish code?
Or maybe even code that was syntactically incorrect?
- ggeorgovassilis 3y agoNo. It often produced code that referenced non existing packages or classes that conveniently would solve the problem if they only existed, but the code would otherwise compile.
- korotkevics 3y agoIt helps to ask it to first split the implementation into a plan and then to ask to implement each step individually. Also, it is faster to fix tiny errors on your own instead of leading it into it. Sometimes it also helps to redo the full process with a good task definition and requirements list. The code isn't ideal but it could be more inspirational than an empty editor when starting something new.
- weatherlite 3y agoNot gibberish but definitely I had quite a few back and forth where he would apologize for getting stuff incorrect, try to correct itself and sometimes be wrong again (in that case you can get into a loop where he alternates between two wrong answers). It was not gibberish just code that did not work (either at all or as intended) for various reasons. So I would call it buggy, not gibberish. Worth noting it was ChatGPT 3.5 so maybe this is less of an issue now.
- DANmode 3y agoWhy does the "he" bother me so much here?
- weatherlite 3y agoHaha I wasn't aware I wrote it :)