Design a short explanation that tests understanding beyond copied commands.
A learner can copy a command and obtain the expected output without understanding why it worked. Technical teaching should make the mechanism visible and then ask the learner to use it in a changed case. The goal is not to catch them out. It is to reveal which part of the model needs another explanation.
Start with a concrete prediction. Show a small input and ask what the system will do before running it. Then reveal the result and explain the causal steps. If the result differs from the prediction, connect the difference to a specific rule. Avoid replacing explanation with a slogan that sounds memorable but fails under another workload.
Use a minimal contrast. Deliver event E1 twice, then deliver E1 and E2 with the same amount. The first case tests repeated identity; the second tests distinct operations with equal values. A learner who deduplicates by amount will get the second case wrong. The contrast exposes the misconception more clearly than another paragraph defining idempotency.
Transfer requires a fresh context. After teaching duplicate events with a local total, ask about repeated email sends or inventory allocation. The mechanism may transfer, but the safe implementation boundary changes. The learner should identify what remains the same and what requires a stronger contract. This is where practical understanding becomes useful in an interview.
Worked example
A fictional five-minute teaching script begins: two events each contain amount 10. One pair shares ID E1; the other pair uses E1 and E2. Predict the total in each case. The answers are 10 and 20 under one effect per event identity. The explanation traces seen IDs rather than comparing amounts.
The transfer prompt asks whether the same in-memory set guarantees one email after a process restart. It does not. The set disappears, and an external send may have completed before local state was recorded. The learner now needs durable identity plus an external recovery contract, not merely a renamed variable.
Make the learner's model visible
A prediction prompt should produce an answer that can be wrong for an informative reason. Asking whether the example is useful mainly measures opinion. Asking whether two equal amounts with different IDs should both count exposes whether the learner understands the identity rule.
Use a short sequence:
Stage
Learner action
Author's evidence
Predict
Write a total and reason before execution
Current identity model
Trace
Mark when an ID enters seen
Mechanism followed step by step
Compare
Explain any difference from prediction
Misconception identified
Transfer
Solve a changed effect/identity case
Rule applied beyond copied syntax
Reflect
State remaining guarantee limits
Boundary understanding
This is an original teaching design, not a claim that one format guarantees learning. It gives the author more useful observations than completion counts alone. A learner can produce the right total by guessing, so the reason matters too.
Use minimal contrasts deliberately
CaseA has E1/10, E1/10. CaseB has E1/10, E2/10. Under one effect per event identity, totals are 10 and 20. Only identity changes between cases, so a different result points directly to that rule. Adding many changes at once makes the cause harder to see.
A second contrast changes payload under the same ID:E1/10, E1/99. The original set silently ignores the second value; the conflict-aware variant rejects it. Now the learner must identify which code contract they are analyzing. There is no single correct total independent of the supplied policy. This teaches the important habit of reading the actual guarantee before applying a slogan.
Do not equate idempotency with dropping any similar request. A user may intentionally buy the same item twice or create two notes with identical text. The operation identity must distinguish repeated delivery from a new intended action. Equal values alone do not reveal intent.
Teach the production boundary through a schedule
code
1External send schedule21. Worker sends email for operationK1.32. Provider accepts the email.43. Network response is lost.54. Worker restarts with an empty local seen set.65. Worker considers retryingK1.
The local set cannot tell whether step 2 happened after restart. Recording a database marker before send can avoid some repeated sends but can lose an email if the process crashes before sending. Recording after send can allow repeats after an uncertain outcome. A durable external operation/reconciliation contract is needed for the stronger promise. The exact answer depends on the provider; do not invent an exactly-once guarantee from local code.
The learner should explain which fact is missing and which observation or contract would resolve it. This is deeper than changing event to email in the original loop. It changes the effect boundary and introduces uncertainty the local exercise intentionally excluded.
Score reasoning, not only final output
A rubric can award separate points for selecting the logical identity, predicting the effect count, tracing the relevant state, and stating the implementation limit. Someone who gets 20 by adding every row but happens to see no duplicate should not receive full credit for understanding deduplication.
Record common errors in a small anonymized teaching log. If several learners deduplicate by amount, add the equal-value/distinct-ID contrast earlier. If they all understand the total but overclaim restart safety, improve the boundary schedule. Let the observed misconception guide revision instead of adding more slides indiscriminately.
A confidence question should ask for self-explanation: can you predict this unseen case and state what the local set cannot guarantee? Confidence alone is not a score. Pair it with the attempted reasoning so a confident misconception can be addressed constructively.
Misconceptions and a second exercise
One misconception is that copied output proves conceptual understanding. It proves procedural completion under one path. Another is that transfer means merely renaming variables. Meaningful transfer changes a constraint, such as a process restart, an external effect, or the difference between delivery ID and business purchase ID.
Exercise: two provider events E7 and E8 describe the same purchase P3, while purchase P4 has the same amount. The business rule allows one entitlement per purchase. Which identity protects the entitlement?P3/P4, not event IDs or amount. Create one entitlement for P3 and one for P4, while retaining both event records for audit. Award one point for purchase identity, one for two entitlements, one for preserving event evidence, and one for explaining why event-level deduplication is insufficient.
The lesson succeeds when a learner can state the invariant, choose identity for that invariant, and explain the boundary where another contract is needed. That is a practical interview skill as well as a useful teaching outcome.
Exercise and solution
Design a checkpoint for a new domain: two orders have equal totals but different order IDs, while one order notification is delivered twice. The model answer processes each distinct order once and ignores only the repeated delivery for the same logical effect. Award one point for preserving both orders, one for identifying the duplicate, and one for explaining why amount is not identity.
Interview probe and wrap-up
How would you know a workshop succeeded? A strong answer uses a transfer task, observes where learners get stuck, and separates completion from understanding. Follow up with a high attendance count but poor exercise results. A weak answer measures only applause or copied output. A technical explanation earns its place when the learner can predict a new case and defend the result without relying on the original script.
Which contrast directly tests identity versus equal values?
AThe same fixture repeated without explanation.BTwo examples with different language and different data.CSame amounts with either repeated or distinct IDs.DTwo unrelated deployment diagrams.
E7 and E8 describe purchase P3; P4 has the same amount. One entitlement per purchase requires?
AOnly the first event in the whole batch.BOne entitlement per event ID.COne entitlement per amount.DOne entitlement per purchase identity, retaining events separately for audit.
An email request may have been accepted before its response was lost. The worker restarts with an empty local set. Which next teaching step exposes the missing guarantee?
AAdd a local marker before another send and claim that this resolves the earlier request.BTrace the uncertain provider effect and ask what durable operation identity and provider lookup or recovery contract can resolve it.CAdd the marker after another send and claim that durable storage alone closes the external-effect crash window.DGenerate a fresh operation ID and treat it as recovery of the original effect without checking the provider contract.
A learner predicts the right number with the wrong identity rule. How should the rubric respond?
ACredit the correct result separately, but require the causal explanation for full understanding.BGive full credit because only output matters.CGive no feedback because the answer was numeric.DReplace the task with an attendance count.
Which transfer changes the mechanism boundary meaningfully?
AIncrease the number of identical deliveries without changing process or effect boundaries.BRepeat the exact worked fixture with the answer visible.CRename event to message while preserving all behavior.DAdd a process restart and an uncertain external effect, then ask what guarantee is missing.
Can you design a prediction and transfer task that reveals identity reasoning and implementation limits rather than only copied output? State the relevant identifiers, failure boundary, and evidence in your own words before selecting your confidence.