The cost of abstraction
On This Lesson 4 topics
This lesson is planned. The outline below lists the topics it will cover. The full lesson has not been published yet.
In this lesson
judge when an abstraction pays for itself.
Planned topics
- Abstractions hide detail and cost indirection, leaky behavior, and debugging time.
- Abstract after the second or third real use, not for imagined futures.
- "We might switch databases" is a weak reason; ask what the switch would cost without it.
- Good abstractions sit at stable boundaries.
Draft outline details
Demonstration
a repository interface wrapping JPA "to allow swapping databases" versus a module boundary that enforces ownership; compare benefit and cost.
Check your understanding
When is an abstraction justified?
Show answer
When real, repeated variation or a stable boundary makes its cost worthwhile.
Practice
Apply this lesson with the module's lab, exercises and quiz.
Marking a lesson complete is optional and you can undo it any time. Your progress stays in this browser.