May 2008 Entries

I was trying this morning to run NCover (for the first time). I downloaded a eval copy (sweet!) and then opened NCover Explorer only to find myself a little lost. So I thought I'd RTFM a bit first. That helped (a little), and the documentation online also helped some, but what I really needed to do was check my MSTest test coverage of my base framework. The documentation really only covered generic scenarios and a little bit of googling only left me wanting. All these little bits and pieces, however, led me to make some educated guesses about what to put in the configuration for NCover and... success! So I thought I'd share, in case it helps someone else.

 

Open NCover Explorer.

Click on the "Run NCover" button on the toolbar or hit Ctrl+N [NOTE: Not the "Run NCover Now" button]

You should be presented with a configuration options screen (see Fig 1)

Set the "Path to application to profile" box to MSTest.exe file (Usually, C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\MSTest.exe)

Set the "Working Folder" to the bin directory of your framework project: (Mine is: C:\svn\CodeBase\trunk\src\CodeBase\bin)

Set the "Application Arguments" to /noisolation /testcontainer:[test_project] where test_project is the path to the DLL of your test project (Mine looks like: /noisolation /testcontainer:C:\svn\CodeBase\trunk\src\CodeBase.Test\bin\Debug\CodeBase.Test.dll )

That's it!

You should now be able to click on the "Run [F5]" button at the bottom there and it will start the sample application, run the tests and give you a code coverage result that shows how much of your framework was exercised by your unit tests.

 

Hope this helps someone!

~L

 

[Fig 1]

NCoverOptions

I finally got the nerve and installed Windows 2008 Server on my x64 laptop. It is rocking so far! It was a little confusing at first because there are lots of things turned off by default (it IS a server OS after all). But I found a post on Building a Windows 2008 x64 Laptop and it worked.

First, it is NOTICEABLY snappier than Vista Business x64. Maybe because there is  nothing set up by default. I almost cried when my Windows Live Writer told me it didn't support Windows Server OS and I thought I would have to change editors (if you haven't tried Windows Live Writer, I highly suggest it), but after a little Google-ing, I found this post and downloaded the *.msi file and it worked just fine (although I didn't get a success message, I am posting from it right now).

Now that I have Visual Studio 2008, ASPNET MVC, the Silverlight toolkit and SQL Server 2008 CTP installed, I am ready to start coding on my home laptop again.

More posts coming soon!

~L

I know you've probably heard it before: "There is no silver bullet." Basically, this means that there is no right answer for a particular problem in every situation. There is only the best solution that you know for each individial scenario. For instance, if you have to load a dependency for an object, you could use dependency injection or a provider model; but if you have to load an object's dependencies and that dependency's dependencies (the leg bone depends on the ankle bone and the ankle bone depends on the foot bone), there's no way to get there using the provider model.

I've been pounding the pavement to understand the gives and takes of DI vs PMP lately and it's pretty murky waters. First, not many people understand both completely, and those who do, will definitely have their preference one way or another. I have found this to be the case with most technologies, taxonomies, methodologies, language-onomies and IDE (no onomy OR ology), and if you dig far enough, you'll usually find that each of the most popular tools used, has it's own advantages and drawbacks. While Structure Map is an awesome, easy-to-use DI container, Unity, nInject or Windsor might be more appropriate for your organization, personality, codebase or even this particular implementation.

The problem is, most of us have work to do and we don't have time to go exhaustively research each framework, tool, methodology, ... you get the idea. Over the coming months and weeks, I will try to make some posts giving as objective a comparison as I can give (remember, my personality will color my opinion) of different "ologies", "onomies" and tools.

I am neck-deep in framework building right now, but I should still have some time to dedicate tothis research. I know it will help me, and it will hopefully help some of you also.

'til then...

~L