<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: What is your favorite debugging anecdote?</title>
	<atom:link href="http://www.embeddedinsights.com/channels/2010/12/01/what-is-your-favorite-debugging-anecdote/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.embeddedinsights.com/channels/2010/12/01/what-is-your-favorite-debugging-anecdote/</link>
	<description>Shedding Light on the Hidden World of Embedded Systems</description>
	<lastBuildDate>Mon, 28 Jul 2014 16:18:37 -0400</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>By: blues</title>
		<link>http://www.embeddedinsights.com/channels/2010/12/01/what-is-your-favorite-debugging-anecdote/#comment-5623</link>
		<dc:creator>blues</dc:creator>
		<pubDate>Mon, 21 Feb 2011 12:50:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.embeddedinsights.com/channels/?p=390#comment-5623</guid>
		<description>I once had a failing hard-drive in my computer at home - at least I thought so first. After having multiple but not so common issues, like a loss of the Partition Table I found out it was the CD Burner Drive on the same IDE channel causing the hard drive failures! Even if the CD Burner Drive did work, I just recognized it being defective when I tried to burn a CD one day....</description>
		<content:encoded><![CDATA[<p>I once had a failing hard-drive in my computer at home &#8211; at least I thought so first. After having multiple but not so common issues, like a loss of the Partition Table I found out it was the CD Burner Drive on the same IDE channel causing the hard drive failures! Even if the CD Burner Drive did work, I just recognized it being defective when I tried to burn a CD one day&#8230;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: L.R. "D" R. @ LI</title>
		<link>http://www.embeddedinsights.com/channels/2010/12/01/what-is-your-favorite-debugging-anecdote/#comment-4781</link>
		<dc:creator>L.R. "D" R. @ LI</dc:creator>
		<pubDate>Thu, 06 Jan 2011 15:25:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.embeddedinsights.com/channels/?p=390#comment-4781</guid>
		<description>Heck, no +1&#039;s for me. The anecdotes are essentially the same!</description>
		<content:encoded><![CDATA[<p>Heck, no +1&#8242;s for me. The anecdotes are essentially the same!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: J.N. @ LI</title>
		<link>http://www.embeddedinsights.com/channels/2010/12/01/what-is-your-favorite-debugging-anecdote/#comment-4769</link>
		<dc:creator>J.N. @ LI</dc:creator>
		<pubDate>Thu, 06 Jan 2011 00:36:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.embeddedinsights.com/channels/?p=390#comment-4769</guid>
		<description>@R.: Yeah, I had a friend in college who would smile and nod. Best darned debugging help I&#039;ve ever had. :)</description>
		<content:encoded><![CDATA[<p>@R.: Yeah, I had a friend in college who would smile and nod. Best darned debugging help I&#8217;ve ever had. <img src='http://www.embeddedinsights.com/channels/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: R.S.K. @ LI</title>
		<link>http://www.embeddedinsights.com/channels/2010/12/01/what-is-your-favorite-debugging-anecdote/#comment-4767</link>
		<dc:creator>R.S.K. @ LI</dc:creator>
		<pubDate>Wed, 05 Jan 2011 22:37:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.embeddedinsights.com/channels/?p=390#comment-4767</guid>
		<description>+1 for R.. I have had innumerable occasions when this has worked for me.</description>
		<content:encoded><![CDATA[<p>+1 for R.. I have had innumerable occasions when this has worked for me.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: N.M. @ LI</title>
		<link>http://www.embeddedinsights.com/channels/2010/12/01/what-is-your-favorite-debugging-anecdote/#comment-4766</link>
		<dc:creator>N.M. @ LI</dc:creator>
		<pubDate>Wed, 05 Jan 2011 22:36:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.embeddedinsights.com/channels/?p=390#comment-4766</guid>
		<description>+1 for R.&#039;s excellent rule-of-thumb. This is exactly why Sherlock Holmes needed Dr. Watson :)</description>
		<content:encoded><![CDATA[<p>+1 for R.&#8217;s excellent rule-of-thumb. This is exactly why Sherlock Holmes needed Dr. Watson <img src='http://www.embeddedinsights.com/channels/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: R.A. @ LI</title>
		<link>http://www.embeddedinsights.com/channels/2010/12/01/what-is-your-favorite-debugging-anecdote/#comment-4765</link>
		<dc:creator>R.A. @ LI</dc:creator>
		<pubDate>Wed, 05 Jan 2011 22:36:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.embeddedinsights.com/channels/?p=390#comment-4765</guid>
		<description>L.R. &quot;D&quot; R. said: &quot;If you&#039;ve looked in an area of code for a bug for more than 24 hours and haven&#039;t found it, look where you least expect it.&quot;

That&#039;s more of a rule-of-thumb or technique than it is an anecdote, but it is a good rule-of-thumb.

If we&#039;re talking rules-of-thumb, then I would add this:

If you can&#039;t figure out why the code doesn&#039;t work, grab a colleague (who knows nothing about the code in question) and explain to them why it *does* work.

I have about a 98% success rate at finding bugs this way (and a bunch of bemused colleagues who listen to me babble on for a few minutes and then conclude with &quot;...wait a minute... oh wow... thanks for your help&quot; without them ever having uttered a word :-).</description>
		<content:encoded><![CDATA[<p>L.R. &#8220;D&#8221; R. said: &#8220;If you&#8217;ve looked in an area of code for a bug for more than 24 hours and haven&#8217;t found it, look where you least expect it.&#8221;</p>
<p>That&#8217;s more of a rule-of-thumb or technique than it is an anecdote, but it is a good rule-of-thumb.</p>
<p>If we&#8217;re talking rules-of-thumb, then I would add this:</p>
<p>If you can&#8217;t figure out why the code doesn&#8217;t work, grab a colleague (who knows nothing about the code in question) and explain to them why it *does* work.</p>
<p>I have about a 98% success rate at finding bugs this way (and a bunch of bemused colleagues who listen to me babble on for a few minutes and then conclude with &#8220;&#8230;wait a minute&#8230; oh wow&#8230; thanks for your help&#8221; without them ever having uttered a word <img src='http://www.embeddedinsights.com/channels/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> .</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: L.R. "D" R. @ LI</title>
		<link>http://www.embeddedinsights.com/channels/2010/12/01/what-is-your-favorite-debugging-anecdote/#comment-4764</link>
		<dc:creator>L.R. "D" R. @ LI</dc:creator>
		<pubDate>Wed, 05 Jan 2011 22:35:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.embeddedinsights.com/channels/?p=390#comment-4764</guid>
		<description>My favorite debugging anecdote is:

If you&#039;ve looked in an area of code for a bug for more than 24 hours and haven&#039;t found it, look where you least expect it.</description>
		<content:encoded><![CDATA[<p>My favorite debugging anecdote is:</p>
<p>If you&#8217;ve looked in an area of code for a bug for more than 24 hours and haven&#8217;t found it, look where you least expect it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: J.S. @ LI</title>
		<link>http://www.embeddedinsights.com/channels/2010/12/01/what-is-your-favorite-debugging-anecdote/#comment-4735</link>
		<dc:creator>J.S. @ LI</dc:creator>
		<pubDate>Mon, 03 Jan 2011 16:24:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.embeddedinsights.com/channels/?p=390#comment-4735</guid>
		<description>My favorites are from people who do not understand the operating system they are programming for. Two incidents from my consulting days that I remember well.

1) Customer needed to make decisions on machine operation (running on a priority based real-time operating system) based on state of DIO. They wrote a program which checked the DIO at 25 ms intervals and then &quot;signaled&quot; (actually, an OS based mechanism which was implemented as a counter and received as a message) another program when particular DIO values changed. Since the programmer knew the initial state, any signal that was received was interpreted as a change in actual value and a decision made. The problem - the decision was made on the basis of the signal being received rather than checking the current state of the DIO. The customer had not adjusted the priority of their program properly, so it would (occasionally) be interrupted for seconds at a time. During that time, several changes could occur to the same DIO port, multiple &quot;signals&quot; queued indicating change of port state, however when the program woke up it only received the first signal and made a decision based on what the programmer THOUGHT the current value of the DIO was rather than the actual value at that time. Resulted in some &quot;unusual&quot; (and often damaging) behavior of the equipment. Bad design in the first place (check actual state rather than assuming you did not miss a signal indicating state change causing your own internal record of state to be off), however they also failed to understand how the underlying OS signalling mechanism and how it worked (plus the scheduling mechanism).

2) Customer wrote a program which controlled a motor. Again, customer was running on a real-time, priority driven OS, however one that defaulted to a decay based scheduling. Customer did not realize this, so the motor would work fine for 5 minutes, then shut down for 5 minutes as control program dropped in priority, then work again, etc. A failure to understand the underlying OS and how it worked (although it is a valid argument that the OS should not have defaulted to a decay based scheduling, it was also well documented that it did along with recommendations change this scheduling for any program needing real-time scheduling).</description>
		<content:encoded><![CDATA[<p>My favorites are from people who do not understand the operating system they are programming for. Two incidents from my consulting days that I remember well.</p>
<p>1) Customer needed to make decisions on machine operation (running on a priority based real-time operating system) based on state of DIO. They wrote a program which checked the DIO at 25 ms intervals and then &#8220;signaled&#8221; (actually, an OS based mechanism which was implemented as a counter and received as a message) another program when particular DIO values changed. Since the programmer knew the initial state, any signal that was received was interpreted as a change in actual value and a decision made. The problem &#8211; the decision was made on the basis of the signal being received rather than checking the current state of the DIO. The customer had not adjusted the priority of their program properly, so it would (occasionally) be interrupted for seconds at a time. During that time, several changes could occur to the same DIO port, multiple &#8220;signals&#8221; queued indicating change of port state, however when the program woke up it only received the first signal and made a decision based on what the programmer THOUGHT the current value of the DIO was rather than the actual value at that time. Resulted in some &#8220;unusual&#8221; (and often damaging) behavior of the equipment. Bad design in the first place (check actual state rather than assuming you did not miss a signal indicating state change causing your own internal record of state to be off), however they also failed to understand how the underlying OS signalling mechanism and how it worked (plus the scheduling mechanism).</p>
<p>2) Customer wrote a program which controlled a motor. Again, customer was running on a real-time, priority driven OS, however one that defaulted to a decay based scheduling. Customer did not realize this, so the motor would work fine for 5 minutes, then shut down for 5 minutes as control program dropped in priority, then work again, etc. A failure to understand the underlying OS and how it worked (although it is a valid argument that the OS should not have defaulted to a decay based scheduling, it was also well documented that it did along with recommendations change this scheduling for any program needing real-time scheduling).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: M.K. @ LI</title>
		<link>http://www.embeddedinsights.com/channels/2010/12/01/what-is-your-favorite-debugging-anecdote/#comment-4734</link>
		<dc:creator>M.K. @ LI</dc:creator>
		<pubDate>Mon, 03 Jan 2011 16:24:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.embeddedinsights.com/channels/?p=390#comment-4734</guid>
		<description>More years ago than I care to remember; I was writing a library to read and write some datafiles according to a customer spec.
The library was working fine and the customer was happy, until we passed 1st august. Al data from recorded from that day was inaccessible. The debugging was postponed for some a couple of month. From 1st of October it was working perfectly.

Eventually it appeared I used to %i in a sscanf to parse the month number. Only problem was the month number was padded with leading zeroes to two digits, causing sscanf to assume the number was octal. 01, 02, 03...07 was ok, 08 and 09 is not valid numbers, 10 is a decimal number. I really learned a lesson on testing....</description>
		<content:encoded><![CDATA[<p>More years ago than I care to remember; I was writing a library to read and write some datafiles according to a customer spec.<br />
The library was working fine and the customer was happy, until we passed 1st august. Al data from recorded from that day was inaccessible. The debugging was postponed for some a couple of month. From 1st of October it was working perfectly.</p>
<p>Eventually it appeared I used to %i in a sscanf to parse the month number. Only problem was the month number was padded with leading zeroes to two digits, causing sscanf to assume the number was octal. 01, 02, 03&#8230;07 was ok, 08 and 09 is not valid numbers, 10 is a decimal number. I really learned a lesson on testing&#8230;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: M.P. @ LI</title>
		<link>http://www.embeddedinsights.com/channels/2010/12/01/what-is-your-favorite-debugging-anecdote/#comment-4733</link>
		<dc:creator>M.P. @ LI</dc:creator>
		<pubDate>Mon, 03 Jan 2011 16:22:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.embeddedinsights.com/channels/?p=390#comment-4733</guid>
		<description>My story is too long to copy here, so here&#039;s a link to my blog and the bottom line:

http://blog.sofistes.net/2010/06/extreme-debugging.html 

&quot;Moral of the story? Debugging is labour but sometimes also instinct. Work only gets you so far.&quot;</description>
		<content:encoded><![CDATA[<p>My story is too long to copy here, so here&#8217;s a link to my blog and the bottom line:</p>
<p><a href="http://blog.sofistes.net/2010/06/extreme-debugging.html" rel="nofollow">http://blog.sofistes.net/2010/06/extreme-debugging.html</a> </p>
<p>&#8220;Moral of the story? Debugging is labour but sometimes also instinct. Work only gets you so far.&#8221;</p>
]]></content:encoded>
	</item>
</channel>
</rss>
