Wednesday, December 21, 2011

'Twas the Week Before Christmas.....

I feel like posting. I don't really have anything to say, however, so if your time is limited, keep moving along. Don't read this post. =) Really, no joke--there's nothing important here. No new news, no exciting developments. Just some musings and stuff I've been working on lately, but it's stuff you really don't have to concern yourself about.

This morning I've spent tweaking the radius of several dozen locations on Atlas Quest. I got a report that a box listed in Sedona, Arizona, wasn't showing up as expected. Most of the time I get reports like this, I tend to roll my eyes. Nine times out of ten, it's because there's a problem with the search. The person is hiding their plants and finds, for instance. Or they had inadvertently clicked the "ignore" button on the box and didn't realize it. Or the box doesn't have a clue listed and most default searches won't display boxes without clues. Or something. There are a lot of reasons a box might not show up in a certain search, and most of the time I get reports like this, there's absolutely nothing wrong except the search that was run.

But.... one time out of ten, there's a bigger issue involved and does require my attention, so I have to investigate anyhow. And this was one of those one time out of ten. The Yahoo Geocoder, for some bizarre reason, listed the radius of Sedona as being a little over 100 miles! I've been to Sedona before, and it's certainly not that big!

The Google Geocoder returns a radius of just over 3 miles--certainly a lot more reasonable, and I changed the radius of Sedona accordingly. A box "somewhere" in a 100+ mile radius isn't going to show up in a search for boxes "within 30 miles" of Sedona, which was the problem in a nutshell. With the smaller radius, it will. Problem fixed....

Or is it? How many other towns on AQ have 100+ mile radiuses? Realistically, the answer should be ZERO. In fact, anything larger than about 30 miles is suspect. So I poked around and found several dozen of them. Most of them cities I'd never heard of before. Buffalo Grove, IL--32 miles in radius? Really? Strathpeffer, Germany was listed as 404 miles in radius!

So I spent a few hours fixing all of these locations. The vast majority of locations were within reasonable bounds, but those several dozen certainly needed some tweaks.

Now the problem is fixed.... right? Well, no, not completely. There's still the matter of making sure this issue doesn't come again in the future. There are hundreds of thousands of locations that AQ doesn't know about, that if someone runs a search or hides a letterbox, will require AQ to use the geocoders to look up the necessary information. The very same geocoders that generated the bad data in the first place. I need some sanity checks in the code. 

I happened to notice this photo in the AQ Photo Gallery.
Remember (especially you, One Particular Harbor!),
all extra cookies you have can be sent to me. =)
I dived into the code itself, specifically the part that looked up the radius of a location, and added a few lines of code that checked if the radius was larger than 30 miles for any given park, address, or town, and--if so--would verify the radius with a second geocoder. And if that second geocoder verified the unusually large size, to ignore the geocoders completely and set the radius to 25 miles.

That second part--ignoring the verified radius--I was torn about. Some locations larger than 30 miles are completely legit. One location was "Sequoia National Forest." Sequoia National Forest IS much larger than 30 miles in radius, so why would I falsely cut the radius to 25 miles? I did so so boxes listed in "Sequoia National Forest" would show up in default searches (which defaults to 30-mile searches). I figured the location was specific enough that it should show up in default searches, even if, technically speaking, such locations normally wouldn't or shouldn't. Kind of a gut feeling type of thing. Technically wrong, but it feels right. =)

And finally I was done. Well, actually, no, not quite. One more thing to do.... testing. I tweaked some code, and I should have my unit tests check that this new code actually works like it's supposed to. So I created a new unit test that checks for these specific conditions, made sure they passed muster, then finally uploaded the changes I made.

All because a letterbox in Sedona wasn't showing up in the search results as expected. =)

Nobody would likely even notice these changes--they're very subtle and affected such a tiny number of letterboxes, you'd have to have a sharp eye indeed to have noticed them. But it still makes AQ a tiny, little bit better. 

Yesterday I spent primarily working on themes. I finished up the Maine theme--which isn't scheduled to go live on AQ until next November if I counted correctly. I want a solid backlog of state themes so I can continue to release them once per month without fail, regardless of how hectic my life might be at any given time. =) Next year, I want to thru-hike El Camino de Santiago--a hike that will take two or three months. I certainly won't have time during the hike to create themes, so I need to create them well in advance. Hey, Mainers, I really like how your theme turned out! It's currently my default theme on my development machine! =) You're up next, Maryland! (My goal was to finish all of the state themes I'd use for next year by the end of this year.)

I also made a few tweaks to the Christmas theme. The Christmas theme really isn't one of my favorite themes. I like the animations, the colors are hard on my eyes. The yellow background for the submenus was bothering me, so I lightened those a bit. I also didn't like how a highlighted menubar option blended in with the red background behind it near the top, so I lightened the highlighted menubars as well. And the bell in the upper-left corner of the page was messing up the layout of the home page, so I got rid of that.

I tend to do this sort of thing quite frequently with old themes that bother me. A few tweaks here and there to make it a little more appealing.

About a month ago, I started looking up all of the 2012 holidays to update when each of the themes would show. Themes like Christmas always show at the same time year after year and don't require changes, but themes like Friday the 13th, total lunar eclipses, and Presidents Day do need adjusting each year. And what to do if a total lunar eclipse falls on a Friday the 13th on Presidents Day, no less?! (While that specific scenario has never happened, there are enough themes that every year involves at least a few conflicts of this sort.) It takes me several hours each year to update the theme schedule for the next year.

Yesterday, I also found myself with a 50% off one item coupon for Michaels, so I wandered down to the local store and purchased myself a large block of Speedy-Stamp. *rubbing hands gleefully* There's also a stamp I want to carve, but I'm not sure this particular block is large enough for my purposes.... So I'll probably carve a couple of stamps during the next few days. =) Not sure when or where I'll hide them as boxes, but at least the stamps will be done!

I might post a bit more later.... for now, though, I plan to get started on a Maryland theme. =) Hope you all are enjoying the holidays and getting to spend enough time with your families that you're ready to leave them! ;o)

1 comment:

Anonymous said...

Thanks for the "fix" - I planted in Sedona so am pleased ... of course I didn't know they didn't show previously!!!! People have been finding them so somehow they were listed. Again, thanks -- green is a current holiday color!!!! You fit right in! Happy holidays to you and Amanda.

Wendy