News for hackers. Stuff that matters.
Re:GUIDs Are Not the Only Answer by ivan_ah on Tuesday January 05, 2021 @06:37PM (#25652823)
The Python package `shortuuid` makes working with UUIDs a little easier by encoding them as strings: https://github.com/skorokithakis/shortuuid#usage (uses base-57 encoding, with alphabet consisting of A-Za-z0-9 with potentially confusing symbols skipped)

The string representation is what you show to users, but under the hood it's still a UUID and compatible/interoperable with any other system that needs UUID-shaped identifiers.

The coolest part is youcan even truncate the string encodings to get shorter IDs, which correspond to UUIDs with lots of leading zeros.

Re:GUIDs Are Not the Only Answer by rualca on Wednesday January 06, 2021 @02:50AM (#25655520)
> The Python package `shortuuid` makes working with UUIDs a little easier by encoding them as strings:

This. In my opinion the only issue with UUIDs is that their standard textual representation can be very verbose and cumbersome in some scenarios.

A single ID takes over around 40 string characters in a line. That's half the width of a default terminal's width.

Thus the solution is obviously to use other textual representations. Instead of base16 then let's ramp up the base to shorten up the text dump, and while we are at it let's pick a readable format.