My favorite part of the job
My favorite part of the job
My favorite part of the job
the fact that these are strings instead of an object that is broken up by country code, area code, and number makes me irrationally angry.
"The number" is itself two parts hence the dash. The first section being the prefix and the last part being the line number.
You absolute buffoon. How do you figure this code isn't testing how to parse a string into such an object??
Better than an integer at least.
Country codes are variable. Even the "I'm about to dial another country prefix" (usually + resolves to 00 but that depends on country and carrier) is variable. Phone number lengths are variable. Phone numbers are often written in non-Arabic numerals. Phone numbers can have specific digits in the middle of the number to reroute the call to another carrier.
You can try to parse phone numbers if you're writing a specific phone number parsing library, but you'll need to keep up with the ITU documents, the numbering plans of all countries and satellite providers, and provide support for older standards going back to the 60s. You'll need to deal with edge cases that your language probably doesn't even have names for. And most importantly, you'll have to guess what country the phone number is from based on context clues such as the user's language or location or locale because phone numbers can be and are reused across borders.
Phone numbers are worse than time zones. Don't parse them yourself unless you're building an international phone interconnect.
i think you think that telephone numbers are well-structured. they are not. they are messy. they do not fit a certain schematic.
I recommend also the following topic: "people have names". https://www.kalzumeus.com/2010/06/17/falsehoods-programmers-believe-about-names/
Names do not in general fit into the schematic "first name, last name"
Could be tests for a parser to convert it from string to object.
Not like your end users are going to type each piece into a separate field.
Found the Java programmer...
microsoft java :p
You seem to enjoy overengineering your code, don't you?
I think it's commendable to vertically align code. (Just not with tabs.) It makes it look neater.
We underutilize tabs. https://nick-gravgaard.com/elastic-tabstops/
(Don't mistake this as me saying everyone should start using tabs immediately. This would take a drastic overhaul of all textual displays and we're likely to never see such a thing, but it's still a cool concept.)
Junior devs don’t know Jenny.
It's true. Who's Jenny, for the zoomers in the chat?
It was a very popular song in the 80s. Jenny’s phone number was 867-5309.
https://en.m.wikipedia.org/wiki/867-5309/Jenny
If you’re ever at a store and need a frequent shopper card, this number with your local area code is usually registered.
Without monospacing....
Could have stopped the meme at the top text to be honest
Tell me you are 40-50 without telling me