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

TechTakes

1397 readers
54 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
you are viewing a single comment's thread
view the rest of the comments
[–] [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.