Ballet Index

August 6, 2009, 8:07 pm

Ballet Index is a fast, cross referenced glossary of Ballet Terms:

A lite version is available free, with a loading delay to access glossary definitions.

  • Index information is stored on your phone. Fast access and no network connectivity required.
  • Each page has been cross referenced for fast browsing of glossary terms.
  • Random flashcard functionality allows you to test your knowledge of Ballet terms (In version 1.1).

Ballet Index uses some of the information available on the Wikipedia Ballet page. This data has been modified, optimized and cross referenced for the iPhone.

Permalink - Comments - Tags: Development,Ballet Index,iPhone,App,Glossaries

Timeline Project Trilogy

July 24, 2009, 9:42 pm

I have set up the third and final (for a while at least) of the sites devoted to geographical and chronological mapping of historical conflicts. Not that I need an additional time sink but the compulsion to add an American Civil War Project was irresistible.

That fact that I now have a Trilogy of sites is purely coincidental. My nauseatingly sycophantic obsession with StackOverflow can only go so far ... hmmm

Anyway, I have three projects ready for user contribution. Although I quite enjoy doing the research and populating data points myself, I do occasionally, quietly hope that some generous denizen of the Internetz will log in and contribute their valuable time to one of my three digital offspring:

Permalink - Comments - Tags: Development,World War Two,Napoleonic Wars,American Civil War

Tail Wagging Googlebot

July 17, 2009, 10:46 pm

I discovered an interesting and somewhat elusive bug in my user validation stuff last night. With a little more sleep and some forethought I might have arrived at the solution a little earlier that I did, but I got there eventually.

I noticed, of the handfall of users that have signed up for my Timeline Project, not all had validated their accounts. I wondered about the reason why and decided to do a bit of testing. I follow a pretty standard model for account validation:

  • User enters their new details.
  • I add the details to the database and generate a random key.
  • I send an email to the specified address with a URL back passing the key as a param.
  • User clicks on the URL in the email and I match it to the database key I stored earlier. Then I erase the key in the user's database entry. I only need to do this once and I use the key for other stuff (password resets).
  • If everything matches up, I set a valid flag on the user account.

So pretty straightforward? When I originally wrote the code, I tested with a couple of accounts, assumed everything was fine and moved on. I assumed wrong.

Re-testing this stuff, I created a whole pile of accounts and checked that they could be successfully validated. To my chagrin, I found that when I clicked on the validation URL, for a handful of them, I generated an error message saying that the key didn't match. This was something of a gumption trap, a random intermittent fail with a system that should be trivial.

I fell back on that mainstay of programming, debug writes. I already have a decent logging system, so I added a few more log messages when the validation URL gets fired. The results I found were puzzling to say the least:

For this log example, the validation succeeded (validate_pass), but the message immediately after it was extremely suspicious. An attempt to validate that user id from some obscure IP address that I hadn't seen in my logs before. My "it is always your fault" programmer instincts failed me and I jumped from one irrational and outlandish conclusion to the next. Eventually I came to my senses and decided to do a traceroute on the IP address:

When my activation email arrived in my Gmail inbox, that enthusiastic, tongue lolling, tail wagging Labrador of a GoogleBot immediately jumped on my validation URL and bounded off to get it. So if the GoogleBot hit the URL first, then the key would get reset and the subsequent real user request would fail. It is pretty satisfying when a classic intermittent and quite random race condition has a very simple solution. "It is ALWAYS your fault". I gotta remember that one.

Adding a few lines to my robots.txt file, which up until that point had been empty, ensured that the GoogleBot would refrain from hitting those fragile URLs. Bug Fixed.

Permalink - Comments - Tags: Development,Google

Juno, Sitemaps, Allison Janney, Crumpet Toast

July 12, 2009, 1:31 am

Finally got around to watching Juno tonight. I loved the trailer when it was on TV and really wanted to see it at the time (I would never barf in your urn). My life tends to lag by about 18 months or so when it comes to stuff like that.

Jeff Atwood on the StackOverflow podcast made me realize I need to generate a sitemap XML based on my content, rather than knocking something together from the entry pages and hoping that the Google crawler will find it's way. Pretty happy with the results, my PHP produced 1,249 URLs ready for Google indexing. Who knew I had so much content?

Mmm, eating crumpet toast with honey. Ok, this is just a gratuitous, inane, food reference.

So I sat in bed writing some pretty simple PHP, while watching Juno. I liked it, but I get the feeling that I am so changed by my West Wing obsession that I would probably like anything with Allison Janney in it:

Permalink - Comments - Tags: Development

August 1940

July 4, 2009, 11:17 pm

I have alternatively made progress and had setbacks in the last few days. First the progress:

I am finding the new interface really streamlined for creating content and have finished entering data points up to August 1940 in Europe. The battle for France has ended, the Italians have entered the war and the Battle of Britain has just begun, it is a fascinating period to be reading about. I would love to get hold of a book on the Battle of Britain to improve the geographical data I have entered for the various phases of that conflict.

The setbacks:

First I discovered that the datapoint creation form was badly broken in Internet Explorer 7. Fixing this will involve a painstaking process of elimination to find the CSS at the root of the problem. I then discovered that the main Timemap interface was broken on all versions of IE, this is a much more serious. I haven't had a chance to investigate yet, but I am confident that this problem will not be too complicated to resolve.

Update : The second problem with the main interface is fixed now. Turns out I was generating some invalid JSON for polyline type markers on the map. Now I just have to fix up entry creation interface for IE7.

Permalink - Comments - Tags: Development,World War Two