Once more, with feeling
Following on from that last post – if you’re interested in playing around with Spotify mixtapes but don’t want to play around with scripts, a more friendly version is sitting at spotipath.com. Like the script it’s built on, this could be charitably described as a beta – so expect downtime, errors, slow responses and more! Give it an artist and a song, and a few seconds (or minutes) later a playlist will come back to you. Some lines down the side show you how the playlist was actually built (with each song having a thread back, relating it to so many songs through the playlist), and to save the playlist (or just add it to your queue), drag and drop it to the Spotify window. The draggable is a bit temperamental so I’m working on a fix for that at the moment. Any suggestions or feedback, throw it at me here!
Posted: October 24, 2011 at 9:51 pm
Down the musical garden path
A while ago I published a little C# app called Spautofy – it awkwardly interfaces with Spotify to try create an ‘infinite mixtape’ – start playing a song and it will queue songs which are similar to those which came before it. The idea was to mimic algorithmically the way people jump from song to song, constructing a sort of accidental narrative as they go. Unfortunately, the way it tried to control Spotify was so hacky it was really unreliable, so not as useful as I’d like.
But, it’s a theme which still really interests me. I’ve just published a variation on it – Spotipath. This (at the moment) is a little Python script which plays on the mixtape idea – taking a source song and crunching through it to incrementally produce a playlist with that same meandering quality. The version on GitHub at the moment is really incomplete and inefficient – it was an evening’s attempt to port the gubbins of Spautofy to Python. The idea is to expand on this and make a user-friendly web frontend to it – but the code is sitting there now. Feel free to try running it yourself – it has a couple of dependencies on wrappers for the Last.fm and Spotify metadata APIs – and you’ll need a Last.fm API key to get it running.
Posted: October 16, 2011 at 3:15 pm
Extract PDF from IEEE Xplore embeds
So I have some issues with embedded PDFs in Firefox on Ubuntu. A cursory Google shows I’m not alone, and a few minutes of effort would probably produce a solution. Apparently however, that’s not how my brain is wired. It wouldn’t really be an issue if IEEE Xplore didn’t bury their papers behind an iframe embed. While it’s easy enough to smoke out the actual link, it’s still a PITA. As a hack n slash solution, I threw together a little Python script which, when given an ID as an argument (that’s the ‘arnumber’ argument as it appears on the IEEE landing page) will snuff out the PDF and download it to a directory baked into the script. It’s nothing interesting and could be infinitely better written, but if you’re equally irked by the embeds feel free to run with it. If you have no issues, this probably isn’t very useful for you!
Change the PDF_DUMP_DIR global to set the directory to write for. Needs to be emphasised – this was a 5 minute job – it sanitises nothing!
Download ieeexplore.py (1.3kb)
Posted: September 29, 2011 at 4:27 pm
Phew, looks like I’m the first person to have an opinion on Google+
Just like the rest of the internet, I’ve watched with some interest as Google+ has been unveiled. Before getting my invite I was trying to determine what its angle was to really differentiate itself from Facebook (or even Twitter, if you believe that’s the real competition). After all, while ‘it’s not Facebook!’ might be enough to convert a few (including Randall Munroe
), we all know that’s not enough for it to achieve critical mass.
After being graciously invited to cross the velvet rope and enter the club of one, I was stunned by just how familiar it all was. How peripheral the headline ‘Hangouts’ and ‘Sparks’ features were, and the sense that this was a red herring – that there’s more to come beyond Yet Another Social Networking Website – was inescapable, perhaps something deeply integrated into search results (after all, it’s a completely captive audience Google already sits on). Most depressing was how much of a wasted opportunity ‘circles’ are – a little bit of UI polish over friend lists and little else. Yes, dig a little deeper and you see where Google+ subtly takes a different view to content sharing – ostensibly nestling itself somewhere between Facebook and Twitter. On the one hand, we lose the mutual and well-understood ‘friendship’ connection of Facebook, and adopt a Twitter-style ‘follow’ dynamic, enhanced perhaps by a little more social context. My immediate concern though, is one of transparency about how content is published and shared. It’s a problem Facebook still hasn’t solved, and yet Twitter has cracked elegantly by sidestepping entirely. This one’s for you too Zuck: ‘social by default’ is fine but only when you’re building a platform which assumes the world is watching, like Twitter. Despite a number of privacy scares over the years, at least Facebook has now incubated the idea that ultimately what happens within its walls is a ‘place for friends’. Google+, in merging the social ideals of Facebook with the inherently open attitude of Twitter, has created a monster. I +1 this and it’s ‘public to the web’, but now you’re urging me to carefully pick ‘circles’ to target this other content to? It’s a confusing message, one which I hope becomes clearer as Google+ matures and uncovers its true identity. I’m sorry, I just don’t buy that yet another website can be the cornerstone of any competitor’s strategy.
But I didn’t come here just to witter on about Google+. Last year, for my final year uni project, I developed a little prototypica
l social networking website called iglu. iglu explored the contribution algorithms can make to improving the social networking experience – and was built on top of the Facebook API as a really quick way of seeding it with a social graph and real-world interaction patterns. With iglu, users didn’t have a single friends list – instead ‘social circles’ were inferred based on the mutual connections between clusters of friends, as a way of targeting different types of content to different friends or family or colleagues and so on… (Sound familiar?) There was a lot of other constant data crunching going on, including attempts to infer interests and dislikes based on posting/commenting/liking habits etc. but in the wake of Google+’s deeply disappointing ‘circles’ functionality, I thought this might be a nice time to revisit the project. No, I have no interest in launching a competing social network(!) – but instead I’ve decided to work on abstracting out (and open sourcing) the social circles algorithm from iglu into a form which can automatically create friends lists for your Facebook account based on the mutual connections in your friends list. It’ll be a nice chance to see if there’s other interesting variables that can be drawn in to better cluster friends and automatically label lists (something the current implementation lacks) – ie. based on shared workplaces, universities, cities etc. Imaginatively titled ‘iglu circles’, hopefully I’ll have something to share soon!
After all, as Mark Zuckerberg says: “Nobody wants to make lists.” Right.
Posted: July 15, 2011 at 8:28 pm
Little update to Spautofy
Ok, so maybe it’s a bit daft releasing a feature update a day after sharing a project, but release early, release often, right?
This update (which brings us to 1.1) completely changes the way Spautofy decides how to queue songs (that’s the justification for the .1
). Now, every time a new song starts playing, it’s added to a stack. When Spautofy is deciding what song to play next, it tries to find a song that’s as similar to as many songs on that stack as possible. This has a couple of benefits. First, it reduces the chance of the same bands popping up repeatedly (and there’s some extra logic to make sure Spautofy doesn’t get stuck in a loop of queuing the same x bands just because they’re all mutually similar). Also, it helps prevent the queue going off on a complete tangent within a couple of songs. The main side effect is that the music tends to err a little on the mainstream now (or at least mainstream relative to the seed song you picked). Spautofy will backtrack and pick a more obscure song if it’s painted itself into a corner, but I’m looking for some cool ways to inject a bit more whimsy to make it a little less predictable ![]()
If you’ve already installed the original release you should get a wee auto-update the next time you start it up. If not, you can download Spautofy from CodePlex, where you can also peek at the source – and that’s probably the best place to let me know if things are broken too!
Posted: May 29, 2011 at 9:14 pm


