News for hackers. Stuff that matters.
Re:Show HN: Prefixed, dual-token, base58 encoded API Keys by benatkin on Tuesday May 10, 2022 @11:44PM (#31335628)
I've used MongoDB quite a bit and I don't like that it has the timestamp in the id. That's unnecessary information.

With UUIDs I prefer UUID4 to UUID1 most of the time.

I prefer to only include the relevant information and for API keys the client doesn't usually need the time the key was created.

Re:Show HN: Prefixed, dual-token, base58 encoded API Keys by jd_mongodb on Thursday May 12, 2022 @01:28AM (#31349614)
Of course if you don't like the id's that MongoDB generates by default you can always the supply your own. The only constraint on the _id field is that it be unique as we automatically apply a unique index. Effectively if you have a unique key for your data you should use _id for it as it saves you an index. (We always index _id).

(I work for MongoDB).

Re:Show HN: Prefixed, dual-token, base58 encoded API Keys by phineyes on Wednesday May 11, 2022 @01:05AM (#31336016)
I don't agree. Your examples (UUID1, UUID4) are much longer strings and contain no useful information. UUID1 contains the device's MAC ID, UUID4 is just random bits.. vs a functional ID system like pika or Snowflakes which make use of those random bits by embedding a timestamp - something which might actually come in useful for some.