As with many things the smallest impediment to something that requires you to go out of the way to do something can seem like Mt. Everest. Often categorised or named "Friction" you usually need something to help remove this "Friction" and smooth the way.
I'd like to introduce you to two utilities that rate as good as WD40 in helping remove said "Friction" (you knew I'd get there in the end!).
Enter stage left, NCoverExplorer. If you do professional Microsoft .NET development you must be aware of the whole raft of tools out there to help you improve the quality of your code. NCover is one of them but code coverage in a lot of peoples opinion falls slightly down the rankings in terms of importance compared to unit testing, continuous integration etc (I have revised my opinion of it and actually think it should be the first thing to implement in a project now, more on this later).
So lets cut to the chase (did you know that term originated from the game 'Real Tennis' where the chase is a line on the court and cutting the ball as close to it as possible is a good thing - I'm indebted to an ex-collegue of mine Russell Lloyd for that titbit!)...I've just refreshed my installs of TestDriven.NET, MbUnit, NCover and finally NCoverExplorer.
Now I have code coverage thats so friction-less you could go curling on it!
Right click your unit test project/class/unit test method inside VS.NET IDE and select "Test with...Coverage" - bam! Up springs NCoverExplorer to give you a quick treeview drill down of where you are (not) exercising your code - and if the entry point is your unit test class you can use it to drill down into the actual assemblies they are testing to see just what is being run and what isn't (unused, redundant code maybe?). I was never a real user of code coverage until now - now I'm glued to the NCoverExplorer window watching my coverage figures improve! As I mentioned earlier I now believe that (as with Test Driven Development) code coverage is an "up front" activity - get it in place before you write any code and use it in parallel as you develop to identify gaps between tests and code (they will exist!).
The other application you need to be aware of is Simian - it detects duplicate code. However the real magic is a shim that HvR wrote to make it truely usable - MonkeyWrangler! Follow the "last post" link to get the full instructions on how to integrate Simian with the VS.NET IDE. If you work on a project with multiple developers (as many of you will undoubtably do) this util will be a life saver for you. Run it on the project you are on right now - you will be quite amazed how much duplication you could have (put it down to Friday afternoon coding!).
I know the authors of these utilities, Grant ("kiwidude") and Howard personally. I worked with Grant on a long term project in London a few years ago and we've been friends since. As he commented to me the other day I allow him to live out is alter-gadget infested life without have to buy any of them! Grant, happy to be your gadget test pilot anyday! I know that when Grant calls it a day over here, cashes in and goes back to New Zealand his AV/gadget setup will be mind blowing and it will be a happy day to sit in the middle of it all and share a beer with him!
Howard is another ex-colleague from my Conchango days. This guy is quite simply dynamite!
I get to hang out with all the cool guys!...LOL
A useful tip also; regularly visit the websites/blogs of the everyday tools you use to augment your development and check for updates. There is often new releases and bug fixes and sometimes new features which can be real time savers.
Another tip: If something seems difficult or too much trouble then someone else has probably come across the problem also. If you are lucky its someone like Howard or Grant and they've fixed the problem for you! If you think there must be a "better way" to do something there probably is - Google for it, you are more than likely to find a solution. For the brave get yourself a group on Project Distributor (this is mine), write some code and publish it!
I'd like to introduce you to two utilities that rate as good as WD40 in helping remove said "Friction" (you knew I'd get there in the end!).
Enter stage left, NCoverExplorer. If you do professional Microsoft .NET development you must be aware of the whole raft of tools out there to help you improve the quality of your code. NCover is one of them but code coverage in a lot of peoples opinion falls slightly down the rankings in terms of importance compared to unit testing, continuous integration etc (I have revised my opinion of it and actually think it should be the first thing to implement in a project now, more on this later).
So lets cut to the chase (did you know that term originated from the game 'Real Tennis' where the chase is a line on the court and cutting the ball as close to it as possible is a good thing - I'm indebted to an ex-collegue of mine Russell Lloyd for that titbit!)...I've just refreshed my installs of TestDriven.NET, MbUnit, NCover and finally NCoverExplorer.
Now I have code coverage thats so friction-less you could go curling on it!
Right click your unit test project/class/unit test method inside VS.NET IDE and select "Test with...Coverage" - bam! Up springs NCoverExplorer to give you a quick treeview drill down of where you are (not) exercising your code - and if the entry point is your unit test class you can use it to drill down into the actual assemblies they are testing to see just what is being run and what isn't (unused, redundant code maybe?). I was never a real user of code coverage until now - now I'm glued to the NCoverExplorer window watching my coverage figures improve! As I mentioned earlier I now believe that (as with Test Driven Development) code coverage is an "up front" activity - get it in place before you write any code and use it in parallel as you develop to identify gaps between tests and code (they will exist!).
The other application you need to be aware of is Simian - it detects duplicate code. However the real magic is a shim that HvR wrote to make it truely usable - MonkeyWrangler! Follow the "last post" link to get the full instructions on how to integrate Simian with the VS.NET IDE. If you work on a project with multiple developers (as many of you will undoubtably do) this util will be a life saver for you. Run it on the project you are on right now - you will be quite amazed how much duplication you could have (put it down to Friday afternoon coding!).
I know the authors of these utilities, Grant ("kiwidude") and Howard personally. I worked with Grant on a long term project in London a few years ago and we've been friends since. As he commented to me the other day I allow him to live out is alter-gadget infested life without have to buy any of them! Grant, happy to be your gadget test pilot anyday! I know that when Grant calls it a day over here, cashes in and goes back to New Zealand his AV/gadget setup will be mind blowing and it will be a happy day to sit in the middle of it all and share a beer with him!
Howard is another ex-colleague from my Conchango days. This guy is quite simply dynamite!
I get to hang out with all the cool guys!...LOL
A useful tip also; regularly visit the websites/blogs of the everyday tools you use to augment your development and check for updates. There is often new releases and bug fixes and sometimes new features which can be real time savers.
Another tip: If something seems difficult or too much trouble then someone else has probably come across the problem also. If you are lucky its someone like Howard or Grant and they've fixed the problem for you! If you think there must be a "better way" to do something there probably is - Google for it, you are more than likely to find a solution. For the brave get yourself a group on Project Distributor (this is mine), write some code and publish it!
Comments