Specifically, the documentation produced by Doxygen (www.doxygen.org/index.html) is very helpful. Even better, Doxygen has support for a large number of languages and producing HTML, LaTeX, and man page documentation. Here's an example (from http://www.scfbm.org/) of a Doxygen-generated UML class diagram:
Adding meta-information to the source code is as simple as documenting it via the prescribed documentation format. For example, Doxygen reads Javadoc-style comments:
/**
* A String representation of an object suitable for debugging.
*/
public String toString() {
...It's also worthwhile to look at the tags (e.g., "@todo") that Doxygen supports for the language that you're using.
Doxygen uses a configuration file, or Doxyfile to determine the type and style of documentation to produce. I find that the easiest way to get started is by using Doxygen's GUI configuration file wizard: doxywizard
I highly recommend enabling the advanced features in "Expert" mode under the "Dot" topic for:
- Class Diagrams,
- Collaboration Graph,
- UML Look,
- Include/Included-by Graph,
- Call/Caller Graph, and
- Graphical Hierarchy.