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

Good trick is to prefix all such keys with magic, i.e. a couple of letters that identify type type of key.

Then it will always be a string and you will be free to change the format/type of the key in the future to UUID or whatever you like.

 help



Rule of thumb: if you’re not doing math with a value, it’s not a number.

Speaking of which, one of my favourite UX brainfarts is treating text fields where you enter a sum as numbers.

Why, you ask? Let's you have a number like 10,000 and you want to replace it with 20,000. You delete the leading 1, and boom! The number is now zero, and three of the digits are gone, and you'll have to retype them like you got no other things to do with your life.


I've been preaching this for years but nobody believes me until it bites them in the ass

Indexes?



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

Search: