XOR Media

Coding, Operations, Etc.

Puzzle Solver

Backstory

Final Puzzle Solution

My brother got me a pretty cool puzzle for Christmas which claims to have "Over 300,000 wrong ways to assemble the pieces, but only One right way!". The only hint/instructions are that the final solution will be a 3x3 square with six points and six holes on ...

(more)
In misc, tagged: algorithms, coding, examples, and javascript.

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.

Recursively Merge Dictionaries in Python

What we're after

jQuery's extend function is really useful and if you've ever written a plug-in for the library chances are you've made use of it. I've run across a use for this functionality in python and it also makes an interesting interview question (regardless ...

(more)