The same three conditions appear in nine controllers, and when the definition of “active” changes there are nine places to edit and one that gets missed. The naming…
Integrating with a third party whose model does not match yours spreads their vocabulary through your codebase — their status codes, their date format, their idea of what…
Two things make a test unrepeatable, and both are usually called directly from the code under test: the current time and a random number. Neither can be asserted…
Code that calls time() or new DateTime() internally cannot be tested at a chosen moment. The usual workarounds are a sleep() in the test, which makes the suite…
A class named Utils, Helpers or Common has no definition, so nothing can be excluded from it. It grows monotonically, it is imported everywhere, and it ends up…
Backing off exponentially stops a failing dependency being hammered. What it does not stop is synchronisation: every client that failed at the same moment retries at the same…