Design Patterns & Anti-Patterns

Design patterns are efficient and elegant solutions to common problems. They provide a prescriptive solution to typical problems.

They can improve the efficiency of teams and the consistency of the code.

Anti-patterns are the antithesis of design patterns. They inefficient and ineffective patterns often used by new developers and more senior developers.

Some examples:

Software design:

  • Input kludge: not handling sketchy input
  • Interface bloat: making the interface too powerful causing it to be difficult to use
  • Race hazard: not seeing how different orders of events will be handled

OO:

  • Circular dependency: uneccassary dependencies between objects
  • God objects: object that has too responsibility

Programming:

  • Hard coding: assumptions hard coded into the system
  • Magic numbers
  • Magic strings

Methodical:

  • Copy and paste
  • Reinventing the wheel

results matching ""

    No results matching ""