Interesting idea, but...
Interesting idea, but...
Posted Nov 20, 2011 22:19 UTC (Sun) by Cyberax (✭ supporter ✭, #52523)In reply to: Interesting idea, but... by vrfy
Parent article: That newfangled Journal thing
Have you considered using reverse domain names for message ids?
UUID are just too unwieldy. Imagine that I'm a developer writing:
class SomeClass
{
void someMethod()
{
while(true)
FILE *fl = fopen(...);
if (!fl)
log(DEBUG, "File with data is not found, trying to create it");
...
At that moment you realize that you need a UUID for this message. Ok, easy enough:
class SomeClass
{
void someMethod()
{
while(true)
FILE *fl = fopen(...);
if (!fl)
log(DEBUG, "d92bc8ba-7a98-4e49-8384-8ee013e2f773", "File with data is not found, trying to create it");
...
But damn! Now my string wraps around 80 character limit! And if I'm unlucky it can wrap around inside the UUID itself, so I need to reformat my code.Alternatively, I need to create a file with #defines of UUIDs and write things like this: "log(DEBUG, FILE_DATA_NOT_FOUND_UUID, "File with data is not found, trying to create it");" which leads to duplications. So most lazy programmers (such as myself) would just define a couple of UUIDs and use them with free-form text fields for verbose messages.
So please, consider making a good API for developers to be your first priority. And using UUIDs in API is definitely doubleplus ungood.
