intermediate
Explaining principle trade-offs
Connect a principle to the change it protects against, the cost it introduces, and the signals that would change the decision.
Strong answers connect a principle to the change it prevents, the cost it adds, and signals that would reverse the decision. Example: DIP adds mapping layers but enables swapping Postgres for a fake in tests; you'd skip it for a throwaway script.
Interviewers want judgment, not slogans—name context, team size, and lifecycle.
On interviews: answer "Why SRP here?" with one reason to change protected and one cost of splitting.
Common pitfalls: citing acronyms without scenario, treating principles as absolutes, and ignoring delivery deadlines.
The trade-off is articulate design reasoning versus checkbox name-dropping.
Checklist:
- State protected change and added cost.
- Give a concrete codebase example.
- Name what would change your mind.