Tuesday, April 09, 2013

QR Codes

This QR code should link to
Do you know what this is? It's called a QR code. I don't actually know much about them, except that it's a 2-D barcode that can be stuffed with all sorts of information. And I've started seeing them around more and more often. In magazines, newspapers, and even in shop windows walking around town. One AQ member, Speedquare, even has one as her profile photo. A pretty orange thing. =)

My Costco flyer that arrived in the mail this afternoon had one, which, apparently, if I can scan to be connected to Costco Services experts.

Except that I don't have anything to scan it with. I don't even have a cell phone much less a smart phone that can scan this stuff. I suppose I could take a photo of it with my camera and find somewhere online that could decode the message--presumably, it's a URL. But it's not worth the effort. I just don't care enough about Costco Services experts to bother. =)

But I'm still fascinated by these little things. And on my walk this afternoon, an idea hit me--maybe I can use them on Atlas Quest! Have them printed out with clues then, anyone who can scan them, could be taken directly to the "record find" page on AQ. No messing with searching for the box online, or keeping track of the box ID. Scan and go directly to the page to record your find.

Nobody has ever asked for this feature.... it just strikes me as immensely interesting. I wasn't even sure if I could implement this feature. How are these QR codes created? Are they patented or something? I didn't know!

So I did a bit of research, found some code online that can programmatically create QR codes, and started messing around with them a bit. Fun times! =)

And I added QR codes to clues. For instance, take my Los Osos Oaks clue. If you scan the QR code, it'll take you to the page to record a find for that series. If necessary, you'll be redirected to log into Atlas Quest before you can record your find. (Obviously, it's tough to record your find properly if we don't know who you are!)

It's also possible to print these codes and tape them into your letterboxes. Perhaps more people will record the find if you're into that thing? Or perhaps they'll just ignore it. Who knows? =) You could even leave a QR code to points to the main page of AQ if you want to make it easy for muggles who find your box to learn more about letterboxing. (The QR code at the top of this post does just that. Or at least it's supposed to--like I said before, I can't actually scan these things!)

Anyhow, it seemed like a fun thing to add. What do the rest of you think, though?

Monday, April 08, 2013

A look back on AQ

There is nothing important in this post. There is a lot of technical information to follow. Continue reading at your own risk! =)

So I was poking around the database, doing the usual sort of stuff, and I noticed the size of the database just hit 3 gigabytes. As I type this, it now stands at "3,000.07 MB" according to my little stats program.

It has 197 tables keeping track of all the happenings on AQ--the message boards, the letterbox listings, account information--in all, "approximately" 22,310,313 rows of organized information. I know that number looks quite precise, but according to the stats program, it's actually an "estimate." Some of the tables, apparently, are difficult to get solid numbers for. =)

Back in 2008--seems so long ago, doesn't? Anyhow, back in 2008, I posted about AQ Database Milestones. It's a long, boring and tedious post--no need to read it now. I remember it, though, because AQ had just passed the 100th table in the database and I had hoped the next 100 would run just as smoothly. I still haven't gotten to that 200th table, but at 197, it's pretty darned closed.

(I should note: These are tables strictly used for AQ purposes. There's a totally different database running Walking4.com. There are 11 tables for that website and that database weighs in at 4.52 MB--considerably smaller than even when AQ started!)

The most interesting part of that post, though, is that when Atlas Quest debuted, it had just 12 tables that took up 70 megabytes of data. Fortunately for me, I wasn't working with 3 gigs of data at the time because I worked on a dial-up connection then. Even 70 megabytes is pretty slow over a 56K modem. =) Now it's nearly 50 times that size and still growing....

The last table I created for the database deals with the geocoders. I've talked about the geocoders before here, in The Magic of Geocoders..... A geocoder, for those who aren't familiar with the term, is a program that can convert a street address or other location into latitude and longitude coordinates. When you run a search for "Houston, TX," AQ needs to convert that into coordinates to be able to run a search for all letterboxes near that location. That's where the geocoders step in.

Anyhow, one of the geocoders AQ depended on stopped working unexpectedly. Nobody noticed, though, because there was a backup geocoder that sprung into action to handle the problem.

Two years ago, when I first redesigned the geocoders, I created them to work like lego bricks--I could snap off one geocoder and snap on another one without affecting any of the code that actually needs a geocoder. This was the first real tests of that new redesign--and the system worked flawlessly. Even with one broken geocoder, AQ could detect the problem and automatically move to the working one. It's kind of a good feeling--that the code I worked on nearly two years ago to handle problems exactly like this worked flawlessly and generated absolutely no downtime for AQ.
So most of the past week I've been working on the "geocoder problem." I created two new geocoders--one that uses Bing and one that uses MapQuest. And retired the Yahoo geocoder which no longer is available, and yesterday, I snapped those into the rest of AQ. The update was so easy and so quick, I didn't even need to take down the website in order to get it done.

I also added more functionality to the geocoders. These geocoders have a much smaller limit on the number of locations I can geocode each day than the one it replaced, so I took steps to reduce those numbers by caching results.

If you're curious, when you do run a search for a location, AQ now tries to figure out what you're talking about in the following order:
  1. It checks if you typed in latitude and longitude coordinates and just uses those.
  2. It checks the AQ database to see if it's a location AQ already knows about.
  3. It check the Bing geocoder to see if Bing can handle it.
  4. It checks the Google geocoder to see if Google can handle it.
  5. It checks an internally-hosted table with millions of locations to see if it can be found locally. This is a pretty bad and primitive search, though, which is why it comes so far down the list, but it's free and doesn't count against any quotas, so I'll keep it.
  6. Then it checks if MapQuest can handle the location. The MapQuest geocoder worked so poorly in my tests, it essentially comes in dead last. I'll use it as a last resort!
  7. For the next month or so, there's a second Google geocoder that will then get a crack at the location. This is the depreciated Google geocoder, an older version of their current geocoder, and Google is planning to pull the plug on it next month. I'll keep it in the lineup as long as it's still chugging along. It's a decent geocoder, but since I know already that it will stop working next month, it seems prudent not to be relying on it at this point. Except as a last resort. =) After Google does pull the plug on it next month, I'll just remove it.
