, test, debug, update, and comment.</p>

<ul>
  <li><strong>Decompose to helper function:</strong>  Extract common code and move to helper function.</li>
</ul>

<div class="language-c++ bad col-sm-6 highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c1">// repeated code</span>
<span class="k">if</span> <span class="p">(</span><span class="n">g</span><span class="p">.</span><span class="n">inBounds</span><span class="p">(</span><span class="n">left</span><span class="p">)</sp