<?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: Can We Teach Debugging?</title>
	<atom:link href="http://www.flatline.net/journal/2009/08/08/can-we-teach-debugging/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.flatline.net/journal/2009/08/08/can-we-teach-debugging/</link>
	<description>self-deprecating yet still self-promotional witty comment</description>
	<lastBuildDate>Fri, 22 Jul 2011 21:32:50 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: JCS</title>
		<link>http://www.flatline.net/journal/2009/08/08/can-we-teach-debugging/comment-page-1/#comment-14776</link>
		<dc:creator>JCS</dc:creator>
		<pubDate>Thu, 13 Aug 2009 07:29:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.flatline.net/journal/2009/08/08/can-we-teach-debugging/#comment-14776</guid>
		<description>Great &quot;tutorial&quot; on how to solve bugs. The key point is (in my opinion) follow a structured way. Creation is usually messy, but the approach to debugging must be structured.
After several frustrating attempts when I was a kid, I stop assembling those projects from the Electronics magazines. Later I understood that if don&#039;t know what is &quot;happening&quot; you shouldn&#039;t build it.
As you I, learned a lot from mechanics, after graduation I worked for a lift (elevator) company, we designed the controllers and worked mostly with induction motor drives and hydraulic lifts, now I solve problems in my bike :-) When you are faced with problems in complex systems requiring interaction of many parts on different domains (mechanics, lubrication, hardware and software) you need to approach the problem in an analytical way: isolate a section; check if it works as it should; if so check the other section, if not break this section again. If you don&#039;t proceed methodically you&#039;ll be lost in the jungle and you&#039;ll never leave.</description>
		<content:encoded><![CDATA[<p>Great &#8220;tutorial&#8221; on how to solve bugs. The key point is (in my opinion) follow a structured way. Creation is usually messy, but the approach to debugging must be structured.<br />
After several frustrating attempts when I was a kid, I stop assembling those projects from the Electronics magazines. Later I understood that if don&#8217;t know what is &#8220;happening&#8221; you shouldn&#8217;t build it.<br />
As you I, learned a lot from mechanics, after graduation I worked for a lift (elevator) company, we designed the controllers and worked mostly with induction motor drives and hydraulic lifts, now I solve problems in my bike :-) When you are faced with problems in complex systems requiring interaction of many parts on different domains (mechanics, lubrication, hardware and software) you need to approach the problem in an analytical way: isolate a section; check if it works as it should; if so check the other section, if not break this section again. If you don&#8217;t proceed methodically you&#8217;ll be lost in the jungle and you&#8217;ll never leave.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jet</title>
		<link>http://www.flatline.net/journal/2009/08/08/can-we-teach-debugging/comment-page-1/#comment-14692</link>
		<dc:creator>jet</dc:creator>
		<pubDate>Mon, 10 Aug 2009 05:06:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.flatline.net/journal/2009/08/08/can-we-teach-debugging/#comment-14692</guid>
		<description>Limor, your instructions are a rare exception in the kit-building world.  You not only explain what to do, but why to do it, so kudos to you for your efforts.</description>
		<content:encoded><![CDATA[<p>Limor, your instructions are a rare exception in the kit-building world.  You not only explain what to do, but why to do it, so kudos to you for your efforts.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: limor</title>
		<link>http://www.flatline.net/journal/2009/08/08/can-we-teach-debugging/comment-page-1/#comment-14690</link>
		<dc:creator>limor</dc:creator>
		<pubDate>Mon, 10 Aug 2009 02:03:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.flatline.net/journal/2009/08/08/can-we-teach-debugging/#comment-14690</guid>
		<description>while i of course agree that kit building is not the same as studying from a book, it does provide a structured way of seeing -patterns- of electronics, eg &quot;There always seems to be a diode between a 7805 and DC Jack&quot; &quot;LEDs have a 1K series resistor&quot;. much like following a recipe does not mean you&#039;re a cook, but eventually many basics sink in. 
the real learning comes when the user modifies the kit!</description>
		<content:encoded><![CDATA[<p>while i of course agree that kit building is not the same as studying from a book, it does provide a structured way of seeing -patterns- of electronics, eg &#8220;There always seems to be a diode between a 7805 and DC Jack&#8221; &#8220;LEDs have a 1K series resistor&#8221;. much like following a recipe does not mean you&#8217;re a cook, but eventually many basics sink in.<br />
the real learning comes when the user modifies the kit!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark</title>
		<link>http://www.flatline.net/journal/2009/08/08/can-we-teach-debugging/comment-page-1/#comment-14685</link>
		<dc:creator>Mark</dc:creator>
		<pubDate>Sun, 09 Aug 2009 23:06:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.flatline.net/journal/2009/08/08/can-we-teach-debugging/#comment-14685</guid>
		<description>I loved the analogy to diagnosing a car. I still vividly remember the day I was trying to fix my car and couldn&#039;t figure out what was wrong. My dad, who happened to be an electronics engineer, came along and started breaking down the problem of &quot;my car won&#039;t start&quot; into appropriate sub categories, in this case air, fuel, and fire. There was no obstruction of the air intake, and valve timing was fine. Pulling a spark plug, I cranked the engine and observed a spark. Finally he pulled the hose off the fuel pump output and we saw that there was no fuel pressure when the engine cranked over. As this was one of the last times I saw my father, I still remember this incident every time I feel stumped trying to debug something. My father taught me how to think things out by his example. The science is in knowing what experiments to try, the art is knowing how best to do the experiment and which experiments to do, but the real key is knowing how to think. Sadly, that usually gets lost in the maze of facts and figures. What&#039;s really needed is a teacher, a guru, who has realized the differences between cause and effect. This can be anybody anywhere: a parent, a teacher, a co-worker, or even a timely stranger. We just have to be willing to get past our fear of ignorance and earnestly seek the answers we need. Once you reach that point, the guru will appear, though you might not recognize them as such. One of the greatest things about on-line forums is the way total strangers can share problem solving strategies and fill in missing knowledge about various subsystems.
Does anyone remember back in the 80&#039;s when there was a huge amount of hype about expert systems? People hoped then that expert level skills could be boiled down into a set of rules which a program could simply run through in order to solve a problem, but none of those programs knew how to ask a new question.
Yes debugging can be taught, but it is an empirical knowledge gained through hands on experience, not simply a memorized procedure. You have to learn how to ask the appropriate questions in order to get the appropriate answers, and that is not a simple thing.</description>
		<content:encoded><![CDATA[<p>I loved the analogy to diagnosing a car. I still vividly remember the day I was trying to fix my car and couldn&#8217;t figure out what was wrong. My dad, who happened to be an electronics engineer, came along and started breaking down the problem of &#8220;my car won&#8217;t start&#8221; into appropriate sub categories, in this case air, fuel, and fire. There was no obstruction of the air intake, and valve timing was fine. Pulling a spark plug, I cranked the engine and observed a spark. Finally he pulled the hose off the fuel pump output and we saw that there was no fuel pressure when the engine cranked over. As this was one of the last times I saw my father, I still remember this incident every time I feel stumped trying to debug something. My father taught me how to think things out by his example. The science is in knowing what experiments to try, the art is knowing how best to do the experiment and which experiments to do, but the real key is knowing how to think. Sadly, that usually gets lost in the maze of facts and figures. What&#8217;s really needed is a teacher, a guru, who has realized the differences between cause and effect. This can be anybody anywhere: a parent, a teacher, a co-worker, or even a timely stranger. We just have to be willing to get past our fear of ignorance and earnestly seek the answers we need. Once you reach that point, the guru will appear, though you might not recognize them as such. One of the greatest things about on-line forums is the way total strangers can share problem solving strategies and fill in missing knowledge about various subsystems.<br />
Does anyone remember back in the 80&#8242;s when there was a huge amount of hype about expert systems? People hoped then that expert level skills could be boiled down into a set of rules which a program could simply run through in order to solve a problem, but none of those programs knew how to ask a new question.<br />
Yes debugging can be taught, but it is an empirical knowledge gained through hands on experience, not simply a memorized procedure. You have to learn how to ask the appropriate questions in order to get the appropriate answers, and that is not a simple thing.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jeffrey</title>
		<link>http://www.flatline.net/journal/2009/08/08/can-we-teach-debugging/comment-page-1/#comment-14676</link>
		<dc:creator>Jeffrey</dc:creator>
		<pubDate>Sun, 09 Aug 2009 15:51:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.flatline.net/journal/2009/08/08/can-we-teach-debugging/#comment-14676</guid>
		<description>I think another thing to throw in along with &quot;isolate the problem&quot; is &quot;Is there a problem at all?&quot;  Many so-called problems are just misunderstandings of what proper behavior is suppose to be.

Somewhat related is problem definition.  &quot;It doesn&#039;t work&quot; isn&#039;t sufficient, of course.  Iteratively defining The Problem in deeper and deeper detail tends to reveal the underlying &quot;why?&quot;  This tends to involve some research and self-education - a step in the process that some get paralyzed at.  This was the hang up VCR owners had years ago - programming a VCR was A Problem To Solve and it required that you had to learn something new.  And that is where people gave up, stopped and thought that anyone who could program a VCR was a genius.

The effort to learn new things is too much of a bother for some.  The rest of us love the idea.</description>
		<content:encoded><![CDATA[<p>I think another thing to throw in along with &#8220;isolate the problem&#8221; is &#8220;Is there a problem at all?&#8221;  Many so-called problems are just misunderstandings of what proper behavior is suppose to be.</p>
<p>Somewhat related is problem definition.  &#8220;It doesn&#8217;t work&#8221; isn&#8217;t sufficient, of course.  Iteratively defining The Problem in deeper and deeper detail tends to reveal the underlying &#8220;why?&#8221;  This tends to involve some research and self-education &#8211; a step in the process that some get paralyzed at.  This was the hang up VCR owners had years ago &#8211; programming a VCR was A Problem To Solve and it required that you had to learn something new.  And that is where people gave up, stopped and thought that anyone who could program a VCR was a genius.</p>
<p>The effort to learn new things is too much of a bother for some.  The rest of us love the idea.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hinermad</title>
		<link>http://www.flatline.net/journal/2009/08/08/can-we-teach-debugging/comment-page-1/#comment-14675</link>
		<dc:creator>Hinermad</dc:creator>
		<pubDate>Sun, 09 Aug 2009 14:46:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.flatline.net/journal/2009/08/08/can-we-teach-debugging/#comment-14675</guid>
		<description>Debuggung is actually two related tasks: finding the bug and fixing the bug. Fixing the bug is usually regarded as being the easier of the two; if one has the knowledge to create a system with a bug, one probably knows how to remove it, or at least replace it with something that works better.

Finding the bug is another issue, and it does require knowledge of the design and underlying technologies. But the process can be taught. &quot;Divide and conquer&quot; works very well, and pretty much describes the method used by everyone except the truly gifted or the divinely lucky. And even the truly gifted usually use that method. They only make it look like they got it right on the first try because their experience and knowledge let them come up with a mental list of potential causes and the relative probabilities of each, then they test the most likely one first. Ask an experienced mechanic why your car won&#039;t start. In a heartbeat he&#039;ll think of a dozen possible reasons, then ask you when was the last time you put gas in the tank. (It&#039;s people like this that encourage Howard&#039;s wankers to try to stare down a problem. They see the battle-scarred veterans do it, but they don&#039;t realize that each scar represents the hard-won experience that makes it possible. We all have to pay our dues one way or another.)

One extension of debuggung I wish more people understood is Root Cause Analysis. Lots of people due to laziness, schedule pressure, or lack of knowledge will fix a symptom and never fix the underlying problem. The unofficial mantra of Root Cause Analysis is &quot;ask &#039;why?&#039; five times.&quot; Each answer leads to the next &quot;why?&quot;, and may even lead to causes (and suggest fixes) outside the system in question. And by answering each &quot;why?&quot; you learn a lot more about the system.</description>
		<content:encoded><![CDATA[<p>Debuggung is actually two related tasks: finding the bug and fixing the bug. Fixing the bug is usually regarded as being the easier of the two; if one has the knowledge to create a system with a bug, one probably knows how to remove it, or at least replace it with something that works better.</p>
<p>Finding the bug is another issue, and it does require knowledge of the design and underlying technologies. But the process can be taught. &#8220;Divide and conquer&#8221; works very well, and pretty much describes the method used by everyone except the truly gifted or the divinely lucky. And even the truly gifted usually use that method. They only make it look like they got it right on the first try because their experience and knowledge let them come up with a mental list of potential causes and the relative probabilities of each, then they test the most likely one first. Ask an experienced mechanic why your car won&#8217;t start. In a heartbeat he&#8217;ll think of a dozen possible reasons, then ask you when was the last time you put gas in the tank. (It&#8217;s people like this that encourage Howard&#8217;s wankers to try to stare down a problem. They see the battle-scarred veterans do it, but they don&#8217;t realize that each scar represents the hard-won experience that makes it possible. We all have to pay our dues one way or another.)</p>
<p>One extension of debuggung I wish more people understood is Root Cause Analysis. Lots of people due to laziness, schedule pressure, or lack of knowledge will fix a symptom and never fix the underlying problem. The unofficial mantra of Root Cause Analysis is &#8220;ask &#8216;why?&#8217; five times.&#8221; Each answer leads to the next &#8220;why?&#8221;, and may even lead to causes (and suggest fixes) outside the system in question. And by answering each &#8220;why?&#8221; you learn a lot more about the system.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Howard Berkey</title>
		<link>http://www.flatline.net/journal/2009/08/08/can-we-teach-debugging/comment-page-1/#comment-14660</link>
		<dc:creator>Howard Berkey</dc:creator>
		<pubDate>Sun, 09 Aug 2009 02:39:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.flatline.net/journal/2009/08/08/can-we-teach-debugging/#comment-14660</guid>
		<description>There are a number of methods that can be taught; debugging is not really an art, it&#039;s more of a craft really.  You become skilled at it but you do so by following various relatively mechanical techniques.

As an example, the first step in debugging is to *isolate the problem*.  The way you typically isolate a problem is via a form of binary search.  You can do this in various ways; breakpoints, probes (even printf), etc.  This is common across almost ALL domains involving complicated systems, not just software.

A common next step is simply to *reduce the problem* into a reproducible and hopefully simpler case.  Again true across many domains.

You really nail the actual meat of the method with points 3 and 4 in your list above, though.  The only valid way to really debug is to collect metrics, analyze them, modify the code, and check results.  It&#039;s kind of a shorthand for the scientific method.  At this point professionals also build new test cases based on the mentioned metrics collection that check this condition so that it can be regressed in the future. 

Too often you see some wanker try and stare down a debugging problem as if he can force the bug away by sheer will of thought.  It&#039;s a lot easier to behave like a scientist rather than a magician :)  This is actually a mark of inexperience and usually plagues mid-level engineers for some reason.  I certainly was guilty of it.  It&#039;s like you have a little experience under your belt so you feel like you can figure out potentially complicated issues by working through them in your head.  Maybe you can, but it is a lot easier combined with the above techniques.</description>
		<content:encoded><![CDATA[<p>There are a number of methods that can be taught; debugging is not really an art, it&#8217;s more of a craft really.  You become skilled at it but you do so by following various relatively mechanical techniques.</p>
<p>As an example, the first step in debugging is to *isolate the problem*.  The way you typically isolate a problem is via a form of binary search.  You can do this in various ways; breakpoints, probes (even printf), etc.  This is common across almost ALL domains involving complicated systems, not just software.</p>
<p>A common next step is simply to *reduce the problem* into a reproducible and hopefully simpler case.  Again true across many domains.</p>
<p>You really nail the actual meat of the method with points 3 and 4 in your list above, though.  The only valid way to really debug is to collect metrics, analyze them, modify the code, and check results.  It&#8217;s kind of a shorthand for the scientific method.  At this point professionals also build new test cases based on the mentioned metrics collection that check this condition so that it can be regressed in the future. </p>
<p>Too often you see some wanker try and stare down a debugging problem as if he can force the bug away by sheer will of thought.  It&#8217;s a lot easier to behave like a scientist rather than a magician :)  This is actually a mark of inexperience and usually plagues mid-level engineers for some reason.  I certainly was guilty of it.  It&#8217;s like you have a little experience under your belt so you feel like you can figure out potentially complicated issues by working through them in your head.  Maybe you can, but it is a lot easier combined with the above techniques.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

