What’s your phone number?
I’m not asking to test whether or not you remember it (you should). Nor am I asking because I feel a romantic spark between us (but I’m sure you’re wonderful).
I present the question to promote a conversation. Let’s have a discussion about phone numbers. First, on a micro level, then on a global macro level.
Ever since you were first granted a cell phone number, the digits became ingrained into your mind within a few hours or days; ready to recite within a moment’s notice. Like a Google search that’ll answer any question, your response became nearly instantaneous; automatic.
Quick History of Phone Numbers
Let’s turn back the hand of time a few decades.
The year is 1876 and the world is a strikingly different place.
In the 100 year old United States, it was an election year (Rutherford B. Hayes vs Samuel J. Tilden), Colorado officially became a state, and the first telephone conversation took place during experiments in Massachusetts. And gradually, the public began to gain access to this wonderful new technology.
During this time, phone calls we made by first calling the phone operator (dial 0) before reaching the actual line you wanted to call. It would take a few decades before direct calling was implemented; the first public phone number being "999" in London.
Americans would later adopt a 7 digit phone number and use mnemonic devices to help people remember those numbers (e.g. TRE-3106 for 873-3106).
Phone Numbers Are Simple
Today in the United States, 11 digits are used for phone numbers, including the area code and the country code (+1).
Simple enough right? US is +1.
But after zooming out a bit, we realize that the US shares the same country code with Canada and a few islands in the Caribbean! Also, some countries use multiple country codes based on the location within the country and when the given phone number was created 🤔.
Not so simple.
More People, More Countries, More Problems
As the number of people using telephones increased, we required more phone numbers than we originally accounted for. We needed to allocated more phone numbers while continuing to support the early adopters. For example, in the 1990s, Iceland moved from 5 digit to 7 digit phone numbers. Furthermore, additional countries wanted in on the action. They were late to the party but deserved equal consideration when growing and maintaining phone numbers globally. In the software and hardware industries, we call this backwards compatibility. It is difficult and requires foresight.
Implementing phone numbers globally is significantly more demanding than executing regionally because of the quantity of people, device distribution, governance, etc.
State of Phone Numbers and Device Complexity
Consider the following scenarios you may have to manage when building software that interacts with phone numbers.
First, a phone number may not be strictly a "number". Some countries, e.g. New Zealand, include special characters in their phone "numbers" for specific services (* for traffic incidents). Thus, you should not store phone numbers in any numerical data type.
A phone number may be formatted correctly and be valid in terms of the sequence of digits, but that does NOT mean it can be used to receive phone calls. Devices such as fax machines and POS terminals can not receive normal voice calls; normally. Consider if your software should even accept those phone numbers.
In many parts of the world, groups of people share a single landline phone number. For example, a family of 5 may use the same phone number among all of them. Clearly, this would break your code if you built it assuming that each individual has their own unique phone number. Also keep in mind that phone numbers are often reassigned to different people at any time! Excuse the rhymes.
Thinking internationally, a given phone number might be free to call or text today (normally mobile but some landline providers support text messaging) but require a fee tomorrow.
Historically, official government phone number policies were often rolled out after phone numbers were already issued to people. So what is officially correct according to public documentation will differ from reality. Regardless of when rules were published, do companies really adhere to governmental policy entirely? It shouldn't take long for you to answer that one.
User Preference
Displaying phone number digits without spaces or dashes is most efficient but less easy to read and more difficult to communicate.
Which do you prefer? 811-41-1019 or 811411019?
It has been recorded that humans have poor short-term memory. Other apes like the chimpanzee seem to excel with short term memory tasks that are a struggle for us. It's reasonable to believe that this motivated the creation of mnemonic rules in New York, London, and Paris in the 1930s to help people remember 7 digit phone numbers.
Piecemeal Construction
During city construction projects, workers can not and should not build as if no one lived or traveled within the city limits. Imagine driving to your local grocery store and at the half way mark you realize that all lanes are closed for 2 miles so workers can most efficiently pave a new lane and build a new barrier.
Can you imagine the highway chaos? The screaming moms? The dented bumpers? The late pizza deliveries? The agony.
Instead workers would (hopefully) shut down only one lane or temporarily provide a detour. We shall build as we go, piecemeal.
Software Challenges
Building software to govern the "chaos" that are phone numbers is clearly challenging. Fortunately, we have tools to help solve our problems.
Google Lib Phone Number
Google Lib Phone Number is a Java, C++ and JavaScript library for handling international phone numbers. Without this library, or something comparable, working with phone numbers across the globe would be a nightmare and many mistakes would be made. But with a literal nightmare, you get to wake up fast. Would it excite you to deal with hundreds of complaints when your application doesn't accept a perfectly valid phone number in the country of Tonga?
Native Frame
Here at Native Frame, we provide a livestreaming platform that lets you scale profitably. A prerequisite of scaling your product is serving people in foreign countries. Accepting that, you will likely have to handle international phone numbers. This is the reason why we package international features in the Native Frame offerings. For Android developers, we offer a lightweight package called Kotlin International Android. Features such as phone number validation, country codes, and UI components are production ready and easily available.
Conclusion
After reading this article, phone numbers might never look the same. When managing phone numbers, we must consider the speaker, the listener, display preferences, and their location in the world.
Looking back through time, with 20/20 hindsight, was alpha numeric the better choice for phone numbers? Instead of 512-220-1010, your phone number might be B-909-221.
10 digit (number only) phone numbers allow for 10 billion possibilities.
7 digit alphanumeric phone numbers would allow for more than 78 billions possibilities.
If you were the chief technology officer of Earth in 1876 and you could invent phone numbers, what would you choose?
References
Hooper, R. (2007). Chimps outperform humans at memory task.
https://www.newscientist.com/article/dn12993-chimps-outperform-humans-at-memory-task
Cleartone Communications Limited. (2020). The History of Phone Numbers.
https://cleartonecommunications.co.uk/blog/history-of-phone-numbers
Google. (2023). Falsehoods Programmers Believe About Phone Numbers.
https://github.com/google/libphonenumber/blob/master/FALSEHOODS.md
Lebedev, A. (2002). A short history of telephone numbers.