Make Pirania voucher codes shorter
Right now, Pirania voucher codes are 6 characters long, all uppercase letters from A-Z without Ñ or Í or anything like that. This means there are 26^6 possible vouchers = 308,915,776 possible vouchers. Do we really need that big of an address space for vouchers?
As far as I know, there's no way to make personalized vouchers, like nice cat or dolphin. So, to make vouchers as easy to use as possible, how about we make them shorter? Yesterday I used a voucher system that had only three digits, alphanumeric, lowercase. If we leave out confusing letters (i, l, o, s, u, v) and numbers (0, 1), that leaves us with 28 characters. Lowercase is easier so that I don't have to tap the shift key on my cell phone, or maybe leave the first letter in uppercase since sometimes the phone automatically makes the first letter uppercase.
Voucher address space size with 28 characters
- length 2 = 28*28 = 784
- length 3 = 282828 = 21,952
- length 4 = 282828*28 = 614,656
Or we could stick with uppercase letters, which means 26 characters:
- length 2 = 26*26 = 676
- length 3 = 262626 = 17,576
- length 4 = 262626*26 = 456,976
Looking at those numbers, I think that it would be perfectly safe to have 3-character long voucher codes. I am not aware of any uses of Pirania, LibreRouterOs, or LibreMesh that serve more than 15,000 people. Maybe I'm missing something. Maybe if Guifi.net wants to use Pirania across their entire network, they will need a larger address space. Everyone else can get by with 3 or even 2 characters.