We coders have all kinds of definitions of simple code. To some, simple code is code they understand and read easily. Others believe simple code follows the coolest, most appropriate design pattern. Some say simple code has the fewest characters.
Extreme Programming tries to settle that debate by offering four qualities of simple code: testability, browsability, understandability, and explainability.
To make these qualities easier to remember I coin the mnemonic TUBE.
Testable
Can automated tests be written for each piece of functionality and permutation of behavior? Are there positive and negative use-cases?
Understandable
When you read a function, does it do what you expected given it's method signature? How long does it take to figure out what the code does?
Browsable
Can the code be browsed in an IDE? How quickly does someone who didn't write the code find what they're looking for?
Explainable
I'm pretty sure this is here twice because it's so important. Can a different developer tell you what the code does? Does their explanation match yours?
If your code meets these criteria, congratulations! Your code fits in the TUBE, and when the TUBE fits, make commits!