There is no such thing as perfect programming, but we shouldn’t be discouraged because programming is a constant pursuit of perfection.

  1. The Single responsibility principle is that each class has one responsibility
  2. The Open Closed principle: Open extensions, close modifications
  3. Interface oriented programming by Dependence invertion principle
  4. The Interface Segregation principle uses minimal interfaces
  5. Subclasses have all the functionality of their superclass, and subclasses can replace their superclass
  6. The Law of Demeter classes should have as few relationships as possible, communicating only with friends (member variables, parameters, return values) and not with strangers