204 comments

[ 1.1 ms ] story [ 319 ms ] thread
Is there any reason the code is written half Spanish half English? As I'm from the Netherlands my understanding of the English language is great but because this is in Spanish I have to use Google translate to read te code.
The original code was written in spanish (my native language) and I translated to english, let me know your particular problem with the code and I will change it.
None of it appears to be translated to English apart from the messages displayed to the user. Without comments in your code and especially when you abbreviate variable names, it's difficult to visually scan the code and have any idea what's going on. You have to mentally process the program to try and reason about what any variables or functions are actually doing.
(comment deleted)
It is nicely done and unlike what3words.com (which is very similar) this version isn't commercial.

The icon acting as a visual hash is a nice touch.

Thanks wscott!, I put the first version here on HN 2 years ago, from the feedback here is the improved version.
The site doesn't work for me as the Google Map API seems to be broken, Authorization removed or something
I just tryed and still works fine, not yet reach the 2500 pageviews of google today :D
Seems broken for me as well. I'm on desktop Chrome. Message says to check JS console. In case it helps, this is the error message:

Google Maps API error: RefererNotAllowedMapError

https://developers.google.com/maps/documentation/javascript/...

Your site URL to be authorized: http://xaddress.org/try?lng=en_.bb

@ js?key=AIzaSyAOUib5wvPGPSazgnTc-Mq415kxB1fNuu8&v=3.24&libraries=drawing,places&language=en:32(anonymous function)

@ common.js:52(anonymous function)

@ common.js:224d

@ common.js:46(anonymous function)

@ AuthenticationService.Authenticate?1shttp%3A%2F%2Fxaddress.org%2Ftry%3Flng%3Den&4sAIzaSyAOUib5wvPGP…:1

(comment deleted)
I got a oops something went wrong while clicking "try it now". using chrome on a desktop.
"HN Hug of Death", just resize the droplet, you can try again
This is really clever. It would be incredible if this took off and became a standard way to represent addresses.
Thanks king_magic, at least is a start, and because is Opensource it can evolve with the needs of the people.
It's really a great idea. It's something I didn't know I wanted until I saw it. My (admittedly potentially naive view) is that it has the potential to simplify many things in the mapping/shipping world - it's so specific. No messy address ambiguity.

I also love the idea of an embeddable "Xaddress badge" (e.g. this image: http://bit.ly/2biI3YY) - unless of course I misunderstood what that is.

Maybe you could work the "legacy" address into that badge as well? Just thinking it would be useful for mentally placing an address - e.g., if you give me a raw GPS address, I have no idea where that is - but if you tell me it's somewhere on 5th avenue in manhattan, I know roughly where that is.

Love the concept, but P2 code depends on the country, I think it should not be resilient on geopolitical address. For example, in France, states have changed recently (change in name and merging).
Thanks dalbin, short codes are resilient and independent from geopolitical addresses, both codes are created at the same time, for the sake of clarity is not show today in the Xaddress
My current location is 5308 AFRAID ANUS. Might be best to exclude ANUS from the word list.
thanks codev, added to the TODO!
Probably don't want SCROTAL in there either
Great. It's a nice project, nice demo as well.

I realised when I was living in Japan recently how much I miss the UK postcode system. When I'm in the UK I can give anyone a short alphanumeric string and they can find me. A global coordinate system like this is really useful. I hope you can get some traction with it.

What are you afraid of?

More serioulsy. I think there are curated word lists out there without swear words.

(comment deleted)
My Street is "BASTARD BOX"

Jee, thanks.

Are you kidding? I'd love to have my address be BASTARD BOX. So apropos.
My subway station is apparently a SHITHOLE.
Note you can click on many of the words and cycle over alternatives.
If you look at the word list, there are many options for each set of numbers. "Anus" could equivalently be any of:

ANUS CUFFLINK GRETNA EMPT WAIFS UNAS FUMOTO GUIDOS ASUN GOOFER GANTER ACKNOWLEDGMENTS YOCHEVED OVERCOMETH WIFIE USAN EDICIONES UNDERPOWERED CALIFIORNIA DESPRES

> CALIFIORNIA

grin

Mine is 8763 UNTIL DICK, word list definitely needs a review.
You could be DICK UNTIL 8763... no wait
I'm at "ETERNAL SHITTIN" No thanks.
First two clicks in the default map location:

8529 WANT FILTHY

8529 WANT EXPLOSIONS

Mine is SUPERMAN KRYPTON which I rather like. I could also go with EMERGENCY REBEL, DOUGLAS PHOTOS (I live in an area with lots of Douglas trees), CATATONIC TYRANNOSAURUS, etc.
I don't see anything new here that isn't already part of w3w.
It's the same, barring some differences like dictionary (this list isn't curated very well, see other comments in this submission), but the big difference is that it's open source unlike w3w.
Yes, which he clearly links on his github readme. He says it is a commercial version with a patented algorithm.
(comment deleted)
8512 WANT ILLEGITIMATE

