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

TechTakes

1427 readers
361 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
[–] froztbyte@awful.systems 10 points 5 months ago (22 children)

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

[–] Imacat@lemmy.dbzer0.com 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?

[–] JackbyDev@programming.dev 1 points 5 months ago* (last edited 5 months ago) (10 children)

Everything after this is so pointlessly condescending and confusing. Even if someone knows what monotonic ids are it doesn't automatically mean they're going to have any clue about what that means with regards to index performance. In the spirit of not being an asshole, I'll write it out here based on my research since everyone else just seems interested in putting others down rather than being helpful.

  • "Monotonic" implies something that is always increasing (or decreasing). You'll never get a result that's lower than one you've gotten before (or higher if you're dealing with monotonically decreasing stuff).
  • Random UUIDs are not monotonic because they're random.
  • Even time based UUIDs are not monotonic because of the format. Rather than being store high, medium, low, they're stored low, medium, high. Think of it like storing numbers like "1 20 300" for 321. 322 would be "2 20 300". To make it worse, the end of them is "random" (a MAC address). So, not monotonic at all because MAC addresses can change. (See here for proposed new formats, where they mention this as a problem https://www.ietf.org/archive/id/draft-peabody-dispatch-new-uuid-format-04.html)
  • Monotonic primary keys are useful because they're more easily inserted into an index because you're always inserting into one specific part of the index rather.
[–] slopjockey@awful.systems 7 points 5 months ago (2 children)

Yeah, I'm all for dunking on promplets, but just being wrong about best practice isn't a big deal. The reaction here is excessively harsh.

[–] self@awful.systems 10 points 5 months ago (1 children)

agreed. we’ve veered a bit too close to slashdot’s tone on this one.

with that said, I’m also acutely aware of the tactics that programming.dev reply guys use to generate these kinds of responses. to our guests: it’s best to take your questions about database best practices literally anywhere else but here.

[–] froztbyte@awful.systems 6 points 5 months ago

with that said, I’m also acutely aware of the tactics that programming.dev reply guys

I wasn't actually aware of this, and will be taking note of it in future. for my part I tried to make my reply "uhh go look at $x and learn" post without, y'know, overtly making things into a not-meant-for-here debate setup, but that didn't seem to have worked out entirely well :)

[–] V0ldek@awful.systems 9 points 5 months ago (1 children)

Just to be clear, if a person is wrong about best practices then it's not a big deal.

In context of spicy autocomplete as coding assistance, it better output immaculate, robust code every fucking time or we should be clowning on it with zero remorse.

[–] slopjockey@awful.systems 6 points 5 months ago

Wait a second...to err is to be human. Programmers err sometimes. ChatGPT shits itself all the time...😟. Yud et al. were right

load more comments (7 replies)
load more comments (17 replies)
load more comments (17 replies)