Coding is like gardening...

How we made #ykyat

Friday 13th February 2009 was going to be just a normal day, as far as we knew. Then Chris arrived at work at 9am and said, “We’re all going to write a new web app today!” The idea for “You know you’re addicted to” had occurred to Chris the previous day, upon realising that checking Twitter before email represents a pretty serious Twitter addiction! Chris thought it might be fun to see what else people were addicted to, and bring the funny anecdotes together in a place where people could rate them and comment upon them.

We had a quick 15-minute meeting where Chris outlined the concept to us and drew some sketches. Tris and I got straight to work on designing the models whilst Chris put together a visual concept. We had lots of discussion about the colour scheme before agreeing on the bright pink. James and Richard were to design the front end, Tris did the backend data manipulating and URL routing. As the person with previous experience in the Twitter API, my part was to get data in from Twitter and send responses out.

By 10:20 we knew this was going to work! Having looked up search.twitter.com for a few select phrases, we discovered that people were indeed twittering about their various addictions!

Data found on Twitter!

Data found on Twitter!

As James and Richard were cutting up the design and turning it into HTML and CSS, Chris made a very welcome coffee round.

At about 11:15 we had a major success for the data import, upon discovering that Twitter Search can bring back up to 100 results at a time. We thought it was limited to 15. This meant that we could go back and select much more data.

Lots of data for us to use

Lots of data for us to use

Obviously, not all this data is particularly interesting, and some of it is just retweets of other people’s addictions. Tris helped me to tweak the regular expression to filter out unwanted results.

Meanwhile, the front end was coming along nicely:

An early version of the front end

An early version of the front end

At midday Chris bought the domain ykyat.com. We were going to use a different domain name, but after seeing that ykyat.com was available, we all agreed that it was a much better domain. I created the Twitter account @ykyat and applied the background image and colour scheme to the Twitter page.

There was a mild panic over URL routing – we wanted to give each ykyat a unique tag, but we also wanted a nice short URL to browse by topic. It was decided to use a tilde when viewing by tag. The routing is rather non-standard for Rails; I found it interesting to see how it is done. Kudos to Tris for more regular expression magic! :)

I spent my lunch break sitting outside the office wondering how best to implement the since_id so as not to bother Twitter Search by asking for the same results more than once. I had three ideas in mind, and it was useful to have a break to consider the most efficient way.

At about 14:00 things were all coming together very nicely! Tris had organised a cron job for the import, and I was very excited to see a tweet of mine imported and displayed in the gorgeous UI that James and Richard had crafted!

A tweet imported and displayed

A tweet imported and displayed

James and Richard turned their attention to the rating system whilst Tris set up the live server on Amazon EC2. My next task was to tweet back an @ reply to the addicted person, with the URL to let them know they had been featured on #ykyat. Thanks to the simplicity of the Twitter API, this didn’t take long …

Ykyat bot responds to the addicted person

Ykyat bot responds to the addicted person

Our Git repository was looking quite exciting at about this time!

Everything coming together

Everything coming together

I then started to look at bringing in the Twitter user icons. All was going fine until I hit the limit of API requests per hour. We realised that we couldn’t just ask Twitter for the icon each time every page was loaded; we would have to be more pragmatic about it. We put the user icons on hold. It was getting to late afternoon by now and we also decided we didn’t have time for commenting. Although Tris had written the back end to support comments, we were aware that the Twitter authentication needed to be secure and well tested so we didn’t want to rush that bit.

The last part of the afternoon was spent getting it working on the live server and making a few tweaks and polish to the user interface. We were all very excited to see what we had achieved in a day! Chris announced at 17:42 that we were done. We went home. Half an hour later Chris announced it on Twitter:

Chris announces #ykyat on Twitter

Chris announces #ykyat on Twitter

We made a few enhancements over the weekend. Chris worked on the navigator, showing popular categories and popular tweeters. I was itching to leave comments, which was very motivating for me, knowing that I had the power to enable it! I wrote the Twitter authentication and commenting system on Sunday evening and it went live on Monday!

Building #ykyat was an exciting and rewarding experience for all of us. It was good to work together as one team when so often we each work on different projects. It was fascinating to see an idea grow into a live web app in one day. I think we all knew that we could do it, but it was great to be able to prove it to the world!

11 Responses to “How we made #ykyat”

  1. I haven't a twitter account yet but I found it very interesting with your post.

  2. coach hire says:

    Nice job, I like what you two have done an enhancement that makes me interest to make a twitter account.

  3. Aimee says:

    Excellent! You should definitely try out Twitter – it's quite fun when you get into it! :)

  4. Aimee says:

    There is so much you can do with Twitter … way above and beyond what the founders originally conceived, i am sure! Have fun!

  5. John Topley says:

    Very cool! Thanks for taking the time to write it up too.

    I built a Rails app during a few hours here and there during a fortnight for monitoring the HTTP status of a set of URLs I'm interested in (I know there are apps out there that do this, but it was fun!) For example, you can specify that you're expecting an HTTP 200 for a URL and then if you get something else the app will email or SMS you a notification.

    You're right about there being a lot you can do with Twitter. My app used a Twitter account as a way of sending text messages for free. Until they stopped that within the UK! :-(

  6. Aimee says:

    Thanks John! We had a great time building the application. Just a bit of fun. We enjoy using Rails. Your application sounds very useful.

    Haha, i also had an application that used Twitter for free text messages. Shame they put a stop to that, hey! Maybe they'll make a deal with the UK phone companies soon.

  7. John Topley says:

    Aimee,

    Take a look if you like: http://addresswatcher.com/signup (no OpenID support, I'm afraid!)

    BTW, each blog entry page on this site says “No comments”–you might want to investigate at some point…

  8. Aimee says:

    Fantastic, thanks John!

    Yeah we seem to have a problem with the Disqus comments. Weird because i use it on my personal blog with no trouble at all. It's kind of a shame to see 0 comments when in fact there are 8.

  9. Hectic 2009 says:

    me too i haven't twitter account how could i find it???

  10. Thats some great work with the plug in. i use it on my blog and it now looks colourful.

  11. jamesmmiddaugh71 says:

    You will get a american flag wallpaper free NASCAR licensed chair after your first qualifying purchase and earn point rewards that can later be redeemed for a NASCAR experience.