Not bad.

Yet another location encoding. Why not MapCode[1]?

>Designed to be used in low tech environments

What are supposed uses of encoded lattitude and longitude in "low tech environments", other than simple transfer?

1. https://en.wikipedia.org/wiki/MapCode

It looks like the only thing it adds to MapCode is the pain of localization
Mapcode is great, compact and precise. Xaddress looks more like a traditional address so it might be easier to fit in , also gives you a hint of where the address is located, and is clear how to encode and decode. But at the end of the day both are tools that might work depending on your needs.
First, you have to teach long division and long multiplication to your 7B people. Like the concept and idea and truly hope for adoption.

Is it possible to reduce to addition and subtraction? I feel that multiplication and division is a high barrier for most.

Thanks cgsmith, a pocket calculator will be great when decoding/encoding by hand. Im guessing that low tech phones (even old nokias) can do the trick by using it as calculator, but then that may not be as low tech as needed.
This is genius! Seems like HN killed it though. The demo is not working anymore, probably rate limits have been hit.

Edit: seems to work on the default location but not when I move the maps to Slovenia.

What makes this better than actual coordinates?

I can easily find numeric coordinates on a map, without any special tables or computations.

I can immediately see if two numeric coordinates are close just by looking at the numbers.

Very many people understand how to use standard numeric coordinates.

Seems more easily remembered and therefore easier to accurately share without reliance on technology. 6342 LAY TRANSCENDENT (my location right now) is easier to write down, and comes with a built in typo checker (icon is the earth in this case).
Probably not a good idea to post your address where people can see who you are (you have your keybase details on your profile)
I'd be happy to meet anyone from HackerNews who wanted to drop by. I'm here everyday. It's the Tucows office in Toronto and it's no secret I work here most weekdays.
Try remembering and telling someone your home's coordinates. Then try telling them the coordinates of the restaurant up the street.
This would seem to suffer from a similar problem, given that we travel on and interact with roads primarily.

Decoupling from that seems like it would be set to fail for human memory, since there would probably be nothing to reinforce the memory over time for your restaurant example.

>What makes this better than actual coordinates? I can easily find numeric coordinates on a map, ...

It may be "better" and more optimized for a particular purpose: human memorization

It has a similar mnemonic strategy to other memorization techniques for numbers.[1] Apparently, there's something special about the language processing of the brain that makes it easier to remember words than numeric sequences. Phone-number-to-words (vanity phone #) is another example.[2][3]

For other tasks you mentioned such as mathematical calculation/comparison, or computer lookup in db indexes, the encoding is definitely not optimized for that. However, that's not its purpose.

[1]https://en.wikipedia.org/wiki/Mnemonic_major_system

[2]http://lifehacker.com/201752/spell-your-phone-number

[3]http://hello-operator.softwareadvice.com/want-memorable-toll...

