Tuesday, October 29, 2013

Azure DevDays

Marraskuun 11. päivä pidetään Microsoftilla (Keilaranta 7) Azure DevDays-tapahtuma joka nimensä mukaisesti keskittyy Azure-teknologioiden ympärille (ja nimestään huolimatta on vain yksipäiväinen Smile). Minäkin olen siellä kertomassa tekemästäni Azure-palvelusta Linnanmäen Windows Phone- ja Windows 8-appeja varten. Tervetuloa kuuntelemaan ja kyselemään!

Ohjelma ja ilmoittautuminen täällä.

Friday, September 20, 2013

Run your development workstation in the cloud

I have been working lately on projects that require me to use legacy versions of development tools (such as VS 2010, SQL 2008 R2 etc). I normally run the latest and greatest versions of everything on my personal development workstation so this has forced me to put up a Hyper-V virtual machine that has the required versions set up properly. Luckily MSDN has all of the legacy versions downloadable :)

I do development work using multiple workstations depending on where I happen to be. I have a more powerful, bigger laptop at my office as the primary developer workstation with external display, keyboard etc. Since it is a bit painful to lug that laptop around when visiting customers, I also have a more lightweight laptop that I use as my take-anywhere tool of choice. That leads to a problem of what to do with the locally hosted development vm? I could copy it to both laptops (the lightweight one is also a Win8Pro machine), but then it would be out of sync constantly on the other machine, although all project source code is managed via the Team Foundation Service at http://tfs.visualstudio.com/.

The solution I came up with is that instead of running a local vm I set up a vm in Azure as an IaaS virtual machine. There is even a platform image with a legacy OS and SQL Server version:

clip_image001

So that would solve my problem! This solution has the benefits of being able to access the same hosted vm from either of my active development machines (or any other machine that has remote desktop capability). It was also a positive surprise (although I knew that but hadn’t realized it in practice earlier) that hugely large downloads from MSDN get downloaded via the extremely quick network that Azure datacenters have. Downloading a 4GB ISO image took a mere 15 minutes or so!

In practice, I already had a vm set up locally, so I also explored the option of moving that vm to Azure instead of creating a new one. In a later post I will explain how to move an existing vm image to Azure.

PS. This post was mostly written in the inspiring environment of Aalto AppCampus open house event on the “national work from home day” in Finland where I met many old friends and made some new ones!

Friday, July 5, 2013

Photo Location Planner reaches 10k download mark

A few days ago the Windows Phone version reached 10 000 download mark on the Windows Phone Store!

Thanks for all the users for this unbelievable achievement! There are some open bugs that I will fix at some point. Also, I have a lot of development ideas as well, finding the time to implement them is the harder problem to solve :)

image

Monday, June 3, 2013

Unprecedented popularity of Photo Location Planner in WP Store

I submitted Photo Location Planner to Windows Phone Store just about a month ago. This weekend the statistics tell me that it has been downloaded from the store over 5000 times! That is way more than I anticipated, although the app is free but it has a fairly limited audience. The download stats look currently like this:

image

Past few weeks it has been fairly steady at 150-200 downloads per day, which is amazing! I have done very minimal marketing, just a few tweets and blog posts + word of mouth to friends + one post to a local photography forum.

To be honest there is currently at least one case when it seems to crash, stay tuned for an updated version. Many thanks for the individuals who have submitted a crash report via email!

Photo Location Planner in Windows Phone Store.

Friday, May 24, 2013

Photo Location Planner for Windows Phone 1.2

New features:

  • Finnish localization
  • Sunrise & sunset compass direction added to start screen
  • Error reporting added
  • Version history added
  • Link to rate & review added

Version 1.2 has been available in the store for a few days now.

Wednesday, May 8, 2013

Weird behaviour of DateTime.AddMilliseconds() on Windows Phone

I have recently released a Windows Phone App to the store, and it has received fair amount of attention. There has been, however, an annoying bug in the code that I did not have time to investigate closer until now.
The problem is that this piece of code
private static DateTime julianDateToDate(double julianDate)
{
    DateTime dt = new DateTime(1970, 1, 1);
    dt = dt.AddMilliseconds((julianDate + 0.5 - J1970) * msInDay);
    return dt;
}
results in an ArgumentOutOfRangeException if the argument julianDate is NaN (which happens when the app logic fails to calculate various twilight times – they cannot be calculated at all at certain times of year and place).
The weird thing is that the exception gets raised only when run on the emulator. If it is run on a real device, no exception is raised! Luckily it is possible to debug the code when it is running on a device, which revealed the problem.
The simple correction is to modify the method to manually check the argument and raise the exception:
private static DateTime julianDateToDate(double julianDate)
{
    if (double.IsNaN(julianDate))
        throw new ArgumentOutOfRangeException("julianDate");
    DateTime dt = new DateTime(1970, 1, 1);
    dt = dt.AddMilliseconds((julianDate + 0.5 - J1970) * msInDay);
    return dt;
}
The lesson here obviously is: the emulator is not the same thing as the real device. Remember to test your apps on the device as well!

Edit 10.5.2013: corrected the first piece of code to reflect reality!

Friday, April 26, 2013

Photo Location Planner

Are you a landscape photographer? Do you need to plan when and where you need to go to capture the perfect sunrise or sunset photograph?

Aalisoft has developed an app that lets you see when the sun rises and sets as well as the direction on an interactive map. The times and directions depend on two things: the date and place. Before the exact times can be calculated, the position needs to be pointed on the map and the desired date needs to be selected (by default it is today but you can plan ahead and select whatever date you desire).

There are three different types of twilights:

  • astronomical (dark enough for astronomical observations)
  • nautical (dark enough for nautical navigation based on stars)
  • civil (starting to get dark for the human eye)

All these three twilights will also be calculated and shown on the screen. See a good explanation on the different twilights here as it relates to photography.

Available in Windows Store…

Photo Location Planner has been available free for Windows 8 and Windows RT since December 2012.

screenshot_01302013_210442

Photo Location Planner in Windows Store

And now also in Windows Phone Store!

A version of Photo Location Planner is now available also for Windows Phone 7.5 and later (including Windows Phone 8).

WP4

Photo Location Planner in Windows Phone Store

Have fun and take great sunset/sunrise photographs! Or just enjoy the sun without a camera, now you know when it rises and sets!