In an attempt to solve one problem I encountered another. I would like to have an easy and memorable way of creating unique error numbers, across projects and across developers. The scheme I came up with was to use the initials of the developer, find their position in the alphabet, and append the date and time.Example: lets say the developer Mark Elliot Zuckerberg (initials MEZ) writes code that throws an exception on Feb 8th 2014 at 12:54AM. The error code would be: 8526020820140054This works brilliantly on 64 bit machines, but the resulting integer is too large for 32 bit computers. Does that make this a bad idea? How common are 32 bit servers, and do we expect them to slowly disappear completely?
Using error numbers which only work on 64 bit servers: a bad idea?
php;web development;error messages;32 bit
I would like to have a [...] way of creating unique error numbers, across projects and across developers.IMHO that is the bad idea. You should avoid the need for having a global unique error number across project boundaries. That is a global requirement you cannot fulfill as soon as you need to add third-party components, and at the long run, it will also be hard to enforce such a rule across many projects and many developers. So better design your system in a way you can manage your error numbers locally, this will give you much more flexibility and does not couple unrelated projects together with obstructive rules.How your indivual projects manage their error numbers then is up to them, but I am pretty sure they will find a way to keep them below 32 bits.