Windows Phone

[MVP Summit 2011] - 3 Minutes & 23 hours

Submitted by Robert MacLean on Sat, 02/26/2011 - 20:23

It is amazing how much can change in 3 minutes, this was the learning from the 1st day of MVP Summit 2011. I arrived in Seattle with Rudi Grobler for MVP summit after 23 hours of travelling which is frankly just ridiculous.


During that time I did a lot of thinking and reading (thank god for my Kindle) but shortly after arriving in a VERY cold Seattle I had my first 3 minute mind change. I walked out the lovely SEATAC airport and saw SNOW! I get like a kid with snow, but within 3 minutes the cold was just too much and the appeal of the snow wore off Smile

One of things we did was head to the awesome Microsoft Store – this place is just fantastic. They have so much in there but so little feels like a store. It really feels like a place to go an experiment and play with Microsoft tech: There is Kinect stations, Microsoft Surfaces, tablets & laptops running Windows 7 and a variety of Windows Phone 7 devices.


The 3 minute lesson here if from the store people – having super friendly and knowledgeable really means that it is so much better and easier to buy there. I hope that this fantastic learning in the consumer space is the start of something more at Microsoft.

Finally we hit a place called The Parlor for some beer & pool and run into a Microsoft Team (WinSE – suspect is second edition, since they had a service pack 1 disk "SE" = Sustained Engineering), just guessing but I think it was their ship party.

25022011492 25022011493

After some pool, where Rudi kicked my ass until another friend Rein Hillman arrived (which is when I fought back fantastically) we left and I had my final 3 minute lesson: Walking with your hands in your pockets, cause it is cold, means you need to using something else to stop your fall and your face doesn’t work well.

Update: Thanks to Chris Johnson to tell me what SE meant.

Finally an AWESOME competition for South African Developers

Submitted by Robert MacLean on Wed, 01/12/2011 - 10:12

logoI often find too many competitions from Microsoft ignore the southern tip of Africa or focus on specific markets, like education with the great ImagineCup event. Finally us hard working developers get a great competition: Internet Explorer 9 Top Developer Competition

This competition wants* developers to either create an awesome IE 9 add-on or light up a web site with some of the new awesome IE 9 features – so if you a web dev, html monkey, C++ or .NET developer you can take part!

The prize? A trip to PDC – the conference were two years ago everyone got hand build super laptops and last year Windows Phone 7 devices**, not to mention it is where the top Microsoft development speakers meet!

So get coding, you only have until March!!

Some things you may want to check out:

* Side note: “The competition wants” really sounds like the competition is a living entity and will punish you if you don’t do this… it isn’t and it won’t.

** My guess for this year at PDC is giving everyone tablets - just looking at what was announced at CES.

Windows Phone 7 Training Event

Submitted by Robert MacLean on Wed, 11/03/2010 - 08:35

logo_windows_phone_vRudi Grobler, known for his love of WPF, Silverlight and Windows Phone 7, has organised a FREE training event focused on Windows Phone 7! This event will run on the 5th Feb 2011 but space is VERY VERY limited.

The idea is to give you key information via presentations, learning via hands on labs and fun via playing with REAL devices!

You can get all the details and register at:

More details about the event will be announced over the coming weeks so follow Rudi’s blog for more!

It's Dev4Dev's time again!

Submitted by Robert MacLean on Fri, 08/20/2010 - 09:30

My favourite gathering of developers happens 2 or 3 times a year, it’s called Dev4Devs. This is a free event which Microsoft runs, where ANYONE can present a topic but they only have 20min! This means that in a morning you see 7 topics and rather than getting swamped in all the details you dive directly to the really important parts.

The topic list is below, and there is some exciting topics there and even some non-MS technology is covered too!

I am also really glad that the entire ATC team at BB&D, which is the team I work in, is presenting – they are highlighted in the list below!

The next one comes on the 4th September 2010 and it occurs at Microsoft’s offices in Johannesburg and you can register at

