HN2new | past | comments | ask | show | jobs | submitlogin

Which of those classes teach that you shouldn't store phone numbers as an int? Physics, logic or network theory?


I'm hoping that at least half of C.E.'s would be able to make that logical deduction given their knowledge on ints and the possible lengths of a phone number. :)


Disregarding the fact that all CS graduates know how integers are represented, You don't need to know anything about that to know that you should not store phone numbers as ints.

You will typically normalize telephone numbers when storing them, that means prefixing them with their national code and two leading zeroes or a plus sign if you want to be fancy. Neither a plus sign, nor double leading zeroes lend to storing as an integer. Even if you're not fancy and normalize your number, there are numbers that have leading zeroes.




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

Search: