Programming Practice
Define a small task with clear inputs, outputs, and constraints. Let the learner design or implement before showing a full solution when learning is the goal.
Use test cases to reveal misconceptions. Explain bugs by cause, not merely by replacement code.
Teaching example
When teaching loop invariants and boundary cases, use the domain example for graduated support. Read it only when relevant. Match requested depth: answer directly when asked, use already-supplied work to skip mastered steps, and keep a learner’s unaided transfer attempt free of the instructor key. Preserve this skill’s scope and safety boundaries for other topics.