Recent Posts

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...

Copying records between tables in different Azure accounts

Today I had to quickly throw up a new instance of a customerā€™s service in Hong Kong as theyā€™ve got a big demo event coming up and want things to be as quick as possible. Now I havenā€™t quite got things to a point where I can have multiple geographically distributed instances of the service all happily talking to each other and sharing data so this instance is itā€™s own little island, a completely...

Today I had to quickly throw up a new instance of a customerā€™s service in Hong Kong as theyā€™ve got a big demo event coming up and want things to be as quick as possible. Now I havenā€™t quite got things to a point where I can have multiple geographically distributed instances of the service all hap...

JSON vs XML: Challenging my assumptions

I was recently (today actually) working on optimising a particular section of my project. This section is basically a Q & A that uses a piece of server-generated XML which is placed in to a Razor view where some Javascript works with it to generate the input fields for the user. But XML is so 2010 right? If I swapped the XML for some JSON the payload would be smaller, it would generate...

I was recently (today actually) working on optimising a particular section of my project. This section is basically a Q & A that uses a piece of server-generated XML which is placed in to a Razor view where some Javascript works with it to generate the input fields for the user. But XML ...

Windows 8.1 - The good, the bad, and the missing.

Little over a year after Windows 8, it gets an upgrade with the release of 8.1. Is this just a Service Pack by any other name or does it provide real improvement over itā€™s predecessor that makes it worthy being a numbered release? First, the good Real effort has been made in 8.1 to reduce the jarring effect of moving between Windowsā€™ Classic and Modern UIs. Here are the main improvements: ...

Little over a year after Windows 8, it gets an upgrade with the release of 8.1. Is this just a Service Pack by any other name or does it provide real improvement over itā€™s predecessor that makes it worthy being a numbered release? First, the good Real effort has been made in 8.1 to reduce the ja...

Slimming down your JSON

Newtonsoft JSON.Net is the JSON serialization library that is so good, Microsoft use it over their own. While converting an existing project from Linq to SQL to EF5 Code First, I hit an issue with the Unit Tests, which use test objects serialized to XML files as the basis of the tests. This upset the XML Serializer as collections in EF are ICollection as opposed to Linq to SQL's EntitySet...

Newtonsoft JSON.Net is the JSON serialization library that is so good, Microsoft use it over their own. While converting an existing project from Linq to SQL to EF5 Code First, I hit an issue with the Unit Tests, which use test objects serialized to XML files as the basis of the tests. This ups...

A simple WebCache Helper

As mentioned in most of my previous posts, the main project I work on is due to move to Azure in the future. Among the many gems of Azure is their caching infrastructure, which can either be hosted on a dedicated worker role or instructed to use spare memory on your web roles. More information and pricing for Azure Caching can be found at http://www.windowsazure.com/en-us/services/caching/ I ...

As mentioned in most of my previous posts, the main project I work on is due to move to Azure in the future. Among the many gems of Azure is their caching infrastructure, which can either be hosted on a dedicated worker role or instructed to use spare memory on your web roles. More information a...