Hacker News new | past | comments | ask | show | jobs | submit login
Nuances around location-based programming (austingil.com)
25 points by thunderbong 79 days ago | hide | past | favorite | 12 comments



The article is entirely correct that none of the methods to provide location data are reliable. I do find some other issues with the article though.

> You want to set the language or currency of your app based on the region.

DO NOT DO THIS. I prefer my software and articles in English or at the very least based on the locale I set myself. However, my location would not allow for this, which is highly annoying. There is nothing more annoying than applications and websites that try to figure out the language out for themselves, ignoring my preferences. Then of all the methods using the location is the worst one to choose from. Further down, the article briefly acknowledges this, but I can't understate how much of an annoyance it is when websites try to be clever here. If you want to do anything, make it a nice little menu that pops up on the right of my screen *asking* me if I want to switch.

> You want to geofence your app for legal reasons (eg. cookie banners).

I guess it is a valid reason, but whenever I encounter websites that do this I also know to avoid them as they clearly do not respect the privacy of their visitors and do not care to hide it either.

The article also mentions that IP location might not be reliable because of VPNs, which is true. But it also isn't reliable in general, as it depends on a lot more factors. At most it gives you a rough potential location but it can easily be hundreds of kilometers off without the user using anything like a VPN.


This frequently happens with documentation. My browser language is German, English and French in that order, but that doesn't mean that I prefer a machine translation over the original in English. Doubly so if I clicked on an English-language search result and the language button is hidden at the bottom of the page.

The correct way is to show the version I came for and maybe inform me that an option in a preferred language exists.

Since I travel a lot, I must also repeat that my location does not inform which languages I speak, or which country's subsite I want to see. I might do Germany-related business while I'm visiting the family abroad. I don't speak Thai just because I'm in Thailand.


Same. I hate it when software documentation websites automatically show me the text in French due to my location and browser settings. I never want to read documentation in French. Always in English. My brain seems to be wired to read documentation in English although English is not my native language.


> You want to set the language or currency of your app based on the region.

I agree, but the article isn't suggesting that you SHOULD do this, though. It's simply giving it as a possibly use-case that would require location-based logic.


I am just saying that from this user's perspective it rarely is a valid use case ;)


Don’t blame a company if they geofence for legal reasons. Blame whoever made tje “legal reasons”


No, I am fully going to put it to the company if they geo-fence and deny access to people from regions of the world with stronger privacy laws. More specifically, as I already said, I know to avoid them as they can't even be bothered.


Since I can't edit my 4 day old comment what sort of HN trickery is happening that this post suddenly has activity and is timestamped to be only 11 hours old?


Sometimes hn gives posts a second chance when they seem good but didn’t get many eyeballs the first time for whatever reason. I suspect that’s what happened here.


One of my RC rabbit hole projects was to make a reverse probabilistic lookup from a users’s timezone (which is presumably set to local time) to locations.

Nepal for example uses a +545 offset, and a one in 6 chance that you’re in the Kathmandu valley (based on population stats, but you could do better with internet stats).

This works quite decently for small unique timezones, but gets fuzzier for the larger ones (China and India are just one timezone each).

I then thought of using other Signals to augment the probabilities (such as the locale which does have its own issues). At that point it felt like a fingerprinting project instead of anything novel and I lost interest.


India isn't one timezone. It has many timezones, some of which are 1/2 hour off.


Indian boundary spans multiple time zones, but the country only follows a single +530 offset (Asia/Kolkata, IST). Assam has been attempting to switch to DST, but it isn’t approved/in-use yet.

https://en.wikipedia.org/wiki/Time_in_India




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: