Skip to content
Ameen Abozaid
In reviewJNR-004-L06

SOLID with judgment

  • Lesson 6 of 7
  • 11 min read
  • Junior
On This Lesson 4 topics

The content for this lesson is written and waiting for review. The outline below shows what it covers. It will be published once it is approved.

In this lesson

know when a principle adds needless complexity.

Planned topics

  • Do not make an interface for every class; one implementation and no need to swap means no interface.
  • Do not split a class so much that you cannot follow the flow.
  • Apply a principle when you feel the pain: a hard-to-change or hard-to-test spot.
  • Prefer the simplest design that is easy to change.
  • Discuss trade-offs in code review, not rules.
Draft outline details

Demonstration

two designs for a simple tax calculation: one with six interfaces, one with a small function.

Check your understanding

When is an interface not needed?

Show answer

One implementation, no tests or swapping that need it.

Practice

Apply this lesson with the module's lab, exercises and quiz.

Lab and exercises Quiz

Marking a lesson complete is optional and you can undo it any time. Your progress stays in this browser.

Continue to next lesson

Type to search levels, phases, modules and lessons.