David Carew's Blog

Yet Another Falsehood Programmers Believe About Addresses

It happened at last. A real world encounter with one of the falsehoods programmers believe about addresses. And one that I don’t see on the original list.

Different addresses refer to different places

I have a PO box that I signed up for delivery notifications for. But several packages arrived with no notice. I looked through all the settings to see if there was something that wasn’t anything obvious. But finally it hit me.

Only USPS can deliver to a PO box, for, as I understand, legal reasons. Conveniently they do offer street addressing where you can give the address of the post office building instead of just the box number, and I usually do this when ordering packages since I don’t know how it’s going to ship. And that’s the catch.

I have my notifications set up for

PO Box #XXXXXX
City, State Zip

But the mail is labelled with

Building Street
#XXXXXX
City, State Zip

Two different addresses, though they resolve to the same physical location.

Evidently there’s no normalization or other accounting for this possibility in USPS’s systems. To be fair it is something of an edge case. And it’s yet another piece of complexity in an endlessly complex world.