4 ms·
>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 rea
by vsareto 6y ago
>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.
- rualca 6y ago> 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.