Programming principles cheat-shit


In computer programmingcohesion refers to the degree to which the elements inside a module belong together.

Modules with high cohesion tend to be preferable because high cohesion is associated with several desirable traits of software including robustness, reliability, reusability, and understandability. In contrast, low cohesion is associated with undesirable traits such as being difficult to maintain, test, reuse, or even understand.

  • Don’t repeat yourself
  • keep it simple stupid
  • single responsibility pattern
  • separation of concerns
  • interface segregation principle
  • dependency injection principle
  • Liskov substitution principle
  • open close principle
  • law of Demeter
  • principle of least astonishment
  • you ain’t gonna need it
  • use a version control system
  • issue tracking
  • continuous integration
  • automated tests
  • mocking
  • code coverage
  • test first
  • reviews
  • and some more