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.
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
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.
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.
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.
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.
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.
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).
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.
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.
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.
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.
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.
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)
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.
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.
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.
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.
204 comments
[ 1.1 ms ] story [ 319 ms ] threadThe icon acting as a visual hash is a nice touch.
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
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.
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.
More serioulsy. I think there are curated word lists out there without swear words.
Jee, thanks.
ANUS CUFFLINK GRETNA EMPT WAIFS UNAS FUMOTO GUIDOS ASUN GOOFER GANTER ACKNOWLEDGMENTS YOCHEVED OVERCOMETH WIFIE USAN EDICIONES UNDERPOWERED CALIFIORNIA DESPRES
grin
8529 WANT FILTHY
8529 WANT EXPLOSIONS
Not bad.
>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
Is it possible to reduce to addition and subtraction? I feel that multiplication and division is a high barrier for most.
Edit: seems to work on the default location but not when I move the maps to Slovenia.
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.
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.
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...
I hope that being opensource will help it to improve.
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.
Zone Improvement Plan solved a problem and where would shipping be without it?
Great to see an open alternative to http://what3words.com (and I also love the icon as visual hash.)
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.
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.
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.
https://moversguide.usps.com/icoa/move-info/icoa-main-flow.d...
do pretty much what you're looking for.
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 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.
Municipalities assign the rest of the address (street name, house number etc) and are responsible for that mess.
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.