Session List for Dev4Devs

Windows Phone 7 - Getting Started

A high level introduction to getting started with Windows Phone 7 development including: where to begin, options for developers, thinking about design and a demonstration application.

Presenter: Johannes van Schalkwyk

Making MVVM easy

Starting with WPF, Silverlight or WP7? Heard of MVVM but think it’s WAY too complex for your simple application? Join me for a crash course using the easiest MVVM framework available… Caliburn.Micro!
Presenter: Rudi Grobler (ATC Team Member)

Why you should care about Google Closure

Closure is a modularised set of JavaScript libraries that can assist you in building rich internet applications.

It's been battle-tested by Google on sites like: Gmail, Google Docs and Google Maps.

Attend this short intro to get an understanding of how important these libraries are and why you should consider using them in your next big internet app.

Presenter: Simon Stewart

Introducing NHibernate 3

The daddy of .NET ORM is back with a new release, in this session you'll see a few of the newest features - such as a full IQueryable LINQ provider - that makes NHibernate 3 the best release yet!
Presenter: Kevin McKelvin

Branding SharePoint 2010 with MasterPages, Layouts and CSS

One of the largest limitations of WSS3.0 and MOSS2007 is the ability to brand SharePoint without intricate knowledge of the platform and in some cases breaking a few rules and modifying out of the box system files to get the desired look and feel. Come and see how the theming engine in SharePoint 2010 together with CSS, Master Pages and Layouts can be used to brand your SharePoint site using the amazing new SharePoint Designer 2010.
Presenter: Brent Samodien

Unit Testing - Code Coverage & Mocking

In this presentation William will demonstrate how code coverage tools help measure the effectiveness of your unit tests.  He will also show how Mocking tools can help to add value to your unit tests and ensure that all edge-case logic is properly checked.
Presenter: William Brander (ATC Team Member)

Getting ready for Windows Azure development

Heard about the cloud? Excited about the possibilities? In this session we have a 1000-mile introduction to Microsoft’s operating system for the cloud, Windows Azure, how it compares to the other cloud offerings that are out there and how to get your hands dirty with the skill-up process. Endless possibilities + new tech = fun stuff.
Presenter: Ryno Rijnsburger

An introduction to Mercurial Source Control

Want a quick introduction into a Distributed Version Control System (DVCS)? Meet Mercurial it is a cross-platform, fast, lightweight source control management system designed for easy and efficient handling of distributed projects.
Presenter: Zayd Kara (ATC Team Member)

Making money with Coded UI

Coded UI is a brand new feature of Visual Studio 2010 which enables you to quickly build automated user interface tests for your application and run them as if they were unit tests. In the talk we will look at how Coded UI can change your life, one UI at a time!
Presenter: ME! (ATC Team Member)

Hack .Net in 10 Seconds - Why obfuscation is critical

Hacking 101 – I demonstrate how to bypass basic copy protection in an unobfusctaed .Net application through reverse engineering and show how obfuscation adds a layer of protection. I also demonstrate additional techniques for protecting your applications from hacking once they are released in the wild.
Presenter: Mark Pearl

Composite Applications with PRISM

In this session Stephan will demonstrate how to leverage the Composite Application Libraries to create modularized applications for WPF and Silverlight. He will also show you how to do multi-targeted development by sharing lots of code between the web and desktop applications.
Presenter: Stephan Johnson

An Introduction to Pex and Moles

An introduction into Pex and Moles, covering the basics of Mole Types and Mole Stubs and Parameterised Testing.
Presenter: Dave Russell

ASP.NET Dynamic Data

I will briefly introduce ASP.NET Dynamic Data by showing how to build a complete data maintenance web application with almost zero code.

Moving on, I will demonstrate some standard ways of customising a Dynamic Data application, and some more advanced non-standard customisation techniques. I will finish off by illustrating how Dynamic Data libraries and controls can be leveraged in other applications that don't normally use dynamic data.

