Documentation can be divided into two main types: internal and external. Internal documentation refers to the comments, annotations, and metadata embedded within the code, while external documentation covers manuals, guides, and specifications that are separate from the code. Both are necessary for system maintenance, however, they are for different purposes and audiences. Internal documentation is mainly for developers and maintainers of the code who need to understand how it works and how to modify it. This should include a brief overview at the beginning of each file or module, descriptive and meaningful names for variables, functions, classes, etc., comments to explain the logic behind the code, annotations indicating input/output/parameters/return values/exceptions/dependencies in a standard format such as Javadoc or Doxygen, and metadata recording author/date/version/license information in a standard format such as SPDX or RDF. External documentation is mainly for users and stakeholders of the code who need to know what it does and how to use it. This should include a comprehensive manual with clear language and examples, a detailed guide with step-by-step instructions and screenshots, an accurate specification with diagrams/models/notations, and a thorough reference listing variables/functions/classes in a standard format like HTML or PDF.