When .gitignore stops being your friend - Debugging missing Git repository files

comments
One of the first things you figure out when working with Git is that like other source control providers, you want an easy way to exclude files from ending up on your source control to save yourself uploading items such as binaries and local user files (here’s looking at you Resharper!). By adding a .gitignore file to your repository you easily make this possible (if you’re using Windows, feel free to take a look at my post on creating these files successfully in Windows). The problem you have next is when you add a gitignore rule that’s a little too aggressive and your new project files fail to be picked up by Git, but you’re not quite sure which rule is the cause – this post shows you how you can troubleshoot these issues.

Running Android apps on Windows Phone 10 preview

comments
Depending on who you talk to, one of the coolest parts of the new Windows Phone OS coming to devices in the next few months is the ability to run Android apps. Yes, you heard me correctly: you will be able to run Android apps on your Windows Phone 10 device. With the preview releases coming out on a regular basis lately it’s good to see we’re getting a little bit closer to having this ability in everyone’s hands soon, but in the meantime the question really is: how do I get to try this now?

Adding filters to your ELMAH installation

comments
One of the most common configurations people use when setting up ELMAH is email exception logging so that you get notified whenever “shit’s goin’ down” on your site. This leads to a follow on issue that stems from this in that you end up receiving 100’s of emails a couple of times a week as your website gets scanned by evil doers looking for vulnerabilities – but there is a simple and elegant solution.

Build Accessible web sites with Visual Studio – WCAG reporting

comments
Adding Accessibility to a website for access by sight or hearing impaired users is a thought that many developers have post build. Along with this, when you’re tasked with the job of building an accessible website, Visual Studio probably wouldn’t initially be a tool that comes to mind, but Visual Studio has everyone fooled on this topic as it has this functionality covered, you just need to look a little below the surface.

Save yourself the trouble – SQL Profiling your Application the easy way

comments
Microsoft SQL Server's Profiler is a necessity when digging around on a SQL server trying to find any bottlenecks or long running queries. How you personally lock down your profiling session to show only your application's data access appears, from the experience of looking over others' shoulders as well as how I personally go about it, to be a "how you taught yourself one day when first debugging queries". Like most things in dev-land someone had this problem WAY before you and there is a final, easy solution.

Visual Studio’s Best Kept Secret – Compare & Update Database Schemas Right From Within Your IDE

comments
When working with different iterations of a SQL database running on Internal, Staging and Production infrastructure it can become a pain in the ass rolling out updates at deployment time or keeping them in sync. Developers often use third party tools to help them do this job, however depending on what version of Visual Studio you have installed, there may be another option you have overlooked, and it’s baked right into the IDE.

How-to: Quick & Dirty SQL Express scheduled backup

comments
SQL Express is pretty awesome as a light weight database server, and when Microsoft released it using the same database engine as the full version they did the world a huge favour. I have seen SQL Express in use on a lot of Virtual Private Servers & development boxes, but in most cases users don’t backup their databases regularly because of the missing scheduled jobs functionality that doesn’t ship in the Express version of Microsoft SQL Server. Like most limitations there is an easy way around this.

Visually edit records for any query using SQL Management Studio

comments
I watched an interesting thing take place the other day, in the form of someone using the visual tooling in SQL Management Studio to “Edit Top 200 rows” in a table, then realising that the record they wanted was not there, running a manual SELECT query to find the record, and then running a manual UPDATE command to edit the row. This can all be done a lot quicker using the same visual tooling they used in the first action – it’s just sneakily hidden in SQL Management Studio.

Output data as raw XML from MS SQL – a little known feature

comments
In the modern world we live in with Web Services, RPC calls and the like, SQL server has had a lot of work on its hands trying to keep its followers from leaving to newer ways to store data such as document databases. Microsoft SQL server is like an old friend that developers have either come to love or hate – but like old friends, they may have been keeping some secrets. One of these hidden gems appears in the shape of native XML output support for queries.

Website feeling overweight? Slim it down with Smush.It

comments
Websites are becoming complicated and bloated beasts that their forefathers wouldn’t recognise for all their fantangleness. International access to broadband aside, there is a time and place for high-res images and the like – and general content pages are not one of them. If you’ve found yourself falling into the trap of having a beautiful looking site that takes an hour to download, Smush.It is for you.

How to fake Optional Parameters in c# 2.0

comments
With the launch of .Net 4.0 there have been a lot of excitement about some of the new features, Optional parameters being one of these. What a lot of people don’t realised it that with a bit of leg work you can pull this off with c# 2.0 – so those of you unable to deploy to a machine running .Net 4.0 can still join the party.

The black arts of custom Type conversion in c#

comments
One of the little used features of c#, is user written implicit and explicit type conversion. Put simply: sometimes you have a object (custom or built-in .Net framework) and want to convert it to another type of object. While you can easily write left to right style code to accomplish this every time, there is a lot cleaner way of doing this by empowering your objects to cast themselves as another type.