Style Guide Examples

Programming Paradigms:

  • Object Oriented Programming
  • Functional Programming

Principles:

  • Prefer Readability & Refactor Invariance
    • Max line length
    • Meaningful naming
    • Argument Alignment
    • Significant Comments
      • Types & Tests First
    • Simple is better
    • Soft Rule: one class per file.
    • Prefer explicit named arguments
  • Replicable, reusable, and easy to reason about codebase
    • Parametrization:
      • Configuration files
      • Environment Variables
      • NEVER store credentials
    • Provide alternatives
      • Alternative constructor
      • Default parameters
    • Work with abstractions
      • DRY: don't repeat yourself
      • Separation of concerns
      • Define entities