Skip to content

Instantly share code, notes, and snippets.

@mshRoR
Last active May 8, 2019 05:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mshRoR/b21b964c853f40cb44ec6392c6d2f0a9 to your computer and use it in GitHub Desktop.
Save mshRoR/b21b964c853f40cb44ec6392c6d2f0a9 to your computer and use it in GitHub Desktop.
writing code quality behavior key notes.

Then the code you write should have the following qualities. Code should be

  • Transparent The consequences of change should be obvious in the code that is changing and in distant code that relies upon it
  • Reasonable The cost of any change should be proportional to the benefits the change achieves
  • Usable Existing code should be usable in new and unexpected contexts
  • Exemplary The code itself should encourage those who change it to perpetuate these qualities

Code that is Transparent, Reasonable, Usable, and Exemplary (TRUE) not only meets today’s needs but can also be changed to meet the needs of the future. The first step in creating code that is TRUE is to ensure that each class has a single, well-defined responsibility.

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