5 ms·
This reminds me of how useful it is to make your ids include the type of the thing they're identifying as part of the value. This could be as simple as somethin
by ekimekim 4y ago
This reminds me of how useful it is to make your ids include the type of the thing they're identifying as part of the value. This could be as simple as something like "u<random digits>" for users, "p<random digits>" for projects, etc. Or it could be a full-blown URN scheme like some of the big cloud providers use (though please, whatever you pick, BE CONSISTENT about using that form and only that form. If there's an operation to exact "just the id" from your larger value, and you need to use the full thing in some places and "just the id" in others, then you've missed the point).
- thundergolfer 4y agoYep, this was a situation where humans manually passed IDs between it other, so it would have been great if those IDs were maximally human-readable. Crockford’s 32 encoding with a domain prefix works well enough.