Notes on software that explains itself

Review the language around code.

Choose a small section you understand well. Look at what its names, comments, and examples ask another reader to infer.

Collect the concepts.

Collect the concepts.

Write down the real concepts in the section before editing their labels. Separate things that have different roles.

Check which names are vague, overloaded, or too similar. Change a name only when it makes the relationship clearer in context.

Find the hidden reason.

Find the hidden reason.

Read each comment and ask what information it adds. Keep explanations of constraints and deliberate choices.

If a comment repeats an obvious operation, consider whether the code or name can carry that meaning directly.

Inspect the examples.

Inspect the examples.

Identify the purpose of each example. Give typical cases and boundary cases visibly different roles.

Remove arbitrary complexity. The smallest example that reveals the distinction usually gives the reader the clearest starting point.

Read the whole explanation.

Read the whole explanation.

Move from the surrounding description into the code and back out. Check whether a concept changes names without explanation.

Ask someone to paraphrase the behaviour if a collaborator is available. Their wording can reveal a missing distinction you no longer notice.

Return to the journal