NDepend Use Case – Find Childless Interfaces (TDD Helper) 0

When using TDD, especially with utilities such as StuctureMap’s RhinoAutoMocker I tend to end up with some “childless” interfaces.

Granted, this could just mean I’m a crappy OO designer, but I like to think it’s more from hammering out the design as I’m working on the problem!

So, I might have a code base that has unused interfaces lying around, and I just want to clean those up.

With NDepend, you can use Code Query Language (CQL) to search for items of interest in your code base. Very cool.

Here’s the CQL for finding Interfaces that have no implementations.

[csharp] // <Name>Find interfaces without Derivatives</Name> SELECT TYPES WHERE IsInterface AND NbChildren == 0 [/csharp]

Unit Testing in SQL Server – Overview 1

Ok, so here’s the first in a series of a home grown implementation of Unit Testing SQL server code.

I’m not talking about using Visual Studio Team Edition for Professionals, like Jeff recommends… but I’ll try to provide a general approach to testing your SQL code, particularly stored procedures (sprocs). Read more »

TDD – A Workout Promise 1

Ok… I’ve had enough. Uncle Bob nailed it: Why don’t we clean our code? When we see an ugly mass of code that we know is going to cause of problems, our first reaction is “This needs to be cleaned up.” Our second reaction is: “If I touch this code I’ll be spending the next two weeks trying to get it to work again.” We don’t clean code because we are afraid we’ll break it.

I promise to Read more »