Naming things

Hashes, UUIDs, haecceities, deep and inscrutable singular Names

June 7, 2016 — August 11, 2023

computers are awful
cryptography
Figure 1: Naming things

1 Terms

Hash
Do some arithmetic on the thingy, represented as an integer to make a probably-unique identifier
UUID
Universally unique identifier

2 Standards

ulid

herein is proposed ULID:

  • 128-bit compatibility with UUID
  • 1.21e+24 unique ULIDs per millisecond
  • Lexicographically sortable!
  • Canonically encoded as a 26 character string, as opposed to the 36 character UUID
  • Uses Crockford’s base32 for better efficiency and readability (5 bits per character)
  • Case insensitive
  • No special characters (URL safe)
  • Monotonic sort order (correctly detects and handles the same millisecond)
proquint

pronounceable UUIDs, in c, java and javascript

In general what would help the humans would be if IDs were not only unique, but were also readable, spellable, and pronounceable and just generally convenient for a human to use — as well as being a reasonably efficient information encoding. We therefore propose PRO-nouncable QUINT-uplets of alternating unambiguous consonants and vowels, or “proquints”, as the solution.

There is only so much Shannon entropy you can get by pushing air through flapping organs originally purposed for eating and breathing. We assume it best to re-use the method to which natural language has already converged.

shortuuid

python library used by some respectable projects; a good choice I suppose?

shortuuid is a simple python library that generates concise, unambiguous, URL-safe UUIDs.

Often, one needs to use non-sequential IDs in places where users will see them, but the IDs must be as concise and easy to use as possible. shortuuid solves this problem by generating uuids using Python’s built-in uuid module and then translating them to base57 using lowercase and uppercase letters and digits, and removing similar-looking characters such as l, 1, I, O and 0.

nom
A name generator in go.
mnemonic
python reference implementation of bip39

You would invoke that as

# Generate a random mnemonic using crypto.randomBytes

mnemonic = bip39.generateMnemonic() # strength defaults to 128 bits
'seed sock milk update focus rotate barely fade car face mechanic mercy'

Online uuid generator.

MUID, the memorable unique id system has a whiff more cryptography about it. Names are expensive to generate, so you use this where you wish to constrain supply.

3 Bacronyms

Ask ChatGPT.

4 References

Lilienfeld, Ammirati, and David. 2012. Distinguishing Science from Pseudoscience in School Psychology: Science and Scientific Thinking as Safeguards Against Human Error.” Journal of School Psychology.
Weissman, and Weissmann. 2007. Giving Things Their Proper Names: Carl Linnaeus and W. H. Auden.” FASEB Journal : Official Publication of the Federation of American Societies for Experimental Biology.