I Programmed My Way Into a Mud Cave

I’m a big fan of Geocaching. If you are unfamiliar with it, it’s a worldwide activity, where by using a GPS you can search out hidden containers. These containers contain a logbook and usually other small toys and trinkets. There are over a million geocaches worldwide in over 200 countries and territories. Learn more about it here.

This post is about geocaching, programming, and the surprise I found when I was able to make them intersect. A special “puzzle” geocache that I came across required you to unscramble this encrypted message using this fuzzy picture and the coordinates N32° 40.990 W117° 11.025 as hints. I knew the real location for the cache was somewhere in the deserts of San Diego county, and I had to solve the puzzle to find the coordinates.

I had figured out the methodology to the decryption and that another word was required as a key. From that, I knew that once I had found the key, the manual process of decrypting that whole message could take hours. Enter coding. I wrote a program that accepted any key and decoded the message with the inputted key. Not yet knowing what the key was, I attempted to cheat and iterate through the entire dictionary to see if anything comprehensible was returned. That failed, and my corner cutting mission was thwarted. Therefore, I knew that the key was not a normal dictionary word.

You can find the program on Github here.

I don’t want to give anything away, but I eventually figured it out. Anyone can figure it out, it isn’t necessary to go to those coordinates, so give it a shot and run it through my program if you think you’ve got it.

The program was relatively simple, and all I did was extend the String class by adding a method that returned the ASCII value of the character. This made the rest of the program easy, as it was just arithmetic from there on out.

class String
  def to_num

Once the puzzle was solved, the trek to the Arroyo Tapiado mud caves in the Anza-Borrego desert was a one filled with anticipation. After a grueling hike through the low ceilings and narrow passageways of this mud cave, we emerged, climbed up a few more small mountains, and located the cache. An amazing adventure all around. An adventure with a big assist from code.

If anyone knows of any other caches what were solved with code, or knows of any amazingly adventurous caches such as this, please let me know. I’d love to do them.