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

TechTakes

1394 readers
58 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] 3 points 5 months ago (21 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] 8 points 5 months ago (9 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] 7 points 5 months ago (8 children)

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

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

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

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

~~you might know what "monotonic" means if you had googled it, which would also give you the answer to your question~~

edit: this was far too harsh of a reply in retrospect, apologies. the question is answered below, but i'll echo it: a "monotonic UUID" is one that numerically increases as new UUIDs are generated. this has an advantage when writing new UUIDs to indexed database columns, since most database index structures are more efficient when inserting at the end than at a random point (non-monotonic UUID's).

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

I’ve more of a math background than cs so monotonic is a word I know well but it apparently means something slightly different to me. Monotonicity isn’t mentioned anywhere in that link.

[–] [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] 6 points 5 months ago

Thanks for trying to explain it. I was hung up on thinking all UUIDs looked like UUID v4. I read up a little on UUID v7 and it’s making sense. Probably should’ve done that sooner.

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

you are probably a better person than i am for actually giving an explanation

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

just stop digging, sheesh

load more comments (6 replies)
load more comments (6 replies)
load more comments (17 replies)