VibeKoding / Ensiklopedia ยท Fondasi KuatEnsiklopedia ยท Fondasi Kuat / An Introduction to Technical WritingAn Introduction to Technical Writing
VK

An Introduction to Technical WritingAn Introduction to Technical Writing

๐Ÿ“š Ensiklopedia ยท Fondasi KuatEnsiklopedia ยท Fondasi Kuat ๐ŸŒ Dual Bahasa (ID / EN) โšก VibeKoding Native

Ensiklopedia VibeKoding: An Introduction to Technical Writing.Ensiklopedia VibeKoding: An Introduction to Technical Writing.

๐Ÿ’ก Tips Praktis๐Ÿ’ก Pro Tip

Does anyone read the documentation you write? Many developers think "if the code works, that's enough โ€” documentation can wait." The result: new hires can't understand the project, API integration relies entirely on verbal communication, and six months later even you've forgotten why you designed it that way. This chapter helps you master the core methods of technical writing so your documentation is actually read, understood, and useful.Does anyone read the documentation you write? Many developers think "if the code works, that's enough โ€” documentation can wait." The result: new hires can't understand the project, API integration relies entirely on verbal communication, and six months later even you've forgotten why you designed it that way. This chapter helps you master the core methods of technical writing so your documentation is actually read, understood, and useful.

What will you learn in this article?What will you learn in this article?

ChapterContentCore Concepts
Chapter 1Document types and structureHow to write different documents
Chapter 2Writing principlesClear, accurate, concise
Chapter 3Practical comparisonsGood docs vs. bad docs
Chapter 4Document maintenanceKeeping documentation up to date

After reading this chapter, you will be able to write technical documentation that is well-structured, accurate, and easy to maintain.After reading this chapter, you will be able to write technical documentation that is well-structured, accurate, and easy to maintain.

------

0. The Big Picture: Why Technical Documentation Matters0. The Big Picture: Why Technical Documentation Matters

Code tells the computer "how"; documentation tells people "why." A project without documentation is like an appliance without a manual โ€” it works, but using it is pure guesswork.Code tells the computer "how"; documentation tells people "why." A project without documentation is like an appliance without a manual โ€” it works, but using it is pure guesswork.

๐Ÿ’ก Tips Praktis๐Ÿ’ก Pro Tip

- Reduced Communication Costs: New team members can onboard independently, reducing repeated explanations - Preserved Decision Context: Recording "why," not just "what" - Increased Project Credibility: Good documentation is the face of an open source project - Accelerated Collaboration: API documentation enables parallel front-end and back-end development- Reduced Communication Costs: New team members can onboard independently, reducing repeated explanations - Preserved Decision Context: Recording "why," not just "what" - Increased Project Credibility: Good documentation is the face of an open source project - Accelerated Collaboration: API documentation enables parallel front-end and back-end development

------

1. Document Types and Structure1. Document Types and Structure

Use the interactive component below to learn the standard structure for different types of documents:Use the interactive component below to learn the standard structure for different types of documents:

1.1 Common Document Types1.1 Common Document Types

Document TypeTarget AudienceCore Content
READMEEveryoneWhat the project is, how to use it, how to contribute
API DocumentationAPI consumersEndpoints, parameters, responses, error codes
Architecture DocsDevelopment teamSystem design, technology choices, data flow
ChangelogUsers/developersVersion changes, additions/fixes/breaking changes
Contributing GuideContributorsDev environment, code standards, PR process

1.2 The Golden Structure of a README1.2 The Golden Structure of a README

