Windows Phone ‘LocalTimestamp’ field 1

I recently had a question that wasn’t easily found via Google so I figured it deserved a proper write-up. My friends know that I like to geek out on programming with dates and times and they sometimes ping me with questions. The other day a friend of mine was looking […]


Simple Excel Export with EPPlus

Anyone I’ve ever met who works with an application that sits in front of a lot of data loves it when they can get that data exported to an Excel file for them to mess around with offline. As both developer and end user of a little website project that […]

Ignoring Your Test Suite

If you practice any form of test-driven development or automated testing you’ve likely come across some kind of test framework. If you work with .NET you might have used nUnit, MSTest, or xUnit. These are all great tools that let you decorate classes and methods with attributes to define a […]

Extending CLAP For Larger Applications

If you’ve been reading my recent posts you’ve probably noticed that I’ve been working a lot with the CLAP project lately. For anyone who is not familiar with that project, its name is an acronym that stands for Command Line Auto Parser. It lets you quickly and easily take an […]

command line

Making a Case For The Command Line

I have had an idea percolating in the back of my mind for over a year now that I’ve just recently started to implement. This idea relates to building out “internal tools” to ease the maintenance and on-going support of a software system. The system that I currently work on […]

Tweaking sp_foreachdb’s database_list Parameter Handling

Aaron Bertrand wrote a great article over at titled, “Making a more reliable and flexible sp_MSforeachdb”. In that article he eschews the use of relying on the undocumented (and unsupported) sp_MSforeachdb system stored procedure that can be found in SQL Server’s master system database. As Aaron points out in […]

Extending sp_WhoIsActive With context_info

If you work with SQL Server you should be familiar with Adam Machanic’s fantastic sp_WhoIsActive stored procedure. This procedure provides high levels of detail about all commands that are currently being executed on a SQL Server instance. I’ve found it immensely helpful for troubleshooting long-running queries and locking/contention issues in […]

SQL Server Identity Quirks

If you’ve worked with SQL Server for any length of time odds are that you’ve used the IDENTITY property to create a surrogate key for a table. These auto-incrementing primary keys can be very handy, but they have a couple of quirks that have bitten me enough in the past […]

Beware Singletons that Raise Events

It’s pretty well documented that one of the most common ways in which a .NET application can “leak” memory stems failing to unsubscribe from events when the subscription is no longer needed. This answer to a Stack Overflow question on memory leaks in C# describes the issue very succinctly: Event […]