XOR Media

Coding, Operations, Etc.

Efficiently Querying for Nearby Things

It's a fairly common use case to have a latitude and longitude and want to find the closest objects to a given point. While there are heavyweight solutions: MySQL Spatial Extensions, PostGIS, they can be more trouble than they're worth especially if you're making use of an ...

(more)
In code, tagged: algorithms, db, examples, geo, mysql, performance, and sql.

UTC is the Only Real Timezone

If you're storing or transmitting time information in any way shape or form (web-services, databases, queues, NoSQL, caches, log files, or just plain txt files) the safest and thus best thing to do is to use UTC (Coordinated Universal Time) everywhere.

Yes you have to do math, but you ...

(more)
In ops, tagged: db, django, mysql, rails, time, and ubuntu.