Shuffle and conquer

A few weeks ago I joined Goodreads. A few days ago I installed a wordpress plugin that displays three of the books on my ‘currentl reading’ shelf. This plugin uses the RSS features delivered with wordpress. It fetches the feed belonging to the shelf, grabs the first three items and displays them in my sidebar.

I considered this to be a simple and nice way of letting people know what I am currently reading. What I hadn’t thought of was the way this display affected myself.

Because it always took the first three items from the front of the feed, it always showed the same items as long as I didn’t finish one of the books. This kind of annoyed me for two reasons. First, taking the first elements of an unordered list - at least no order of any relevance in terms of importance or quality of the chosen book - is by no means representative. Second, and more important, it permanently reminded me of books that are placed in the ‘currently reading’ shelf but that I do not actually read currently.

So I took a few minutes and read the code in goodreads.php, the single file that contains the plugin. After fiddling around with this a little, I added code for an additional flag on whose basis wordpress decides whether the feed is left as received or shuffled before grabbing the configured amount of items for display.

I created and submitted a patch for this modification to the plguin maintainers. So have a look at the project page if you think this hack might be of use to you.

Leave a Reply