In work we interface with an API that recycles its serial numbers sometimes, or at least they're not guaranteed to be unique over a certain length of time. However in our system the things that the serial numbers refer to have to be unique, so we prefixed a 5 digit timestamp to the serial numbers in the format of YYDDD where YY is the 2 digit year and DDD is the current numerical day of the year from 1-365.
So I was a bro and warned future devs by writing a comment saying that this may cause conflicts if the software is still in use 100 years from now.
mooseman3 on July 15th, 2017 at 14:53 UTC »
Here's the source
Hidden bonus panel
Jafit on July 15th, 2017 at 17:28 UTC »
In work we interface with an API that recycles its serial numbers sometimes, or at least they're not guaranteed to be unique over a certain length of time. However in our system the things that the serial numbers refer to have to be unique, so we prefixed a 5 digit timestamp to the serial numbers in the format of YYDDD where YY is the 2 digit year and DDD is the current numerical day of the year from 1-365.
So I was a bro and warned future devs by writing a comment saying that this may cause conflicts if the software is still in use 100 years from now.
asdfman123 on July 15th, 2017 at 19:00 UTC »
More like:
Today: "This code sucks, but whatever."
Ten years later: "Well, we can't fire Bob, he's the only guy who understands how to maintain Goliath."