Do all the things like ++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatarSign Up
netikras14300161dUmm.. But you don't need distributed generation, do you? I think a db sequence would be a nice way to get unique values for your formatted string seed [instead of the timestamp]
Friiick, I forgot the KISS again.
You are right.
EDIT: After reading your comment, I went from red to green before I fully facepalmed myself, I don't know why but I HAVE HAD tried seeding it with single n++ number which obviously worked but I was in this illusion that I HAVE TO use timestamp somehow.
electrineer10771161dint randnum = 6; // random number from a dice
zotigapo836161dSo bssically you are doing tiny url.
I feel like you may get lot of collisions.
You need re design your architecture for tiny url. Its not that simple at app level to generate tiny url.
mindev588160dIf you are trying to make a URL shortener, look into base62 conversion. At least that's what I used for mine.
Edit: After 100k records it uses 3 characters as an ID
Your Job Suck?
Take a quick quiz from Triplebyte to skip the job search hassles and jump to final interviews at hot tech firms
Get a Better Job