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 Anonymous, 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

<< Home




Archive

  • July 2014
  • June 2014
  • May 2014
  • October 2013
  • July 2013
  • June 2013
  • April 2013
  • January 2013
  • August 2012
  • June 2012
  • April 2012
  • March 2012
  • February 2012
  • December 2011
  • July 2011
  • June 2011
  • May 2011
  • April 2011
  • March 2011
  • February 2011
  • January 2011
  • December 2010
  • November 2010
  • October 2010
  • September 2010
  • August 2010
  • July 2010
  • June 2010
  • May 2010
  • April 2010
  • March 2010
  • February 2010
  • January 2010
  • December 2009
  • November 2009
  • October 2009
  • September 2009
  • August 2009
  • July 2009
  • June 2009
  • May 2009
  • April 2009
  • March 2009
  • February 2009
  • January 2009
  • December 2008
  • November 2008
  • October 2008
  • September 2008
  • August 2008
  • July 2008
  • June 2008
  • May 2008
  • April 2008
  • March 2008
  • February 2008
  • January 2008
  • December 2007
  • November 2007
  • October 2007
  • September 2007
  • August 2007
  • July 2007
  • June 2007
  • May 2007
  • April 2007
  • March 2007
  • February 2007
  • January 2007
  • December 2006
  • November 2006
  • October 2006
  • September 2006
  • August 2006
  • July 2006
  • June 2006
  • May 2006
  • April 2006
  • March 2006
  • February 2006
  • January 2006
  • December 2005
  • November 2005
  • October 2005
  • September 2005
  • August 2005
  • July 2005