Recent Posts

Windows 10 upgrade experience

Microsoft have really upped their upgrade game. Pre-Windows 8, there was no point even bothering with an upgrade. Even if it completed without bricking your machine, the end result would be so unstable you’d just pave it and start again anyway. The upgrade from 7 to 8 was relatively painless, I only needed to reinstall a handful of applications afterwards, not a big deal. 8 to 8.1 was seamle...

Microsoft have really upped their upgrade game. Pre-Windows 8, there was no point even bothering with an upgrade. Even if it completed without bricking your machine, the end result would be so unstable you’d just pave it and start again anyway. The upgrade from 7 to 8 was relatively painless, I...

UniqueIdentifier as a primary key, that will solve all of our problems!

No, no it won’t. In evolving a single-instance website to multi-instance one, one of the many problems I have faced is how to deal with database access when your website instances are on the opposite side of the world. My solution to this was to use SQL Azure Data Sync, makes sense as my databases are already in SQL Azure anyway. Facilitating this involved changing all of the integer primar ...

No, no it won’t. In evolving a single-instance website to multi-instance one, one of the many problems I have faced is how to deal with database access when your website instances are on the opposite side of the world. My solution to this was to use SQL Azure Data Sync, makes sense as my databa...

Windows Phone 10 - First Impressions

After running the Windows 10 Technical Preview on my laptop for the last few months and being generally happy with it, bar the obvious problems you get running a Technical Preview, I’ve been itching to get my hands on Windows Phone 10 (officially referred to as Windows 10 Mobile, but I’m going to refer to it as WP10). As a very happy owner of a Lumia 1020, I’ll be getting it eventually so thoug...

After running the Windows 10 Technical Preview on my laptop for the last few months and being generally happy with it, bar the obvious problems you get running a Technical Preview, I’ve been itching to get my hands on Windows Phone 10 (officially referred to as Windows 10 Mobile, but I’m going to...

Getting started with Azure Application Insights

Now that pricing information has been released for Application Insights, I decided to take the dive and deploy it on a few of the web applications I work on. The documentation is pretty good for your basic scenarios, but it glosses over what I think are probably common use cases. The instrumentation key (commonly referred to as the iKey) is located in an applicationinsights.config file, whi...

Now that pricing information has been released for Application Insights, I decided to take the dive and deploy it on a few of the web applications I work on. The documentation is pretty good for your basic scenarios, but it glosses over what I think are probably common use cases. The instrume...

Close a window by title in C#

When you’re developing for embedded systems that don’t have a mouse or keyboard attached, a misbehaving program that decides to pop up windows at random is suddenly a lot more inconvenient. Cue the below code snippet, which takes in a window title and sets it’s state to minimised, maximised, or normal depending on the parameters you pass in. As usual, this is a Linqpad script. You just need to...

When you’re developing for embedded systems that don’t have a mouse or keyboard attached, a misbehaving program that decides to pop up windows at random is suddenly a lot more inconvenient. Cue the below code snippet, which takes in a window title and sets it’s state to minimised, maximised, or ...

ProTip: Open Powershell as admin from Powershell

Just a quick one as I find I have been using this trick a lot lately. If I am in a standard Powershell prompt and need to get an admin one open, I used to search for Powershell, right-click, run as admin. I’d do this even if I was already in a Powershell prompt as I can never remember the syntax for runas.exe. A much easier way, especially if you are already in a Powershell prompt is: Start-...

Just a quick one as I find I have been using this trick a lot lately. If I am in a standard Powershell prompt and need to get an admin one open, I used to search for Powershell, right-click, run as admin. I’d do this even if I was already in a Powershell prompt as I can never remember the syntax...

Copying records between tables in different Azure accounts : The Next Generation

A few months back I posted a small piece of code for copying objects between Azure Table Storage Accounts. I have 2 bug-bears with the code I previously posted. It’s all very custom, you need to give it the type that is in the table and add lambdas to make sure it doesn’t try to select the wrong object. Due to a change in the Azure Storage Library, it no longer works. I hadn’t used this...

A few months back I posted a small piece of code for copying objects between Azure Table Storage Accounts. I have 2 bug-bears with the code I previously posted. It’s all very custom, you need to give it the type that is in the table and add lambdas to make sure it doesn’t try to select the wr...

Using Custom Model Binders in ASP.Net MVC

I answered a question on Reddit this week from someone starting out in MVC who had read an incorrect article about model binding which was mostly correct, but made using custom binders look like they require more code than they actually do, so I thought it was worth a post to clear that up. What is (Custom) Model Binding? Model Binding is the process through which MVC takes a form post and map...

I answered a question on Reddit this week from someone starting out in MVC who had read an incorrect article about model binding which was mostly correct, but made using custom binders look like they require more code than they actually do, so I thought it was worth a post to clear that up. What...

API Head-to-head: AWS S3 Vs Windows Azure Table Storage

Recently, I was experimenting with using S3 as a tertiary backup for my photos, an honour which eventually went to Azure as it was cheaper and I am more familiar with the Azure APIs as I use them in my day job. I thought I’d take a deeper look at both APIs and see how they compare. I’ll go through some standard operations, comparing the amount of code required to perform the operation. If you...

Recently, I was experimenting with using S3 as a tertiary backup for my photos, an honour which eventually went to Azure as it was cheaper and I am more familiar with the Azure APIs as I use them in my day job. I thought I’d take a deeper look at both APIs and see how they compare. I’ll go throu...

Upgraded to Azure Storage Emulator 3.2, where have all my tables gone?

In an attempt to solve a 400 error accessing tables on the Azure Storage Emulator 3.0 today, I upgraded to 3.2 using the Web Platform Installer. This resulted in a kind of good news, bad news situation. Good - The error stopped happening. Bad - Where the f**k have all my tables gone! I’ll be buggered if I’m recreating and repopulating them all so I went hunting. I managed to find the emulato...

In an attempt to solve a 400 error accessing tables on the Azure Storage Emulator 3.0 today, I upgraded to 3.2 using the Web Platform Installer. This resulted in a kind of good news, bad news situation. Good - The error stopped happening. Bad - Where the f**k have all my tables gone! I’ll be b...