Tuesday, January 15, 2008

Documentation

Documentation is very important, there is an old famous saying "The computers will always understand the code, but humans will not" writing for yourself and others.

Documenting function parameters and return values.

Using friendly names that reflects the algorithm flow and motive.

Practice documentation at programming-time, document the function role and motive, if the function impacts on shared or global data it is important to write the pre and post states that should happen and will occur.

Documentation should be at all levels from class responsibilities and role, global variables, methods their parameters, and complicated instructions.

Documenting class relations, using UML (Unified modeling language) to display the architecture used, and help with extension of the code.

Documenting the whole software cycle from requirement phase to developing phase will enable later the maintenance at minimum cost.

No comments: