<story><title>German tank problem</title><url>http://en.wikipedia.org/wiki/German_tank_problem</url></story><parent_chain><item><author>sparkman55</author><text>There is some practical relevance to software development here.  One shouldn&amp;#x27;t expose sequential IDs (a.k.a. serial numbers) to the public for anything non-public.&lt;p&gt;I see this Hacker News post has a numerical ID in the URL, for example; I can estimate the size of Hacker News given enough of these numbers...  More directly, I can modify that numerical ID to crawl Hacker News.&lt;p&gt;Many sites do this; it&amp;#x27;s generally better to generate a (random or hashed or generated from a natural key) &amp;#x27;slug&amp;#x27; to use as the key instead.  For example, Amazon generates a unique, non-sequential, 10-digit alphanumeric string for each item in their catalog.</text></item></parent_chain><comment><author>meritt</author><text>I&amp;#x27;d advise against modifying that numerical ID. Recent history shows this is a punishable offense (hacking!) under the lovely CFAA and supported by the incompetent judicial system.</text></comment>
<story><title>German tank problem</title><url>http://en.wikipedia.org/wiki/German_tank_problem</url></story><parent_chain><item><author>sparkman55</author><text>There is some practical relevance to software development here.  One shouldn&amp;#x27;t expose sequential IDs (a.k.a. serial numbers) to the public for anything non-public.&lt;p&gt;I see this Hacker News post has a numerical ID in the URL, for example; I can estimate the size of Hacker News given enough of these numbers...  More directly, I can modify that numerical ID to crawl Hacker News.&lt;p&gt;Many sites do this; it&amp;#x27;s generally better to generate a (random or hashed or generated from a natural key) &amp;#x27;slug&amp;#x27; to use as the key instead.  For example, Amazon generates a unique, non-sequential, 10-digit alphanumeric string for each item in their catalog.</text></item></parent_chain><comment><author>pavel_lishin</author><text>The flipside is that you can give off the impression of having a large user base&amp;#x2F;product catalog&amp;#x2F;etc if you number things sequentially... but start at a large non-round number.</text></comment>