Articles By Category
- Apple (4)
- Applescript (2)
- Database Design (1)
- HTML/CSS (1)
- iTunes (1)
- Javascript (1)
- Linix/Apache (2)
- MS SQL (12)
- mysql (3)
- OS X (1)
- php (5)
- REGEX (1)
- Software Development Methodology (1)
- Software QA/Testing (1)
- Software/Product Design (1)
- Swift (1)
- Transact SQL (11)
- Uncategorized (2)
- Web Apps (5)
Concord Business Services Unique ID Generator
Short and Sweet
This should be used for a permanent key if and only if there is code to determine if a generated value is a duplicate, and only if there are a pretty small number of records using this. Number of possible values is only 72^5 = 1,934,917,632. Also, there is no check to see if the code accidentally generates a bad word, or something that sounds like a bad word. But it's pretty cool that with just 5 characters, and using only digits and letters, we can come up with almost two billion combinations, don't you think?
7Y255
Meduim
Same caveats as above, but possible values are 72^12 = 19,408,409,961,765,342,806,016. Pretty darn safe to use, I think.
3lsX8r1p5jGR
Full
A full-blown, true guid for the purists. It starts with a 12-character are a unique id generated by each refresh (same as the Medium number above). Then, there's a php-generated guid based on the millisecond that the refresh occurred, combined with the medium number as a seed. Finally, I insert three punctuation characters in the string at random positions.
3lsX8r1p|5jGR67$66b4e_d124ec
Debug
Every once in a while, I run a program, and I have a piece of debug information that prints to the screen when I don't want it there. And sometimes, I've lost where the bit of debug code is. If it's just printing some intermediate value, it's really hard to search several files of code and find the offending line. So I copy and paste this bit in front of my debug lines, just to make it easy to undo.
print '<br />7Y255 debug code - remove me<br />';