At the end of the week before last I decided that Spotify’s new social features were a good excuse to host a little festival using Spotify as a platform. I announced it on Twitter and facebook, and then tried to decide how best to run it.
I figured I’d try my best to just get the site done so people could see it and start thinking about their playlists, so I made it entirely static. I put it on a rails stack so I could add to it later, which gave me an opportunity to use the awesome Heroku service for deployment. In under an hour, the site was up. This turned out to be really sensible, because I have a bad habit of starting projects and not finishing them. Here I was finished before I’d even really started thinking about what I’d do.
Monday came around and we kicked off with 8 or 9 playlists that morning! I was half expecting to do all the music work myself, but apparently I had captured some imaginations and there was plenty of music to sift through. People were also using the hashtag to talk about the playlists, so I wrote a few more lines of JS to filter out anything that didn’t include a playlist link.
On Tuesday, someone posted their playlist in a bit.ly link, which I hadn’t accounted for, and as soon as I found time, I used the bit.ly API to expand the links and find stages. I know it was only a tiny change, but this act of writing features only when they were needed by users was really refreshing. A million people have said it before me, but it’s true: users absolutely must drive development.
While I’m thinking about it, bit.ly’s API is perfect. It couldn’t be simpler. Good work!
Towards the end of the festival I wanted to immortalise the links to the playlists so that they could be found later. Twitter’s API isn’t so great for finding historical data so I moved my search code into rails and stored my search findings into a database. The festival was still going, but Heroku does not provide hourly cron jobs for free, so I made an admin page that would run the search and dump it to a database whenever I hit it. I made the job stateless so I could mash refresh on it as often or as little as I liked. Heroku and rails are my saviours here: it was so easy to do all this, I feel like I cheated.
All told, for a tiny week-long project that I thought up on a Friday, it was a huge success. Thank you so much to everyone who contributed and listened - you made everyone involved very happy. Thanks to Spotify, the playlists live on, and they’re all still available on the Spotstock website.
Here are some stats:
- 24 playlists
- over 20 hours of music
- 10 people
- 188 unique visits
- 505 hits
If you like, you can see the minimal amount of code involved.