Presenter: Brady Kelly


As you probably already surmised, ASP.NET MVC 3 is the next major release of ASP.NET MVC. Join us as we highlight the upcoming features and modifications to this popular framework.
Presenters: Jaco Pretorius and Kobus Brummer

.NET 4 Baby Steps - Part X: Location, Location, Location

Submitted by Robert MacLean on Fri, 05/14/2010 - 09:27

Note: This post is part of a series and you can find the rest of the parts in the series index.

This is seriously some of the coolest stuff in .NET 4: System.Device.Location which gives you access to the Windows 7 sensor platform to build location aware applications. The two important classes to know are:

  • GeoCoordinateWatcher: Think of this as your GPS device. It gives you time and latitude and longitude.
  • CivicAddressResolver: This translates latitudes and longitude into addresses!


Usage of it is very easy. First we create a resolver and gps and then we tell the GPS to start. We assign an event to alert us when the position has changed and when we done we tell the GPS to stop.

static System.Device.Location.CivicAddressResolver resolver = new System.Device.Location.CivicAddressResolver();
static System.Device.Location.GeoCoordinateWatcher gps;

static void Main(string[] args)
    Console.WriteLine("Press any key to quit");

    using (gps = new System.Device.Location.GeoCoordinateWatcher())
        gps.PositionChanged += new EventHandler<System.Device.Location.GeoPositionChangedEventArgs<System.Device.Location.GeoCoordinate>>(gps_PositionChanged);



When the GPS position changes we write it to the screen as follows:

static void gps_PositionChanged(object sender, System.Device.Location.GeoPositionChangedEventArgs<System.Device.Location.GeoCoordinate> e)
    Console.WriteLine("Last updated at: {0}", DateTime.Now);
    Console.WriteLine("Your location: {0}", e.Position.Location);
    Console.WriteLine("I think that is: {0}", NiceAddress(e.Position.Location));
    Console.WriteLine("Press any key to quit");

How do we get our address and display it nicely?

private static object NiceAddress(System.Device.Location.GeoCoordinate geoCoordinate)
    System.Device.Location.CivicAddress address = resolver.ResolveAddress(geoCoordinate);
    if (address.IsUnknown)
        return "Unknown";

    return string.Join("\n", address.FloorLevel, address.Building, address.AddressLine1, address.AddressLine2, address.City, address.StateProvince, address.CountryRegion, address.PostalCode);

And all this code produces the following:



The GeoCoordinate class has a brilliant method called GetDistanceTo which returns the distance, in meters (Metric system FTW) between it and another GeoCoordinate. So for me to find the distance to the Lions Rugby Team home stadium I just do:

static void gps_PositionChanged(object sender, System.Device.Location.GeoPositionChangedEventArgs<System.Device.Location.GeoCoordinate> e)
    Console.WriteLine("Last updated at: {0}", DateTime.Now);
    System.Device.Location.GeoCoordinate ellisPark = new System.Device.Location.GeoCoordinate(-26.1978417421848, 28.060884475708 );
    Console.WriteLine("It is {0}km to Ellis Park", e.Position.Location.GetDistanceTo(ellisPark) / 1000);
    Console.WriteLine("Press any key to quit");

Which gives:



The accuracy can be controlled in settings, but a lot of it is up to your GPS receiver device. Unfortunately I do not have a proper hardware based GPS device, so I have used the excellent free software based Geosense for Windows, which you can see is accurate enough for most scenarios.

No sensor?

If you are on a version of Windows prior to 7, then the status of the GPS sensor will be set to Disabled.

If you are on Windows 7 without a GPS sensor then when you run it, you will be prompted for your default location information which Windows can try and use to find you.



As a bonus to using this, it is similar as the geolocation system in the new Windows Phone 7 platform! You can find out about geolocation in Windows Mobile 7 in Rudi’s blog post.