diggtop: importance in feeds

Summary

RSS feeds are sometimes too linear: you can’t quickly find the important news so you have to check every item. But Digg and other sites add an importance score to its feeds, allowing a more interesting way to read news. Diggtop is a small webapp that takes advantage of this by showing Digg’s most popular stories, taking importance into account. It then lets the user read or discard stories while maintaining a newspaper-like view of the news.

Context

An important difference between a newspaper and a news feed is that
the news in a newspaper are organised and presented by
importance, while a news feed is just a list of sequential and
similarly formatted stories. Online feeds are similar to news feeds, and so
lack the editorial work needed to bring the concept of
importance to news. Therefore the reader cannot quickly find what’s
essential to read and has to skim through the whole list, which can
take a lot of time. There are news sites that organise their pages
like a newspaper, either manually like one the site of any
newspaper, or automatically like Google News, using heuristics to
determine the importance of a news from how often it is talked about
on the web. If you get your news from feeds (RSS, Atom, Twitter,
etc.), you lose that.

Feeds are usually chronologically ordered. However they don’t have to: the
Atom specification states that it “assigns no significance to the
order of atom:entry elements within the feed”. RSS2 doesn’t mention
any ordering of the item elements . So it’s perfectly valid to construct a feed with items ordered by importance. Few feeds are, though, because
feed reading software expects them to be chronological. With one notable exception:
Firefox’s Live Bookmarks, which simply show the feed’s list, but with
no concept of hiding already seen stories, so not very useful.

Digg publish feeds of its stories, ordered by some measure of their
importance, i.e. the number of times someone has “dugg” a story. (One may
find that particular metric not very useful, but digg’s a very popular
website, which means many people do find it acceptable.) Digg also has a
nice REST API that can, among many functionalities, return the list of
all stories ranked by number of diggs.

Diggtop

We can use that API to build a newsreader that will show stories similar to a newspaper (big headlines for important stories), but will also offer dynamic functionalities found in feed readers to let you hide what you’ve already read, and also update automatically when new important stories are published.

Introducing Diggtop, a webapp that does just that.

 

 

Diggtop screenshot

How it works

– The user sees a page like the one above and can either click on a story’s title to see the actual story’s page, or on the story’s text to just discard it.

– When a story is read, or discarded, it is removed and is replaced by the next most important one (and a new unread story then appears at the bottom right of the page).

– Digg is checked regularly, and any new important story is automatically inserted in the page.

Behind the scenes

– A very simple PHP backend maintains a list of the stories the user has seen or discarded. It just allows storing and retrieving lists of {story identifier, timestamp} pairs.

– The front-end javascript code talks to both the backend API and Digg’s API to maintain a a list of stories to show on the screen. It all happens asynchronously in order not to block any interaction, and to maintain the application state across sessions.

(Clearly we’re describing a very simple Model-View-Controller architecture, and I may write a longer entry about it because it’s allowed me to learn a few Ajaxy concepts in the process.)

Diggtop seems to work well, and I actually use it myself. It could certainly be used for other similar services, as long as they provide some sort of score (reddit, slashdot, probably many more), and perhaps even mix stories from those services on the same page.

Using it

Unfortunately you won’t be able to use diggtop on this site. That’s because you need the PHP backend to be much more complicated that it is, in particular handle more than one user. But you can still use it on your site: just copy those 2 php files and put them on your server somewhere. Make sure that the http server is able to write files in the directory where you put the files, so that the php can create a file called urls.txt. Then put the html and js files in the same directory, and you’re ready to go. You’ll also need to grab a copy of jquery.js. And if you like it, you can contribute by writing that multi-user PHP backend (with authentication and all), or perhaps make the HTML pretty.

The files

addseenstories.phpsaddseenstories.phpsdiggtop.htmldiggtop.js

This entry was posted in in English, software. Bookmark the permalink.

Leave a Reply

Your email address will not be published.