The Living Thing / Notebooks :

Naming things

Hashes, UUIDs, deep and inscrutable singular Names

Naming things
Naming things

Terms

Hash

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

UUID

Universally unique identifier

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 that are 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