Tuesday, August 08, 2006


[+/-] show/hide text
To tie the link layers to the ink images, Build 52 assigns each image an id generated randomly using a value between 0 and 1000. I mistakenly assumed this meant the odds of duplication were about one in a million. Actually, it's one in a thousand and one, which is still pretty slim, but I beat the odds this week with two images sporting the same ID tag.

Has no effect on the individual entries, but when they were both on the index page, the links grouped up on one image. Fortunately, this post knocks one off the index nor will they be grouped in the same archive page.

I am now adjusting Build 52 to use the current point in time as the numeric value.

Updated! I wasn't even done writing this when I saw that Warner posted the audio InkShow I recorded with him, which prompted me to fix the error, which would have disappeared with this post.

The odds work against Build 52


2 Comments:

  1. Whenever you need a unique identifier, you should use a Guid. Not only is it guaranteed to be unique in your context, but it's guaranteed to be unique globally.

    Guid.NewGuid() in .NET and
    CoCreateGuid in COM.

    By Anonymous Josh Einstein, at 8/09/2006 11:06:00 AM
     

  2. Oh Josh, you're so funny. Surely you noticed during your visit to the Build 52 web page that it's all Javascript. guid for .NET or COM... silly...

    Seriously though, good tip but unfortunately it doesn't apply (either to B52 or me; I'm not a programmer).

    By Blogger Sumocat, at 8/10/2006 04:09:00 PM
     

Post a Comment

Links to this post:

Create a Link

<< Home




Archive