22 ms·
For me, the visual noise is a downside for UUIDs. A lot of time investigating data issues means glancing at query results and deciding if something looks unexp
by Timpy 3y ago
For me, the visual noise is a downside for UUIDs. A lot of time investigating data issues means glancing at query results and deciding if something looks unexpected. I just can't parse a UUID with my eyes that quick. I've come up against this at my current job a little too often and I'm cursing the decision to switch to UUIDs. I know, it's a balancing act of competing concerns. But for us moving to UUIDs was future proofing for a problem that never arose, and the senior dev who made us switch left the company a few years ago. I just don't like the dev experience of UUIDs in a world where you do have to get hands (and eyes) on the data all the time.
- Pet_Ant 3y agoSomething I saw a longtime ago was hashing UUIDs into a RGB value and then colouring the background of the cell (at least when viewing in a DB IDE). That way you can quickly at a glance tell if it's worth going over character by character.
- Timpy 3y agoWow I really love that idea. Next time I get stuck on a fix tinkering with my setup I'm going to check this out.
- adverbly 3y agoHoly crap this is brilliant. I'd just change the text color of the uuid itself though - no need to change the background(although you'd need to make sure that the hash function avoided your existing background color to maintain a high enough contrast ratio for readability). I want this as a vscode extension. Or maybe as a terminal plugin or something? Is that possible? Could tmux do it maybe?
- michaelsalim 3y agoInteresting take. I do agree there's some visual noise there, but not how you described it. UUID just takes so much screen space compared to its integer counterpart. If you don't have a good UI sorting things out it's quite annoying. Otherwise it's pretty great.
- arp242 3y agoIt's kind of a tooling problem; no reason tooling can't do the same as git and display "1509af9" instead of "1509af9af2634d16f8d9b98e01a0166a49185474". Also I wish these sort of things would get encoded in base-36 (0-9 a-z) instead of base-16; that would help too.
- ComputerGuru 3y agoUlid is an ordered UUID canonically rendered in not Base36 but Crockford's Base32 (to make it easier to read then write or read aloud or parse and error correct).
- apelapan 3y agoVisual noise and screen space hogging annoy me alot. Especially when you end up with multiple UUID:s on the same log line. If one doesn't truly need distributed creation of globally unique identifiers, it is so much nicer with base35-encoded integer sequences. Preferably loosely based on a timestamp.
- deleted 3y ago[deleted]
- SkyPuncher 3y agoInterestingly, my experience has been the opposite. It's incredibly easy to search and filter logs with UUIDs. You can search for just the UUID without any other information.