Upgrade to Pro — share decks privately, control downloads, hide ads and more …

The Ministry of Truth Rules for Good Software D...

The Ministry of Truth Rules for Good Software Design

A reworking of a lightning talk presentation first made by Allen Short at PyCon 2012

nefarioustim

February 05, 2013
Tweet

More Decks by nefarioustim

Other Decks in Programming

Transcript

  1. THE MORE FREEDOM YOU HAVE TO ACT The more you

    constrain your code’s behaviour,
  2. To write better objects… •  Leave your object in a

    consistent state regardless of what your clients do. •  Prevent clients from accessing things they aren't supposed to touch. •  Only give your objects access to the resources they need to get the job done.
  3. To write better programs… •  Leave your program in a

    consistent state regardless of what your clients do. •  Prevent clients from accessing things they aren't supposed to touch. •  Only give your programs access to the resources they need to get the job done.