THE MARTYR OF BUTLERIAN JIHAD on Nostr: Google's libphonenumber contains almost 50k lines of C++ code and not that much less ...
Google's libphonenumber contains almost 50k lines of C++ code and not that much less of Java and Javascript. All of that is needed to parse and validate phone numbers. Just think about this for a second.
Your input is as simple as "1 323 555 66 69". With or without a plus sign in the beginning. Maybe the country code is missing and passed explicitly. And you need 50k lines of C++ to parse, validate, and format this data.
This is real code, written by real programmers. Someone out there makes over $200k annually (i actually don't know how much people at Google make) for writing this. This is the most elegant solution one of the leading software companies could come up with.
I can almost guarantee than any single lad reading this post can do better. Not that I have high opinions of you, although you're probably fine, but because libphonenumber is an atrocious piece of shit. It must have taken a huge amount of effort to make it this bad.
Published at
2023-08-13 21:48:46Event JSON
{
"id": "ce8a0e4962090a5d71e7460f7d3cd481edead67641704565bec4d86ec3b1e1a1",
"pubkey": "a8b998527117a18bb2ceef79019c0a9430b384589e1160bff4193355fba3a0d8",
"created_at": 1691963326,
"kind": 1,
"tags": [
[
"proxy",
"https://mstdn.starnix.network/users/icon_of_computational_sin/statuses/110884508576542808",
"activitypub"
]
],
"content": "Google's libphonenumber contains almost 50k lines of C++ code and not that much less of Java and Javascript. All of that is needed to parse and validate phone numbers. Just think about this for a second.\n\nYour input is as simple as \"1 323 555 66 69\". With or without a plus sign in the beginning. Maybe the country code is missing and passed explicitly. And you need 50k lines of C++ to parse, validate, and format this data.\n\nThis is real code, written by real programmers. Someone out there makes over $200k annually (i actually don't know how much people at Google make) for writing this. This is the most elegant solution one of the leading software companies could come up with.\n\nI can almost guarantee than any single lad reading this post can do better. Not that I have high opinions of you, although you're probably fine, but because libphonenumber is an atrocious piece of shit. It must have taken a huge amount of effort to make it this bad.",
"sig": "e6a553f413c8c01aaf233916091734568bff6904dcd8d0671c36ae96649a66c3ecdb2c8068799bead378d1b8d492148718a39146951e65f14e9f927860196854"
}