Engineering Principles

  • Measure twice and cut once
  • Don’t Repeat Yourself (DRY): refactor and reuse.
  • Keep It Simple Stupid (KISS): minimize complexity
  • You Aren’t Gonna Need It (YAGNI): Focus on the problem at hand and avoid adding unnecessary complexity by adding functionality only when needed.
  • Avoid Premature Optimization: write code fast, then write fast code.
  • Principle Of Least Astonishment: make the software consistent and predictable. A solution or approach should not surprise a reasonably knowledgeable person, even in their first encounter.
  • Law of Demeter (LOD or The Principle of Least Knowledge): each software structure(class, function, modules, etc.) should operate without assuming anything about anything unless they are directly connected.
    • Decoupling: try to reduce the number of connections between different classes.
    • Cohesion: the associated classes must be in one module/package/directory.
  • Use Objected Oriented Programming(OOP) f concepts with any level of complexity exist.
  • Composition Over Inheritance (COI): Favoring object composition over class inheritance, as it's more flexible and helps to avoid problems associated with larger inheritance hierarchies.
  • Use diagrams(UML is software engineering) to visualize classes, abstract classes, interfaces, and stakeholder agents and their relationship.
  • Use existing Design Pattern for problems that occur with regularity.
  • Newly written code is always dirty. always refactor it.
  • To develop a great product imagine user experience, and list technologies required to develop that product.
  • Don't learn to create product. Start development and learn while doing.