Why type safety in configuration is a good thing

How many times have you seen a piece of code like this? bool shouldUseXyzService = bool.Parse(WebConfiguration.AppSettings["shouldUseXyzService"]); if(shouldUseXyzService){…} It's a familiar thing to most programmers. And most programmers never stop to think about just how evil it is. In my last few posts I've been suggesting that we ought to be using something like this: if(SomeConfiguration.ShouldUseXyzService){…}... Continue Reading →


Create a website or blog at WordPress.com

Up ↑