Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #32695
| From | Roy Smith <roy@panix.com> |
|---|---|
| Newsgroups | comp.lang.python |
| Subject | Re: How to generate account number? |
| Date | 2012-11-03 09:22 -0400 |
| Organization | PANIX Public Access Internet and UNIX, NYC |
| Message-ID | <roy-1E6B33.09225503112012@news.panix.com> (permalink) |
| References | <mailman.3220.1351890866.27098.python-list@python.org> <1gsdm9-r2c.ln1@crazy-horse.bildanet.com> <mailman.3234.1351931985.27098.python-list@python.org> |
In article <mailman.3234.1351931985.27098.python-list@python.org>, Andriy Kornatskyy <andriy.kornatskyy@live.com> wrote: > 'Z05738521581' > 'Z17888279480' > 'Z07395350007' > > Short, human readable and satisfy original requirements. > > Andriy If you really want human readable, it's better to chunk the data up into 3 or 4 digit groups. So, instead of Z05738521581, maybe Z05-738-521-581. Or perhaps even better, Z05-7385-21-581 (just a hunch, but I suspect varying the length of the groups makes it easier to read). Even better might be base-32 encoding the value. Strings of digits have an information density of about 3.2 bits/char. Base-32 is just about as readable, but gives you 5 bits/char, so you end up with a few less characters (which you still want to chunk into 3 or 4 character groups).
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
How to generate account number? Andriy Kornatskyy <andriy.kornatskyy@live.com> - 2012-11-03 00:13 +0300
Re: How to generate account number? GangGreene <GangGreene@example.com> - 2012-11-02 18:02 -0400
RE: How to generate account number? Andriy Kornatskyy <andriy.kornatskyy@live.com> - 2012-11-03 11:38 +0300
Re: How to generate account number? Roy Smith <roy@panix.com> - 2012-11-03 09:22 -0400
Re: How to generate account number? Tim Chase <python.list@tim.thechases.com> - 2012-11-03 10:34 -0500
RE: How to generate account number? Andriy Kornatskyy <andriy.kornatskyy@live.com> - 2012-11-03 19:18 +0300
RE: How to generate account number? Andriy Kornatskyy <andriy.kornatskyy@live.com> - 2012-11-03 19:23 +0300
Re: How to generate account number? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-11-02 22:39 +0000
RE: How to generate account number? Andriy Kornatskyy <andriy.kornatskyy@live.com> - 2012-11-03 11:42 +0300
csiph-web