Live data from Hacker News

A ChatGPT mistake cost us $10k

asim.bearblog.dev

11–20 of 526 posts

Re: A ChatGPT mistake cost us $10k

#11
post #3

I'm not familiar with this library, how does `text("(now())")` evaluate and why there are extra parentheses? And should that be a lambda expression as well, so that `create_date` isn't just the timestamp when the python process was started?

I suspect it's either just an SQL expression sent to the DB, or it's `eval`ed in Python.

Re: A ChatGPT mistake cost us $10k

#12
post #3

I'm not familiar with this library, how does `text("(now())")` evaluate and why there are extra parentheses? And should that be a lambda expression as well, so that `create_date` isn't just the timestamp when the python process was started?

IIRC, the difference is server_default vs default. One is generated DB-side, the other in the Python code. Might be wrong on that, but that's my recollection

Re: A ChatGPT mistake cost us $10k

#14
post #3

I'm not familiar with this library, how does `text("(now())")` evaluate and why there are extra parentheses? And should that be a lambda expression as well, so that `create_date` isn't just the timestamp when the python process was started?

I’ll note that the bug is in the `id` column, but the `created_date` is likely passing the string “now()” to invoke SQL’s NOW(), deferring the timestamp creation to the database.

Re: A ChatGPT mistake cost us $10k

#15
I understand how the mistake was made, it seems relatively easy to slip by even when writing code without ChatGPT.

But what I don't understand is how this wasn't caught after the first failure? Does this company not have any logging? Shouldn't the fact the backend is attempting to reuse UUIDs be immediately obvious from observing the error?

Re: A ChatGPT mistake cost us $10k

#17

"Note: I want to preface this by saying yes the practices here are bad and could have been avoided. This was from a different time under large time constraints. Please read with that in mind" These "constraints" are why I'm terrified of subscribing to software

>subscribing

The previous world where you buying per user seat licenses for hundreds and hundreds of dollars wasn't great.

Re: A ChatGPT mistake cost us $10k

#18

I understand how the mistake was made, it seems relatively easy to slip by even when writing code without ChatGPT. But what I don't understand is how this wasn't caught after the first failure? Does this company not have any logging? Shouldn't the fact the backend is attempting to reuse UUIDs be immediately obvious from observing the error?

They didn’t even know there was an error until the customers came ringing. You always want to know what errors happened before your customers do, logging, alerting, any monitoring at all would have helped them here.

Re: A ChatGPT mistake cost us $10k

#19
post #2

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.

If 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.

Re: A ChatGPT mistake cost us $10k

#20
post #2

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.

Your take-away is that this is ChatGPT's fault rather than a failure of testing?
Post reply on HN