Since we're doing some RAD stuff nobody got time to comment their code. But commenting code will be really helpful once we get used to it. If more than one developer is working on the same file it will be advantageous to that developer. As far as I concern every developer should comment their code. We can automatically generate a comments document using a third party tool or by using the Visual Studio. Every method we write should be documented/ commented. Its really helpful to the client developers. If were building a library you must comment your code coz thats the only way a client developer can understand easily how to use the library. Most of the developers already know how to use Microsoft comments.
/// <summary>
/// Gets the users age
/// </summary>
/// <param name="name">username</param>
/// <returns>age</returns>
public int GetAge(string name)
{
return 26;
}
I will show you how to document your code using Visual Studio. You can completely generate a standard documentation from the VS ;)
Click on the Tools > Build Comment Web pages >
Then the Build Comment dialog box will appear, you can select the solution that you want to document, give the path & then press ok. Youre done. You will get a nice documentation for your project. For vb developers you can download add in for xml style comments from this url. http://www.gotdotnet.com/team/ide/#original
1 comment:
Of course documenting is very important, otherwise you are in very big trouble.
Like me... I should have documented you taking my ring from me...
Post a Comment