DEV Community

juan pablo abadia medina
juan pablo abadia medina

Posted on

Write the learning question beside your sample input

"Before adding another sample to a tutorial, try writing what you want the reader to reason about.

Here is a fictional documentation exercise. It does not require a library or a working application.

Define the rule for the exercise

Assume a sample workflow requires a preferred date before a request can be submitted. Make that requirement visible to the reader.

Sample A
request_type: access
description: cannot open the demo account
preferred_date: a fictional date supplied in the exercise

Sample B
request_type: access
description: cannot open the demo account
preferred_date: missing
Enter fullscreen mode Exit fullscreen mode

Learning question: what information must be clarified before submitting Sample B?

Ask before completing the answer

Ask the reader to state their first action, the rule they used and the question they would record. Do not silently treat an invented date as supplied information.

If the reader cannot find the requirement, inspect your explanation before concluding that they misunderstood it.

Preserve the observation

Use a short note:

Changed condition:
Reader's proposed action:
Reason given:
Question raised:
Hint or explanation provided:
Next practice proposed:
Enter fullscreen mode Exit fullscreen mode

If you provide help, retain that context. A response after a hint describes a different moment from the initial attempt.

Separate this from software validation

This is a manual learning exercise. It does not test an implementation, enforce validation or demonstrate production readiness.

After discussing the example, decide what behavior the actual application requires and how to check that behavior in its own context.

What question would you place beside your next sample input?

Juan Pablo Abadía Medina"

Top comments (0)