Software is more than code. The documents that go with it are what allow other people to understand, use and change it.
Purpose of Documentation
Software documentation is the set of written and diagrammatic material that describes the software and its use. It allows the team to communicate, preserves knowledge when people leave, helps users to use the product, helps testers to plan, and helps maintainers to understand the system. Without good documentation, maintenance cost rises sharply. Documents should be accurate, up to date, clear and kept with the code under version control.
Definition: Software documentation. The text and diagrams that describe a software system and explain how it is built, how it works and how it is used.
Types of Documentation
Internal documentation is part of the code, and includes comments, meaningful names, headers on modules that state their purpose, inputs, outputs and author, and clear structure. External documentation is kept apart from the code. It is of two main kinds. Process documentation records the plans, schedules, estimates, reports and minutes of the development. Product documentation describes the product. It is split into system documentation, for the developers and maintainers, and user documentation, for the users.
System and User Documentation
System documentation has the SRS, the design documents with the architecture and the data design, the source code listings, the test plans and results, and the maintenance guide. User documentation has the user manual, which explains how to carry out tasks, an installation guide, a reference manual that describes every feature, a quick start guide, online help and frequently asked questions. It is written in the language of the user, with examples and screen images. The documentation should be tested by having real users follow it.
Qualities of Good Documentation
Good documentation is written for a particular reader and a particular purpose. A maintainer who opens a module wants to know what it is for, what it needs, what it returns and what it must never do, and a short header can say all of this in a few lines. A user wants to complete a task, so a manual organised by task is more useful than one organised by menu. Documents should be complete, so that no important feature or decision is missing, consistent, so that the same term is used in the same way everywhere, and traceable, so that a requirement can be followed through the design, the code and the tests. They should also be easy to find and to change. Many teams keep documents in the same repository as the code, so that a change to the code and the change to its document are reviewed together. Reviews of documents, like reviews of code, find errors early. The effort needed is small compared with the time lost when a maintainer must work out the purpose of undocumented code from the code alone.
Table 4.4: Types of documentation
| Type | Audience | Examples |
|---|---|---|
| Internal | Programmers | Comments, module headers |
| Process | Managers and team | Plans, schedules, minutes |
| System | Developers, maintainers | SRS, design, test plans |
| User | End users | Manual, help, FAQ |
Example 4.4: Choosing the document
Problem: Name the document needed in each case: (a) a new maintainer wants to know how the modules are connected, (b) a user wants to know how to install the software, (c) a manager wants to know the planned dates.
Solution:
- How modules connect is in the design document.
- Installation steps are in the installation guide, a user document.
- Planned dates are in the project schedule, a process document.
Result: (a) design document, (b) installation guide, (c) project schedule.
Common mistakes
- Letting documents become out of date, so that they mislead.
- Writing user manuals in technical language.
- Keeping documents separate from the code and not under version control.
Key takeaways
- Documentation preserves knowledge and helps maintenance.
- Internal documentation is in the code, external is separate.
- Product documentation has system documents and user documents.
- Documents must be accurate and kept up to date.
Practice questions
- Distinguish system and user documentation.
- Give two examples of internal documentation.
- Why must documentation be kept up to date?
Answers to the practice questions
- System documentation is for developers and maintainers, user documentation is for the users of the software.
- Comments and module headers (also meaningful names).
- Out-of-date documents mislead, and raise the cost of maintenance.
Sources
- Official BCA syllabus Advanced Software Engineering, course code 25BCA405DS01, Unit IV
