Technical Writing and Documentation Questions
The craft of producing durable, reference-quality written artifacts and keeping them accurate: READMEs and quick-start guides, design docs, RFCs and technical proposals, runbooks and deployment guides, model cards, datasheets and data dictionaries, bug reports and reproducible examples, postmortem write-ups, handoff documents, pull request descriptions, code comments, release notes, experiment reports, and knowledge-base articles. Covers structure and information design, writing for a specific audience and for future readers (including plain language and accessibility), templates and style standards, docs-as-code workflows with CI checks, testing of examples and snippets, documentation review and quality checks, versioning and freshness checks on the documents you own, keeping sensitive data out of docs, and measuring whether documentation works. Architecture decision records, API reference docs, PRDs and PR/FAQs, and live presentations are covered elsewhere.
Analysts write metric definitions as free prose, while another proposal is a structured template with formula, SQL, owner and examples. Which would you adopt, and how would you handle the migration and enforcement?
Sample Answer
Direct answer
I would adopt the structured template (a fixed set of named fields per metric, stored as YAML, a plain-text key: value format), but keep one free-prose field inside it ("definition in plain English") so it does not become a form nobody reads. Prose alone cannot be checked by a machine and drifts between authors; a template alone can be filled with junk. Store it in Git, validate it in CI (continuous integration, automated checks that run on every change), migrate the metrics people actually use first, and enforce with a rule that only tightens over time.
Trade-offs
| Free prose | Structured template | |
|---|---|---|
| Ease of writing | Highest | A few minutes more per metric |
| Ambiguity | Common (unstated time window, filters) | Forced fields expose gaps |
| Checkable by CI | No | Yes: required fields, SQL runs, example matches |
| Reviewing a change | Reads as a text diff | Field-level diff shows exactly what changed |
| Searchable and comparable | Weak | Strong (same fields everywhere) |
| Main failure | Two versions of the truth | Placeholder text ("TBD") in required fields |
The template (real, runnable check)
Each metric is a small YAML file with name, owner, definition, sql, grain (the level of detail the metric is computed at: here one number per week, as opposed to per day or per user), and an example with an expected value. The validator refuses missing fields and placeholders, and it runs the SQL and compares it with the example (needs pip install pyyaml):
import sqlite3, yaml
SPEC = """
name: weekly_active_teams
owner: growth-analytics
definition: Distinct teams with at least one qualifying event in a Monday-to-Sunday UTC week.
sql: |
SELECT COUNT(DISTINCT team_id) FROM events
WHERE event_type IN ('login','edit')
AND event_ts >= :week_start AND event_ts < date(:week_start, '+7 days')
grain: week
example: {week_start: '2026-08-03', expected: 2}
"""
REQUIRED = ["name", "owner", "definition", "sql", "grain", "example"]
PLACEHOLDERS = {"", "tbd", "todo", "n/a"}
def validate(spec, db):
errors = [f"missing {k}" for k in REQUIRED if k not in spec]
errors += [f"placeholder in {k}" for k, v in spec.items() if str(v).strip().lower() in PLACEHOLDERS]
if not errors:
got = db.execute(spec["sql"], {"week_start": spec["example"]["week_start"]}).fetchone()[0] # the SQL must actually run
if got != spec["example"]["expected"]:
errors.append(f"example expects {spec['example']['expected']} but SQL returns {got}")
return errors
db = sqlite3.connect(":memory:")
db.executescript("""CREATE TABLE events (team_id INTEGER, event_type TEXT, event_ts TEXT);
INSERT INTO events VALUES (1,'login','2026-08-04'),(1,'edit','2026-08-05'),(2,'edit','2026-08-09'),
(3,'heartbeat','2026-08-06'),(4,'login','2026-08-10');""")
spec = yaml.safe_load(SPEC)
print("good spec:", validate(spec, db))
print("no owner:", validate({k: v for k, v in spec.items() if k != "owner"}, db))
print("placeholder:", validate({**spec, "definition": "TBD"}, db))
print("stale example:", validate({**spec, "example": {"week_start": "2026-08-03", "expected": 3}}, db))
Output:
good spec: []
no owner: ['missing owner']
placeholder: ['placeholder in definition']
stale example: ['example expects 3 but SQL returns 2']
The example.week_start value is fed into the SQL as :week_start, so the window is written once and the documented example and the query cannot quietly use different dates. The last line is the valuable one: if someone changes the SQL and forgets the documented example, the check fails, so the prose and the query cannot drift silently.
Migration plan (illustrative numbers)
Say there are 60 metrics. Do not migrate all 60.
- Rank them by use: export 90 days of views per dashboard, add up the views of every dashboard that uses each metric, and sort from highest to lowest (appearances in exec reports can break ties). Convert the top 10 first, each with its owner, in the first two weeks.
- Freeze the rest: legacy prose pages get an "unmigrated" tag and stay readable.
- Publish a coverage number where the team sees it. The 14 in "14 of 60 migrated" is the top 10 plus, say, 4 more metrics that were converted because someone happened to edit them (step 4).
- Convert a metric whenever someone next touches it, so the work follows real change.
Enforcement (carrot first, stick second)
- Immediately: a new metric cannot be merged without a spec that passes the check. This costs nothing to existing work.
- After the top 10 are migrated: a change to a metric's SQL requires the spec in the same pull request (a proposed change that teammates review), with the owner listed as reviewer in a CODEOWNERS file (a file that names who must approve changes to which paths).
- Ratchet (a rule that can only tighten, like a ratchet wrench that turns one way): the share of metrics that must be migrated rises each quarter and never drops back.
- Warn but do not block on subjective checks such as a
last_revieweddate older than 180 days (an optional field you would add to the template; the minimal one above does not have it).
How it gets gamed, and the guard
People type "TBD" or copy an example from another metric. The guards are the placeholder check, the requirement that the example is recomputed by CI, and a human owner who is accountable on review.
What would change my answer
With a team of three analysts and fewer than 15 metrics, a wiki page with a checklist is enough and CI machinery is overhead. If completion rates stay low after a month, the template is too long: cut fields before adding enforcement.
What makes a runbook usable by a tired on-call engineer in the middle of an outage? Walk me through the practices you follow when you write one for a data pipeline.
Sample Answer
Direct answer
A runbook is a step-by-step operating guide for one specific situation, usually opened from an alert. A tired on-call engineer (the person currently carrying the pager for the team) has almost no spare attention, so a usable runbook needs no interpretation: it starts from the alert they received, gives one action per step with the exact command, shows what a correct result looks like, and says plainly when to stop and call someone. For a data pipeline (a scheduled chain of jobs that moves and transforms data) I write each entry around a symptom such as "table not fresh by 06:00", never around the architecture.
Practices I follow for a pipeline runbook
- One entry per alert, linked from the alert itself. The page that fires should contain the URL of its entry, so nobody searches a wiki at 3 a.m.
- Symptom first, then a short decision path. Step 1 answers "is it still running, failed, or never started?" and each answer points to a numbered step. No background essays inside the steps.
- Exact commands and exact locations. Say where the command runs (a jump host, meaning a locked-down server you log into first to reach production, or a laptop with a named cluster context, the setting that says which cluster a command talks to) and paste it ready to copy, with placeholders in angle brackets.
- State the expected result after each step, so the reader knows whether to continue.
- Say whether an action is safe to repeat. Re-running a load is only calm if the job is idempotent (running it twice leaves the same data as running it once). Write "safe to repeat: yes, the load merges on order_id" or "NOT safe: creates duplicates, ask the owner first".
- Name the blast radius (how much else is affected if this breaks or your fix goes wrong): which dashboards, models or teams read this table, and who to notify.
- Escalation is a step, not an afterthought: after 30 minutes without progress, page the owning team, with the channel and rotation name (the rotation is the schedule that decides who is on call).
- Known failure table: last three real incidents as "log line seen, cause, fix", because pipelines fail in repetitive ways.
Worked example (illustrative excerpt)
ALERT: orders_daily table not updated by 06:00 UTC
Owner: data-platform-oncall Last verified: 2025-06-02 by a.rivera
Impact: finance dashboard and churn model read this table.
1. Is the run still going? (run from the jump host)
airflow dags list-runs -d orders_daily --state running
Rows returned -> wait 30 min, then go to step 4.
No rows -> go to step 2.
2. Open the DAG's runs in the orchestrator UI.
No run at all for today (it never started) -> check the DAG is not paused and the
scheduler is healthy, then go to step 4
A red (failed) run: open the failed task's log and match the last line:
"Connection refused ... source-db" -> source outage, go to step 4
"duplicate key" -> STOP, do not re-run, escalate
3. Clear (re-run) the failed task load_orders. Safe to repeat: yes (MERGE on order_id).
Expected: task turns green in about one normal run time.
4. Escalate to data-platform-owners if not green after 30 minutes.
Reading the excerpt: Airflow is a scheduler that runs a chain of jobs in order, and a DAG (directed acyclic graph) is one such chain of tasks with a fixed order and no loops. airflow dags list-runs -d orders_daily --state running lists the runs of the orders_daily DAG that are in progress right now. The orchestrator UI is Airflow's web page showing each task's status and logs. To "clear" a failed task means to tell Airflow to run it again. MERGE on order_id is a SQL statement that updates rows that already exist and inserts new ones, matched by order_id, which is why repeating it does not create duplicates.
Fields I validate before publishing (and re-validate on a schedule)
- A named owner that is a team or rotation, not a person who may leave.
- A last-verified date and who verified it, with a review interval (for example 90 days) after which the page is flagged stale.
- Tested commands: someone other than the author ran every command against staging or a copy and the output matched what the step promises.
- Links resolve, and the alert's runbook link points to this exact page.
Pitfalls
- Paragraph prose instead of numbered steps.
- "Check the logs" without saying which logs and what to look for.
- Commands that only work with context the author carries in their head.
- A runbook that has never been used under pressure. Run a drill and fix every place the reader hesitated.
A data scientist hands you a 500-line Jupyter notebook mixing narrative and experiments. You need to turn it into a concise internal post for engineers and product managers. What editorial steps do you take?
Sample Answer
Direct answer
A notebook is a lab diary: it records what was tried, in the order it happened. A post is an argument: it states one conclusion and shows only what supports it. My editorial job is to find the conclusion, decide who needs it, and cut everything else, then check every claim I keep against the notebook by rerunning it.
Editorial steps
- Interview the author (15 minutes) and read the notebook end to end. Ask "what did you find and what should the reader do about it?" Write the answer in one sentence. That is the headline.
- Name the audience and the decision. Engineers want what changed and how to use or integrate it; product managers want impact, risk, confidence and next step. If both, lead with the result and put method below the fold.
- Sort every section into three piles: keep (supports the headline), move to an appendix or link (needed to reproduce), delete (dead ends, debugging, repeated plots). Dead ends survive only if they change what the reader should believe (for example "we tried X and it did not help, so do not retry").
- Rerun the notebook top to bottom in a clean environment so every number and chart is the one you publish. Hidden state and stale outputs are common.
- Choose 2-4 figures. Each gets a title that states the takeaway ("Recall rises for new customers"), labelled axes, and units. Redraw plots that were made for exploring.
- Translate the jargon. Define the metric (for example, recall: the share of real positives the model finds), give the baseline, and state uncertainty honestly, including sample size.
- Write to a fixed skeleton: result and recommendation, why it matters, what we did (short), evidence (figures), caveats, next steps, link to the notebook and the data snapshot.
- Cut again and have the author fact-check it. They approve accuracy; you own clarity. Then test it on one engineer and one PM who were not involved: can each say the conclusion back?
Worked example (illustrative excerpt)
Headline: Adding support-ticket counts to the churn model finds more at-risk customers among new accounts, at the cost of a slower nightly build.
Recommendation: Ship it for new accounts; hold for older accounts until we re-test in Q4.
Evidence: (Figure 1) recall by account age; (Figure 2) build time before and after.
Caveats: The new-account group is small, so the gain has wide uncertainty.
Reproduce it: link to the notebook, commit and data snapshot.
Of the roughly 500 lines, what survives is the two figures and about five lines of setup; the feature-engineering experiments live behind the link.
Trade-offs and pitfalls
- Cutting can distort: do not drop a caveat because it complicates the story.
- Do not paste code into the post unless the audience will run it.
- The author must approve; the editor's polish should never change a claim.
In your own words, what makes a piece of technical documentation good? Walk me through how you would judge a document you have just inherited from a colleague.
Sample Answer
Direct answer
Good technical documentation lets a specific reader finish a specific task correctly without asking the author. So I judge it on four things: is it aimed at a clear reader and task, is it true today, can the reader find what they need fast, and can they verify it by doing what it says. Everything else (polish, length, diagrams) is secondary.
How I would judge an inherited document, in order
- Name the reader and the job. Who was this written for (a new hire, an on-call engineer, an analyst) and what should they be able to do afterwards? If I cannot tell, that is the first defect. Different deliverables serve different readers: a README (the front-page file of a code repository) gets someone running the thing, a slide deck persuades a decision-maker in one sitting, and an API reference is scanned by a developer looking up one parameter. A good document fits its reader, so judging "good" without naming the reader is meaningless.
- Check it is current. Compare the last-edited date to the last meaningful change in the system. Look for a named owner. Spot-check five concrete claims (a command, a config name, a diagram box) against reality.
- Run it. Follow the steps literally in a clean environment. Every place I have to guess or ask someone is a bug in the document.
- Test findability. Can I answer three realistic questions in under two minutes using only headings, the table of contents and search? Are there prerequisites up front and a clear "if this fails, do this"?
- Decide: keep, fix, or retire. Fix the top few defects, delete what is wrong or duplicated elsewhere, and add an owner and a review date. A stale document that looks authoritative is worse than none.
Worked example
I inherit a README for a nightly ingestion service. It has a 40-line "Overview" of the team's history but "Setup" says only "install dependencies and run main". Step 1: the reader is a new engineer who needs to run it locally. Step 2: the document names an environment variable that no longer exists in the code. Step 3: following it literally fails at the second command. Step 4: the failure-handling section is missing. Verdict: fix. I move setup to the top, correct the variable, add a "known failure: expired credentials, how to renew" entry, cut the history to two lines, and record myself as owner with a quarterly review.
Trade-offs and pitfalls
- Length is not quality: a short accurate page beats a long stale one.
- Do not judge only prose style. A beautifully written document with a wrong command fails its reader.
- Do not rewrite everything on inheritance. Fix what blocks the main task first, then improve iteratively.
Tell me about a technical proposal or RFC you wrote for reliability work. How did you structure it, what convinced reviewers, and what would you change now?
Sample Answer
Direct answer
The proposal (an RFC, "request for comments": a written design put out for peer review before building) that I would describe was an illustrative composite: it fixed repeated overload of a shared job queue. I structured it around evidence from real incidents, three options compared on cost and risk, a phased reversible rollout, and success measures agreed up front. It convinced reviewers because it showed the failure reproduced, offered the cheapest fix first, and could be switched off. Today I would establish the baseline earlier and involve the most affected team sooner.
Structured elaboration (situation, task, action)
Situation. Several teams sent jobs to one shared queue. Roughly every two months, one tenant's (one team or customer sharing the platform) failing jobs retried in a tight loop, filled the queue, and delayed everyone else's work. Each time the on-call engineer (the person responsible for responding to alerts out of hours) drained the queue by hand.
Task. I owned the reliability of that queue and had to move the team from firefighting to a fix that other teams would accept, since some of them had to change their retry code.
Action. I wrote the RFC with these sections:
- Problem and evidence: three postmortems (written incident reviews) laid on one timeline, showing the same trigger each time. This made it a pattern, not an anecdote.
- Goals and non-goals: goal, one tenant can no longer delay others. Non-goal, rewriting the queue technology.
- Options: (a) per-tenant rate limits (a cap on how many jobs one tenant may submit per minute), (b) retry backoff with jitter (random delay so retries do not all fire together) plus a dead-letter queue (a holding area for jobs that keep failing), (c) migrate to a different queue product. I recommended a plus b, and rejected c as costing months for a problem we could fix in weeks.
- Rollout: a flag, shadow mode first (log what would be limited without limiting), then one tenant, then all.
- Success measures, defined before rollout: count of overload pages per quarter, and the age of the oldest waiting job. Written with a baseline and a target, for example (illustrative numbers): "baseline: 3 overload pages in the last two quarters, taken from the pager history; target: 0 over the next two; oldest waiting job under 10 minutes." Without the baseline, nobody can say later whether it worked.
- Risks and reviewers' asks: what each dependent team had to change.
Worked example: what convinced reviewers, and the result
- We reproduced it. I replayed recorded incident traffic in staging and showed the queue saturating (filling to capacity so nothing new could get through), then showed it holding with the limits on.
- Cheapest reversible option first. Shadow mode meant nobody had to trust the design; they could see its decisions before it acted.
- I pre-reviewed with the noisiest team. Their objection (a hard limit could drop legitimate bursts) became a design change: a burst allowance (letting a tenant briefly exceed its cap for a short spike, then refilling slowly).
- Result (qualitative): the overload pages stopped recurring in the following quarters, and the on-call runbook (the step-by-step guide an engineer follows when an alert fires) lost its manual-drain step (emptying the queue by hand). I would not quote a precise percentage I cannot reconstruct.
Trade-offs, pitfalls and what I would change now
- Change 1: capture the baseline before writing, not during rollout, so the "before" number is not a reconstruction.
- Change 2: bring the affected team in at the outline stage, not the draft stage. Their burst objection cost a rewrite that an earlier conversation would have avoided.
- Change 3: the first draft ran to eight pages; reviewers replied to the parts they read. A two-page body with an appendix got better comments.
- Change 4: add a date to review the outcome (say, 90 days) so the proposal is judged against its own success measures.
- A pitfall in telling this story: naming virtues ("I collaborated") instead of the specific action. Interviewers remember the timeline overlay and the shadow mode, not the adjectives.
Unlock Full Question Bank
Get access to all Technical Writing and Documentation interview questions and detailed answers.
Sign in to ContinueJoin thousands of developers preparing for their dream job.