Say When? Film Trivia in 10k.

OMGPonies. I got to participate in this years 10k contest sponsored by Mix Online and An Event Apart. Erik Hicks, Seattleite developer, helped with the YQL & storage bits. My employer, Tag Creative, was super supportive of the Say When? project, and helped pushed to make it even better. It was basically a love-fest here in Pioneer Square.

Try it here. Guess the year the film was released.

The first thing we learned was that guessing the exact year a film was released is harder than you think. Originally, the scoring approach was going to be X of N movies you guessed correctly, and we’d give you a percentage correct. Then we gave a random point award (from within a range) based on how many years off your guess was. Exactly correct, being the most possible points and so on; And it worked.

Once we decided we needed a timer, we inverted the scoring mechanism to a subtractive – not additive – model. Each question has a total maximum value, which starts counting down. If you guess correctly, you get all those points, and we remove points in larger amounts for increased inaccuracy. Also, don’t forget, use onkeydown not onkeypress.

There are three known items that are hard to deal with in Say When? Especially in under 10k 🙂 The first, remakes. This seems to be due to the now nature of the web.

If the movie we try to fetch is The Karate Kid, the trailer we get is for the recent remake, not the original. We tried appending the release year to the request, but that actually caused us to get more incorrect results than without.

A second item is video content that is not authorized for external embedding, and/or has no mobile version; Yes, Say When? works on mobile, try it! There’s nothing we can do about this.

And then there’s just plain random sh!t. Sometimes we get weird video responses. Even when pinging the You Tube API with the movie title and the word trailer, you can get some weird responses.

The solution to these – given the size and time constraints – was the skip button. This allows players to just bypass anything that’s funky.

The basic application flow is thus. A player hits Say When? We pick a random year from within a range, currently set to 1970 – 2011. We throw that year to a bit of YQL sitting out in cyberspace (yay erik!) which finds, parses, and returns a list of movies from that year in film page on wikipedia.

We then select a random movie from that list, append the word trailer to it, and send it to the You Tube API. The response is a an ID. We use that to build an embed, start the timer, and play it.

That’s basically it.

Dear Jules Winnfield. Almost every time I read the the Say When? brand header, I think of Samuel Jackson in Pulp Fiction and the infamous What does Marcellus Wallace look like? (great short texty version) – post foot massage conversation – in which he says, among many other gloriously delivered lines, “Say what again.”

I always hear that as “Say when again.” and if anyone knows Samuel Jackson, and he’d like to contribute a few minutes for a recording of that a la go the f to sleep – well, that would be awesome.