Evan Harmon - Memex

Programming patterns, design patterns, principles, best practices, & code quality

Overview

Gist

Only use a variable when you need to refer to it later

e.g., Not x = 100, print(x). Just print(100)

Bob Martin

SOLID

Open-closed Principle

Dependency inversion principle (DIP)

Single Responsibility Principle

  • omnioutliner:///open?row=hlX2nT4AVSQ

Liskov substitution principle

Interface segregation principle

The Mythical Man-Month

Brooks' Law

The Cathedral and the Bazaar

Tools

Inbox

  • you can check whether one number is divisible by another—if x % y is zero, then x is divisible by y. This can be used, in particular, to determine whether an integer is even or odd. If x % 2 is zero, then x is even. If x % 2 is 1, then x is odd.
  • You can also use % to extract the right-most digit or digits from a number. For example, x % 10 yields the right-most digit of x (in base 10). Similarly x % 100 yields the last two digits.
  • Dogfooding
  • Peter Principle
  • Goodhart's Law
Programming patterns, design patterns, principles, best practices, & code quality
Interactive graph
On this page
Programming patterns, design patterns, principles, best practices, & code quality
Overview
Gist
Design Pattern
Anti-pattern
Architectural Patterns
Best Practice
The Zen of Python
DRY (Don’t Repeat Yourself)
KISS Principle
Magic Number
Magic String
Only use a variable when you need to refer to it later
e.g., Not x = 100, print(x). Just print(100)
Iterative and incremental development
Bob Martin
SOLID
Open-closed Principle
Dependency inversion principle (DIP)
Single Responsibility Principle
Liskov substitution principle
https://en.wikipedia.org/wiki/SOLID
Interface segregation principle
GRASP (Object-oriented Design)
Loose Coupling
Cohesion
Separation of Concerns
Separation of Content and Presentation
Modular Programming
Conway's Law
The Three Virtues of a GREAT Programmer
Component-based Software Engineering
Information Hiding
Reusability
Package Principles
Minimalism (computing)
Software Bloat
Technical Debt
Worse is Better
Unix Philosophy
The Zen of Python
The Mythical Man-Month
https://en.wikipedia.org/wiki/The_Mythical_Man-Month
Brooks' Law
Composability
Pareto Principle
Principle of Least Privilege
There's more than one way to do it (TMTOWTDI or TIMTOWTDI, pronounced Tim Toady)
The Cathedral and the Bazaar
https://en.wikipedia.org/wiki/The_Cathedral_and_the_Bazaar
Twelve-Factor App methodology
LeBlanc's Law
Lehman's Laws of Software Evolution
You Aren't Gonna Need It (YAGNI)
Testing Best Practices
Tools
Inbox