Is there a name for the human-readable IDs that services like Battle.net uses?
4 replies, posted
Referring to things like this:
https://i.imgur.com/dtTcYYn.png
as opposed to using UUIDs that follow RFC4122. I think Discord also used to do this but now it seems they do both according to the User class in the JS API.
I'm considering using the username + discriminator approach for a project I'm working on because it'll make people's IDs easier to remember, however I really don't know anything beyond that, so I'd like to research it first. Except I have no idea what it's called.
Also, if anyone knows, I'm mainly wondering if I can run with just a username + discriminator as a replacement for UUIDs, or if it's better to use both and associate a username + discriminator with a UUID or something like that.
Any help is appreciated
Discord calls the second part (including the octothorp) 'tag'.
What you use for association depends on whether you want to ever let the user change it.
I prefer to use fully opaque IDs for that reason, but it also has the side effect of potentially making your database a bunch more performant (since you can use fixed-length data for that ID).
Another benefit is that you can make more assumptions about your fully generated IDs elsewhere in the code, for example regarding which characters won't appear in them.
Discord seems to support just about anything in the display name for that reason.
As far as complete terminology goes, I think I'd use
ID ≈ handle = display name + tag
for this. I'm not entirely sure where 'handle' comes from besides programming, but it seems to be used as IRC term. It's what users use to get ahold of one another.
Since it can change at any time along with display name and possibly tag, the backing storage for any occurrence should include the ID. I think Discord actually puts both ID and current handle into the internal representation of @user (hi).
Note that discord does not use the discriminator as their internal ID, they use twitter's snowflakes
I have literally never heard this word before thank you I thought it was some xenobiological appendage
I'm using it partially in jest (and it looks like the inventors of that name did too). The official Unicode character name is NUMBER SIGN.
Sorry, you need to Log In to post a reply to this thread.