News for hackers. Stuff that matters.
Re:GUIDs Are Not the Only Answer by vsareto on Tuesday January 05, 2021 @06:13PM (#25652563)
>Poorly formatted log statements/errors can become harder to debug >UUIDs often need context to aid debugging.

The GUID vs Int problem is incidental to the real problem: poorly formatting logs. An integer or other key type without context is no more helpful.

>At the very least, identifiers should not be allowed to float freely as strings or integers in order to prevent a class of inconsistency bugs.

I'm not familiar with the ergonomics of GUIDs across all languages, but C#/MSSQL makes them pretty easy to handle when they have been chosen as keys.

So the answer, as far as ergonomics go, is not settled depending on your stack.

Re:GUIDs Are Not the Only Answer by rualca on Wednesday January 06, 2021 @02:23AM (#25655393)
> The GUID vs Int problem is incidental to the real problem: poorly formatting logs.

This.

The author's arguments boil down to "UUIDs are bad because the way I generate my logs is an unusable mess".

The ints vs UUIDs problem is also specious because a UUID is nothing more than a 16 byte int that's generated in a clever way. It might typically be presented in a particular string representation but the text string is not the value of the UUID.

Re:GUIDs Are Not the Only Answer by dehrmann on Wednesday January 06, 2021 @03:17AM (#25655685)
Yeah, IDs with a sufficiently large dataset will be unintelligible no matter what you do.
Re:GUIDs Are Not the Only Answer by SeriousM on Thursday January 07, 2021 @02:04AM (#25668090)
Structured logs would help here in order to extract the logged information in an easy way.