Category Archives: Agile

Auditing with Castle Active Record

Sometimes you need to audit everything you do in a transactional system. A lot of standards such as SOX and others state that you must audit your transactions. Doing this by hand inside of your system can (and usually is) a huge PITA. However, it is a necessary evil in some instances. However, if you’re…

Finding App_Data Programmatically

While writing some code I needed to be able to access the the App_Data directory in my ASPNET MVC app. Doing this usually involves a Server.MapPath, but this wont work for my unit test. Here’s how you can get around it:   var appDataPath = (string)AppDomain.CurrentDomain.GetData("DataDirectory") ?? AppDomain.CurrentDomain.SetupInformation.ApplicationBase;   Now I have my data directory…

Featured in the Spaghetti Code Podcast

I was recently interviewed on the Spaghetti Code Podcast, hosted by Microsoft’s Jeff Brand. Jeff and I talked about Mocking and how it relates to the development process, testing process and your day to day coding. You can download the files from the SlickThought website here or from ITunes here. * I’m not sure if…

My ReSharper Templates

Recently when working with some co-workers I was flying through some menus and whipping out some code at a breakneck speed and a couple asked how I was doing it so quickly. Simple – Resharper’s live templates. I’m surprised I haven’t posted these before, but for whatever reason here they are. The NUnit templates are…

Is Premature Optimization Really Evil?

Photo Courtesy of: rosendahl My first initial answer is … it depends. (Isn’t that the case for everything?) Today I had conversation with a colleague and we were discussing how application developers don’t plan ahead. This eventually brought up the question/topic: “Is premature optimization pure evil?” My colleague stated that all optimization should be done…