The only real problem, I imagine, are those people who want my Under Construction letterbox. As AQ becomes more robust, I'm able to do more and more updates without actually taking the website down--and this clue is only available when the website is down for an update. Which makes the clue progressively more and more difficult to get! Not only am I having to do fewer "big updates" than in years past, but they're often a lot faster too.

Anyhow, I just felt like reminiscing.... Go ahead and go back to your normally scheduled program. =)

Monday, April 01, 2013

The Great Hoax of 2013

So, as some skeptics out there suspected, that whole Bake Your Own Carving Block tutorial was an April Fools joke. A complete hoax, through and through. Oh, there were elements of truth to it--the better to make it believable. For instance, when I wrote, "This tutorial has been more than a year in the making," that was the honest truth. I had the idea for the tutorial about a year ago, and it took me that long to save enough shavings to create a tutorial that would look legit!

And when I wrote about the equipment: "Amanda found ours at a Japanese dollar store and our total expense was less than $10!"--that too was completely true.

But those are about the only two true statements in the entire tutorial. The rest was a complete hoax.

"But!" I hear you thinking, "Look at those photos you took! They look so real!" Yes, they do look convincing, don't they? But remember, they had to look convincing if it was ever going to fool anyone! =)

In step 1, when I'm shredding pink stuff with a cheese grater and cutting it with a knife--I really did these things. That's real pink stuff that I really did shred with the cheese grater. But the cheese grater was so hard to work and cut so little off at a time, I got tired of it and started cutting up the pieces instead. Much faster. So step 1B--that's me being lazy. =)

Real pink stuff, really being shredded with a cheese grater.

Real pink stuff, when I got too lazy to shred enough pink stuff!

Step 2: Apply DEET as a food release spray
In step 2, when I sprayed the pan with DEET--this is true. I really did do this. Why did I use DEET? What made me even think of using DEET? That was the first question Amanda had when I showed her the tutorial. "DEET? That's crazy!" she told me.

I actually went through our kitchen looking for Pam. I figured it needed a food release spray, but when I looked for it, I couldn't find it anywhere. Were we out? Was it hidden behind the cinnamon and I was just overlooking it? I didn't know, but then I realized I'm just making a fake tutorial anyhow. Who the heck cares? It just has to look like I sprayed something on it! So I started searching the kitchen for anything "spray-able," and you know what I found? Nothing. Absolutely nothing.

Then I thought I could use one of those water spritzer bottle thingys, but I couldn't find any of those in the house either. And then I remembered my DEET. It came in a small bottle that was sprayable. And it clicked immediately--what a WONDERFUL idea!!!! I was going to try to use something else other than food release spray and pretend it was a food release spray, but DEET keeps bugs away--that could actually be a good thing for our little rubber stamps! Who cares if it worked? It looked good and it sounded even better! Perfect for an April Fools joke!

Real pink stuff, real scraps. But the DEET had
already been washed off and the tray dried again.
So the DEET was actually a last minute addition when I couldn't find real food spray in the kitchen. Thank goodness we had run out! =)

I took a few photos of the DEET-covered tray, then immediately washed off the DEET and dried the tray. It had served its purpose.

For step 3, I then piled on a bunch of old pink shavings from real carvings that Amanda and I had done over the past year. It's a real photo, of real pink stuff. There's absolutely no DEET or food release on the tray, though. It didn't need it since I had absolutely no intention of baking it. =)

