Using Microsoft pubCenter with AdDuplex

Not everyone realises but when you put an ad control such as Microsofts pubCenter control in your app, it doesn’t mean that every single user will see an ad every single time. Microsoft and any other ad provided has a limited number of ad’s to show based on the number they’ve sold. So sometimes there just isn’t an ad to show. This is referred to as fill rate, usually expresses as a percentage this tells you what percentage of requests to show an ad actually resulted in an ad being shown.

Not having 100% fill rates causes 2 issues. Firstly your not maximising your revenue as people are using your app but not seeing an ad. Secondly, unless you’ve designed for it, there’s potentially an odd looking blank space in your app where an ad is meant to go.

There is a solution though, when an ad isn’t received by the ad control it does at least fire an event to inform you that this has happened. You can either then do something to update your UI or show something else in its place like another ad control.

The second ad control I am using is AdDuplex. Unlike a traditional ad, this isn’t going to pay me out any money. Instead its specifically for Windows Phone developers to promote there apps and works on a basis that if you show an ad, your ad will get shown on another app. For every 10 ads your app shows, 8 of yours will be shown on other apps. The remaining 2 ad spaces are used by AdDuplex to make there money. The benefit of this system is there is a 100% fill rate, so your ad space is used to its full potential.

Enough talk, show me the code

In the xaml mark-up I have a MS pubCenter ad control and an AdDuplex control along with the properties set to make them fit the layout of my page. Nothing special over what you would normally do here, other than the fact there’s 2 controls on top of each other and the AdDuplex one is collpsed.

<UI:AdControl Name="MSAdControl" ApplicationId="YOUR APP ID" 
   AdUnitId="YOUR AD UNIT ID" HorizontalAlignment="Left" 
   Height="80" VerticalAlignment="Top" Width="480" BorderThickness="0" Grid.Row="0" />
<adduplex:AdControl x:Name="AdDuplexAdControl" 
   AppId="YOUR APP ID" Visibility="Collapsed" />

In the code behind I’m setting up 2 event handlers on the MS pubCenter control for error occurred and ad refreshed.

The error occurred even will get fired when an Ad isn’t loaded. In that instance I need to show the AdDuplex control. Having an event on the ad refreshed control also ensures that if an ad ever does manage to display the control will be shown again.

public MainPage()
: base()
MSAdControl.ErrorOccurred += MSAdControl_ErrorOccurred;
MSAdControl.AdRefreshed += new EventHandler(MSAdControl_NewAd);

