Transformation Priority Premise


Transformation Priority Premise is a programming approach developed by Robert C. Martin as a refinement to make the process of test-driven development easier and more effective for a computer programmer.
Transformation Priority Premise states that simpler transformations should be preferred:
This approach facilitates the programmer doing the simplest possible thing for the purposes of test-driven development as they can explicitly refer to the list of transformations and favor the simpler transformations over those further down in the list in the first instance.

The Transformations

  1. no code at all → code that employs nil
  2. a simple constant to a more complex constant
  3. replacing a constant with a variable or an argument
  4. adding more unconditional statements.
  5. splitting the execution path
  6. replacing an expression with a function or algorithm
  7. replacing the value of a variable.
  8. adding a case to an existing switch or if
Uncle Bob also explicitly stated: "There are likely others".