How can I make the documentation Of my coding? I want to mean what is the structure of documentation that are acceptable to client?
First of all I would like to welcome you to Experts Advice Forums . I hope you will enjoy the community here and shall get good tips in programming.
Now about your query
1. All variables should be commented as why they are defined and what is there use.
2. Each function should be commented as what are the input parameters and why and what is the output and some logic in the lines.
3. See the Java Doc and see how they generate the Documentation from the codes and comments and that should be more than sufficient.
Well, it is very encouraging to see a developer showing interest in documentation .. generally developers are of the opinion documentation is a very mechanical and boring task and should be avoided .. what they do not realise is by avoiding proper documentation they are inviting 100 times more frustrating and lengthy maintainence and bug fixing stints.
Generally it is a good idea to document "why you do something" rather than "what you do" since the latter is pretty apparent form the code itself, mostly. Make your code readable along with documenting it.
Make sure that if at any point of time another programmer has to make sense of your code without you being around it is a cakewalk for him. Do not document each and every line and the meaning of logical constructs (since overdoing things will make matter worse).
Follow the golden middle and you will find people fall in love with your code very easily.
Amit Ray. :cool:
|All times are GMT +5.5. The time now is 14:08.|