gnomicutterance

joined 6 months ago
[–] [email protected] 4 points 5 months ago

One day I’ll read the dissertations that must exist on those reactionaries and ancaps who adored the aesthetic of Occupy but still loved the idea of wealth consolidation, social norms enforced by power, and state violence used to violently suppress protest and disorder.

[–] [email protected] 14 points 5 months ago (3 children)

But betting? There’s being an insider and then there’s profiting, and aren’t most journalists prohibited from trading or betting on their covered areas?

[–] [email protected] 18 points 5 months ago (8 children)

is it considered acceptable journalistic ethics at Vox for a journalist who reports on EAs and prediction markets to make prediction market bets on how a journalistic outlet will follow-up a story on prediction markets and EAs? My eyebrows have just levitated so high they've collided with a starlink swarm.

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

Imagine saying “we have no specific views on eugenics”! You should, buddy. You should.

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

Solutions: AI-guided suggestions to parents about the traits they should select

There’s a joke in here about and that’s how the human race all became polydactylic with extra elbows, but it’s too early in the morning for me to figure out how to make it not be at the expense of people with limb and facial differences.

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

Intelligent, thoughtful, empathetic like cartman was kind.

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

ah, thank you!

[–] [email protected] 14 points 5 months ago* (last edited 5 months ago) (8 children)

when you do not yet have (1) customers, (B) unit tests, (ג) developers who can write their own code, or (IV) exception handling, the term-of-art that comes to mind for doing anything besides auto-incrementing primary keys is YAGNI. (Especially because nobody who is making thoughtful, careful database tuning decisions is using chat-gippity to convert their models. And more to the point, they aren't using SQLAlchemy of all things to make large, distributed applications that need UUID primary keys.)

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

okay, for some reason, I feel the need to help.

The given link defines the function that creates a UUID:

uuid.uuid4(): Generate a random UUID.

In mathematics, can you generate a monotonic function by generating random numbers?

[–] [email protected] 19 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] 12 points 5 months ago (6 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?

view more: ‹ prev next ›