<h3>Switch statements: hide them</h3> <p>Use polymorphism or a factory. A <code>switch</code> with multiple cases usually violates the Single Responsibility Principle.</p>
<p>Legal comments, TODO notes, and warnings are acceptable but keep them brief. Avoid commented-out code—delete it. Your VCS history will remember.</p> codigo limpo epub
<h2>7. Boundaries: Keep Third-Party Code at Arm’s Length</h2> <p>Wrap external APIs (libraries, frameworks) to isolate changes. Do not let a specific JSON library leak into your core domain.</p> Switch statements: hide them<
<div class="tip"> One assertion per test is a good guideline. If you have many, consider splitting. </div> Wrap external APIs (libraries