Documentation That Developers Actually Read
I've worked with teams that had thousands of pages of documentation that nobody read. And I've worked with teams that had a single README that saved hours every week. The difference isn't effort - it's approach.
Bad documentation is worse than no documentation. It wastes time writing it, wastes time reading outdated information, and creates false confidence that knowledge is captured when it isn't.
Let's build docs that actually work.
The Four Types of Documentation
Most documentation fails because it mixes purposes. A tutorial isn't a reference. A how-to guide isn't an explanation. The Diátaxis framework splits documentation into four categories:
Tutorials
Learning-oriented. For newcomers who want to get started. "Build your first app in 10 minutes." Hand-holding, step-by-step, guaranteed to work if followed exactly.
How-To Guides
Goal-oriented. For practitioners who want to accomplish something. "How to deploy to production." Assumes basic competence, focuses on the task, skips theory.
Reference
Information-oriented. For developers who need to look something up. API documentation, configuration options, function signatures. Dry, complete, accurate.
Explanations
Understanding-oriented. For people who want to understand why. Architecture decisions, design philosophy, conceptual overviews. Long-form, context-rich.
Don't mix these. A tutorial that stops to explain architecture loses the reader. A reference that includes tutorials becomes impossible to navigate. Keep them separate, link between them.
Write for the Reader, Not Yourself
The biggest documentation mistake: writing for the person who knows the system (you) instead of the person learning it (them).
Symptoms of this problem:
- Jargon without explanation
- Missing steps that seem "obvious"
- No context for why something matters
- Examples that require unstated prerequisites
The fix: have someone unfamiliar with the system follow your docs. Watch where they get stuck. Those are the gaps.
Even better: write docs while you're learning something. The curse of knowledge hasn't set in yet, so you'll naturally capture what a newcomer needs.
Start with the README
Your README is the front door. Make it count. It should answer:
- What is this? One sentence. What does this project do?
- Why should I care? What problem does it solve? Who is it for?
- How do I start? Minimum viable instructions to get running.
- Where do I learn more? Links to full documentation.
Keep the README focused. I've seen READMEs with 2000 lines covering every possible configuration option. That's not a README - that's a reference doc masquerading as an intro.
Document the "Why"
Code tells you what. Comments sometimes tell you how. Documentation should tell you why.
Architecture decision records (ADRs) are great for this. Short documents explaining:
- What decision was made
- What context led to it
- What alternatives were considered
- What tradeoffs were accepted
Six months later, when someone asks "why do we use this weird pattern here?", you have an answer that isn't "nobody remembers."
Keep Documentation Close to Code
Documentation in a wiki dies. Documentation in the repo lives.
When docs are in the same repository as code:
- They can be updated in the same PR as the feature
- They're versioned alongside the code they describe
- Code review can include doc review
- Contributors see them without leaving their workflow
Put docs in a /docs folder or use inline documentation (rustdoc, JSDoc, etc.) where appropriate. External wikis are for company-wide knowledge, not project-specific docs.
The Maintenance Problem
Outdated documentation is actively harmful. It sends people down wrong paths and erodes trust in all your docs.
Strategies to keep docs current:
Test your docs: For tutorials and how-to guides, can you follow them start to finish and get the expected result? Do this periodically.
Date everything: When was this written? When was it last verified? A doc labeled "Last verified: 2019" tells the reader to be skeptical.
Make updating easy: If fixing a typo requires a 12-step approval process, nobody will do it. Lower the friction.
Include docs in definition of done: A feature isn't done until it's documented. Review docs in code review.
Delete aggressively: Old docs about deprecated features? Delete them. Tutorials for a version nobody uses? Archive them. Less is more.
Writing Style for Technical Docs
Technical writing isn't creative writing. The goal is clarity, not elegance.
- Short sentences. One idea per sentence.
- Active voice. "Run the script" not "The script should be run."
- Consistent terminology. Pick one term and stick with it. Don't switch between "server," "instance," and "machine."
- Real examples. Not
fooandbar- actual realistic usage. - Working code. Every code example should be tested. Nothing erodes trust faster than examples that don't work.
Documentation Tooling
The best tool is the one your team will actually use. That said:
For simple projects: Markdown files in the repo. GitHub/GitLab renders them nicely.
For larger projects: Static site generators like Docusaurus, MkDocs, or Starlight. They turn markdown into navigable websites with search.
For API reference: Generate from code where possible. OpenAPI for REST, GraphQL introspection, rustdoc, JSDoc.
For diagrams: Mermaid, PlantUML, or similar text-based tools that can be version-controlled. Don't use Lucidchart screenshots that nobody can update.
The Minimum Viable Documentation
If you're starting from nothing, here's what to write first:
- README: What is this, how do I run it
- Setup guide: Complete dev environment setup for new team members
- Architecture overview: High-level diagram and explanation of major components
- Deploy runbook: How to ship to production
- Common tasks: How to add a new endpoint, create a migration, etc.
That's enough to onboard new developers and handle day-to-day work. Everything else can come later, driven by actual questions people ask.
Measure Your Docs
How do you know if documentation is working?
- Track questions in Slack/chat. If the same question keeps coming up, the docs aren't covering it well.
- Onboarding time. How long until a new developer is productive? Good docs shorten this.
- Page views and search queries. What are people looking for? What don't they find?
- Direct feedback. Ask developers what's missing or confusing.
Documentation isn't a box to check. It's a product, and your developers are the users. Treat it that way.