Same reason we have DNS instead of remembering IP addresses.
DNS allows us to keep swapping the IP address associated with a service though, this (afaik) doesn't.
Ability to swap underlying ip address is orthogonal to using alphanumerics in DNS. Numeric sequences could also be used as CNAME for the ip address. But we don't because of human brain.
Great idea / initiative but I must ask, are you new to Ruby? I've rarely come across code that was so not idiomatic.
Thanks, yes, I'm ashamed of my code, this is my first project in ruby , my last programming work was 15 years ago, (Foxpro for DOS) so this is my comeback to programming.

I hope that being opensource will help it to improve.

I applaud you for putting it out there! Fear of negative feedback often keeps me from releasing code in situations like this.
No sweat, man. You are new to the language and you're putting yourself out there. Major kudos for that.

Now, for some low hanging fruits / pointers:

- $name is a global variable. Virtually unused in idiomatic Ruby.

- @name is an instance variable. So it's perfectly ok to use it... within a class.

- You should omit the 'then' after each if.

- I'd use find_words rather than busca_palabras.

- Except for rare edge cases, you can drop the .nil? from if my_var.nil?. If my_var is nil it will on its own make the condition false.

- I would use more spaces. 'a = 1' instead of 'a=1', 'b == 0' rather than 'b==0'.

- Use indentation consistently. 2 spaces.

- The else clause is indented at the same level as the leading if.

- Use && instead of 'and' in conditionals. Likewise || instead of 'or'. These short circuit the evaluation for you. So if the first argument is false && won't bother evaluating the second argument. Likewise, if the first argument is true || won't bother executing the second argument as it doesn't matter.

- Ruby is an Object-Oriented programming language. I would look into modules and classes to restructure the code in a less procedural way.

Thank you very much acangiano, I will review all the code with your guidelines at hand!.
At first I thought you might be being overly critical as can sometimes be the case here, but glad I checked the code. Your comment is spot-on.
Isn't this a solution waiting for a (sponsored) problem?

Zone Improvement Plan solved a problem and where would shipping be without it?

AFRAID SEA here. To avoid confusion, might be best to exclude words that are common placenames from the word list (street, road, lake) as well as rude words.

Great to see an open alternative to http://what3words.com (and I also love the icon as visual hash.)

But why? Forget about the tech. What does this accomplish? What3words is nonsensical for the same reasons- Amazon Prime is not coming to Mongolia anytime soon and it has a lot more to do with little disposable income/economics than logistics.
So the people in Mongolia, for example, that don't have a physical address in the postal service's database don't deserve mail, or being able to more easily communicate with their government where they're located? Just because Amazon Prime isn't come somewhere doesn't mean that logistics problems don't exist and don't need to be solved.
What3Words, for example, would be a great help to all the Deliveroo drivers that can't find my house because it opens onto an alleyway instead of a road. This is in the UK, mind you, not Mongolia.
Remember, addresses are very personal. They are reflective; they are metallic and have a magnetic quality; they are outwardly expressive; they have a perceived value; they are understandable; they are historic (having a history)
That's not what this is though.
Directly no - you are absolutely right. Indirectly yes - if a human is associated with it. As I'm making deliveries now with addresses on it there is no way anyone with a current address will change it. Or should I say allow anyone to change their address. People already have at least two addresses (lat long ) and a third (parcel block for taxes)
This is probably a first world problem, but I wouldn't mind something similar for the western world. Some sort of extended zip code that I can just enter on any device in a second and it represents my entire fully and correctly defined location including door number, floor, gps coordinates and crossing streets and if it's left or right side of a one way street, etc. Just a ~12 digit number for every single door (and maybe window - for drone delivery) in the world. It would probably have a positive impact on the economy.
I have long maintained that an extension of the postal service should provide a one-stop-shop for your addresses.

I have moved nearly every year since I left for college and I hate having to reset every address on every service I have. I'm sick of it.

http://www.iammoving.com/ :)

