Transformation Priority Premise

Transformation Priority Premise (TPP) is a programming approach developed by Robert C. Martin (Uncle Bob) as a refinement to make the process of test-driven development (TDD) easier and more effective for a computer programmer.

Transformations have a priority, or a preferred ordering, which if maintained, by the ordering of the tests, will prevent impasses, or long outages in the red/green/refactor cycle.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 (from the top of the list) over those further down in the list in the first instance.

The Transformation Priority Premise is a name given to the mental structure TDD’ers build up over time as to balance your code from being too specific, rather than generic.

The idea is that with each example you add to the tests you move up the Transformation Priority list, making your code more generic, so able to handle more of the cases.

In Java, for example, we might move (if→while) and (variable→assignment) above (statement→tail-recursion) so that iteration is always preferred above recursion, and assignment is preferred above parameter passing ... because Java is not a functional language.Ridlehoover clarifies that the Transformations help you pick which tests to write and in what order.