Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I did, it just was poorly written with second order ideas and non sequitors, instead of trying to identify the primary concepts.

> Try double clicking on that ID to select and copy it. You can’t. The browser interprets it as 5 different words.

After reading that, shouldn't my first thought be: "Have you though about simply removing the dashes from your string?"

To me these are the questions that you should ask about a uid function:

1. How much randomness do you want to add to prevent collisions?

2. What characters are allowed? If you want to dictate it, maybe avoid 0,1,o,l and keep lowercase. If you can paste it, allow uppercase characters.

3. Can you precisely describe the algorithm in case you want it in another programming language?

4. Do you want any non-random information encoded? Maybe a sharding id or a timestamp?

Only the first question was actually addressed, and even that without doing the math, by simply referencing another website. Doing estimation calculation is something that an engineer should have a good intuitive understanding of, so I think it's slightly damaging for industry mentality when even these articles don't do this themselves.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: