Problem: Chartbeat generates random unique user IDs in the browser when a new reader visits a customers' sites. The original 2 line random user ID function used would generate over 4.8 trillion trillion (yes, that’s 1 trillion squared) different unique IDs, but in practice we were seeing laughably high collision rates. To add to the challenge of fixing this issue, our solution had to run in all browsers, take up minimal code, and work with zero calls to a server.
Wes Chow (CTO, Chartbeat) describes the experiences in solving this problem as well as the mathematical basics of hash functions and pseudo-randomness.
This talk was given at the Full-Stack Engineering Meetup hosted by Gilt.
If you have questions to Wes, you can now submit them in the comments below the post.