<story><title>AI found a bug in my code</title><url>https://joel.tools/codegen/</url></story><parent_chain><item><author>readthenotes1</author><text>Lesson: adding comments explaining what you think the code us doing today arent helpful.&lt;p&gt;Observation: many comments explaining what the code is doing don&amp;#x27;t match what the code is doing after a few check-ins.
E.G., I&amp;#x27;ve seen variations on&lt;p&gt;&lt;pre&gt;&lt;code&gt;  &amp;#x2F;&amp;#x2F;Add 1 to x
  x+=2;
&lt;/code&gt;&lt;/pre&gt;
too many times to count.</text></item></parent_chain><comment><author>sdenton4</author><text>Usually you can check the commit history for the unexpected line to figure out what&amp;#x27;s up, though, to let you figure out if the bug is in the code or the comment.&lt;p&gt;Comments that have the same content as the code but written in English will have code drift problems. But most comments aren&amp;#x27;t like this; they can provide context or explain what&amp;#x27;s happening at a higher level, ideally.</text></comment>
<story><title>AI found a bug in my code</title><url>https://joel.tools/codegen/</url></story><parent_chain><item><author>readthenotes1</author><text>Lesson: adding comments explaining what you think the code us doing today arent helpful.&lt;p&gt;Observation: many comments explaining what the code is doing don&amp;#x27;t match what the code is doing after a few check-ins.
E.G., I&amp;#x27;ve seen variations on&lt;p&gt;&lt;pre&gt;&lt;code&gt;  &amp;#x2F;&amp;#x2F;Add 1 to x
  x+=2;
&lt;/code&gt;&lt;/pre&gt;
too many times to count.</text></item></parent_chain><comment><author>marginalia_nu</author><text>In general, I feel comments should explain why the code is the way it is, not what it does.</text></comment>