Contact Us

Our Blog.

JQuery & HTML5 Drag n Drop Uploads with ASP.NET MVC3

I recently came across this incredibly funky jQuery library to do Drag ‘n’ Drop uploads using the new HTML5 File API.  After reading about it and playing with the demo I just had to try it out, so I’ve knocked up a sample ASP.NET MVC 3 app that handles the uploads.  It currently works in Chrome and Read More »

January 10, 2012 | by

Things Storm bookmarked this week / 26-10-11

This week… Dave pointed me to the fact that Google have given their App Store a bit of a facelift. As he points out – “to say that it had a ‘hint of iTunes app store’ is possibly an understatement” – but he’s also right, it’s pretty well put together and always worth spending a Read More »

October 26, 2011 | by

Generating code coverage metrics for a Ruby on Rails project with simplecov

As part of my dive into unit testing Rails applications I was keen to set up a tool to give me code coverage stats.  Code coverage represents the % of your source code that your unit tests exercise.  100% code coverage is a good goal to have and the earlier you hit it, the more Read More »

September 19, 2011 | by

Stop autotest continuously re-running your Rails tests

I’ve been getting up to speed with writing unit tests for Rails applications today.  My setup currently consists of RSpec tests being automatically run by autotest when I save a file.  This is a really nice workflow as you get instant feedback on failing tests.  Couple that with the autotest-growl gem to receive Growl notifications Read More »

September 16, 2011 | by

Using curly braces in a C# String.Format format pattern

This is a gotcha which caught me out and after banging my head against my desk to 10 minutes was easily solved by reading the documentation.  I was trying to use StringBuilder.AppendFormat to build up a JavaScript function and kept getting hit with a FormatException when trying to do this: sb.AppendFormat(“function {0}(args) { return false; Read More »

January 15, 2011 | by

URL Re-Writing in ASP.NET Requires Form Action to be Re-written

On a project I was working on recently we ran into a problem where the combination of URL re-writing and  postbacks caused the page to post back to the wrong URL.  When you create an ASP.NET page with a <form runat=”server”> tag, ASP.NET will automatically output the action attribute to be the URL of the current page.  However, the URL that is used is not the original URL of the request, but instead the real URL of the page.  For example, when you are on the page “/services/web-design” the real request might be to “/services.aspx?service=web-design”.  When you do a postback, you will be returned to the ugly URL.

June 4, 2010 | by

The Haversine Formula in C# and SQL: Distance between two points

Storm was recently asked to create a local office finder for a client.  We used the Google Maps API to geo-locate the offices, storing their lat/lng co-ordinates in a database. Each time a customer performs a search for their town or post code we use the same process to their lat/lng co-ordinates as well.  Now we have the information we need, but how you find out which offices is closest to the customer?  We use the Haversine Formula.

May 17, 2010 | by

Using the Google Maps API to get long/lat co-ordinates from a postcode or address

Storm were recently asked to create a local office finder for franchised business VoIP provider, Datasharp. The client requested that the user should be able to enter their postcode or town/city and be informed where their nearest branch was. To make this possible we would need the latitude and longitude co-ordinates for each office and the customer, but how do you get the co-ordinates from the address?

May 17, 2010 | by

Convert an angle in Degrees to Radians in C#

I was recently using Google Maps API geo-location lookups to get the longitude and latitude of an address entered by the user.  I wanted to find the distance between a two co-ordinates using the Haversine Formula.  To do this I needed to convert my lat/lng co-ordinates into radians.  This seemed like an excellent opportunity to create a new extension method to add to Storm‘s library of re-usable code.

May 17, 2010 | by

Archive of Related Entries with Movable Type

Recently, I have been working on a Movable Type based website for monthly research data. We found that we needed to create a sidebar module displaying monthly entries grouped by year. After some head scratching I came up with the following MT4 code.

February 26, 2008 | by