I’ve started knocking together a little app to automate the process of trawling through a folder structure and checking .NET project files (C# .csproj currently) to extract some info out of them. The DotNetProjectFileAnalyser repo is up on GitHub. I’ve been working against Visual Studio 2010 project files, but could well work for other versions assuming the project file structure is the same for the elements it currently looks at - I just haven’t tried as yet.
[Read More]
GB Post Code Importer Conversion Accuracy Fix
In a post last year (Ordnance Survey Data Importer Coordinate Conversion Accuracy) I looked into an accuracy issue with the conversion process within the GeoCoordConversion DLL that I use in this project (blog post). Bottom line, was that it was a minor with an average inaccuracy of around 2.5 metres and a max of ~130 metres by my reckoning. I’ve since had a few requests asking if I can supply an updated GeoCoordConversion DLL with fixes to the calculations.
[Read More]
SQL Server Table Designer Bug With Filtered Unique Index
A colleague was getting a duplicate key error when trying to add a new column to a table via the Table Designer in SQL Server Management Studio (2008R2 - not tested on other versions), despite there being no violating data in the table. After a bit of digging around, I tracked the problem down to what appears to be a bug in Table Designer when there is a unique, filtered index in place on the table and the table is being recreated (i.
[Read More]
MongoDB ASP.NET Session Store Provider v1.1.0
Since I created the MongoDB ASP.NET Session State Store Provider (v1.0.0), a few things have moved on in the MongoDB C# Driver. I’ve pushed a number of changes up to the project on GitHub (which I’ve incremented to v1.1.0), so it now uses v1.7.0.4714 of the driver. There is no change to way it is configured in web.config, so if you are using v1.0.0 of my provider it should be painless.
[Read More]
Importing twitter archive into ElasticSearch
I recently downloaded my full history of tweets from Twitter (via the “Request your archive” button on the Settings page), which gives the data in CSV and JSON formats. The download comes with a simple web UI so you can browse locally, all your historical tweets, as well as perform basic searches. When I tried performing a wildcard search, it resulted in an unresponsive script warning and nobbled the browser tab.
[Read More]
Configuring Azure Storage Emulator SQL Server Instance
If you’re using Windows Azure Storage, you are almost certainly going to be running the storage emulator during development, instead of working directly against your storage account up in the cloud. This emulator (which comes in the Windows Azure SDK - see the “other” category), allows you to test locally against local instances of Blob, Queue and Table services.
As per the Overview of Running a Windows Azure Application with Storage Emulator reference, the emulator needs a local SQL Server instance.
[Read More]
Error Creating Azure Blob Storage Container
I received a rather…vague…error when trying out a bit of .NET code to connect to a Windows Azure Blob Storage account, and create a new container in which to store some blobs.
The code CloudStorageAccount storageAccount = CloudStorageAccount.Parse( "DefaultEndpointsProtocol=https;AccountName=REMOVED;AccountKey=REMOVED"); CloudBlobClient blobClient = storageAccount.CreateCloudBlobClient(); CloudBlobContainer container = blobClient.GetContainerReference("TestContainer1"); container.CreateIfNotExist(); // This error'd The error A StorageClientException was thrown saying “One of the request inputs is out of range.”. An inner WebException showed that “The remote server returned an error: (400) Bad Request.
[Read More]
ASP.NET MVC Performance Profiling
Building up a profile of how a web application functions, all the database interactions that take place and where the server-side time is spent during a request can be a challenging task when you are new to an existing codebase. If you’re trying to address the generic/non-specific “we need to improve performance / it’s slow” issue, you need to get a good picture of what is going on and where to prioritise effort.
[Read More]
Trust your developer instinct and experience
That feature you’re implementing, that bug you’re fixing, that performance improvement you’re trying to make…it’s using up a fair few brain CPU cycles trying to analyse how best to implement it. Scalability, performance, ease of maintenance, clean code…just some of the things you are mentally scoring your potential approaches against to determine which route to take. And that’s without any mention of business domain logic. We’ve all been in the situation where you start heading down one path only to find a hurdle.
[Read More]
Ordnance Survey Data Importer Coordinate Conversion Accuracy
Update 13 March 2013: Please see latest blog post (fix) on this here.
Thanks to a comment on my original post around my project that imports Ordnance Survey CodePoint data into SQL Server, I was made aware of a potential issue with the (awesome) third party GeoCoordConversion DLL I use to convert the Eastings/Northings coordinates supplied in the Ordnance Survey data files, into Latitude/Longitude coordinates. The issue relates to an inaccuracy in the conversion process, specifically to do with integer divisions instead of double.
[Read More]