AOP sessions on IDNDUG

I’ve just come back from my dual session on AOP on the local user group. The first part was introduction to AOP – what is it and why should you care.I’ve also reviewed several ways to implement AOP in your code from functional programming to full AOP frameworks.Introduction to aophttp://static.slidesharecdn.com/swf/ssplayer2.swf?doc=introductiontoaop-120321143232-phpapp02&stripped_title=introduction-to-aop&userName=dhelper View more presentations from Dror … Continue reading AOP sessions on IDNDUG

NUnit’s new Action Attributes is AOP to your unit tests

With the new NUnit release (v2.6) introduce a new feature called Action Attributes which means that now NUnit has rolled out it’s own mini-AOP capabilities. In the past SetUp and TearDown where used to perform actions before and/or after a test run, they worked well enough but were limited to running certain operation only on … Continue reading NUnit’s new Action Attributes is AOP to your unit tests

Refactor “if” statements – functional programming style

Have you ever seen code that look like this: public string GetStatusDescription(Model model){ if(model.HasProblemReports) { return "Errors"; } if(model.SystemState.WorkingMode == WorkingMode.NotManaged) { return "Manual"; } if(model.SystemState.IsInitializing) { return "Initialize"; } if(!model.SystemState.InService) { return "Not in service"; } if(model.SystemState.WorkingMode == WorkingMode.Paused) { return "Paused"; } if(model.Storage.Objects.Any(obj => obj.IsMoving)) { return "Movement in storage"; } return string.Empty;}I … Continue reading Refactor “if” statements – functional programming style

Three .NET "tools" that I use every day and you want to know about

Time is a very limited and expensive resource. As a software developer I feel more often than not that I just don’t have enough of it…That’s why whenever I find a new library or tool that save me time I embrace it with both hands, especially if they preform tasks that I find boring and … Continue reading Three .NET "tools" that I use every day and you want to know about

Enabling parameterized tests in MSTest using PostSharp

I have blogged about the shortcoming of Microsoft’s unit testing framework in the past. It has very good Visual Studio (and TYFS) integration out of the box but it seems that in order to use it I have to suffer lack of functionality I’m used to taking for granted when using any other .NET unit … Continue reading Enabling parameterized tests in MSTest using PostSharp