NICOLÁS BOTTARINI
Back to the path

The path

Design Principles

368 pages of reading · 16 h 53 min of video

A good design is one that is easy to change. These principles are the tools to get there: clean code, objects that collaborate by sending messages, low coupling and high cohesion. You don't learn them by reading, you learn them by applying them in every kata and every refactor.

Topics

Stage 1 · TDD and objects
  • Clean Code

    Clean Code, Bad Code, Rot, Big Ball of Mud, Naming, Boy Scout Rule, Broken Window Theory, Functions, Parameters, Comments, Formatting

  • Encapsulation

  • Information Hiding

Stage 2 · Design principles
  • Tell, Don't Ask

    Tell, Don't Ask

  • Law of Demeter

    Principle of Least Knowledge

  • 4 Rules of Simple Design

  • Command Query Separation

  • Uniform Access Principle

  • YAGNI

  • DRY

    Don't Repeat Yourself, Incidental Duplication

  • Balanced Abstraction Principle

  • Law of Leaky Abstractions

  • Principle of Least Astonishment

    Principle of Least Surprise

  • SOLID

    Single Responsibility Principle, Open-Closed Principle, Liskov Substitution Principle, Interface Segregation Principle, Dependency Inversion Principle, God Objects

  • Coupling

    Levels of Coupling

  • Cohesion

    Levels of Cohesion

  • Software Design Odors

    Rigidity, Fragility, Immobility, Viscosity, Needless Complexity, Needless Repetition, Opacity

  • Design by Contract

  • ETC

    Easier to Change Principle

  • Connascence

    of Name and Type, of Position, of Value, of Meaning, of Algorithm, of Execution Order, of Timing, of Identity, of Manual Task

  • Composition over Inheritance

Resources

Katas to practice

Bowling

Bowling

Calculate bowling score

NoviceShort
View kata
Game of Life

Game of Life

Code Conway's famous cellular automaton using TDD

Advanced beginnerMedium
View kata
Gilded Rose

Gilded Rose

A famous kata to start your refactoring journey

Advanced beginnerMedium
View kata
Mars Rover

Mars Rover

Move rovers around a plateau on Mars

Advanced beginnerLong
View kata