• IsolatedStorageSettings extension method

    I noticed that my Windows Phone 7 applications started to have lots of these kinds of statements in the OnLaunch and OnActivate event handlers:

    IsolatedStorageSettings settings = IsolatedStorageSettings.ApplicationSettings; bool allowLocationService; AllowLocationServiceProperty = settings.TryGetValue( “AllowLocationService”, out allowLocationService ) ? allowLocationService : false;

    I came up with simple this extension method to reduce the repetition:

    /// <summary> /// Gets a value for the specified key /// </summary> /// The System.Type of the value parameter. /// </param> /// The key of the value to get.</param> /// A value to return if the key is not found.</param> /// When this method returns, the value associated with the specified key if the key is found; /// otherwise, the value of . public static T TryGetValue(this IsolatedStorageSettings settings, string key, T @default) { T value; return settings.TryGetValue( key, out value ) ? value : @default; }

    Which means I can now do:

    IsolatedStorageSettings settings = IsolatedStorageSettings.ApplicationSettings;

    AllowLocationServiceProperty = settings.TryGetValue( “AllowLocationService”, false );

    That’s a bit better!

    There’s a few other examples in this thread in the Windows Phone 7 forums.

  • Comparison of public weather forecasts for Adelaide

    If I want what I consider the most accurate forecast for Adelaide, I’m going to refer to the Bureau of Meteorology forecast. There are a number of other weather sites on the Internet, so let’s see how close their forecasts are to what I’ll call the “official” one.

    Note, temperature is measured in Celsius in Australia, so those are the units I’m displaying. Out of interest, 42°C is equivalent to 107.6°F which is equivalent to hot!

    BoM Forecast

    PRECIS FORECAST FOR ADELAIDE Issued at 5:00 am on Monday, 31 January 2011

    Monday Max 42 Dry. Sunny.

    Tuesday Min 24 Max 33 Fine. Mostly sunny. Wednesday Min 20 Max 34 Fine. Mostly sunny. Thursday Min 22 Max 34 Fine. Mostly sunny.

    wunderground.com

    http://www.wunderground.com/global/stations/94672.html

    Predicting 37°C

    image

    weather.com

    http://uk.weather.com/weather/today-Adelaide-ASXX0001?fromSearch=true

    I went to the UK version of weather.com as that seemed to be the easiest way to get the temperatures in Celsius.

    Forecast: 40°C

    image

    accuweather.com

    http://www.accuweather.com/en-us/au/south-australia/adelaide/quick-look.aspx

    Forecast: 42°C

    image

    theweathernetwork.com

    http://www.theweathernetwork.com/weather/ausa0001

    Forecast: 32°C

    image

    image

    weatherbug.com

    http://weather.weatherbug.com/Australia/Adelaide-weather.html?zcode=z6286&lang_id=en-au

    Forecast: 33°C

    Looking at the screengrab, I can see why they’re called weatherbug.

    image

    So as you can see, most of these have absolutely no idea.. I can only presume they are throwing darts at a dart board with the numbers they come up with. Accuweather seemed to be the closest to the Bureau’s figures.

    And as it turned out, Monday did get to 42°C, so the BoM was on the money.

  • WP7 Apps–the value proposition

    I’ve noticed something interesting recently with some of the paid apps appearing in the Windows Phone 7 marketplace. For apps that are essentially just a front-end for publicly available free data, I’m wondering why you would want to pay for them?

    For example I chose to publish my Internode Usage app for free (just updated to version 1.1). As I don’t have to pay to access the data (Internode make it freely available via a web API) I figure unless the app adds significant additional value then why shouldn’t my app be free too?

    The same principle applies to the second WP7 app that I’ve been developing – “Aussie Toilets”. It is based on data published by the Australian Government, and as they’ve already published a free iPhone app, the idea that I would try and charge for basically the same thing on a different platform doesn’t seem logical (I’m assuming my app is similar, I haven’t actually seen the iPhone one).

    You see, for every paid app that uses free data there’s a threat looming - another app that uses the same data but which is free. So if a paid app is to be commercially viable then it really needs to stand out – add significant value to the original data (eg. visualisations, interpretations), and stand above any free competition.

    There is one reason I can think of for some apps being paid which would otherwise be free. It’s related to the fact that developers only get 5 free app submissions per year (but no limit to paid apps), so there is an incentive to publish paid apps (especially considering the penalty for failing app certification for a new free app).

    So my challenge to the WP7 developer community – innovate and provide real value, and make the best of an impressive platform. Deliver quality apps, whether they are free or paid. But if you expect me to pay for your app, make sure the value it provides is worth at least the value you are charging for it!