Testing Enumeration Mappings

My coworker John Sonmez had a great blog post recently illustrating how to refactor a switch statement. In short, he outlined how to take a switch statement covering all known values of a C# Enumeration and convert it into a Dictionary “map” object allowing you to quickly determine what action […]

download in progress

Detecting the File Download Dialog In the Browser

Updated 2011-01-28 to reference the correct question stackoverflow.com Updated 2011-10-02 With a link to a sample application on github. Updated 2013-07-01 with corrected jQuery Cookie plug-in link and syntax Web applications sometimes need to create documents (PDF, Excel, Word, TIFF, etc.) based on some user input. In most cases, these […]

Brainless Backups

I’m a software developer by trade which means to my friends and family I’m just a “computer guy”. It’s assumed that I know everything about every facet of computing from removing spyware to replacing hardware. I also can do all of this blindly over the phone or after hearing a […]

Know What Time It Is

Over the past several weeks I’ve found myself having to play the role of server administrator more and more. Being a developer I’ve had some exposure to server admin work in the past, but I certainly don’t consider myself an expert in the area. Unfortunately there was no one else […]

The Stalker Model of Customer Service

The rate at which twitter has blown up is nothing short of astonishing. One of the most interesting things about twitter, in my opinion, is in all the various ways it is used. Normal people like me use it to keep in touch with some friends and family, celebrities use […]

The Gift That Keeps On Taking

It’s the the gift giving season, which naturally has me thinking a lot about what makes a great gift. There’s the ubiquitous gift card, which is almost always a safe bet, but can seem a bit impersonal in my opinion. Then there are gifts that aren’t really gifts at all. […]

Differences between using the ‘Convert’ class vs. casting (Part 2 of 2)

In the last post I was puzzled by what I thought were some inconsistencies between using the cast operator and Convert.ToInt32 when trying to convert an object typed as a decimal to an int. I had it tracked down at the ‘System.Convert’ class in the ‘mscorlib’ assembly we’ll find the […]

Differences between using the ‘Convert’ class vs. casting (Part 1 of 2)

In the previous post "Why does SubSonic’s SimpleRepository Add<T> Method return a decimal instead of an int?" I talked some about what appeared to be some odd behavior regarding the return value of the ‘Add<T>’ method in SubSonic’s SimpleRepository. In a nutshell, I expected the object that this method returned […]