<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: UUID Generator in JavaScript</title>
	<atom:link href="http://ajaxian.com/archives/uuid-generator-in-javascript/feed" rel="self" type="application/rss+xml" />
	<link>http://ajaxian.com/archives/uuid-generator-in-javascript</link>
	<description>Cleaning up the web with Ajax</description>
	<lastBuildDate>Thu, 17 May 2012 07:43:39 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
	<item>
		<title>By: michaelsharman</title>
		<link>http://ajaxian.com/archives/uuid-generator-in-javascript/comment-page-1#comment-271776</link>
		<dc:creator>michaelsharman</dc:creator>
		<pubDate>Wed, 04 Mar 2009 23:59:17 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=4365#comment-271776</guid>
		<description>Note that the code presented here is out of date and doesn&#039;t work in IE6 and I believe IE7.

Check broofa&#039;s site for the most up to date:

http://www.broofa.com/blog/2008/09/javascript-uuid-function/</description>
		<content:encoded><![CDATA[<p>Note that the code presented here is out of date and doesn&#8217;t work in IE6 and I believe IE7.</p>
<p>Check broofa&#8217;s site for the most up to date:</p>
<p><a href="http://www.broofa.com/blog/2008/09/javascript-uuid-function/" rel="nofollow">http://www.broofa.com/blog/2008/09/javascript-uuid-function/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: broofa</title>
		<link>http://ajaxian.com/archives/uuid-generator-in-javascript/comment-page-1#comment-267388</link>
		<dc:creator>broofa</dc:creator>
		<pubDate>Sun, 14 Sep 2008 14:42:18 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=4365#comment-267388</guid>
		<description>
@trav1m: The importance of random number generation comes from it&#039;s use as a substitute for unique state.  As long as you have state that you know to be unique, that you can use as a starting point for UUID creation, than a deterministic process will give you IDs that you can guarantee to be unique.  This is how &quot;version 1&quot; UUIDs work - they are built using a combination of MAC address, timestamps, and counters.  The result is UUIDs that are guaranteed to be unique across all devices that have MAC addresses.


But sometimes you don&#039;t have unique state to use as a starting point, as is the case in JavaScript.  We don&#039;t know the system&#039;s MAC address or anything else that is sufficiently unique for our purposes.  So instead we use state that we &lt;em&gt;hope&lt;/em&gt; is unique - randomly generated numbers - to produce &quot;version 4&quot; UUIDs.  As long as there is a sufficient degree of randomness, the odds of picking the same UUID are so astronomically low that we can essentially guarantee uniqueness for all but the most insanely picky requirements. (See my original blog post for details).


There is a catch, however, and that is that Math.random() typically relies on a &lt;a href=&quot;http://en.wikipedia.org/wiki/Pseudorandom_number_generator&quot; rel=&quot;nofollow&quot;&gt;pseudo-RNG&lt;/a&gt; algorithm.  If you really want to get nit-picky about how unique the UUIDs we&#039;re generating are, than you need to look at the quality of the algorithm and how it is seeded. But that&#039;s really getting into microscopic hair-splitting, IMHO.
</description>
		<content:encoded><![CDATA[<p>@trav1m: The importance of random number generation comes from it&#8217;s use as a substitute for unique state.  As long as you have state that you know to be unique, that you can use as a starting point for UUID creation, than a deterministic process will give you IDs that you can guarantee to be unique.  This is how &#8220;version 1&#8243; UUIDs work &#8211; they are built using a combination of MAC address, timestamps, and counters.  The result is UUIDs that are guaranteed to be unique across all devices that have MAC addresses.</p>
<p>But sometimes you don&#8217;t have unique state to use as a starting point, as is the case in JavaScript.  We don&#8217;t know the system&#8217;s MAC address or anything else that is sufficiently unique for our purposes.  So instead we use state that we <em>hope</em> is unique &#8211; randomly generated numbers &#8211; to produce &#8220;version 4&#8243; UUIDs.  As long as there is a sufficient degree of randomness, the odds of picking the same UUID are so astronomically low that we can essentially guarantee uniqueness for all but the most insanely picky requirements. (See my original blog post for details).</p>
<p>There is a catch, however, and that is that Math.random() typically relies on a <a href="http://en.wikipedia.org/wiki/Pseudorandom_number_generator" rel="nofollow">pseudo-RNG</a> algorithm.  If you really want to get nit-picky about how unique the UUIDs we&#8217;re generating are, than you need to look at the quality of the algorithm and how it is seeded. But that&#8217;s really getting into microscopic hair-splitting, IMHO.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: trav1m</title>
		<link>http://ajaxian.com/archives/uuid-generator-in-javascript/comment-page-1#comment-267284</link>
		<dc:creator>trav1m</dc:creator>
		<pubDate>Tue, 09 Sep 2008 16:23:15 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=4365#comment-267284</guid>
		<description>I don&#039;t understand the importance of true randomness in a UUID. Isn&#039;t the whole point that the value will never be generated again by any generator at any time? Wouldn&#039;t some degree of predictability *help* meet that goal?</description>
		<content:encoded><![CDATA[<p>I don&#8217;t understand the importance of true randomness in a UUID. Isn&#8217;t the whole point that the value will never be generated again by any generator at any time? Wouldn&#8217;t some degree of predictability *help* meet that goal?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

