4 ms·
Thanks for telling. Bookmarked for the next time we're told ChatGPT's code error rate is acceptable because we review its code just like an intern's.
by chrisjj 2y ago
Thanks for telling.
Bookmarked for the next time we're told ChatGPT's code error rate is acceptable because we review its code just like an intern's.
- morgante 2y agoHonestly I'm not sure why ChatGPT has anything to do with this problem. I remember making the exact same mistake (accidentally using a single function call in a schema) back in 2010. No LLMs required. The bigger culprit is probably a lack of testing / debugging. This error would immediately get caught if you simply registered twice on a test instance.
- fzeroracer 2y agoIn a world where this entire codebase wasn't generated by ChatGPT, you'd have engineers familiar with the various parts of the system to quickly identify and fix the problem. Testing and debugging isn't just a matter of stepping through code, it's an exercise of seeing where your mental model of the codebase is faulty versus the current reality of it. I've encountered similar problems and they'd be fixed in a matter of hours, not days.
- moody__ 2y agoThis is spot on, the issue is not the mistake per se but in creating a code base that the team themselves are not familiar with. With some intern or team member generated code you can sit down with them and have them walk you through the code and introduce you to their reasoning, but you can't do that with an LLM. The author even admits to just mimicking the existing structure that the LLM started with when they had to expand, which sounds like a first commit for a team member first getting familiar with some new code. Part of the benefit of being able to write your own code is that you can do it in a way that clicks for you. Hopefully this lets you debug and extend it efficiently. I don't know why someone would squander this opportunity.
- audiodude 2y agoYes I don't understand the perceived benefits of re-writing the code in Python/FastAPI if none of them know Python/FastAPI.
- chrisjj 2y ago"Requirements"?
- chrisjj 2y ago> In a world where this entire codebase wasn't generated by ChatGPT, you'd have engineers familiar with the various parts of the system to quickly identify and fix the problem. I wonder why this victim didn't ask ChatGPT to identify and fix the problem...
- dragonwriter 2y ago> Honestly I'm not sure why ChatGPT has anything to do with this problem. Because if humans had written and reviewed the code, multiple team members would have had to have learned Python, and SQLAlchemy specifically, which, even if the mistake was initially made as many times as ChatGPT did, there would have been multiple independent opportunities for it to be caught and questioned and the relevant knowledge shared during development. ChatGPT may be able to crank out immense volumes of superficially functional code, but if its your only “teammate” that understands the libraries used and touches the code, its a huge single point of failure.
- yen223 2y ago> This error would immediately get caught if you simply registered twice on a test instance Friendly reminder: check if your codebase is actually testing this! One of the interesting consequence of running unit tests with a fresh database everytime is that problems related to unique constraints seldom get caught by unit tests.
- chrisjj 2y agoBut why should we assume twice is enough...
- chrisjj 2y ago> Honestly I'm not sure why ChatGPT has anything to do with this problem. I remember making the exact same mistake (accidentally using a single function call in a schema) back in 2010. No LLMs required. So /that's/ where ChatGPT learned it! :)
- ben_w 2y agoIf you're treating ChatGPT code differently than your interns' code, you're going to miss some serious issues regardless of which one isn't under a spotlight. I had to fix some intern code once, and… well, I can't give too many details, but I will say that an FAQ shouldn't consist entirely of quotations from a TV show from a different country in a language the app doesn't support.
- deleted 2y ago[deleted]
- Closi 2y agoYour take-away is that this is ChatGPT's fault rather than a failure of testing?
- asddubs 2y agoi can see missing this during testing since it relies on doing the flow twice. though i have a hard time imagining a team of people not figuring this out in less than 5 days
- jackspawn 2y agoto be fair, they didnt think it was a problem at the beginning, which can happen... if you made a mistake with your logging/monitoring
- hansvm 2y agoTheir take-away is that when people tell them ChatGPT produces excellent code you have a nice example to the contrary. The business had many failures, not the least of which is that `default = ... foo() ...` should have jumped out in a cursory glance at the code as needing further inspection, almost no matter which language the developers in question are most comfortable with.
- probably_wrong 2y agoThere is a comment higher up in this thread [1] about how "ChatGPT 4-o can spot the error immediately" which I believe exemplifies the point the parent is making, namely, that any criticism of ChatGPT is met with "that's only because you didn't use enough of it", aka the "more cowbell" defense. If HN is to be believed you should use ChatGPT to generate your data insertion code, to port it to a different language, and to ask for which error it made when you asked before. What to do if an error slips through in this version is always an exercise left for the reader. [1] https://news.ycombinator.com/item?id=40630906 https://news.ycombinator.com/item?id=40630906
- chrisjj 2y agoMy takeaway is fault lies with s/he who trusted ChatGPT.