This is for the UK. Dunno about elsewhere. Dunno about competitors in the UK.

I remember having this idea in the late 90s (while in London, moving around frequently) and did a net search and found that there was a provider of such a service even back then. Do not know if it the same crowd since way back then.

Nice find! I'd love to see something like this in the US. You can get the usps to forward your mail for a year but the thing that would really win me over would be to update my address on the usps, go buy a thing on, say, Amazon, and see at the checkout page that my delivery address AND billing address have been automatically updated.

Of course all of this automated centralization will result in security holes, so that'll suck, especially if the federal government's fallback is the woefully insecure social security number.

Right the USPS should provide a layer of indirection. Give everyone a virtual mailing address, and then they could automatically route your mail to wherever you actually happen to live at the moment.
I didn't know it until now, but this is the disruption I've been waiting for.
The USPS have a hard enough time maintaining a conventional address database.

My understanding is that addresses in the US are usually derived from the municipal authority and by the time those trickle out to the various consumers (counties, states, feds, USPS, Census, and commercial consumers) it's a mess. There are many initiatives underway to clean this up (usually in the context of E-911 and putting a single point on every discrete unit in a building) but it's a massive task.

Every City has it's own standard (often the whim of whoever has the authority) and there are situations that will make you tear your hair out - the official address being 1000 Some Road but it's a multi family place so the building address is 1020 Some Road, or confusion over whether its 1000 W Some Road or 1000 Some Road W. My personal favourite was the guy who convinced USPS that his address was 1 Unicorn Road (changed for privacy) rather than XXXX Long Avenue. The City ended up making an exception for him. Then there are address like 10 1/2 12 1/2 Avenue.

And don't even get me started on how USPS often use a different City (my understanding is that this dates back to when the US was surveyed and the postal system was established. If your City didn't exist at this time then there is a good chance your USPS address is really the nearest large city).

Geocoding solves the issue if you don't care about spatial accuracy but even that has issues.

The reason cities vary randomly in mailing addresses is that the third line of your mailing address:

  YOUR NAME
  123 YOUR STREET
  NOT-YOUR-TOWN, STATE ZIP
is not the name of any city at all, it's the name of the post office from which your mail is delivered. The post office will shuffle addresses between ZIP codes based on what makes for an efficient delivery route -- it has nothing to do with municipalities.

The mismatch is especially common in areas which used to have dozens of post offices which have now been either shut down or downgraded to PO box-only offices, and all home delivery has been consolidated to a single post office for cost efficiency.

Correct. I've heard that it varies depending upon your location. For example St Paul, MN was massive when it was set up so most of the eastern suburbs of the Twin Cities have St Paul MN, 5XXXX rather than the actual city.

Municipalities assign the rest of the address (street name, house number etc) and are responsible for that mess.

That's what PO boxes are for. Some friends I know even managed to get the PO box on their driver's license (using suit 1234 instead of PO BOX 1234).
In Sweden our population registry is used for that purpose - for stuff like banks, utilities and even some online shopping you sign up with your personal ID number, and then they pull the address from the government population registry, and then sync changes periodically. Change your address with the registry and it updates nearly everywhere.
The problem with this is that the various data would be somewhat inaccurate and ephemeral. You actually need to store a history of facts contributed by multiple different people. So a delivery person could update the record with better information. Or maybe the drone would add a lidar point cloud of the approach to the window.

Perhaps you could have QR or NFC stickers tied to a GUID. They get stuck to things and then scanned by different users. They would contribute facts based on the GUID to various public or private databases. Not particularly memorable, but super simple to setup.

I think this is a really nice idea, and it seems somewhat more memorizable than a what3words address because it incorporates numbers. Really cool work! The only two complaints I have are 1) as others in this submission have said, is that the list should really be curated, or at least be filtered to remove "bad words", and 2) ideally this algorithm could be tweaked to not require a city to go along with it, so it becomes easier for a place that hasn't been able to designate cities can use it more easily.