Diary of a ninja
A blog about Life, Code and Beating level 99 to brag to your mates...
Output data as raw XML from MS SQL – a little known feature
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
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
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.

 

Controlling Facebook user referral link content
Social networking has taken the world by storm, and added a new tool to web developers’ marketing arsenal (along with Digg, Reddit etc), in the form of link sharing. The problem is that it is nearly impossible to have a say in most social network link sharing, along with how you are promoted. However in Facebook’s case we have a few tricks up our sleave.

 

The black arts of custom Type conversion in c#
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.

 

6 Undocumented MSSQL stored procedures you may not know about
There are quite a few built-in stored procedures in Microsoft's SQL Server that can help you troubleshoot database issues and make those long nights less painful. Knowing they exist can be a life saver, so lets take a look.