Skip to content

Latest commit

 

History

History
23 lines (19 loc) · 1.84 KB

coding_principles.md

File metadata and controls

23 lines (19 loc) · 1.84 KB

Coding Principles

"Everything should be made as simple as possible, but no simpler" (c) Albert Einstein

  • Think product-wide - Developing any feature think how it will be used now, who will use it, and how it may be transformed in the future.
  • Working concept first - Focus on the working concept of the feature first before starting journey to the ideal code structure.
  • Consistency - Keep variable names, structures, approaches, styles same across the whole project.
  • Least astonishment - Make your code, design, UI/UX follow commonly used approaches (a.k.a. principle of least surprise)
  • Keep It Simple (KISS) - The simpler your code is, the easier it is to construct and maintain.
  • You Aren’t Gonna Need It (YAGNI) - Do not add functionality until deemed necessary.
  • Don’t Repeat Yourself (DRY) - Remember, OverDRYing may break KISS principles. Sometimes, readability and clearness are better than complexity.
  • Validate your data - Any incoming data should be validated and/or filtered.
  • Always Test Your Code

References