Building high-quality and well-crafted software is not an impossible ideal. Regardless of how much experience your team possesses, or how tight a deadline might be, you can always ensure that high quality is baked into your delivery process. Manually having to check on your projects quality levels is a time suck. Without the right process or tools, trying to maintain a consistent high-quality level within a team can often feel like pushing a boulder uphill. This is why a lot of teams end up cutting corners and reducing the quality gates when deadlines start creeping upon them. Finding time to maintain quality can be hard. When you think about the state of your current codebase, if your first thought is of frustration, shame, or embarrassment you might want to try a new approach. NDepends might be the tool you have been looking for.

Why Do Some Teams Struggle Writing Quality Code?

Over the years, I've worked with many different teams. I have worked both agency-side and client-side. I have worked within teams both big and small. From this experience, I've come to the conclusion that there are two types of teams, the high-performers and the fire-fighters. The high-performance teams always seem to deliver business functionality quickly and the fire-fighters move at a fraction of the pace. You might think, some teams just have better developers. The skill level of the development team does matter, however, the biggest differentiating factor that I have personally noticed is usually down to process. How much importance the team commits to doing things the 'right way' and then learning how they can automate quality checks to improve their process. For example, are you using Stylecop? If so have you confirm it to fail a local build on warnings? These small things may sound trivial, however, it helps prevent technical debt build-up. In the long run, having minimal technical debt will allow your team to move quicker.

The fire-fighters who 'hack' their way through a project, might seem like they make quicker progress in the first few weeks, however, this is only a short term feeling. Fast forward a few months and the time it takes to deliver new features start to increase. The amount of time spent firefighting and figuring out what all the random hacks are meant to do decreases productivity. In a go quick with a minimum quality culture, the dominant task the team performs is figuring out what hell is going on when things get into a messy state.

Defining what good quality software means is hard. My definition of what good quality well-crafted software looks like will be different than yours. Quality is a subjective matter and the definition will change depending on the people in the team. Agreeing within a team what is 'good' design and how a feature should be designed is subjective and can lead to disagreements in the team. On a lot of projects, it's usually down to the lead developer to manually enforce that the team follows good design. The more manual steps that are involved in your quality gates, the higher the chance that it will be given up when the going gets tough. The more you can automate your workflow the quicker you will be able to ship your software. When you can use a tool to replace a manual process, the chances of manual errors occurring drop significantly. This is where NDepends fits in.

What Is NDepends?

NDepend is a code-quality static-analyzer that simplifies managing the quality gates within your complex .NET codebase. It is a tool that you can use to help standardise your code quality process. NDepends is 100% integrated within Visual Studio so you can use it while you code. Some of the things you can with NDepend include:

Why Use NDepends?

NDepends can be used to provide a consistent measurement of how good your code is, reviewed against industry standard and agreed-upon rules. When you use NDepends in your team, gone are the excuses of not having enough time. Gone are the days of squabbling over who is right and who is wrong. Gone are the days of continually checking the team are doing code reviews in a consistent manner. Sounds great right?

When you can convert a manual step into an automated one, your release process will be quicker and your codebase will contain fewer bugs. This might sound like some fancy sales pitch but it's basic maths. Running a code analysis tool against your codebase on a daily consistent basis (like every commit) and forcing a refactoring before it is checked in will transform the quality of your project levels. Constant and little refactors is the key to winning. This enforcement of rule checking is not possible manually. Using a tool will make your team more efficient while sticking to the quality gate levels! You can integrate NDepends into your build, so you can even prevent people from committing code that contains code smells.