News for hackers. Stuff that matters.
Re:A ChatGPT mistake cost us $10k by mbreese on Sunday June 09, 2024 @09:31PM (#40629238)
This is an error that should probably have been caught just based upon the color of the text when it was typed/pasted into the source code. Of the uuid() call was in quotes, it would have appeared as text. When you’re blindly using so much copy/pasted code (regardless of the source), it’s really easy to miss errors like this.

But our existing tools are already built to help us avoid this.

Back in the day, I used a tool from a group in Google called “error-prone”. It was great at catching things like this (and Lorne goal NPE in Java). It would examine code before compiling to find common errors like this. I wish we had more “quick” check tools for more languages.

Re:A ChatGPT mistake cost us $10k by thaumasiotes on Sunday June 09, 2024 @11:24PM (#40629838)
> This is an error that should probably have been caught just based upon the color of the text when it was typed/pasted into the source code. Of the uuid() call was in quotes, it would have appeared as text.

It's not in quotes. It's a function call.

The issue is that the function call happens once, when you define the class, rather than happening each time you instantiate the class.

Re:A ChatGPT mistake cost us $10k by mbreese on Wednesday June 12, 2024 @09:07AM (#40657700)
You’re right… I was remembering it as a `server_default` attribute. Those were quoted in the other lines, but this wouldn’t have been.