Technical Writing for Developers
Contents
Good technical writing is a superpower. It scales your knowledge and helps your team move faster.
The Inverted Pyramid
Put the most important information first:
Most Important (what, why)
↓
Supporting Details (how)
↓
Background (context)
Don’t make readers wade through history to find what they need.
README Structure
|
|
Write for Scanning
People scan before they read:
- Use headings liberally
- Keep paragraphs short (3-4 sentences max)
- Use bullet points
- Bold key terms
- Include code examples
Show, Don’t Just Tell
Weak:
The function accepts various parameters.
Strong:
|
|
Use Active Voice
Passive:
The configuration file should be edited by the user.
Active:
Edit the configuration file.
Be Specific
Vague:
This may cause performance issues.
Specific:
Processing more than 10,000 items may exceed the 5-second timeout.
Error Messages
Good error messages tell users what happened and what to do:
Bad:
Error: Invalid input
Good:
Error: Email address is invalid.
Expected format: user@example.com
Received: "not-an-email"
API Documentation
For each endpoint, include:
|
|
Commit Messages
# Format
<type>: <subject>
<body>
<footer>
# Example
feat: add user authentication
Implement JWT-based authentication with refresh tokens.
Sessions expire after 24 hours of inactivity.
Closes #123
Types: feat, fix, docs, refactor, test, chore
Runbooks
For operational procedures:
|
|
Editing Checklist
- Clear purpose in first paragraph
- Scannable with headings
- Code examples included
- Active voice used
- No jargon without explanation
- Proofread for typos
Good writing takes practice. The more you write, the better you get.
Comments