3 ms·
Yikes. People store phone numbers as integers? Why would anyone do that? Is there some use-case where being able to treat a phone number as an integer value ha
by statictype 16y ago
Yikes. People store phone numbers as integers? Why would anyone do that?
Is there some use-case where being able to treat a phone number as an integer value has any usefulness?
- zck 16y ago"A string of characters acting as numbers? Hell no. People could put in anything. '234-fake-num' isn't a real phone number! This way we'll be sure the numbers are real. Besides, look how much space we'll be saving."
- pan69 16y agoBad idea as celoyd pointed out. Besides, to check whether a phone number is real or not we use regular expressions.
- j_baker 16y agoI think he was being facetious...
- reitzensteinm 16y agoI don't think zck was arguing for phone numbers as integers. I think he was just dissecting the broken thinking that would cause someone to make that decision.
- dalore 16y agoTo check if a phone number is real, it's best to call it.
- joshfinnie 16y agoMy google voice number is 786-J-Finnie... I really hate that I can't enter that on a vaild phone number on many websites! Since I specificially looked for that as a phone number, I haven't memorized the actual numers of JFINNIE, so I just put in a fake number.
- celoyd 16y agoWell, it will be smaller on disk. I know next to nothing about the phone system, but in some countries there are legitimate numbers starting with 0. So among the many problems with this practice, it puts an arbitrary technical limit on your market.
- bigbang 16y agoConverting the phone number to hex and then storing them as character bytes as opposed to long integers, might save even more space on disk at the cost of hex-decimal conversion :)
- dfox 16y agohexadecimal is used, because the conversion is almost free (as oposed to decimal) Also, phone numbers (for last 50 years or so) actually are hexadecimal strings (with extra characters - denoted ABCD*# - reserved for various special purposes).