Live data from Hacker News

A ChatGPT mistake cost us $10k

asim.bearblog.dev

151–160 of 526 posts

Re: A ChatGPT mistake cost us $10k

#151

I have seen the same mistake made in code created by humans. Many times, especially in react / typescript/ JavaScript, someone will forget to use a lambda. I felt the blog post failed to articulate the root cause of the issue and went straight to blaming ChatGPT. When you rush and make large or non peer code reviewed commits to main it is going to happen. The real issue was when you rush, take shortcuts and don’t ade…

Yeah ChatGPT is a red herring -- it doesn't matter what generates the code, it's what you do with it.

Re: A ChatGPT mistake cost us $10k

#152

This is a great example of why SQLAlchemy is a terrible ORM, and chatGPT is not alone in making the same mistake as millions of engineers, in fact likely where it learned the mistake. default = python code evaluates the default value as necessary for each new record server_default = the initial CREATE TABLE uses this computed (from python) value, thus the hardcoded UUID. They also could have done server_default=text(…

[flagged]

Re: A ChatGPT mistake cost us $10k

#155
post #86

Earlier quoted context omitted.

Simply put - if you want get the best out of the framework, you need to host it in Vercel. Otherwise, there are better options for frameworks. No need to ”fight it”. You will find many issues from GitHub which are not considered because they would make the framework ”better” or easier to use on other clouds.

Making things worse in a free offering by a company to profit from premium offerings by the same company its the pinacle of capitalism, reminds me of a recurrent joke I have with a friend while playing Call Of Duty, that they will get greedier and soon will sell not only character's skins but also shaders/textures for the maps, oh so you want to see something better than placeholder textures? We have the DLC just for…

The Video game metaphor stretches pretty far.

Madden has a monopoly license for NFL content. For a decade the biggest complaint was how they gate kept rosters behind the yearly re-release. Eventually they allowed roster sharing but they put it behind the most god awful inept UI you could possibly imagine such that practically casual gamers wouldn't bother with it.

Then Madden came out with Madden Ultimate Team (like trading cards MTX) and have been neglecting non-MUT modes ever since. They don't explicitly regress the rest of their game, they just commit resources to that effect.

Its like malicious compliance. They don't embrace, extend, extinguish, but they get a similar effect just with resourcing, layoffs, whatever.

Re: A ChatGPT mistake cost us $10k

#156

Earlier quoted context omitted.

It read like no one really knew what they were doing. "We just let it generate the code and everything seemed to work" is certainly not a good way to market your company.

> It read like no one really knew what they were doing. In my experience, hardly anyone in software does know what they're doing, for sufficiently rigorous values of "know what you're doing." We all read about other people's stupid mistakes, and think "haha, I would never have done that, because I know about XYZ!" And then we go off and happily make some equally stupid mistake because we don't know about ABC.

There’s a difference between not knowing what you are doing and making a mistake.

Re: A ChatGPT mistake cost us $10k

#158
I think this type of happenstance will become a lot more common and that’s not because using chatgpt to produce code directly, it’s a useful tool that I use from time to time too and I welcome it to some degree. I think this will become a lot more common because this tool enables more to be expected of us in terms of productivity, namely quantity. And if writing code wasn’t the hardest part, reviewing more and more of it in a shorter time will become the next burden.

Re: A ChatGPT mistake cost us $10k

#159

Earlier quoted context omitted.

The bug was in multiple subscriptions not just users. And I can't think of one non-contrived reason to do it. Even when testing the visibility/access of subscriptions between users you need 2 users, but only one subscription.

create a subscription for a test user. delete it. Make sure you can create another subscription for the same user. create subscriptions with and without overlapping effective windows Those seem like very basic tests that would have highlighted the underlying issue

Hindsight is 20/20. It’s always easy to think of tests that would have caught the issue. Can you think of tests that will catch the next issue though?

Re: A ChatGPT mistake cost us $10k

#160
post #60

Earlier quoted context omitted.

Line 56 is executed as the file is loaded. Simplified, the line is essentially: id = Column(default=str(uuid.uuid4())) As written, a UUID is generated once and used to set a class-level attribute. Each Python process would generate a unique value, so it wouldn't be immediately obvious. Most of the time Python's ability to run code as a file is loaded is helpful, but this is one the well known gotchas. Although I'm no…

default=lambda: str(uuid.uuid4())

ChatGPT, rewrite this as a named function

Sure,

```

UUID4 = uuid.uuid4()

def default_id():

    return UUID4
```
Post reply on HN