Documentation
Documentation is material that describes or explains an object, system, or procedure, or gives instructions about it, including how to use or maintain it. Familiar examples are a README file that tells you how to install a program, a patient's medical record, and a scientist's lab notebook.
The word has older meanings too. It can mean supplying documents as proof.[1]
In the early 1900s, "documentation" was also the name of a field that later became information science.[1][2]
Meanings of the word
Dictionaries list several related senses of "documentation".[1] They range from the everyday act of backing a claim with papers to the manuals that come with software.
| Sense | Example |
|---|---|
| The act of supplying or proving something with documents | Documenting an expense with receipts |
| Documentary evidence, or footnotes and appendices that point to it | The sources cited in a history book |
| Information science, as a field of study | The documentation movement of the early 1900s |
| Usually printed instructions and information for using software or hardware | A printer's setup guide |
This page covers documentation in the broad sense given in the lead. Technical documentation and software documentation have their own pages.
What documentation is for
Documentation lets knowledge outlast the moment and the person who had it. Its main uses repeat across fields.
- Using a system correctly. Google's software engineering guide says good documentation makes code and APIs easier to understand, which reduces mistakes, and makes manual processes easier to follow.[3]
- Sharing knowledge in a group. The same guide says bringing new members onto a team takes much less effort when the process is written down.[3] Keeping and sharing what a group knows is the concern of knowledge management.
- Continuity and communication. In health care, recording routine practice supports continuity of patient care, communication among health professionals, diagnosis, and treatment.[4]
- Evidence. Medical records support legal defence and getting paid for care (reimbursement).[4] A lab notebook is a record that may be used as evidence in legal proceedings.[5]
- Repeating work. A lab notebook should hold enough detail that others can reproduce the research.[5]
Kinds of documentation
The subsections below group documentation by who reads it and by what the reader needs.
Google's software engineering guide advises writers to pick one primary audience for each document. It also advises giving each document a single purpose.[3]
By audience
The same system often needs different documents for different readers.[3]
- Users need to know how to use a product. The international standard ISO/IEC/IEEE 26514 covers the design and development of this "information for users".[6]
- Developers and maintainers need to know how a system works inside. In code, API comments are written for users of an interface, while implementation comments can assume more knowledge and explain why the code was written as it was.[3]
- Decision makers may read a design document, which might need to persuade them that a plan is sound.[3]
Four forms by reader need
A widely used model, the Diátaxis framework by Daniele Procida, says there are four kinds of documentation that meet four different needs.[7][8] Each kind has a different purpose and should be written in a different way.[7]
The framework arranges the four kinds on two axes: what the user does versus what the user knows, and gaining a skill (study) versus applying it (work).[7]
| Kind | What it is | Concerns | Serves |
|---|---|---|---|
| Tutorial | A lesson that takes a learner through a practical experience | What the user does | Study, gaining skill |
| How-to guide | Practical directions for a real-world goal or problem, for an already competent user | What the user does | Work, applying skill |
| Reference | Accurate, complete technical facts, free of interpretation | What the user knows | Work, applying skill |
| Explanation | Background that builds understanding | What the user knows | Study, gaining skill |
The framework also says that reference material should mirror the structure of the thing it describes, the way a map does.[7] Canonical gives mixed kinds, such as a tutorial that breaks off into explanation, as typical examples of confusing documentation.[9]
Other common software types
Google's guide describes several further types of documents that software teams write.[3]
- Code comments are the most common form of reference documentation that engineers maintain.
- Design documents propose a design before work on a major project starts and are often reviewed by experts first.
- Conceptual documents give overviews of APIs or systems and are meant to add to reference documentation, not replace it.
- Landing pages state their purpose and link to other pages.
Related types have their own pages, including API documentation, software test documentation, and postmortem documentation.
Documentation in different fields
Many fields keep documentation, each with its own forms and rules. The table compares a few.
| Field | Typical documentation | Main purposes |
|---|---|---|
| Software | READMEs, API references, code comments, design documents | Installing and using software[10] |
| Health care | Medical records, nursing documentation | Continuity of care, communication, legal defence, getting paid for care[4] |
| Research | Lab notebooks, including electronic lab notebooks | Reproducing research, legal evidence[5] |
| Drug manufacturing | Records required by the rules for making medicines (current good manufacturing practice) | Reliable, accurate data for regulators[11] |
| Linguistics | Language documentation | A lasting, multipurpose record of a language[12] |
Writing good documentation
This section follows the advice in Google's software engineering guide, which says to start from the reader's needs and that often, less is more.[3]
Completeness, accuracy, and clarity
The guide names three aspects of good documentation: completeness, accuracy, and clarity.[3] It says a document rarely achieves all three, because they pull against each other. Trying to cover every possible use of an API can make a document unclear, and making a hard topic clear may mean leaving out rare side effects.
Reviews
The guide's test of whether documentation works is to have someone else review it.[3] It names three kinds of review:
- A technical review for accuracy, usually by a subject expert.
- An audience review for clarity, by someone new to the topic.
- A writing review for consistency, often by a technical writer.
Ownership and keeping it current
The guide warns that documents without owners become stale and hard to maintain.[3] It advises removing a document that no longer serves a purpose, or marking it as no longer current, ideally with a pointer to newer information.
The guide also describes "freshness dates" that record when a document was last reviewed.[3] At Google, the documentation system sends email reminders when a document has not been touched for a set time, for example three months.
Documentation as code
In software, much documentation now lives with the code it describes. Source control, also called version control, is a system that tracks changes to files and lets a team return to earlier versions. Google's guide recommends placing documents under source control next to the code, which helps make them the main, trusted source.[3]
The docs-as-code approach
Docs as code is the idea that documentation should be written with the same tools as code.[13]
- Issue trackers
- Version control, such as Git
- Plain text markup, such as Markdown, reStructuredText, or AsciiDoc
- Code reviews
- Automated tests
This means writers follow the same workflow as the development team.[13]
One stated benefit is that a team can block new features from being merged until they include documentation.[13]
Documentation inside the code
Some documentation sits inside the program text itself. A comment is a note in the source code for human readers.
In Python, a docstring is a string literal (a piece of text in quotes written directly in the code) that is the first statement in a module, function, class, or method definition.[14] It becomes the object's __doc__ attribute, a special built-in field where Python stores that text.
import math
def circle_area(radius):
"""Return the area of a circle with the given radius."""
return math.pi * radius ** 2
The autodoc extension of Sphinx can import the modules being documented and pull in documentation from their docstrings.[15]
Literate programming, introduced by Donald Knuth, goes further. It combines a programming language with a documentation language and treats a program as literature addressed to human beings rather than to a computer.[16]
Standards and rules
Some documentation is shaped by formal standards or by law.
User information standards
ISO/IEC 26514:2008 set requirements for designing and developing software user documentation as part of the software life cycle.[17] The later IEEE/ISO/IEC 26514-2021 is titled "Design and development of information for users".[6]
The 2021 standard can also be applied to some other kinds of information, but it does not cover all aspects of them.[6] These include information for users of products other than software, training materials, and information built into the user interface itself.
Records in regulated industries
In drug manufacturing, the US Food and Drug Administration expects all data to be reliable and accurate.[11] Its December 2018 guidance says complete, consistent, and accurate data should be:
- Attributable, meaning linked to who generated the data[18]
- Legible
- Recorded at the time of the activity ("contemporaneously recorded")
- Original or a true copy
- Accurate
These five attributes are known as ALCOA.[11] Related rules appear under good documentation practice and data integrity in manufacturing.
History of the documentation field
In the early 1900s, "documentation" named a whole field of work. In Europe the word was increasingly used instead of "bibliography" (the listing and description of books and other sources) for the techniques needed to manage a fast-growing number of documents.[2]
Otlet and the documentation movement
In 1895 Paul Otlet and Henri La Fontaine founded the International Institute of Bibliography (Institut International de Bibliographie) in Belgium.[19] It became the central force in the international documentation movement.
From about 1920, "documentation" was increasingly accepted as a general term covering bibliography, scholarly information services, records management, and archival work.[2]
Documentalists stretched the meaning of "document" beyond written texts.[2] Otlet noted that documents could be three-dimensional, which brought in sculpture. In his 1934 Traité de documentation he wrote that objects themselves, such as natural objects, archaeological finds, models, and works of art, can count as documents if you learn from observing them.
Briet's antelope
In 1951 Suzanne Briet published Qu'est-ce que la documentation? (What Is Documentation?).[2] It opens with the claim that "a document is evidence in support of a fact". She then asked whether each of six objects was a document.
| Not a document | Document |
|---|---|
| Star in the sky | Photo of the star |
| Stone in a river | Stone in a museum |
| Animal in the wild | Animal in a zoo |
The point is that documentation is about access to evidence, not only about texts.[2] Briet's example animal was a newly discovered African antelope brought to a zoo in Paris.
From documentation to information science
The American Documentation Institute was founded on March 13, 1937.[20] Its first interest was developing microfilm (film that holds very small photographic copies of documents) to help spread information.
After about 1950, terms such as "information science" and "information storage and retrieval" increasingly replaced "documentation".[2] The institute's members voted to rename it the American Society for Information Science, and the change took effect on January 1, 1968.[20]
Debates and open problems
How much documentation to write, and how to keep it true, are still argued over.
How much is enough
The 2001 Manifesto for Agile Software Development values "working software over comprehensive documentation".[21] It adds that there is value in the items on the right, such as documentation, but that its authors value the items on the left more.
A 2023 literature review notes that there have always been conflicting opinions about what to document in agile software development.[22]
Why documentation is not written
A 2024 survey of 367 developers found a paradox about comments at the top of functions.[23] Developers valued these comments and thought they were worth the time, yet tended not to write them in their own code. Reasons included the belief that code should explain itself and the worry that comments would not be kept up to date.
Documentation that goes out of date
Documentation can stop matching the thing it describes. A study of over 3,000 GitHub projects found that most contained at least one reference to a code element that no longer existed, at some point in their history.[24] Researchers are building tools that detect such outdated references automatically.
What counts as a document
The question Otlet and Briet raised is not settled. Michael Buckland argued that digital technology renews old questions and old confusions between medium, message, and meaning.[2]
Buckland also noted that Briet's rules for when an object becomes a document are not made clear.[19]
References
- Documentation, definition and meaning, Merriam-Webster, 2026.
- What is a "document"?, Michael K. Buckland, Journal of the American Society for Information Science, 1997.
- Software Engineering at Google, Chapter 10: Documentation, Winters, Manshreck, and Wright, O'Reilly, 2020.
- Health professionals' routine practice documentation and its associated factors in a resource-limited setting: a cross-sectional study, Demsash et al., PubMed Central, 2023.
- Keeping Lab Notebooks in the NIH IRP: Basic Principles and Best Practices, NIH Office of Intramural Research, 2024.
- IEEE/ISO/IEC 26514-2021, Design and development of information for users, IEEE Standards Association, 2021.
- Start here: Diátaxis in five minutes, Daniele Procida, Diátaxis, undated (accessed 2026).
- Colophon, Daniele Procida, Diátaxis, undated (accessed 2026).
- Diátaxis, a new foundation for Canonical documentation, Daniele Procida, Canonical Ubuntu blog, 2021.
- Adapting Installation Instructions in Rapidly Evolving Software Ecosystems, arXiv, 2023.
- Data Integrity and Compliance With Drug CGMP: Questions and Answers, US Food and Drug Administration, 2018.
- Language documentation: What is it and what is it good for?, Nikolaus P. Himmelmann, in Essentials of Language Documentation, Mouton de Gruyter, 2006.
- Docs as Code, Eric Holscher and the Write the Docs community, Write the Docs, undated (accessed 2026).
- PEP 257: Docstring Conventions, Python Software Foundation, 2001.
- sphinx.ext.autodoc: Include documentation from docstrings, Sphinx project, undated (accessed 2026).
- Literate Programming, Donald E. Knuth, Center for the Study of Language and Information, 1992.
- ISO/IEC 26514:2008, Systems and software engineering, International Organization for Standardization, 2008.
- FDA's Data Integrity Guidance for cGMP: The 2018 Q&A, Applied, CASRAI, undated (accessed 2026).
- The Lady and the Antelope: Suzanne Briet's Contribution to the French Documentation Movement, Mary Niles Maack, Library Trends, 2004.
- History of ASIS&T, Association for Information Science and Technology, undated (accessed 2026).
- Manifesto for Agile Software Development, Beck et al., 2001.
- Documentation Practices in Agile Software Development: A Systematic Literature Review, Islam, Hasan, and Eisty, arXiv, 2023.
- The Paradox of Function Header Comments, Oxenhorn, Mor, Stern, and Feitelson, arXiv, 2024.
- Detecting Outdated Code Element References in Software Repository Documentation, Tan, Wagner, and Treude, arXiv, 2022.
