Skip to content

Latest commit

 

History

History
42 lines (29 loc) · 1.01 KB

09-best-practices-and-design-patterns.md

File metadata and controls

42 lines (29 loc) · 1.01 KB

General Best Practices & Design Patterns

Universal Best Practices

  • DRY - Don't Repeat Yourself
  • KISS - Keep It Simple (Stupid)
  • YAGNI - You Aren't 'Gonna Need It

Principles

SOLID & STUPID code

SOLID Code

Is a set of principles that aims to let developers make more maintainable source code

  • Single Responsibility Principle
  • Open/Closed Principle
  • Liskov Substitution Principle
  • Interface Segregation Principle
  • Dependency Inversion Principle

STUPID Code

A list of things that are normally considered bad practices

  • Singleton
  • Tight Coupling
  • Untestability
  • Premature Optimization
  • Indescriptive Naming
  • Duplication

Design Patterns

Reusable solutions to commonly occurring problems in software engineering given a context. You may consider design patterns as somewhat like templates.

There are three types of design patterns, these are:

  • Structural
  • Creational
  • Behavioral

Follow along the instructor as he discuss these in detail and demonstrate some of the relevant design patterns.