Slide 1

Slide 1 text

Let’s Talk About Docs Jonathan Sick SQuaRE

Slide 2

Slide 2 text

2 Documentation, along with API, frames the user's image of a piece of software.

Slide 3

Slide 3 text

3 Documentation is the best marketing.

Slide 4

Slide 4 text

4 Docs are first class products of software development.

Slide 5

Slide 5 text

5 Docs or it didn't happen.

Slide 6

Slide 6 text

6 Writing is an exercise in empathy. You’re writing for the reader. Remember the reader might not encounter your doc in the best circumstances.

Slide 7

Slide 7 text

7 What is not documentation? Source code. Unit tests.

Slide 8

Slide 8 text

Types of Documentation 8 Tutorial User Guide Reference Experience. Understanding. Reliable companion.

Slide 9

Slide 9 text

Tutorials • Give a realistic feeling for using the software on real projects - Conceptual docs for concepts & ‘toy’ examples; tutorials for real-world experience • Demonstrate best practices • Keep explanations light; link liberally to reference & concept docs • 30 minutes or less: lunch break sized - Chain tutorials to do bigger, more complex things • Railroad the reader towards a goal or product - Show how to arrive at solution, at every step. ‘Exercise for the reader’ doesn’t cut it. - Show solution. Ideally we’d like to provide downloadable repos or notebooks. • State pre-requisites up-front 9

Slide 10

Slide 10 text

10

Slide 11

Slide 11 text

11 Realistic Railroading

Slide 12

Slide 12 text

12

Slide 13

Slide 13 text

13

Slide 14

Slide 14 text

14 Goals / end result Prerequisites

Slide 15

Slide 15 text

15 Checkpoints help a reader follow along. Short paragraphs; clear instructions.

Slide 16

Slide 16 text

16

Slide 17

Slide 17 text

Conceptual Docs / User Guide • This is about teaching - Think about the project’s philosophy and teach that - Use clear, simple words (more on writing later) • Be comprehensive - More details than tutorials, but still link frequently to reference • Use illustrative examples - Examples can be stripped-down, but should work - Names should be relevant; avoid foo and bar 17

Slide 18

Slide 18 text

18 1. Introduction 2. Getting Started 3. Using {subpackage} 4. Reference/API Quickly and clearly answer the question: What is this? Will this solve my problem?

Slide 19

Slide 19 text

19 1. Introduction 2. Getting Started 3. Using {subpackage} 4. Reference/API Show what it’s like to use API with small examples. Like a lightweight tutorial.

Slide 20

Slide 20 text

20 1. Introduction 2. Getting Started 3. Using {subpackage} 4. Reference/API Detailed, per-concept guides.

Slide 21

Slide 21 text

21 1. Introduction 2. Getting Started 3. Using {subpackage} 4. Reference/API Lots of illustrative examples.

Slide 22

Slide 22 text

22 Revisiting Django.

Slide 23

Slide 23 text

23 Mini-concept guides markets Django and onboards users. Links to full guide.

Slide 24

Slide 24 text

24

Slide 25

Slide 25 text

Reference Guides • API references extracted from code comments/docstrings - Formats: Numpydoc for Python, Doxygen for C++ • Used in many contexts: doc site, python help(), devs viewing code • Strongly formalized format - One sentence summary - Parameters, returns, exceptions - Usage examples - Possibly also detailed notes, ‘see also,’ literature references for algorithms • Separation between public API & internal implementation - ‘_objects’ are excluded; use public import paths - Use regular code comments for things an API user shouldn’t know 25

Slide 26

Slide 26 text

26 Signature (auto) Parameter/Return Details Helpful links Detailed explanation of behaviour; things users should be aware of Examples of behaviours and usage ideas One-sentence summary.

Slide 27

Slide 27 text

27 One sentence summary from function/class docstrings used in API tables. Writing a clear one-sentence summary is critical.

Slide 28

Slide 28 text

28 Writing.

Slide 29

Slide 29 text

29 Writing is hard work Writing is hard work. A clear sentence is no accident. Very few sentences come out right the first time, or even the third time. Remember this in moments of despair. If you find that writing is hard, it’s because it is hard. — William Zinsser, On Writing Well

Slide 30

Slide 30 text

Design scannable docs “Users won't read your text thoroughly in a word-by-word manner. “The first two paragraphs must state the most important information. “Start subheads, paragraphs, and bullet points with information-carrying words. 30 From: F-Shaped Pattern For Reading Web Content by Jakob Nielsen, http://ls.st/fzp.

Slide 31

Slide 31 text

Design scannable docs • Most people don’t read the web sentence-by-sentence. • Use lots of meaningful headers. • 2–3 sentence paragraphs. • First one or two words of a paragraph should convey meaning. • Use lists and typographic elements for structure. 31

Slide 32

Slide 32 text

Craft sentences • Write short sentences. Avoid trailing-on. • Opt for active over passive voice. • Use imperative for giving directions. • But only using short or imperative sentences can make your writing cold. Use your ear and switch it up. 32

Slide 33

Slide 33 text

Voice & Tone Voice is our organization’s identity and personality • As a group we [should] write with the same voice all the time. • Is this our voice? - “[API] was taught to [functionality].” - “Then chant to following commands to gdb:” Tone is how we write in context. 33

Slide 34

Slide 34 text

Robert McKercher and the LSST Publications Board Document 13016 Latest Revision Date: January 2012 . Voice LSST DM could benefit from an addendum to the LSST Style Manual that gives vocabulary and phrasing guidance. 34 http://ls.st/doc-13016

Slide 35

Slide 35 text

35 styleguide.mailchimp.com

Slide 36

Slide 36 text

36 voiceandtone.com

Slide 37

Slide 37 text

37 voiceandtone.com

Slide 38

Slide 38 text

Be conversational in tone and write simply • Don’t go out of your way to sound clever or smart • Documentation is not like academic writing • Use 5 cent words. Throw out your thesaurus. • Write like you speak; contractions are fine 38

Slide 39

Slide 39 text

Be honest and considerate • Avoid the words “easy,” “trivial,” and “just.” • Your readers are intelligent; they just don’t have your domain knowledge yet • Adapt your tone for error messages and other tricky situations Anticipate your reader’s emotions and context 39

Slide 40

Slide 40 text

40 Editing

Slide 41

Slide 41 text

Advice for Writers • Be open to feedback. Writing is about communication, and the editor is the first person you connect with. • Be up-front about the type of feedback you want. Structural organization? Technical check? Copy edits? • Editing is a conversation. 41

Slide 42

Slide 42 text

Advice for Editors • Your job is to advocate for the reader. • Use GitHub PR comments to talk about structure, flow, and content. • Two options for copy editing: 1. Edits in PR line comments. 2. Commit edits on a new branch that the author can merge in. 42

Slide 43

Slide 43 text

Some resources • Nicely Said by Nicole Fenton and Kate Kiefer Lee. http://ls.st/6fl 43 Books • Write the Docs conference videos. http://ls.st/4gu • Jacob Kaplan Moss’s series on documentation. http://ls.st/d6w • Teach, Don’t Tell, by Steve Losh. http://ls.st/2h2 • Cooking up Effective Technical Writing by Sally Jenkinson for 24ways. http://ls.st/owh • Mailchimp’s Content Style Guide. http://ls.st/9jo • Writing for the Web. Dalhousie University. http:// ls.st/i5d Web