News for hackers. Stuff that matters.
Re:Using Masked Identifiers to Reference ActiveRecord Models by matthodan on Saturday July 30, 2011 @07:26PM (#2827091)
I thought so too at first, but this way I can control the length of the unique ID while still guaranteeing that every ID is unique. Clearly, if you decided to have a 2 character masked identifier, you'd end up with a small number of possible objects before problems start to happen. As a TODO, I need to implement an elegant way to handle situations when all possible UIDs have been exhausted. If you know of a good UUID lib that lets you control the length of the UID, guarantees 100% unique codes, and gracefully handles issues when UIDs have run out, let me know! I'd definitely consider replacing my CodeGenerator.

There are no comments on this comment yet.