Technical Writing

Technical writing covers the process of writing documentation, wiki pages, guides, and introductions (including project READMEs). It does not cover scientific repot writing.

Useful resources:

For a more in-depth approach to documentation writing, see Diataxis

Audience

Writing should always match the audience. Therefore, the first thing you should do is to define your audience’s:

Then, you need to identify exactly what you want the audience to learn, or what tasks they should be able to perform.

This will help you to structure your writing, and ensure you have something to check against as you progress.

Other tips:

Layout

First, how much knowledge are you trying to put down? Which of the following formats is most suitable:

Start with a structured, high-level outline to group topics and clarify the order of presentation. Using this, ensure you introduce information in a logical, coherent narrative, when it is most relevant to the reader.

Also consider what the audience wants to learn. If you’re writing an introduction to an SDK, put a quick-start guide before more complex code. If you’re writing a literature review, write an introduction to your topic first.

Then, you should write the scope of the document, clarifying what it covers, and importantly what it does not. It should also include what the target audience is, and what they should already know.

The introduction should state what the audience will learn or gain after reading the document.

During the document, you should try to alternate between explanations and examples.

You should also include comparisons and contrasts between your ideas and those the audience already understands.

Style

Some style tips:

Put some text under each heading, and avoid placing two headings directly next to each other:

## H2
### H3

is worse than

## H2
intro to topic
### H3

Jargon

The “curse of knowledge” refers to the idea that being in an expert in a topic makes you less able to explain it to newcomers.

Jargon refers to technical field-specific words (such as Hamiltonian), and also project-specific terminology. While using it may be second nature for you, your readers will likely be unfamiliar with the meaning or nuance.

If using a term for the first time in a document, define it, either by

From then on, make sure to use terms consistently. Using different words for the same thing may imply subtle distinctions that you haven’t explained. This will also reduce confusion when comparing with other texts.

Another form of jargon is acronyms. The proper way to introduce an acronym is as follows:

  1. full capitalised phrase in boldface
  2. acronym in parentheses and boldface

From there, only use the acronym as usual. For example,

The Variational Quantum Eigensolver (VQE) is … You can also use the VQE to …

Don’t define acronyms if you’re only going to use them a few times.

Jargon can also rear its head in headings, but you should avoid this. Instead, use task-based headings. For example, ## Running QAOA is a less informative heading than ## Solving because the latter is task-based and easier to both search for and understand.

Graphics

Readers like graphics! But only informative graphics are useful. A few useful tips are as follows:

Code

Code itself is the best documentation! Wherever possible, include code to demonstrate and clarify your explanations.

This code should be:

Larger code blocks with comments are preferable to short snippets, because they are easier to test, and easier to reuse.

You should also inform readers of how to actually run the code you present: what libraries and versions are necessary, what API keys do you need, etc.

Try to provide a range of complexity in your sample code, right from the most basic statements, to larger complex programs.

Start simple, spiral to complexity.

Miscellaneous

When editing, you can use the following techniques to proof-read: