I'm implementing a referral program on a site and was wondering if there was a best practice in terms of what the referral codes should look like. I assume since we don't want overly long referral codes, we can't just use GUID or anything like that, so I'll have to do checks on the referral codes generated to ensure uniqueness?
I am not sure what exactly you are doing so I will give more than one solution.
1) If you are just worried about length, you could use something called ShortGUID. developed for C#.
2) if you are looking for a more readable format which I assume you might you could use todays date/time and number count that recycles everyday. (or anything using the datetime)
3) If these are referals via web you can use unique URLs like a PURL.