Skip to content

Instantly share code, notes, and snippets.

View nickgnd's full-sized avatar
👨‍💻
Hacking my way

Nicolò G. nickgnd

👨‍💻
Hacking my way
View GitHub Profile
@nickgnd
nickgnd / poodir-notes.md
Created March 12, 2016 13:51 — forked from speric/poodir-notes.md
Notes From "Practical Object-Oriented Design In Ruby" by Sandi Metz

Chapter 1 - Object Oriented Design

The purpose of design is to allow you to do design later, and it's primary goal is to reduce the cost of change.

SOLID Design:

  • Single Responsibility Principle: a class should have only a single responsibility
  • Open-Closed Principle: Software entities should be open for extension, but closed for modification (inherit instead of modifying existing classes).
  • Liskov Substitution: Objects in a program should be replaceable with instances of their subtypes without altering the correctness of that program.
  • Interface Segregation: Many client-specific interfaces are better than one general-purpose interface.