this post was submitted on 13 Jun 2024
1 points (100.0% liked)

TechTakes

1432 readers
16 users here now

Big brain tech dude got yet another clueless take over at HackerNews etc? Here's the place to vent. Orange site, VC foolishness, all welcome.

This is not debate club. Unless it’s amusing debate.

For actually-good tech, you want our NotAwfulTech community

founded 1 year ago
MODERATORS
(page 2) 18 comments
sorted by: hot top controversial new old
[–] [email protected] 0 points 5 months ago* (last edited 5 months ago) (1 children)

How did they not find this while testing?

e: Regardless, I don't regret the experience.

eurgh

load more comments (1 replies)
[–] [email protected] 0 points 5 months ago* (last edited 5 months ago) (2 children)

friend of mine happened to dm me this the other day, and here are my reactions from chat, verbatim (albeit timestamps removed)

fucking sfba method, man
so many things in that post, man, god
linear extrapolation for “lost sales”, doing the double presumption of both constant uptake and that everyone would definitely have been a customer
“whatever you’re thinking, double it” bayfucker advice
and just …. everything
fucking hell

and the code. fuck me the fucking code. it's always "nice" to see just how very very clever all the yc fuckers are. but christ does it give me feelings.

but they gotta go fast! if they're barely approaching redshift, are they even agile?!

[–] [email protected] 0 points 5 months ago (1 children)

It’s okay to copy/paste your basic model structure for SQLAlchemy classes, but copy and paste from the SQLAlchemy docs. Sweet suffering stack overflow, did nobody even look at the docs ever, or did they only trust ChatGPT? SQLAlchemy‘s simple for basic use cases.

Also here is such a nutshell of everything wrong with YC: jackhole prompt fondlers with no tests, no paying customers, who turn on the most important new feature in prod at the end of the day (jesus wept), and yet with all that clown show,

We had eight ECS tasks on AWS, all running five instances of our backend (overkill, yes we know, but to be fair we had AWS credits).

What the actual fuck.

[–] [email protected] 0 points 5 months ago

Oh yeah I entirely agree about copying - hell, lord knows how much interlang tools suck, I entirely get copycloning some defs best-match

But yeah indeed they super fucked up :D

With a nice cushy bit of “free” to make the problem go away. Whereas recently a fedi admin got their their instance turboscraped and were stressing about a sub-10k bill that would’ve probably killed their entirely service. My contempt for these bayfucker dickweeds knows no bound.

load more comments (1 replies)
[–] [email protected] 0 points 5 months ago (3 children)

You also definitely shouldn't be using String non-monotonic UUIDs for primary keys in a database, like, literally ever, but what the fuck do I know, I just do databases for a living, I'm not the all-knowing GPT code wizard.

[–] [email protected] 0 points 5 months ago

i'm not doing databases for living but the idea of stringifying a perfectly cromulent unique number in order to store it in the database comes as slightly weird to me.

[–] [email protected] 0 points 5 months ago (25 children)

UUIDs make great primary keys in some applications. If you generated 100 trillion UUID4s, there’s about a 1 in a billion chance of finding a duplicate. Thats usually good enough for my databases.

The issue here was that they used a single UUID instead of generating a new one for each record.

[–] [email protected] 0 points 5 months ago

There are countless issues here. They didn't do exception handling, they used a string to store their UUIDs (even if this was a DB constraint, you use sqlalchemy.Uuid and let the ORM and DB handle the translation), and as the person you're replying to stressed, they're using non-monotonic UUIDs. Also if you have a unique user_id and you're never exposing your primary keys, you don't need to get fancy, just let the ORM handle it with auto-incrementing, for most use cases. And so many other tragic things about this one tiny blog post.

tl;dr if you're going to copy code you don't understand, copy it from the docs, not from everything in the kitchen thrown into a blender.

[–] [email protected] 0 points 5 months ago (1 children)

You’re missing the entire point of the post you replied to

[–] [email protected] 0 points 5 months ago (12 children)

I was reading it as an endorsement for autoincrementing int primary keys and a condemnation of uuids in general which is a genuine stance I’ve known people to take. Is that not it?

[–] [email protected] 0 points 5 months ago (1 children)

indeed, that is not it

hint: don't try to "read in" any extra meanings. just read the actual statement that was posted.

[–] [email protected] 0 points 5 months ago (1 children)

second hint: throw "monotonic UUIDs" into your search engine of choice

[–] [email protected] 0 points 5 months ago (6 children)

Would they not have monotonic uuids after altering the code in the article to use a function or lambda as they suggested?

load more comments (6 replies)
load more comments (11 replies)
load more comments (23 replies)
[–] [email protected] 0 points 5 months ago (3 children)

If you’re using a new-to-you ORM, and you don’t ever check the docs to see the basic primary key syntax… it’s SQLAchemy, it’s well documented and there’s tons of prior art.

Also I don’t understand their business case but if a user has a primary key, a unique user ID, and a unique customer ID, then all three of those uniquely identify the customer. (Weird, but there are some plausible explanations.) But then why would you need both the user ID and the customer ID in the subscription table is this some stripe thing I don’t understand or are they just bad at this?

[–] [email protected] 0 points 5 months ago (2 children)

20 bucks the datastructure was designed for easiest access from the semantics of whatever du jour js lib they were using for the app

[–] [email protected] 0 points 5 months ago (1 children)

“designed”, rather

Even “derived from” feels too strong a statement. “Was the result of”?

load more comments (1 replies)
load more comments (1 replies)
load more comments (2 replies)
[–] [email protected] 0 points 5 months ago* (last edited 5 months ago) (2 children)

The original post was removed, hence the archive link.

HN figures the real issue was the lack of testing/monitoring, not specifically the use of ChatGPT. But the kind of person who's ok with letting spicy autocomplete write their customer acquisition code is probably not the kind of person knowing how to test and monitor.

https://news.ycombinator.com/item?id=40627558

[–] [email protected] 0 points 5 months ago

I actually tried letting ChatGPT-4o write some tests the other day.

Easily 50% of the tests were wrong. They ignored DB uniqueness constrains or even datatypes. In a few cases, they just hallucinated field names that didn't exist.

I ended up spending just as much time cleaning up the cruft as writing them. I could easily see someone just starting out letting the code go through.

load more comments (1 replies)
load more comments
view more: ‹ prev next ›