Dead simple polyfilling

As more and more EcmaScript 6 features are being implemented in modern web browsers, developers can begin to strip unneeded libraries from their applications. However in many cases, implementations of these features are not present in browsers that still need supporting.

Plugging isolation level leaks in SQL Server

Transaction isolation levels are a critical concept to understand when working with SQL. As a quick refersher, the isolation level of a transaction defines how the database handles locking and concurrency. A lower level provides better performance at the expense of data integrity, and a higher level provides better data integrity at the expense of performance. Using the wrong isolation level can lead to corrupted data and/or deadlocking.

Cannot cast SqlGeography to SqlGeography

I was recently writing some C# code that manipulated location data coming out of SQL Server. Specifically, I was writing a Dapper type handler which transformed an instance of Microsoft.SqlServer.Types.SqlGeography to a struct which held latitude and longitude values. The method that was causing me problems looked like this.

How to crop/resize images in C#

I remember taking quite some time figuring out how to crop an image the first time that I had to do it. The .NET Framework contains a lot of methods and overloads that you can use to manipulate images, and finding the right one that meets your needs can prove challenging. Here, I present a simple method that you can use to do basic image cropping and resizing without any hassle.