void MSAdControl_ErrorOccurred(object sender, Microsoft.Advertising.AdErrorEventArgs e)
System.Windows.Deployment.Current.Dispatcher.BeginInvoke(() =>
MSAdControl.Visibility = Visibility.Collapsed;
AdDuplexAdControl.Visibility = Visibility.Visible;

void MSAdControl_NewAd(object sender, EventArgs e)
System.Windows.Deployment.Current.Dispatcher.BeginInvoke(() =>
AdDuplexAdControl.Visibility = Visibility.Collapsed;
MSAdControl.Visibility = Visibility.Visible;

Microsoft and Music – the story continues…

A while ago I wrote about Microsoft having an awful music strategy. The gist was generally that they had created lots of great services but nothing linked together and left users confused. Now with the release of Windows 8, the latest Xbox update and Xbox Music lets see what’s changed.

Xbox Music

Xbox Music is essentially a rebranding of Zune. Personally I likes the Zune products and calling everything Xbox to me just makes confusion, but it’s just a name so I’ll look past it.

In Microsofts press release for Xbox Music they talk about users currently using services like Last FM to discover music, Spotify to play subscription music anywhere and Amazon to buy music and store it in the cloud. Xbox Music is meant to combine all of these into 1 service. Sounds great! Even better Windows 8 will let you stream any song from the catalogue for free, which is fairly amazing.

There is still in Music Pass service at £8.99 which allows you to stream music to Xbox 360, and Windows Phone 7, plus sort of sync all your music across devices.

Sounds like there kind of ticking all the box’s of what I wanted to see, what about the software…

Well software on the Xbox 360 is basically what it was before except for the fact you now have playlists that sync with all your other devices. So if you make a playlist on your Windows 8 machine then it will be there on your Xbox. Other than that there’s still the limiting feature that you cant play music while playing a game and you can’t copy music from a CD into the Xbox Music app, there’s still a separate Music section on the Xbox for that. Without the Xbox Music pass you also still can’t sync you music from PC to Xbox. The playlist is there but the music either won’t play (if it’s not in the catalogue), will just play a 30 second preview or if you originally bought it from Microsoft will play the whole track.

As for the new Music app on Windows 8, it’s a start but far from perfect. The UI is nice and touch friendly but it’s harder to use than the old Zune player. Viewing your music lists everything in giant lists. The nice compact grid of albums organised by most recent that showed everything you were likely to want to play is gone, and to me this is a shame. Other features like being able to skip through a track or even click and artist and then an album are also gone. Now you must go into the full artist page including albums you don’t own, fair enough you can stream all this stuff, but I’d really just like to see my stuff. For some reason I think while creating the service that lets you stream any music Microsoft lost sight of the concept of a music collection. People like to collect music and in may ways you can learn a lot about a person by looking at what music is in their collection. But with the Music App your collection now seems to contain 30,000,000 tracks and is in no way personal.

A big big plus for Windows 8 though is Media Centre has gone (you can still get it but by default its gone). I like this as Media Centre was just another service creating confusion. It wasn’t a bad product but Microsoft needed to pick one solution and go with it, rather than leave users with many half complete options.


Microsoft’s ambition for 3 styles of music in one was a nice idea, but they’ve really only fulfilled 2 of them. The Radio service and subscription music. The one I’m most interested in (your own music) is still a mess, and it all seems to stem from the music subscription service dominating everything else. When they say you can get your music on your Xbox, what they really seem to be meaning is when you pay £8.99 a month you can get anything on your Xbox, therefore you have your music on your Xbox. But if your like me and spend closer to £20 a year on music rather than over £100, then £80 a year just to play music you already own is quite expensive!!!

The Future

One thing we still are yet to see is the new Music hub in Windows Phone 8. We know it will integrate with the Xbox Music Pass, but we don’t yeu know how we’re going to get our own music on the device. The new Music app in Windows 8 doesn’t suggest any way to add music to a device, and even if the icons just appeared like in Zune, there is no dragging and dropping of music to suggest you will drag music onto your phone. We can only hope that the solution they’ve come up with isn’t requiring you to spend £8.99 on a music pass and then only sync your playlists as with Xbox 360.

Office 2010 vs iWorks09

I often read comments stating Microsoft is approaching demise due to its over reliance on Office and the fact that because iWorks can read and save in the Office file format the need to use Office is gone. My own previous experience with iWorks wasn’t great but as there’s so much support I decided to give it another go and see if I really could replace Office with iWorks.

Firstly for the record although my day job is as a .net developer, im also a huge Apple fan and have been for the last decade, so im fairly unbiased towards each company.

Word vs Pages

Being a .net developer my main tool is visual studio, actually using word is not a regular thing for me, my general use is to write specs, documentation and user guides. Features like mail merge or printing labels are things I’ve never even needed to do once. There are a few features though that I regularly use and need. These include styling text, adding screenshots, comments, tables and using the smart object function to make illustrations.


So first off the UI. Microsoft have done away with toolbars of old and tried to squeeze everything into 1 tab bar at the top of the page. Apple on the other hand have a toolbar plus an object inspector popup containing a lot of tabs.

UI is largely a personal thing but I would give this one to Microsoft. Pages toolbar is good at changing fonts and adding charts but overall I felt like they had just dumped most of the functionality into the object inspector to make the toolbar simple. The result is the object inspector contains a lot of functionality in a small space organised into tabs with cryptic icons rather than words.

Styling text

Both packages have the standard font drop down, bold, underline, colour etc that you expect from any word processor. Apple however have a button that seems to quickly fill a page with Loren ipsum text including made up headings and sub headings. I guess the idea with this is that you then replace the text with your own and the sections are already styled.

Microsoft on the other hand have added icons to there ribbon toolbar that let you select from a predefined set of styles for headings, sub headings etc. They also have a format painter tool that allows you to copy the styles on an existing section to another.

In the styling comparison I would award the category to Microsoft. I personally prefer the quick style links and they have been something I’ve come to rely on, but there also nicer styles than what Pages auto page fill feature creates.


One of my most loved features of Word is the screenshot button that lets you insert a screen clipping of any open window or select a custom clipping with the mouse. As one of my main uses is to write documentation, this is something I use a lot. As far as I could tell Pages does not have an equivalent feature. The screen grab app must be used to get the screen shot which you can then paste into the doc.


Both apps support adding comments and in both cases they highlight in nice colours. Word does have a lot more options with its comments compared to Pages which just has add and delete, but this is no real issue Pages does as much as is needed.

Tables, charts

Inserting a table or chart can be achieved daily easily in Pages as can it be in Word.

Smart Objects

For those that don’t know, Words smart object feature allows you to quickly create diagrams like a higherarchy chart with very little effort and choose from a set of nice designs. The closest thing in Pages is manually drawing lines and text boxes. For me this is a big win go Word.

Excel vs Numbers

On the whole I generally use Excel for sorting data and fairly basic formulas. Numbers seemed to fulfil these needs without issue, however like with Pages I did miss the ability to quickly style my sheet using predefined styles.

One other major issue I came up against was the ability to connect to a remote data source like a database. Numbers doesn’t do this at all, but the ability for me to connect an excel doc to our management systems db to automatically pull in data on current projects is something I ultimately rely upon, without it I would have to constantly copy data from exports.


iWorks is probably a very good set of tools for anyone doing homework or other home use but for the workplace and my needs it falls short. It also isn’t the equivalent product to Office. There is a big price different but Microsoft also offer Office web apps for free which is more similar in features. In the windows world Microsoft also give away Office Starter for free which again is more equivalent in features. So rather than Apple have a product that could kill Office as its only £30, Microsoft are actually giving away something just as good for nothing.