Example 1 — Recognize the model
EasyProblem
A class sees this computing situation: students plan a small app, write pseudocode, test edge cases, document decisions, and revise the design after feedback. How should a student decide whether Unit Testing is the right model?
Solution
-
Identify the target of the reasoning.
The target might be a problem, data representation, code state, system component, user need, or stakeholder.
-
List the process or relationship that matters.
Unit Testing is useful when the problem asks for a software-design explanation with requirement, artifact, user need, test evidence, maintenance concern, and tradeoff stated.
-
Apply the recognition test: Am I reasoning about how a software solution is specified, communicated, tested, changed, or used by people?
This separates unit testing from programming syntax and algorithm only.
-
State the evidence that would prove the answer.
A trace, test, diagram, input-output pair, or impact argument prevents a vague answer.
Answer
Use Unit Testing only if the task is asking for a software-design explanation with requirement, artifact, user need, test evidence, maintenance concern, and tradeoff stated and the situation passes the recognition test. Otherwise, choose the nearby model that better matches the computing structure.
Takeaway: Model choice comes before definitions. The same words can belong to different CS ideas depending on the problem structure.