Fragile and Resilient Code

Break

The

Ownership

Break

The

Code

The journey of a thousand miles starts with one step

  • Just add an extra parameter
  • Just add a boolean parameter
  • Managers and other 30+ function classes
  • Break some windows
  • var data;
  • A big inheritance
  • Evals and hidden evals
  • Globals or global-like states.
  • Drop the information hiding
  • Couple everywhere
  • Repeat the same solutions everywhere

How to get development velocity back

Escape plan

  • Build walls - Contracts
  • Flat Dependency Injection
  • Build walls - Packages
  • Semver everywhere
  • Build walls - Tests
  • Cyclomatic scan
  • Global state container
  • "Cut and paste" not always harmful
  • Clean up tiny bits as you go
  • Reduce dependencies

Fragile and Resilient code

By Brian Graham

Fragile and Resilient code

How to take perfectly good code and make it awful, then, how to get out.

  • 880