Unit Of Work in .Net

So one of the things David Woods (a fellow Edmontonian who also took the JP experience on head first) comments on is one of the things I was a bit disappointed not to see myself. Of course considering the amount of stuff we did learn this isn’t really a complaint (especially when you take into account the skill disparity that did exist which slowed down some of the higher level stuff) but it sure would be nice to see Unit Of Work in action. So does anyone have some good example .Net (heck Java would do) code? I’ve got some ideas myself on how this could be implemented that I’ll be working on but so far I don’t see how you can do this without a lot of stupid code. I’m sure there must be a smarter way.

Anyone got any ideas?

Unit Of Work in .Net

Performance hit of a List across threads

Well Trey Hutcheson brings us some interesting news regarding List across threads.

I’ve seen a lot of concern over performance during very premature stages of development. Worse I’ve actually seen code changes (very complicated ones) made to avoid that possible performance hit. So I find this discovery kind of funny because at the end of the day it came due to premature optimization. From what details Trey provides it dosen’t appear that the original code was causing any real issues (especially since he switched back to it). So by switching his implementation to an implementation that he thought would be faster for the sake of it he actually caused a big performance hit.

The good news is that Trey noticed the big hit the switch had made and did actual metrics to show there was a problem. As a smart man taught me.. show me the performance problem and I’ll fix it. Until then let me code with testing and maintainability as my primary focus.

And if you do happen to read this Trey don’t consider it a hit on you.. we all fall victim to the evil spirit of premature optimization at points.

Performance hit of a List across threads

NCover & NCoverExplorer Update

Thanks to a bit of help from Kiwidude I was able to use NCoverExplorer to get NCover working. It’s a very cool tool that allows you to easily run NCover. It has a very nice interface that makes it easy as pie to run NCover against NUnit. Oh and it will even generate MSBuild and NAnt scripts for you. How cool is that?

So now that NCover has been added to my toolbox I’m wondering how best to integrate it into the build process. Does anyone know if you can set it up so that if you don’t have say 90% code coverage the build fails? Oh well something to investigate.

Next on the list is a bit of special time with NDepend which is a code metrics tool. Should be fun.

NCover & NCoverExplorer Update