CLEAN design

  • An object should have

    • Well defined characteristics

    • focused responsibilities

    • hidden implementation

    • In charge of it's state

    • Defined only once

  • CLEAN stands for

    • Cohesive

    • Loosely Coupled

    • Encapsulated

    • Assertive

    • Non redundent

  • Code quality is about keeping the relationship between objects intentional and clear

  • Best code is written thinking about the programmers that come after.

    • We aren’t supposed to create things that stand the test of time, just the test of profit

      • Doing something that lasts forever at the first go is so expensive that it isn’t worth it, but focusing only on short-term profit will create code that collapses under its own weight.

    • Need a middle ground

    • to take the existing codebase and slowly reshape it to make it manageable again

Last updated

Was this helpful?