"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
Having worked with some legacy subscription code it can be quite nasty. We had race conditions where we would charge users twice This has made me paranoid that any time I see timeout or error related to money I assume it went through and come back later.
A ChatGPT mistake cost us $10k
491–500 of 526 posts
Re: A ChatGPT mistake cost us $10k
#492Earlier quoted context omitted.
> Tell me you had no business being invested in without telling me. Check out their comment history to see who invested in them.
The lesson I learned from the dot-com era is that people who are dependent on the hype to make profit will crane their necks to believe the hype. Salespeople, executives, engineers, it doesn’t matter. Every day on HN reminds me a little more of 1998.
Re: A ChatGPT mistake cost us $10k
#493Earlier quoted context omitted.
looking at the query logs for the nighttime period should have made the bug fairly obvious
They even said they had sentry set up.. they'd notice the duplicate key error immediately.
This is not an error that would be difficult to spot in an error aggregator, it would throw some sort of constraint error with a reasonable error message.
Re: A ChatGPT mistake cost us $10k
#494I spotted the error instantly. With all due respect to your team - this has nothing to do with ChatGPT and everything to do with using a programming model that your team does not have sufficient expertise in. Even if this error managed to slip by code review, it would have been caught with virtually any monitoring solution, many of which take less than 5 minutes to set up.
To be fair, if I wasn't looking for this bug I never would have spotted it. That being said, you're entirely right that any monitoring or even the most basic manual testing should have instantly caught this.
Re: A ChatGPT mistake cost us $10k
#495 id = Column(String, primary_key=True, default=str(uuid.uuid4()), unique=True, nullable=False)
Can be fixed by making the default a function: id = Column(String, primary_key=True, default=lambda: str(uuid.uuid4()), unique=True, nullable=False)
Or, if you choose to use native UUID types in Python and SQL: id = Column(Uuid, primary_key=True, default=uuid.uuid4, unique=True, nullable=False)Re: A ChatGPT mistake cost us $10k
#496This is why you should always rush your engineers, never giving them enough time to validate or understand what ChatGPT just spewed. Good job. /s Meanwhile, I go through the tedious process of understanding ChatGPT's code letter-by-letter, also reading the docs, searching StackOverflow, even offering and rewarding bounties on StackOverflow, all to see if the code makes a shred of sense.
When I was coding https://stackoverflow.com/a/77210784/308851 well, I had no idea how to open an SSH connection using go, I barely knew basic Go so I asked ChatGPT. The meat of the SSH connecting code is still pretty much ChatGPT written (bad chx!) but it contained a couple defers like defer session.Close() which I needed to understand and remove before it became usable as a utility function. I did search for ssh.Pub…
Yeah just a secure shell what ever could go wrong with code you don't understand? Probably nothing much right?
Re: A ChatGPT mistake cost us $10k
#497Earlier quoted context omitted.
When I was coding https://stackoverflow.com/a/77210784/308851 well, I had no idea how to open an SSH connection using go, I barely knew basic Go so I asked ChatGPT. The meat of the SSH connecting code is still pretty much ChatGPT written (bad chx!) but it contained a couple defers like defer session.Close() which I needed to understand and remove before it became usable as a utility function. I did search for ssh.Pub…
> It's just an SSH connection, the risk is quite low Yeah just a secure shell what ever could go wrong with code you don't understand? Probably nothing much right?
Re: A ChatGPT mistake cost us $10k
#498In your defense, at least your solution wasn’t: ‘$ EXPORT MAX_REQUESTS=1 gunicorn bear:app’ … which would have in fact fixed your subscription problem, but gave you a new problem :) Great share!
Heads up Bear [1] is just the blogging platform, not the company this post is about. [1] https://bearblog.dev
Re: A ChatGPT mistake cost us $10k
#499Earlier quoted context omitted.
> It's just an SSH connection, the risk is quite low Yeah just a secure shell what ever could go wrong with code you don't understand? Probably nothing much right?
well, it's client. What could go wrong? I mean, it might not connect, right? I did understand it to some degree.
Re: A ChatGPT mistake cost us $10k
#500Earlier quoted context omitted.
well, it's client. What could go wrong? I mean, it might not connect, right? I did understand it to some degree.
I would make sure the SSH client doesn't connect to a man-in-the-middle!
the tricky part , really , is the syntax for ssh config but again that's easy to understand even if it's very hard to write.