Predictable Side Effects
← Back to Principle of Least Astonishment
Functions and methods should have side effects that are obvious from their name and signature. Hidden side effects — like modifying global state, sending emails, or writing to disk — surprise callers and introduce subtle bugs.