Wednesday, December 17, 2008
Pushing Source Code
So, now you can keep up with the current solution by going to http://www.codeplex.com/twitivia and downloading it. I will shortly be posting the Windows Service solution here and also the database that got made to support both the Service and Website (once it is more complete).
Turns out codeplex is just a big Team Foundation Server installation so I am checking files in and out.
Just a quick note to give everyone a stats update and let you know you can hijack the code whenever you want now.
Monday, December 15, 2008
One further refinement
Oh geeze, the sales guy in my head just tried to issue a "Change Request Form" to the client in my head after the Project Manager just told him about adding a new message type. Now the client is all ticked off and is threatening to kill the whole project. I stepped in and told them all that changes like this are a normal part of the development process and this particular change won't be much at all since we haven't started coding that part yet. That's what refactoring is for. Refinements..
Everyone seems ok now...
Saturday, December 13, 2008
Twitter twitter Yedda yedda
Twitter exposes some of its functionality via an Application Programming Interface (API). That means we can talk to the twitter at a system to system level rather then having a high maintenance human (me) in the loop. After doing the contest 3 times, I think we can automate pretty much the whole thing and just leave it run.
Twitter provides a RESTful interface (check Wikipedia for more on what that means if you like http://en.wikipedia.org/wiki/REST). While we could spend valuable time writing an interface to twitter in C#, but it seems someone has already done that for us (sweet) and we can build our application on their work. I looked at 3 libraries and have decided to use the Yedda Twitter C# Library (http://devblog.yedda.com/index.php/twitter-c-library/)
So with that decision made, we can look at how we can build the application at a higher level.
I’m thinking a windows service can do all the day to day work, the twitivia.com website can be based on MVC (since I’m using that right now and it will be easier) and then we can add in some cool silverlight stuff to play with that.
How about, I get started then catch you up.
The rules of Twitivia
Ok, just a quick post to formalize the rules we have been talking about. Ha, formalize rules.. I crack myself up.
Anyway, when we started posting twitivia questions way back 3 days ago, it seemed like a good idea to have the first response win. Then we all watched @joshuainboden hover over his text messages and was quick on the response. I believe that is when we coined the term “tweethover”.
So after a quick discussion with a few people, it was decided that we should award a “First Responder” award but allow the session to run for several hours to allow more people to participate and then choose the winner “randomly” from the list of winners.
Ok, that should be the last of the non-project, project related stuff about the project.
Thursday, December 11, 2008
What are we building again?
So, let’s talk about what we want to accomplish next.
I have to do it??!
I have run the contest for two days, and wow is it a lot of work. Well, not really, but it’s not something that anyone should have to do for very long by hand. Isn’t that really why we made computers?
The way I see it, there are 6 message types that should go out to the twitterverse about the game and let’s explore them.
Warning! Questions ahead!
The game is going to run once a day (at least while I have to do it by hand) and the first correct answer to the question is the winner. That means the speed that the players respond is important. I think we should give them some warning that the question is getting ready to go and what better way then with the sponsor message that will carry the “hey, a twitivia round is queuing up”. So message type one is a sponsor message, something like;
“Today's twitivia sponsor is AWH (www.awh.net) "Make IT work for your business". Prepare for the question!“
So when we want to have more sponsors then AWH we would likely fill the message in with data and it would look like something like
“Today's twitivia sponsor is <sponsorName> (<sponsorUrl>) "<sponsorTagline>". Prepare for the question!”
(I’m using the <> to wrap the section we will put data into in the future.)
Next, the inquisition begins!
Twitiva wants to know, With separate divisions for righties and lefites, what sport requires its players to keep their elbows at the table?
We have to keep the questions (and answers for that matter) under 140 characters… so the wording is important. Why 140 characters? That is a twitter message limit.
A simple substitution like;
Twitiva wants to know, <question>?
would work for this.
Pavlovian response anyone?
I noticed today, when I posted the questions, the people that played that I was in the room with were chomping at the bit to see if they won. I think that the lag in announcing a winner for several hours is a good thing for the games and it allows me to space the posts out over a longer period of time so they are not as annoying to everyone, and they show up spaced out in the global timeline to attract more players. That is one of the goals (so if you’re reading this… sign up!)
And the winner is: @joshuainboden for the correct answer, Arm Wrestling!
Which again is a simple substitution for something like;
And the winner is: @<userName> for the correct answer, <correctAnswer>!
By tracking the username, we can then keep track of leader boards and individual player stats which we will added into the twitivia.com website (when we get there)
Gimme gimme gimme
Since everyone I know likes instant gratification, once the winner is announced, we should provide the daily stats so people can see how well they did and how many other players are playing. We all want to feel part of something big (and of course, since you’re reading this, not only are you a part, you on the inside, like in the inner circle of trust). Don’t violate the circle of trust…
Daily stats from twitivia: 8 total answers, 7 correct answers, first answer 1 minute from question post.
Would be something like;
Daily stats from twitivia: <totalAnswers> total answers, <totalCorrectAnswers> correct answers, first answer <firstAnswerDelay> from question post.
I figure at some point we can also do prizes (once we have real sponsorship), until then… “Yea! You won! My, look at the big brain on that player” is all we are getting.
But Chris, that is only 4, what about the other two?? The other two!!
The other two will be simple “reminder” type message and a “call to action” type message that will broadcast out until we have enough players playing and the game is rolling on its own. Something along the lines of;
-
Tune in tomorrow for the next question and follow the twitiva project at www.chrisslee.com
-
To win at twitivia, you have to follow twitivia!
Wow
That was a lot of dense narrative. If you read this much, cool. I figured we had to get this part done so we all understood what the goal was. Next post, we start to look at solving the problem, until then I’ll slave over a hot laptop to get the questions out. So play, for the love of all that is Holy, play!
Wednesday, December 10, 2008
Twitivia
Twitter, ASP.NET MVC, Silverlight, XNA, iPhone, what do they all have in common? Twitivia! (If you’re on twitter feel free to follow the project @twitivia on twitter).
Twitivia is a project that you can follow me through, it is a simple idea, ask one trivia question a day on twitter and track the answers.
The goal is to create an application that will do all the real work and then spread the client to as many platforms as possible (web, iPhone, Xbox, desktop (WPF)) and you can follow me through. As I build the application, I am going to post the progress (bad code and all) and hopefully some can learn with me, and others will point me in the right direction when I’m lost.
So, let’s get started shall we?
Step one: Get twitter all set up
Well that was simple, go to twitter.com and click the join button.
I setup the new account to be twitivia (obviously) and then went out and registered the domain (yes, I really did). So when we start writing code that runs on the net, like the leader board (for scores) and all the various service end points, we can all find it.
I found a nice icon, changed the design colors on the twitter site and bang, it was online.
Step two: Let people know
I posted the first question and winning answer (hmm could use that as a trivia question later on.. who was the first winner on twitivia).
Then I went out to my regular twitter account (http://www.twitter.com/kuronoir (feel free to follow me there too)) and posted the “it’s alive” announcement and since my twitter and Facebook accounts are linked, about 150-200 people were notified.
I got some good feedback and have asked people to email me questions and answers we can use to populate the database. If you have some good trivia, email me.
Step three: Let’s work out the application plan
Since the primary input and output channel is twitter, I think the first place to go would be to the twitter API and start fooling around with that.

