Writing code is easy. But writing quality code is not that easy. Naming conventions, variables and constants defining, right use of the enums, class member visibility and many more things exists for the developer to be concerned with. In fact, you can save your customer as well as destroy him depending on the code you write sometimes. There are unit tests and load tests that Visual Studio provides inbuilt which you can asses the accuracy and speed of the code you write. Of course there are some best practices which should be followed but when you are a day before the code freeze, it is sometimes not likely to happen.
I have tried out StyleCop which is a style analysis tool that works at the code level and FxCop which is a static analysis tool that works on the level of managed assembly. They give a lot of support for the developer to write some quality code. But what I am going to describe in the rest of article is a tool that do many times of work than any of these does.
I got a message on LinkedIn from Patrick Smacchia, who is the CEO and Lead Developer of NDepend with an amazing gift. It's a free professional license for NDepend. I tried the tool for a few weeks and found some interesting features in it that could save my time and improve my code quality. So I used it to evaluate one of the projects I did about an year back. In a way I was really happy that I have recorded only 51 rules violations in a project with 232 classes when I was just 1 year experienced.
NDepend is an amazing tool that serves end users with a graphical experience of matrix on the code we write. It has defined these matrix at levels of applications, assemblies, namespaces, types, methods and fields.
Above is an assembly matrix of my project which has a detailed description on each and everyone's, dependencies abstraction levels, comments, lines of comments and so on.
Apart from these matrices, it also have some reviews on the codes that I have written which give a vivid description on how my code is good.
Reviewing all of this, I think this is the right tool for the developers to have with them in order to write the code nice and smart. The tool does not cost that much and the powerful features that it has enabled make this is a tool worth buying.
No comments:
Post a Comment