TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ask HN: Have you got ChatGPT to output gibberish code?

1 pointsby firstfewshellsabout 2 years ago
Or maybe even code that was syntactically incorrect?

3 comments

ggeorgovassilisabout 2 years ago
No. 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.
weatherliteabout 2 years ago
Not 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.<p>Worth noting it was ChatGPT 3.5 so maybe this is less of an issue now.
评论 #35251263 未加载
korotkevicsabout 2 years ago
It 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&#x27;t ideal but it could be more inspirational than an empty editor when starting something new.