Plain text, considered carefully
A working notebook on technical writing: clear explanations, readable code, diagrams, and the small details that help an idea travel.
In this article
Good technical writing makes a decision easier to understand. The format should support that purpose: enough structure to find the important parts, enough detail to reproduce the example, and enough context to know where the advice stops applying.
This notebook is also a living specimen of the publication’s Markdown and MDX. It keeps the ordinary elements together so changes to the reading experience can be checked against real content.
Begin with the answer
Use plain text when the work benefits from reviewable changes, durable links, and a publishing process that lives alongside the code. Markdown is a useful starting point. MDX adds small editorial components when the standard vocabulary is not enough.
That doesn’t make it the right choice for every author. A team that needs collaborative editing may value a document editor more than a Git history. The publishing system should fit the people doing the writing.
Show the decision in code
A code example needs a purpose, a language, and enough surrounding explanation to be useful. File labels make it easier to place a fragment in a project.
type Entry = {
title: string;
draft: boolean;
published: Date;
};
export function isPublic(entry: Entry, now = new Date()) {
return !entry.draft && entry.published <= now;
}The isPublic function makes the rule explicit: a post must be ready and its publication date must have arrived. Use that same rule wherever content is exposed, including feeds and social previews.
For a change, show the difference rather than asking a reader to compare two large blocks:
const visible = posts;
const visible = posts.filter((post) => isPublic(post)); The highlighted lines use Shiki’s build-time notation. The annotations disappear from the rendered code; the meaning stays visible through the added and removed line markers.
pnpm dev:me
pnpm --filter @johnsoriano/me typecheck
pnpm build:meGive comparisons a structure
A table is useful when the reader needs to compare the same properties across a few choices. On a small screen, the table can scroll without widening the page.
| Format | Useful for | Main constraint |
|---|---|---|
| Markdown | Essays, explanations, code examples | A small, standard vocabulary |
| MDX | Writing with reusable figures and callouts | Imports need to stay maintainable |
| Astro | Page layouts and shared components | More structure than most articles need |
Use more formatting the amount of formatting that helps the reader make the comparison.
Make a process visible
A diagram can expose a missing step that a paragraph hides. This one is written in Mermaid and rendered to SVG during the build:
There is no diagram library to download in the browser. The SVG remains part of the article’s static HTML.
Keep a reader’s place
An explanation often needs several levels of detail:
- State the question.
- Give the smallest useful example.
- Name the inputs and assumptions.
- Show what changes when an assumption fails.
- Connect the result back to the decision.
A short checklist can help before publishing:
- The opening states the subject clearly.
- Examples name their constraints.
- Links have descriptive text.
- A second reader has challenged the explanation.
Clarity includes knowing which part of an explanation is an example and which part is a promise.
Use notation when it earns its place
Sometimes an equation is the clearest statement. For a simple weighted score, define the weights first and show the relationship:
Here, is an observation and is its weight. This is a mathematical example, not a recommendation for evaluating a particular system. Equations are compiled by KaTeX to native, accessible MathML.
Leave a trail
Link to the source of a technical claim. Link to another note when it adds context. Use footnotes for a useful aside that would interrupt the main explanation.1
For more on the design decision behind this site, read a place to think in public. For a concrete engineering example, read before the code, draw the boundary.
References
- Astro’s content collections documentation
- The MDX project’s documentation
- Shiki’s notation transformers
- Mermaid’s syntax documentation
Footnotes
-
Footnotes keep the main argument readable while preserving context for a reader who wants to follow it. ↩