Skip to content

Instantly share code, notes, and snippets.

@koorgoo
Last active August 4, 2017 10:19
Show Gist options
  • Save koorgoo/83425ab0a97703a465a0 to your computer and use it in GitHub Desktop.
Save koorgoo/83425ab0a97703a465a0 to your computer and use it in GitHub Desktop.
Software Development Principles

Don't worry about design, if you listen to your code a good design will appear.

Martin Folwer, Is Design Dead?

Do the simplest thing that could possibly work.

SOLID

  1. single responsibility principle

    • a class should have only one reason to change
  2. open/closed principle

    • software entities (classes, modules, functions, etc.)
    • should be open for extensions but closed for modification
  3. liskow substition principle

    • subtypes must be substitutable for their base types
  4. dependency-inversion principle

    • high-level modules should not depend on low-level modules, both should depend on abstraction
    • abstractions should not depend upon details, details should depend upon abstractions
  5. interface-segregation principle

KISS

keep it simple, stupid

DRY

don't repeat yourself

YAGNI

you ain't gonna need it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment