Tracking RSS Feed Statistics

A few of my friends and co-workers have jumped on the FeedBurner bandwagon, and I’ve been pretty impressed with the stats they’ve been gathering. I’m not willing to send my readers off to someone else’s service though (even though there are some reasonably safe ways to do that), so I started to think about how best to gather similar info myself. One idea would be to ship the IIS logs from my site back to my PC on a regular basis and run them through a LogParser script that would figure out all the stats for me… but that seems like a rather manual (or difficult to automate) and data transfer intensive method.

Instead, what I decided to do was to log every feed requests into a table on my SQL Server (actual SQL updates occur at regular intervals, not on every feed request). I log the feed URL being requested, the user agent of the requester, the IP Address of the requester, the number of subscribers represented by the user agent string (Google’s feed reader, amongst others, indicates the # of subscribers in the user agent string) and the date/time they made the request.

Feed Reader Stats

What happens next is currently a manual process, but I’m working on making it automatic…

For a given 24-hour period:

  • I sum up the number of requests by user agent/IP address combo
  • I filter down to user agent/IP address combos that made more than one request to the same feed during that time period… this is intended to distinguish between a manual user visit and an RSS aggregator. (of course, if an RSS aggregator is set to be very polite and only hit my site once per day, then this will cut those #s out of the list)
  • I sum up the average subscriber # for all useragent/IP address combos … to avoid counting any single aggregator user more than once and also to accommodate any fluctuation in web aggregator subscriber counts throughout the day.

This produces a final # that I believe is roughly accurate… 792 (for the past 24 hours) across all of my feeds (mostly either the main feed or the Visual Basic feed).

About half of the requests (244 total) filtered out because they made only one request in 24 hours do appear to be aggregators (looking at user agent strings) so that would add 120 or so to this #, but in the interest of not inflating the numbers, I think I’ll stick with the calculations I’ve worked out so far. My other worry is that some of the web-based aggregators might be producing some duplicate values due to multiple source IP addresses, probably as a result of having aggregation code running on multiple nodes of a web farm.

Has anyone else tried to implement their own FeedBurner-style stats? Any thoughts on my logic so far?

Added Silverlight Streaming support to Channel 9’s forums

Continuing on in the same pattern as my last post, adding Soapbox support to C9’s forums, Adam Kinney bugged me a bit and I went ahead and added support for Silverlight Streaming as well.


It will be interesting to see if (or more accurately, how long before) someone turns this to malicious purposes.

Added Support for Soapbox Videos on Channel 9

When I started on the C9 dev team, one of the first things I did was to remove the ability for users to post embed, object and script tags. We had a couple of people abusing this feature and I wanted to lock it right down. The downside to this move was that it prevented some forms of user interaction/posts that we didn’t really mind and in some cases would even like to encourage.

As a small step towards a more community-driven future, I added support to C9 today to allow you to embed Soapbox videos in any forum post. Simple use the following markup in your post:

[soapbox video=”(soapbox video id)”]


and it will turn it into a full blown embed tag with a link to the source material underneath. The Soapbox video id is simply the GUID that appears on the permalink url ( for example) for a video and also shows up in its embed code if you take a look at that as well.

Overlaying HTML over Silverlight

In the new code that we are building for Channel 9, we have a few HTML popups here and there… floating divs for user info being one example. At the same time as we’ve been adding that feature, we also moved from using Windows Media Player to using Silverlight as our video player.

We ran into a bit of an issue though, in that our floating HTML was sitting under the Silverlight player, no matter what I did with the z-index of the two areas of the page.



That just wouldn’t do, so I asked Adam Kinney (Silverlight Evangelist and former dev on the C9/C10 team) what to do. He pointed me to the ‘isWindowless’ property of the Silverlight object and that info, combined with this KB article about Windowless controls, was enough for me to figure out what to do.


Changing our player creation script to include this property solved the issue:

Silverlight.createObjectEx( { source: this.get_playerXaml(),
parentElement: this.get_playerHost(), 
properties:{ width:'322', height:'296',
version:'1.0', isWindowless:'true',
inplaceInstallPrompt:'true'  },


this, this._handleSilverlightPlayerLoad) }} );


producing a much nicer result…


XSLT and Alternating Rows

Saw this today (it is over a year old though) on Roger Hartford’s blog;

XSLT alternating rows

In an XSLT template tag you can simulate the same functionality as in  GridView/DataGrid “AlternatingRowClass” property using this syntax:
<div class=”MyClass”>
    <xsl:if test=”position() mod 2 != 1″>
        <xsl:attribute  name=”class”>AnotherClass</xsl:attribute>
It’s that simple!

I’m a big fan of XSLT based processing… and it is great to see ways to get exactly the results you want without additional server or client side code…

Xbox Dad article on Harry Potter and the Order of the Phoenix is up

I was a bit surprised to find that I enjoyed this game, although I enjoyed the last few books in the series and the latest movie, I really figured the game would only appeal to kids. The pace is slower than most adult/teen games, but that makes it into more of an exploration instead of just quickly moving from one task to the next. My wife watched it and thought it was similar to a much more interactive and complex form of the game Myst… there are some action elements where you have to move quickly, target the bad guys, etc… but for the most part you are figuring out puzzles, perfecting your spells and exploring a very open set of environments. You can see more of my thoughts on the game in this Harry Potter article on

The Channel 9/Channel 10 team is hiring

Hey folks, I work as the dev lead for Channel 9, Channel 10, Mix Online and other sites. We build community sites for Microsoft using video, audio and text blogging and we build them using the latest .NET technologies. If you are into web development, if you have a passion for design and user experience, and if you really rock at AJAX, Javascript, CSS, C# and ASP.NET …. then this is the job for you 🙂

The Developer and Platform Evangelism Team is hiring a software design engineer to join the team that builds and extends Channel 9, Channel 10 and more. Our sites build a two way interaction between our customers and Microsoft using video as the primary communication tool. In the past several years we have built several additional sites and our network has grown in both traffic and content, and as a result we are looking for an additional Software Design Engineer to join the team. We are looking for someone who lives and breathes HTML, CSS, Javascript, AJAX and ASP.NET. The ideal candidate will have skills in all those technologies combined with a passion for design and user experience.

Do you like to ship, takes chances and effect change? Do you want to build cool sites that use Silverlight and Atlas to deliver a great user experience? Then come join our group where you’ll find a small dynamic team of folks and you’ll swear you are part of startup.

Experience in HTML/CSS, ASP.NET and C# is required and experience with AJAX, SQL, Scrum and Test-Driven Development is highly desired. Experience with Silverlight and/or WPF is not required but it would be great to have.

If you are interested and you meet the requirements, go to the official job listing on the Microsoft careers site and submit your resume!

Ratatouille preview article up on

My latest kid-focused game article, which happens to be yet another movie tie-in, is about the upcoming Pixar film Ratatouille. Cool game, very nice looking… and it has entire missions around making recipes by spilling ingredients… just like how I cook at home!

Internal Microsoft tool, eScrum, is available to the public…

We (the dev team behind Channel 9, Channel 10, Mix Online, and others)been doing scrum-ish development for a few sprints now, but we recently switched to using eScrum. This is a set of templates and tools for use with Team Foundation Server and it really rocks. There are few less-than-polished elements about the install and the web interface, but I’m glad they shipped it out for general use.

You can read a good summary of eScrum on the blog ‘A Developer’s Life’, which is also a good resource for lots of other Visual Studio related news.