Hacker News new | ask | show | jobs
by darklajid 5199 days ago
Have to see how good that works in Germany.

Prefixes/area codes are different length:

+49 30 ... -> Berlin +49 221 .... -> Cologne +49 2389 ... -> Small town where I grew up

If you solve that, you'll notice that the number afterwards has the same problems on a bigger scale.

Some (especially small towns) have 3 or 4 digit local phone numbers. Big cities go up to 7 (Or more? No idea, but I know numbers from 3 to 7 digits in length). And length varies within the same area code. So (area) 1234 might be valid, as is (area) 12356.

I fail to see how that could work reliably. Thanks for the link - now I'm trying to figure out what they know that I don't. :)

Edit: Skimmed the project. They have a binary (protobuf?) file for phone number metadata which seems to be a huuuge number of regular expressions.

For the reasons listed above I claim that that way you cannot find out if a number is 'done' typing using this library. Looking plausible? Yes. But you cannot replace the dial button in DE for all I can tell.

1 comments

It's obviously possible to encode all phone numberd, since, you know, your landline doesn't have a dial button, but calls connect.

Timezone data is a (smaller) mess, but that has been encoded in a library.

I very well might be mistaken. But I don't buy it.

My landline is constantly connected to the operator. My totally clueless understanding of this voodoo box called telephone is that each digit is passed on to 'the system', initiating a call when I hit a valid number (or resulting in an error tone).

I do not believe that it is possible (outside of the telephone network) to encode this information. You could create a huuuuge snapshot (a digital phone book..?) and by the time that data is on any device you care about it's already out of date.

Sorry, I don't believe you and don't think that it is obvious.

Edit: Stole the idea of checking the wikipedia link for DE from the UK sibling thread. See:

https://en.wikipedia.org/wiki/+49

Note things like

" (0xxxx) xxxxxxx

In area codes that use four digits, newly assigned numbers (for all locations from May 2010, some cities earlier: e,g, Heidelberg already in May 2003) have a length of seven digits, also yielding a total length of eleven digits. Grandfathered numbers may be as short as three digits (seven total) in very rural areas."

Reread the last sentence. Not feasible. End of story. You know if a number is valid if you try to call it.

You could say 'aaah, but new numbers follow scheme X so lets just have a database (phonebook) of all current numbers first and fallback to the rule later'. No idea if that would work and how it reacts to someone canceling his contract for one of these gazillion 3 or 4 digit numbers.