October 2011 Coding Challenge/Real-Time



= Real-Time Challenge =

Thousands of people edit Wikipedia every day. Wikipedia articles are constantly changing, with the most popular articles getting updated upwards of 100 times a day. But there is very little on the article page that tells the reader that anything has changed. We would like to make the articles on Wikipedia appear more alive, so that our readers understand that knowledge is a dynamic, not static, thing.

Here are a few themes that participants might want to explore:


 * Recent changes. How might you retrieve article change data in a systematic way and represent that data in a compelling visual way?
 * Article updated ping. How could we notify a reader when they're looking at a page that new changes have been made while they were looking at it?
 * Trending articles. How might you identify the articles that are currently most interesting to users?
 * Top editors today. How might you determine which editors are having the most impact on Wikipedia today?
 * Post to social media. How might you enable Wikipedians to share their favorite articles through their social networks, in a way that's consistent with our privacy policy?
 * Page views since last edit. How might an editor be able to see how many people have seen an article since their last changes to it?

These are only a few ideas. Wikipedia collects and exposes a lot of interesting data, and there could be many creative ways to collect and represent that data.

You could go many different development routes here: Write a MediaWiki extension, a user script, or an external service calling the API. You can also leverage the IRC recent-changes feed. Note that basic recent-changes visualizations are pretty easy to do and lots of cool work has already been done in that area (e.g. wikistream which shows Wikipedia recent-changes and recent image uploads).

Writing a user script
All pages on MediaWiki sites include some built-in MediaWiki JavaScript code. Users can add their own code to this preload process by writing and uploading User Scripts, which are then loaded whenever that logged-in user loads a page. Perusing the  online guide explaining how those User Scripts work, you could begin having your own, personal JavaScript code (local to your login) up and running within half an hour.

Page traffic data
You can find raw page view statistics on dumps.wikimedia.org and on Domas Mituzas' server.

Manual: Developing extensions
Be sure to read the extensive documentation about developing extensions for MediaWiki sites.

Manual: API
The MediaWiki API is extensive, and has exhaustive documentation.