There are a lot of reviews of ndepend out there, and I don't think I have read a negative one, granted 1/2 of them got a free copy but I can say I paid for mine. Our team uses ndepend as the "big brother code reviewer," always ready to give his opinion on check-in. We do not use it as a replacement for manual code reviews it only allows our manual code review process to be more focused and productive.
Our team: Our company has about 80 IS strong (developers, scrum masters and QA). My work focuses on what we call the "Product Team," as contrasted to our company's core line of work, which is custom development for the fortune 500.
We have been using Microsoft technologies for 12+ years and currently (ASP.NET 3.5, C#, Silverlight, SQL). Hybrid Scrum has proliferated our organization, using Team Foundation Server (TFS) for most of our electronic process based needs. Item tracking (bugs, backlog, tasks), source control, and build process. I have also been trying to inspire my teams to do TDD but it doesn't seem to stick.
Before ndepend our code reviews were hap hazard and lacked focus, as an example "This is the code I have been working on... Oh that's nice or no that's not so great will you refactor it when you get time?" Then out pops a TFS task, assign to a future sprint/iteration, only possibly to be postponed forever. In the "fridge" as my team had coined, just waiting for you like left overs.
Each team has a different review process, and each team has different criteria of what they see as important. Amazing we can get such consistent results,
all of
projects over 2 years old turn into something you would not even introduce to your mother. Sure quality is relative but I consider frequent 100 line methods with high cyclomatic complexity and 20%+ code duplication pretty low. How does this happen? Everyone knows small simple methods are best, don't they? And reuse... cut and paste is much faster. Conflicting priories and procrastinating refactors are only a couple of ways to achieve such consistency.
There are many reasons for code reviews. My research would say the industry defines the primary purpose of code reviews to find defects. For the purpose of this article you might define my code reviews as design reviews, although I am only looking at code.
What am I looking for? Hard to read / unmaintainable code, it smells bad, and more importantly is to provide developers better options to achieve the goal of clean code. Consistently finding bad code is is easy, consistently keeping smelling fresh is not. In manual reviews we also look at team standards, security, naming conventions... you get the picture.
Life after ndepend: We have implemented ndepend in a way that I have not seen any other teams openly discuss on the web. Realize my ultimate goal is to get developers to keep their code clean and I can justifiably argue, the easiest time to fix it is when you create it. If the code is fresh in your mind you feel much more comfortable refactoring. I can honestly say our current processes have accomplished our goal of keeping our code clean. We can and will take this progressively further but I can easily say over time our code has stayed so much better, not only would our developers show their old code to their mother, they might even show it off to a peer.
Many companies use ndepend with continuous integration (ccnet). We also are using ccnet for all of my teams projects. We use it in a fairly simple manner, immediate feedback when developers break the build and run our ndepend automation process, that's it for now. What we are doing differently is that when a developer checks in some failing code, ccnet
creates a refactor task for the developer and he gets an email from TFS, new task created, so he can go in immediately and clean his code he was just working on. Developers can usually clean 80% or more right after this check-in failure. I know... before check-in is even better.
To inspire the developer further we have a daily email that goes out to all developers and the managers with red, yellow, green project status to show if you have closed all your ndepend failure tasks. Yes every developer wants his project green, we provide everything possible to promote this, including the ability to postpone a task. Back in the "fridge," only this time it is like beer, you can't wait to take it out. While in the fridge the task does not affect the green status. Today 6 out of 7 of our projects are green and 4 out of 7 have no outstanding tasks that need refactoring. Much better than continual postponement and a couple that are trailing are legacy that are being brought up to par, talk about difficult.
So a long article only to say. Immediate code verification feedback and daily email color status,
so simple, so valuable.In a separate blog I will talk about what is the definition of red, yellow and green and what we see as valuable for the rules of ndepend. The great thing about ndepend is each project or team can have their own rules. I will also create an blog about manual code reviews.
Ultimately I believe that
keeping developer inspiration high may be the most important goal in software development (customer satisfaction is near the top too). Developers spend so much time maintaining applications, keeping the quality high is part of retaining that inspiration, even maintainance tasks are more fun when you know you must adhere to standards and refactor to keep your code clean.. Good luck...