Design Principles

0%
Coding
Theory
Quiz

    Single Responsibility & Cohesion

    • Split God Class With SRP

      Junior
    • Split Employee With Extract Class

      Mid
    • Split the OrderService God Class

      Mid
    • Extract a Repository Seam

      Mid
    • Separate Report Data From Formatting

      Mid
    • Extract Class From God Class

      Senior

    Open Closed & Polymorphism

    • Replace Type Switch With Shape Polymorphism

      Junior
    • Refactor Discounts to Strategy Pattern

      Junior
    • Refactor PaymentProcessor to Strategy

      Mid
    • Replace Type Switch With Polymorphism

      Mid
    • Replace Shipping-Cost Conditionals With Strategies

      Mid
    • Extract Exporter Strategy Per Format

      Mid
    • Refactor NotificationService to Strategy

      Mid
    • Composable Validation Rules

      Mid

    Liskov Substitution

    • Extract a Flyable Abstraction

      Junior
    • Fix the Square/Rectangle LSP Violation

      Junior
    • Honor the Base withdraw() Contract

      Mid
    • Split the Read and Mutation Contracts

      Senior

    Interface Segregation

    • Segregate the Fat Worker Interface

      Junior
    • Segregate the Multifunction Device Interface

      Mid
    • Depend on a Narrow Role Interface

      Senior
    • Split Repository Into Read and Write

      Senior

    Dependency Inversion & Injection

    • Inject EmailSender via Constructor

      Junior
    • Inject OrderService Dependencies via Constructor

      Junior
    • Inject a Logger Abstraction

      Junior
    • Inject a PaymentGateway Seam

      Mid
    • Invert ReportService Infra Dependencies

      Mid
    • Decouple ProductService From the Database

      Mid
    • Inject a Clock Seam

      Mid
    • Inject a Random Source Seam

      Mid
    • Inject the HTTP Transport as a Parameter

      Mid
    • Replace Payment Switch With Polymorphism

      Senior

    Dry & Duplication

    • Extract Duplicated Calculation Into a Helper

      Junior
    • Extract Magic Numbers Into Constants

      Junior
    • Parameterize Two Near-Identical Functions

      Mid
    • Consolidate Duplicate Statements Across Branches

      Mid
    • Extract Shared Input Validation

      Mid

    Kiss & Yagni

    • Extract Steps From a Long Method

      Junior
    • Split the Flag Argument Into Two Functions

      Mid
    • Introduce a Parameter Object

      Mid

    Encapsulation & Law Of Demeter

    • Encapsulate a Public Mutable Field

      Junior
    • Encapsulate the Exposed Collection

      Mid
    • Hide Delegate to Fix Demeter Violation

      Mid
    • Fix Feature Envy With Move Method

      Mid
    • Guard an Invariant Behind Behavior

      Mid
    • Extract a Money Value Object

      Mid
    • Tell, Don't Ask: wallet.pay(amount)

      Senior
    • Relocate Alerting With Tell-Don't-Ask

      Senior

    Composition Over Inheritance

    • Replace Notifier Inheritance With Delegation

      Mid
    • Replace Subclass Tree With Strategies

      Mid
    • Eliminate a Refused Bequest

      Mid
    • Replace Subclass Explosion With Strategy Injection

      Senior

    Immutability & Pure Functions

    • Refactor Mutating Sorter to Pure Function

      Junior
    • Separate Computation From Printing

      Junior
    • Split Pure Core From Side Effects

      Mid
    • Make Discount Greeting Pure

      Mid

    Refactoring Katas

    • Refactor TennisGame1 Scoring

      Mid
    • Refactor the Theatrical Players statement()

      Mid
    • Polymorphic Parrot Speed and Cry

      Mid
    • Refactor Gilded Rose and Add Conjured Items

      Senior
    • Break Seams in TripService.getTripsByUser()

      Senior
    • Refactor the Ugly Trivia Game

      Senior
    • Refactor Supermarket Receipt Offer Engine

      Senior