A good README should include:A good README should include:

  1. Project name + one-line description: Let people know what this is in 3 secondsProject name + one-line description: Let people know what this is in 3 seconds
  2. Quick start: Run it with minimal stepsQuick start: Run it with minimal steps
  3. Features: Core selling pointsFeatures: Core selling points
  4. Installation: Detailed environment requirements and installation stepsInstallation: Detailed environment requirements and installation steps
  5. Usage examples: Copy-paste-ready codeUsage examples: Copy-paste-ready code
  6. Contributing guide: How to participateContributing guide: How to participate
  7. License: Legal informationLicense: Legal information
  8. ------

    2. Writing Principles2. Writing Principles

    2.1 Clarity First2.1 Clarity First

    markdown
    <!-- Bad: vague and unclear --> This function processes data. <!-- Good: specific and clear --> Converts raw order data to invoice format, including tax calculation and currency conversion.
    

    2.2 Audience-Oriented2.2 Audience-Oriented

    Before writing documentation, ask: Who will read this? What information do they need?Before writing documentation, ask: Who will read this? What information do they need?

    • Writing for beginners: Explain terminology, provide complete examplesWriting for beginners: Explain terminology, provide complete examples
    • Writing for experienced developers: Get to the point, provide API referencesWriting for experienced developers: Get to the point, provide API references
    • Writing for non-technical people: Use analogies, avoid jargonWriting for non-technical people: Use analogies, avoid jargon

    2.3 Code Examples Are the Best Documentation2.3 Code Examples Are the Best Documentation

    markdown
    <!-- Bad: text description only --> Call the createUser function, passing in the username and email parameters. <!-- Good: runnable example --> const user = await createUser({ name: 'Zhang San', email: 'zhangsan@example.com' }) // Returns: { id: 'u_123', name: 'Zhang San', createdAt: '2025-01-15' }
    

    ------

    3. Practical Comparisons3. Practical Comparisons

    Use the interactive component below to compare good and bad technical writing:Use the interactive component below to compare good and bad technical writing:

    3.1 Commit Message Standards3.1 Commit Message Standards

    CODE
    # Bad fix bug update code # Good (Conventional Commits) fix: resolve login page white screen issue on Safari feat: support batch export of PDF reports docs: update example code in API authentication section
    

    3.2 The Art of Comments3.2 The Art of Comments

    javascript
    // Bad: describes "what" (the code already says this) // Iterate through the array for (const item of items) { ... } // Good: explains "why" // Iterate in reverse because forward iteration skips the next item when deleting for (let i = items.length - 1; i >= 0; i--) { ... }
    

    ------

    4. Document Maintenance4. Document Maintenance

    4.1 Docs as Code4.1 Docs as Code

    Keep documentation and code in the same repository, managed with the same workflow:Keep documentation and code in the same repository, managed with the same workflow:

    • Submit documentation changes alongside code in the same PRSubmit documentation changes alongside code in the same PR
    • Use CI to check documentation formatting and link validityUse CI to check documentation formatting and link validity
    • Update documentation in sync with version releasesUpdate documentation in sync with version releases

    4.2 Preventing Documentation Rot4.2 Preventing Documentation Rot

    ProblemSolution
    Outdated documentationForce documentation updates with code changes (PR checks)
    No one maintains itAssign documentation owners
    Content duplicationSingle source of truth, link to it elsewhere

    ------

    5. AI-Powered: Using LLMs to Improve Documentation Quality5. AI-Powered: Using LLMs to Improve Documentation Quality

    LLMs are almost "naturally gifted" in technical writing โ€” generating documentation, improving expression, and translating content are all strong suits.LLMs are almost "naturally gifted" in technical writing โ€” generating documentation, improving expression, and translating content are all strong suits.

    5.1 Generating API Documentation5.1 Generating API Documentation

    > Prompt:> Prompt:

    > ```> ```

    > Based on the following Express route code, generate complete API documentation including:> Based on the following Express route code, generate complete API documentation including:

    > - Endpoint path and method> - Endpoint path and method

    > - Request parameters (path params, query params, request body) and types> - Request parameters (path params, query params, request body) and types

    > - Success and error response examples> - Success and error response examples

    > - curl usage examples> - curl usage examples

    >>

    > [Paste your route code]> [Paste your route code]

    > ```> ```

    5.2 Improving Technical Writing5.2 Improving Technical Writing

    > Prompt:> Prompt:

    > ```> ```

    > Please improve the expression of the following technical documentation:> Please improve the expression of the following technical documentation:

    > 1. Use concise and clear language, remove redundant expressions> 1. Use concise and clear language, remove redundant expressions

    > 2. Replace passive voice with active voice> 2. Replace passive voice with active voice

    > 3. Keep technical terms accurate> 3. Keep technical terms accurate

    > 4. Add necessary code examples> 4. Add necessary code examples

    > Preserve the original meaning; only improve the quality of expression.> Preserve the original meaning; only improve the quality of expression.

    >>

    > [Paste your documentation content]> [Paste your documentation content]

    > ```> ```

    5.3 Generating a README5.3 Generating a README

    > Prompt:> Prompt:

    > ```> ```

    > Based on the following project information, generate a high-quality README.md:> Based on the following project information, generate a high-quality README.md:

    > - Project name: [name]> - Project name: [name]

    > - One-line description: [description]> - One-line description: [description]

    > - Tech stack: [list]> - Tech stack: [list]

    > - Core features: [list]> - Core features: [list]

    >>

    > Must include: project introduction, quick start, features,> Must include: project introduction, quick start, features,

    > installation steps (with code), usage examples, contributing guide, license.> installation steps (with code), usage examples, contributing guide, license.

    > ```> ```

    ๐Ÿ’ก Tips Praktis๐Ÿ’ก Pro Tip

    Always verify technical details in AI-generated documentation โ€” it may fabricate non-existent API parameters or incorrect return values. Always cross-check against the actual code.Always verify technical details in AI-generated documentation โ€” it may fabricate non-existent API parameters or incorrect return values. Always cross-check against the actual code.

    ------

    6. Summary6. Summary

    1. Type Matching: Different documents have different structures and writing stylesType Matching: Different documents have different structures and writing styles
    2. Clarity First: Be specific, accurate, and audience-orientedClarity First: Be specific, accurate, and audience-oriented
    3. Example-Driven: Good code examples are worth a thousand wordsExample-Driven: Good code examples are worth a thousand words
    4. Continuous Maintenance: Treat docs as code, evolving with the projectContinuous Maintenance: Treat docs as code, evolving with the project
    5. ๐Ÿ’ก Tips Praktis๐Ÿ’ก Pro Tip

      Writing documentation is not wasting time โ€” it's saving future time. The 30 minutes you spend writing documentation today could save 10 people an hour each. Good documentation is the best investment you can make for your team.Writing documentation is not wasting time โ€” it's saving future time. The 30 minutes you spend writing documentation today could save 10 people an hour each. Good documentation is the best investment you can make for your team.

      ------

      Further ReadingFurther Reading

      • Writing Guide: Google's Technical Writing course is free and practical.Writing Guide: Google's Technical Writing course is free and practical.
      • Documentation Tools: VitePress, Docusaurus, GitBook, and other modern documentation frameworks.Documentation Tools: VitePress, Docusaurus, GitBook, and other modern documentation frameworks.
      • API Documentation: The OpenAPI/Swagger specification is the industry standard for API documentation.API Documentation: The OpenAPI/Swagger specification is the industry standard for API documentation.
      • Practical Advice: Start by writing a good README for your own project.Practical Advice: Start by writing a good README for your own project.