Live data from Hacker News

Show HN: Give 7B people an instant physical address

github.com

91–100 of 205 posts

Re: Show HN: Give 7B people an instant physical address

#93
I think this is a neat way of encoding things. But this also has a lot of shortcomings that existing mailing addresses don't have; it's really only useful for identifying a physical spot, which is what a lat/long and geocodings of mailing addresses will do anyway.

Additionally:

* What if you live at an apartment?

* What if your address doesn't correspond to a fixed physical location, like an APO?

* Aren't the city and country redundant if you have a physical lat/long location?

Still, we need to look at how we send information to our fellow humans. Addresses are important and I'm glad folks like the OP are taking a closer look.

Re: Show HN: Give 7B people an instant physical address

#94

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.

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.

Re: Show HN: Give 7B people an instant physical address

#96
post #75

As a sidenote, Australia moves about 7cm north annually [1], so any encoding of GPS location is not flexible enough in the long term. Also only encoding lat/long makes it so you would not be able to address a single floor in a large building. [1] http://www.bbc.com/news/technology-36912700

Obviously we need to add the date the coordinates were encoded. The decoding will have to apply correction based on ample databases of tectonic data. A simple formula will not work, a major earthquake can move a rift by some 5-10 cm. And you need to know exactly what plate does the coordinate refer to, is not as simple as 'Australia moves 7cm a year', consider parts of California east vs. west of the fault. Well, that spiraled out of control fast... It makes the time issues like [0] seem trivial by comparison.

[0] http://stackoverflow.com/questions/6841333/why-is-subtractin...

Re: Show HN: Give 7B people an instant physical address

#97

Earlier quoted context omitted.

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,…

Thank you very much acangiano, I will review all the code with your guidelines at hand!.

Re: Show HN: Give 7B people an instant physical address

#98
post #75

As a sidenote, Australia moves about 7cm north annually [1], so any encoding of GPS location is not flexible enough in the long term. Also only encoding lat/long makes it so you would not be able to address a single floor in a large building. [1] http://www.bbc.com/news/technology-36912700

Perhaps the address can be made relative to some landmark which moves in the same direction. This could add an additional word in front of it (for the landmark) but will resolve such issues.

Re: Show HN: Give 7B people an instant physical address

#99
post #85

Earlier quoted context omitted.

This is why he's incorporated the avatar - in the example he provides you wouldn't see the "boot" avatar if you had missed a letter, the boot is part of the address and should be communicated verbally when giving the address verbally.

If you are sending or telling someone the adress you can't expect them to check the avatar. How would it work e.g. over the phone?

From the README:

If you want to transmit your Xaddress by phone you will say "7150 MAGICAL PEARL - Maluku ,Indonesia" my avatar is a boot

Re: Show HN: Give 7B people an instant physical address

#100
post #23

My current location is 5308 AFRAID ANUS. Might be best to exclude ANUS from the word list.

thanks codev, added to the TODO!

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.

Post reply on HN