Command Query Separation (CQS)

CQS is a principle by Bertrand Meyer — the idea is simple but powerful. A method should either do something or return something — not both. Every method you write should do one of two things only — either change something, or return something.