By step 4, I added aluminum foil over the tray. The pink stuff actually is still in it at this point, and the aluminum foil served a couple of purposes for me. First, it gave me something new to take a photo of and (I thought) made the tutorial look more authentic. Second, by covering up the material, I didn't have to show any photos of the "slowly melting" pink stuff--which I wasn't sure I could pull of convincingly. Amanda and I actually had different visions for how we were going to pull off the melted look. I thought covering it up with aluminum foil would be easiest and more convincing. Amanda thought I should "melt" the pink stuff in a pot on the stove and pour the melted mess into the tray to dry and harden. But she was off on a trip working when I made this tutorial so I got my way. =)

The fork in the aluminum foil I did just because I thought it was funny. As if there was lasagna or something cooking and you didn't want the cheese to get crispy. =)

In steps 5 and 6--it's actually still real when I turned on my toaster oven* to 350 degrees and waited for it to warm up a bit. I wanted that orange glow to show that the toaster over really was on and quite warm. When it glowed sufficiently, I put the tray in and took a few photos. The pink stuff really is still in there, but as soon as my photo shoot was over (perhaps after about 1 minute), I turned off the toaster oven and removed the tray.

It's not until the tutorial gets to step 7 when the hoax really crosses from fact into complete fantasy. That's when I bring out the "melted" pink stuff. Since I didn't have any melted pink stuff--and I'm not even sure that it would melt (but I haven't eliminated the possibility either)--I needed something else. Something pink and liquid-ish. Anyone care to take a guess at what I did use? If you guess Pepto-Bismol, you guessed correctly. =) If you've got the runs, this concoction might help you out! But for carving purposes, it's absolutely terrible!

Here's the switcher-roo! The pink shavings have been
replaced with Pepto-Bismol--plus a few chunks of real
pink stuff to make it look "mostly" melted.
So I dumped out all of the pink shavings and filled up the tray with Pepto-Bismol. Then I threw in a small handful of real pink stuff to give it that "mostly" melted and lumpy look, mixed it in real good, then placed the aluminum foil behind it as if I had just opened it for the photo.

Removing real air bubbles from the Pepto-Bismol.
Next I wanted a photo of the "finished" product, so I used a fork to pull out most of the real pink shavings in the Pepto-Bismol. The smaller pieces that sank to the bottom I didn't worry about--you couldn't really see those. I was more worried about the bigger pieces that gave a lumpy appearance and that could actually be seen. But when it was done, I was a little concerned by the fact that the Pepto-Bismol had a TON of enormous air bubbles! It didn't look flat or carvable at all!

I did, in fact, try popping them with the end of a toothpick, but they were stubbornly resistant to popping, which is when I pulled out my spoon and started "skimming" the biggest bubbles off the surface. It looked pretty good in the photo, but if you really zoomed in closely, you'd see all sorts of smaller air bubbles I never did get.

I was almost done with the Pepto-Bismol. Before I dumped it out, though, I wanted to get Marjorie involved. I let the Pepto-Bismol tray set out overnight--mostly just to see what would happen--and a very thin, slight crust formed on it by morning. Which was an awesome effect! I thought it made the pink stuff look like it was already cooling (but hadn't cooled completely) giving it a sense of legitimacy, and even made it look less like the Pepto-Bismol that it really was.

Marjorie helps out! Leaving the Pepto-Bismol out overnight
left a thin layer of slightly hardened surface that's pretty clear
in this photo. It's actually an effect I really liked and wanted!
Which is why I used Marjorie to make a hole in it then
moved her to the side so the "hole" was quite obvious.

Here comes the second switcher-roo--the Pepto-Bismol-laced
pink stuff was switched out with strawberry-scented candle wax.
By step 10, I needed to show a "finished" product. The problem with Pepto-Bismol, as you might imagine, is that it's a liquid. It's always a liquid. It's a little hard to "pop" it out and have it look carvable. Amanda came to the rescue here, though--she found strawberry-scented candle wax that was just the right shade of pink.

So I dumped out the Pepto-Bismol (along with whatever pink shavings were still in it), cleaned up the tray, and dried it. Then I threw in the candle wax, put it on the stove, and started melting it. When the wax melted, it became a translucent red color, which looked nothing like the pink stuff, so I let it cool and harden a few hours before I took more photos. It also left the apartment smelling like strawberries for the next two days--which Amanda commented immediately upon walking in the door from the trip she was on. =)

And as you can see in the last photo of the tutorial, the candle wax just popped right out of the tray. No food release, no DEET. I was a little worried that it might stick to the tray, but fortunately, it didn't. Well, there was a tiny little section in the very middle of the tray that stuck, which is why I popped it out "a little bit" for my photo. I didn't want the part that stuck to the tray to show, so I covered the "mistake" with the "carving block." Then I took one last photo for the tutorial...

...a perfectly formed block of candle wax. =)
I hope you've enjoyed this "tutorial of a hoax." At least you can trust everything in this post is true! Right...? Is anyone still listening to me...? Hmm...

* No toaster ovens were harmed in the making of this hoax.