<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Debugging on Pavan Yara</title><link>https://pavanyara.com/tags/debugging/</link><description>Recent content in Debugging on Pavan Yara</description><generator>Hugo -- gohugo.io</generator><language>en-US</language><managingEditor>pavan.yara@gmail.com (Pavan Yara)</managingEditor><webMaster>pavan.yara@gmail.com (Pavan Yara)</webMaster><copyright>Pavan Yara</copyright><lastBuildDate>Wed, 21 Sep 2022 14:11:24 +0530</lastBuildDate><atom:link href="https://pavanyara.com/tags/debugging/index.xml" rel="self" type="application/rss+xml"/><item><title>Rules of Debugging</title><link>https://pavanyara.com/blog/rules-of-debugging/</link><pubDate>Wed, 21 Sep 2022 14:11:24 +0530</pubDate><author>pavan.yara@gmail.com (Pavan Yara)</author><guid>https://pavanyara.com/blog/rules-of-debugging/</guid><description>&lt;p&gt;Here is a list of David J.Agan&amp;rsquo;s timeless and universal rules of debugging. As the author notes in the book - &lt;strong&gt;Memorize them. Tape them to your wall. Tape them to all of your walls.&lt;/strong&gt;&lt;/p&gt;&#10;&lt;ol&gt;&#10;&lt;li&gt;&lt;strong&gt;Understand the System&lt;/strong&gt;: Read the manual. Read everything in Depth. Know the Fundamentals. Know the road map. Understand your tools. Look up the details&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Make it Fail&lt;/strong&gt;: Do it Again. Start at the Beginning. Stimulate the Failure. Don&amp;rsquo;t Simulate the Failure. Find the uncontrolled condition that makes it intermittent. Record everything and find the signature of intermittent bugs. Don&amp;rsquo;t trust Statistics too much. Know that &amp;ldquo;that&amp;rdquo; can happen. Never throw away a Debugging tool.&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Quit Thinking and Look&lt;/strong&gt;: Get Data First. Don&amp;rsquo;t just do Complicated repairs based on guess game. See the Failure. See the Details. Build Instrumentation in. Add Instrumentation on. Don&amp;rsquo;t be afraid to Dive-in. Watch out for Heisenberg. Guess only to focus the Search.&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Divide and Conquer&lt;/strong&gt;: Narrow the Search with successive Approximation. Get the Range. Determine which side of the Bug you are on. Use Easy-to-use test patterns. Start with the Bad. Fix the bugs you know about. Fix the noise first.&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Change One Thing at a Time&lt;/strong&gt;: Isolate the key factor. Grab the brass bar with both hands (i.e., understand what&amp;rsquo;s wrong before fixing). Change one test at a time. Compare it with a good one. Determine what you changed since the last time it worked.&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Keep an Audit Trail&lt;/strong&gt;: Write down what you did in what order and what happened as a result. Understand that any detail could be the important one. Correlate Events. Understand that audit trails for design are also good for testing. Write it Down!&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Check the Plug&lt;/strong&gt;: Question your assumptions. Start at the Beginning. Test the Tool.&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Get a Fresh View&lt;/strong&gt;: Ask for Fresh Insights (aka explaining the problem to a mannequin/dummy). Tap expertise. Listen to the voice of Experience. Know that help is all around you. Don&amp;rsquo;t be Proud. Report symptoms (not theories). Realize that you don&amp;rsquo;t have to be Sure.&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;If you don&amp;rsquo;t Fix it, it Ain&amp;rsquo;t Fixed&lt;/strong&gt;: Check that it&amp;rsquo;s actually/really fixed. Check that it&amp;rsquo;s really your fix that fixed it. Know that it never just goes away by itself. Fix the Cause. And, fix the Process.&lt;/li&gt;&#10;&lt;/ol&gt;</description><content:encoded><![CDATA[<p>Here is a list of David J.Agan&rsquo;s timeless and universal rules of debugging. As the author notes in the book - <strong>Memorize them. Tape them to your wall. Tape them to all of your walls.</strong></p>
<ol>
<li><strong>Understand the System</strong>: Read the manual. Read everything in Depth. Know the Fundamentals. Know the road map. Understand your tools. Look up the details</li>
<li><strong>Make it Fail</strong>: Do it Again. Start at the Beginning. Stimulate the Failure. Don&rsquo;t Simulate the Failure. Find the uncontrolled condition that makes it intermittent. Record everything and find the signature of intermittent bugs. Don&rsquo;t trust Statistics too much. Know that &ldquo;that&rdquo; can happen. Never throw away a Debugging tool.</li>
<li><strong>Quit Thinking and Look</strong>: Get Data First. Don&rsquo;t just do Complicated repairs based on guess game. See the Failure. See the Details. Build Instrumentation in. Add Instrumentation on. Don&rsquo;t be afraid to Dive-in. Watch out for Heisenberg. Guess only to focus the Search.</li>
<li><strong>Divide and Conquer</strong>: Narrow the Search with successive Approximation. Get the Range. Determine which side of the Bug you are on. Use Easy-to-use test patterns. Start with the Bad. Fix the bugs you know about. Fix the noise first.</li>
<li><strong>Change One Thing at a Time</strong>: Isolate the key factor. Grab the brass bar with both hands (i.e., understand what&rsquo;s wrong before fixing). Change one test at a time. Compare it with a good one. Determine what you changed since the last time it worked.</li>
<li><strong>Keep an Audit Trail</strong>: Write down what you did in what order and what happened as a result. Understand that any detail could be the important one. Correlate Events. Understand that audit trails for design are also good for testing. Write it Down!</li>
<li><strong>Check the Plug</strong>: Question your assumptions. Start at the Beginning. Test the Tool.</li>
<li><strong>Get a Fresh View</strong>: Ask for Fresh Insights (aka explaining the problem to a mannequin/dummy). Tap expertise. Listen to the voice of Experience. Know that help is all around you. Don&rsquo;t be Proud. Report symptoms (not theories). Realize that you don&rsquo;t have to be Sure.</li>
<li><strong>If you don&rsquo;t Fix it, it Ain&rsquo;t Fixed</strong>: Check that it&rsquo;s actually/really fixed. Check that it&rsquo;s really your fix that fixed it. Know that it never just goes away by itself. Fix the Cause. And, fix the Process.</li>
</ol>
]]></content:encoded></item></channel></rss>