August 8th, 2024

Nuances around location-based programming

The article explores location-based programming, detailing methods for accessing user location, their challenges, and emphasizing user choice and transparency in application development for effective functionality.

Read original articleLink Icon
Nuances around location-based programming

The article discusses the complexities of location-based programming, highlighting the various methods to access user location and their associated challenges. It outlines common use cases for location data, such as setting app language or currency, offering regional discounts, and providing store locators. The author emphasizes the importance of distinguishing between user experience, application logic, and legal compliance when implementing location features. Four primary methods for obtaining user location are identified: user reporting, device heuristics, IP address tracking, and edge computing. Each method has its pros and cons, including issues of accuracy and user consent. The article warns that none of these methods can be fully trusted due to potential user dishonesty, device settings, and the use of VPNs that can obscure true location. The author suggests that while challenges exist, developers should remain informed and adaptable, allowing users to make choices regarding their location preferences, especially in multilingual contexts. Ultimately, the article serves as a guide for developers navigating the intricacies of location-based functionalities in applications.

- Location-based programming has various applications, including user experience enhancement and legal compliance.

- Four methods to access user location include user reporting, device heuristics, IP address tracking, and edge computing.

- None of the location methods are entirely reliable due to user dishonesty and technical limitations.

- Developers should prioritize user choice and transparency regarding location data usage.

- Understanding the nuances of location data is crucial for effective application development.

Link Icon 2 comments
By @creesch - 7 months
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.

By @captn3m0 - 7 months
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.