Live data from Hacker News

Google's phone number handling library

code.google.com

21–30 of 44 posts

Re: Google's phone number handling library

#21

I guess I shouldn't but One thing that surprises me is the lack of developer friendly libraries like this coming out of major corporations that should know better. Why, for example, is Stripe leading the charge on decent credit card front ends when Visa could spend a few million and produce the one and only Unicode, works everywhere, looks up addresses credit card entry form. Why is an advertising company doing this…

I think the concept of giving something away that someone did on the clock seems utterly stupid to them (on the surface it does sound dumb). Even though a solid library that's really useful can take on a life of its own and require less work in the future - just getting a port to a different language for free could make it well worth while if you ever needed it. Then there's licensing and lawyering around releasing something. I understand it, but also wish this would happen more often.

Re: Google's phone number handling library

#22

I guess I shouldn't but One thing that surprises me is the lack of developer friendly libraries like this coming out of major corporations that should know better. Why, for example, is Stripe leading the charge on decent credit card front ends when Visa could spend a few million and produce the one and only Unicode, works everywhere, looks up addresses credit card entry form. Why is an advertising company doing this…

A few million? Under one million... with significant polish.

Re: Google's phone number handling library

#24
post #18
post #13

I've been using this for quite a while -- it's excellent -- without a doubt the best library around for dealing with phone numbers in E.164 format (the international standard). As someone who does a lot of telephony work, <333

Exactly. It comes in super handy when you have a free(ish) form text field where the users enter their number which you want to later use (say for 2FA).

Yep! This is what I use it for (among other things).

Re: Google's phone number handling library

#26

I guess I shouldn't but One thing that surprises me is the lack of developer friendly libraries like this coming out of major corporations that should know better. Why, for example, is Stripe leading the charge on decent credit card front ends when Visa could spend a few million and produce the one and only Unicode, works everywhere, looks up addresses credit card entry form. Why is an advertising company doing this…

Part of the problem is, designing a friendly library requires taking into account all of the use cases of other people.

Often when you're developing an app, even one completely in open source, you aren't designing all parts of it for maximum reusability. There are tons of private APIs in most apps, including most open source apps.

It's usually after the application which drove the development of the utility code in the first place is finished and stabilized, that people go back and figure out how to refactor it to make it generally more useful.

Re: Google's phone number handling library

#28

Ha, good to see this here - so incredibly useful, and already ported to lots of useful languages. Handling phone numbers gets messy really quickly: formatting/validation for national/international numbers, in different forms (land-line/mobile/premium etc), in hundreds of different countries... These guys have done a great job, and are also super responsive/helpful when you raise issues. A word of warning: if you ever…

That looks amazing.

Re: Google's phone number handling library

#29
I've used this to great effect to help handle partially obfuscated phone numbers and validate whether they could be valid or not. There are far too many edge cases to try to handle on your own if it's not core to the problem you're trying to solve.

Re: Google's phone number handling library

#30

Ha, good to see this here - so incredibly useful, and already ported to lots of useful languages. Handling phone numbers gets messy really quickly: formatting/validation for national/international numbers, in different forms (land-line/mobile/premium etc), in hundreds of different countries... These guys have done a great job, and are also super responsive/helpful when you raise issues. A word of warning: if you ever…

Exactly what I was looking for! Thanks!
Post reply on HN