Today I just want to rant a bit about how lazy the average C# Visual Studio developer really is. This is just to show how a few simple 5 points can be done to improve code and the quality of code.

Point 1: Install GhostDoc

Get GhostDoc it is free! Install it and assign the relevant hot key and start documenting your code. Methods, Interfaces and Properties. Even if it is private. This tool generate the necessary documentation structure. You just have to do little fix ups here and there in the documentations sometime. Not difficult to use!

With all your code documented, it is easy to generate the relevant help file of your code and it helps in intellisense to describe what the method and parameters are used for. You should even list all the exceptions that might be raised by the method in you documentation.

This help the developer that might use your method to be alerted of a possible exception and he will know how to handle it.

Point 2: Get Reharper or other similar tool

Invest in yourself! Be the best you can by buying a tool like Resharper that helps you to refactor quickly and write cleaner code. Development is your lively hood so do the best job.

Point 3: Use StyleCop practices

Another free tool. Even if you don’t use the tool explicitly, just try to apply some of the guidelines it provides. Just following some of them will make your code more readable and cleaner again.

Point 4: Run FxCop

Wow, another free tool! Just run this tool before you check in and you might be surprised at what you need to do to make your code comply with the .Net coding guidelines. Again this tool helps you to improve your code.

Point 5: Code Clean-up

In general just follow good code clean up practices. Remove commented code that is not used. Order you properties, public and private methods together. Follow consistent naming convention.

One big pain point is when I see developers clean up after them self in production code, but not in the unit tests that they have written. Please take care of both!

No More Points

Just try using these 5 points and you are already on a road to be a better Visual Studio developer and more productive. I just want the standard of code for Visual Studio developers to be lifted, but that is allot to ask for.

There are a whole lot of other tools to use, but the tool listed above is a good starting point and does not take allot of time to learn.

Any questions of feedback is welcome!


Categories: , ,