AlgoViz

Defend a decision with evidence

hard 12 min

Defend a design by naming the constraint, the rejected alternative, the evidence and a reversal condition.

Theory

Read or listen first. About 1 min.

What it is

The interviewer asks why an inventory service has a repository interface. Saying it follows a principle leaves the interviewer unable to tell which requirement the design serves.

Why it exists

Hold the requirement fixed while comparing designs. A mockable CRUD interface can still oversell. A concrete atomic storage operation may solve the hard problem with less indirection. Show the contested last unit, name the measured outcome and state the limits of a single-process simulation.

Evidence for a design defense

ClaimEvidenceLimit
Only one buyer winsTwo overlapping claims, one held outcomeOne modeled store
Replay is harmlessSame hold ID twice, one debitID must be retained
Interface pays for itselfIndependent adapter contract exercised twiceNo benefit demonstrated by its name alone

Understand it

Work through the decision

Choose a concrete store when there is one owner and one implementation. Explain which tests can still exercise the real boundary.

Choose a narrow port when the use case needs a stable operation across genuinely different adapters. Demonstrate the same contract on each.

Give the agent a check

  • Predict the result without assistance, show a test that distinguishes the alternatives, and invite the interviewer to change a constraint.

The shortcut

  • Ask the assistant to write a polished speech about clean architecture.

What a reviewer can hear

SignalExample
WeakAsk the assistant to write a polished speech about clean architecture.
CompetentTie it to the joint stock-and-hold write. An interface name is not evidence of atomicity.
StrongIdentify the specific suggestion you accepted or rejected, the check you ran and the engineering reason for the outcome.

Summary

The whole topic in one minute.

Because of this constraint, I chose this boundary. Here is the evidence that could change my mind.

Sources