<story><title>Reflections on 10k Hours of Programming</title><url>https://matt-rickard.com/reflections-on-10-000-hours-of-programming/</url></story><parent_chain><item><author>carlisle_</author><text>&amp;gt;Know when to break the rules. For rules like &amp;quot;don&amp;#x27;t repeat yourself,&amp;quot; sometimes a little repetition is better than a bit of dependency.&lt;p&gt;Glad to see DRY called out here. I&amp;#x27;ve seen so much crazy code simply to avoid breaking, The Rule.</text></item></parent_chain><comment><author>Jtsummers</author><text>What&amp;#x27;s frustrating is that DRY is often paired with something like &amp;quot;The Rule of Three&amp;quot;. &lt;i&gt;Do&lt;/i&gt; repeat yourself about three times until you actually understand what it is that&amp;#x27;s being repeated (or whether it&amp;#x27;s just coincidental) so it can be refactored. But a lot of people forget that part and focus only on DRY.&lt;p&gt;Is the magic number 1024 the same in all instances, for example. Or is it merely a coincidence that it&amp;#x27;s the same in a few places. Is the apparently repetitious code:&lt;p&gt;&lt;pre&gt;&lt;code&gt;  context = create_context();
  context.action(params);
&lt;/code&gt;&lt;/pre&gt;
In several places &lt;i&gt;really&lt;/i&gt; the same? Or is it a coincidence that &lt;i&gt;right now&lt;/i&gt; none of them pass any parameters to &lt;i&gt;create_context&lt;/i&gt; and use the same params in their call to &lt;i&gt;action&lt;/i&gt;?&lt;p&gt;Avoiding the repetition makes it hard to even ask that question. And disentangling the different cases later is riskier than keeping a few pieces of repeated code around for a while to understand the situation better.</text></comment>
<story><title>Reflections on 10k Hours of Programming</title><url>https://matt-rickard.com/reflections-on-10-000-hours-of-programming/</url></story><parent_chain><item><author>carlisle_</author><text>&amp;gt;Know when to break the rules. For rules like &amp;quot;don&amp;#x27;t repeat yourself,&amp;quot; sometimes a little repetition is better than a bit of dependency.&lt;p&gt;Glad to see DRY called out here. I&amp;#x27;ve seen so much crazy code simply to avoid breaking, The Rule.</text></item></parent_chain><comment><author>ctvo</author><text>Trade-offs are the heart of this profession. Developers who stick blindly to DRY, SOLID, any dogma really, come off as inexperienced.</text></comment>