> Basically everyone in the US knows the first 5 digits. It's really easy to memorize them. If you can remember your city, you can remember your zip code. And in the US you use it all the time, so it stays memorized.
What's the 5 digits for Yonkers New York (edited because I originally had NYC)
> That complaint about magic numbers is completely off base. Magic strings are just as bad in software. "Beverly Hills" and 90210 are equal sins on the magic front.
For the same reasons, that's why it would be: Beverly Hills, Los Angelos County, California, USA, 90210
> What's the 5 digits for Yonkers New York (edited because I originally had NYC)
Nobody sends packages where the destination is an entire city. If someone gives me an address inside Yonkers, it'll have the zip code in the address. I've never had to look up a zip code in my life.
> For the same reasons, that's why it would be: Beverly Hills, Los Angelos County, California, USA, 90210
Which reasons? That has nothing to do with magic numbers, except that a 'magic full mailing address' is still bad, you don't shove that into the middle of your code either. If you're looking at the "made a typo" reason then that's where showing the address after putting in the zip code will give you the same verification but faster.
Is that information supposed to change my mind about something?
If you put in any of those numbers it can prefill the city name, with enough accuracy that you don't need to change it.
Did I imply anywhere that cities only have one zip code before you asked about Yonkers? I said if you can remember your city name you can remember your zip code. That doesn't imply you would use a list to get from one to the other.
I picked up the implication that you thought my response could be improved, so I tried to guess what your criticism was and respond to that. If it feels "way off" because I framed it as disagreement, then I dunno, that feels like the right framing? Unless it's something else I did? I could have made it clearer I was guessing but that doesn't seem way off.
What's the 5 digits for Yonkers New York (edited because I originally had NYC)
> That complaint about magic numbers is completely off base. Magic strings are just as bad in software. "Beverly Hills" and 90210 are equal sins on the magic front.
For the same reasons, that's why it would be: Beverly Hills, Los Angelos County, California, USA, 90210