Hacker News new | ask | show | jobs
by seph-reed 1764 days ago
At one point I was working on a project with user locations/distance sharing.

My solution was just to Math.floor both of their lat/lng to be in increments of .25 miles. You could still use the triangulation trick to find that point, but .25 miles seemed like more than enough to obfuscate things.

Had I made the display in increments of miles only, that would have probably been even better.

1 comments

Pretty sure tinder just makes the minimum miles away shown to be 2 miles. Simply one if statement.
Tinder actually has a fairly interesting solution to this, they divide the world up into mile grids and use those. Funnily enough, a blog post by the same writer as OPs link.

https://robertheaton.com/2018/07/09/how-tinder-keeps-your-lo...

You need to dither that by a half-mile as well so that the baddies can't use the border between e.g. 2 and 3 miles to do the same test.
This is a trick I use when doing competitive analysis for a certain type of sensor. I need to measure the amount of noise in the system, but a dead-band or quantization is almost always included. So, I insert a signal that bumps up against the boundaries of the dead-band or quantization. Doing this repeatedly gives me a sampling of the noise.