<?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: rejection in person; printf debugging</title>
	<atom:link href="http://malvasiabianca.org/archives/2007/05/rejection-in-person-printf-debugging/feed/" rel="self" type="application/rss+xml" />
	<link>http://malvasiabianca.org/archives/2007/05/rejection-in-person-printf-debugging/</link>
	<description></description>
	<lastBuildDate>Fri, 10 Feb 2012 05:54:57 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
	<item>
		<title>By: David Carlton</title>
		<link>http://malvasiabianca.org/archives/2007/05/rejection-in-person-printf-debugging/comment-page-1/#comment-121657</link>
		<dc:creator>David Carlton</dc:creator>
		<pubDate>Thu, 07 Jan 2010 20:20:27 +0000</pubDate>
		<guid isPermaLink="false">http://malvasiabianca.org/archives/2007/05/rejection-in-person-printf-debugging/#comment-121657</guid>
		<description>Yeah, that&#039;s probably more an artifact of the tools that I use (GDB through the command line) and the rather naive way I use them than anything else.</description>
		<content:encoded><![CDATA[<p>Yeah, that&#8217;s probably more an artifact of the tools that I use (GDB through the command line) and the rather naive way I use them than anything else.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brian Carlton</title>
		<link>http://malvasiabianca.org/archives/2007/05/rejection-in-person-printf-debugging/comment-page-1/#comment-121656</link>
		<dc:creator>Brian Carlton</dc:creator>
		<pubDate>Thu, 07 Jan 2010 20:07:54 +0000</pubDate>
		<guid isPermaLink="false">http://malvasiabianca.org/archives/2007/05/rejection-in-person-printf-debugging/#comment-121656</guid>
		<description>You said &quot;I suspect that debugging with a debugger is less likely to lead to this problem, if only because it takes more effort to generate lots of values.&quot;  Why do you say this?  At least in my (Verilog/VHDL) debugger, I can select many variables to watch easily.</description>
		<content:encoded><![CDATA[<p>You said &#8220;I suspect that debugging with a debugger is less likely to lead to this problem, if only because it takes more effort to generate lots of values.&#8221;  Why do you say this?  At least in my (Verilog/VHDL) debugger, I can select many variables to watch easily.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: david carlton</title>
		<link>http://malvasiabianca.org/archives/2007/05/rejection-in-person-printf-debugging/comment-page-1/#comment-44202</link>
		<dc:creator>david carlton</dc:creator>
		<pubDate>Fri, 18 May 2007 04:56:53 +0000</pubDate>
		<guid isPermaLink="false">http://malvasiabianca.org/archives/2007/05/rejection-in-person-printf-debugging/#comment-44202</guid>
		<description>Not sure if the point of my last sentence is clear or not, so I will try again: I&#039;m presenting TDD as hypothesis-based programming.  At every step, you&#039;re forced to make a concrete prediction about what your code should do next.  I suppose calling it a prediction / hypothesis isn&#039;t quite right, actually, because the code hasn&#039;t been written yet, but to me it has the same benefits compared to non-TDD programming that hypothesis-based debugging has to debugging based on messing around: at each step, you phrase a concrete question about your program&#039;s behavior.  Neither is a solution to all woes, but both have what seem to me to be similar virtues.</description>
		<content:encoded><![CDATA[<p>Not sure if the point of my last sentence is clear or not, so I will try again: I&#8217;m presenting TDD as hypothesis-based programming.  At every step, you&#8217;re forced to make a concrete prediction about what your code should do next.  I suppose calling it a prediction / hypothesis isn&#8217;t quite right, actually, because the code hasn&#8217;t been written yet, but to me it has the same benefits compared to non-TDD programming that hypothesis-based debugging has to debugging based on messing around: at each step, you phrase a concrete question about your program&#8217;s behavior.  Neither is a solution to all woes, but both have what seem to me to be similar virtues.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stuart Marks</title>
		<link>http://malvasiabianca.org/archives/2007/05/rejection-in-person-printf-debugging/comment-page-1/#comment-44183</link>
		<dc:creator>Stuart Marks</dc:creator>
		<pubDate>Fri, 18 May 2007 00:18:05 +0000</pubDate>
		<guid isPermaLink="false">http://malvasiabianca.org/archives/2007/05/rejection-in-person-printf-debugging/#comment-44183</guid>
		<description>I think you&#039;re right to criticize poor debugging technique, though I don&#039;t think poor technique is necessarily linked with printf. Certainly I&#039;ve seen people flailing about, adding printfs of values at random places throughout the code in the hopes of stumbling across something interesting. This isn&#039;t restricted to printf, though. I&#039;ve seen people do much the same thing with debuggers, that is, single-stepping through the code until the program crashes or exhibits the erroneous behavior.

I think the distinction you really want isn&#039;t about printf vs not printf, but rather it&#039;s about the formulation and testing of hypotheses vs lack of doing so.

I&#039;m also a big fan of TDD (as you might already know) but the connection between TDD and hypothesis-based debugging is a bit tenuous. It&#039;s probably true that code developed using TDD has fewer bugs. But there are probably classes of bugs that aren&#039;t necessarily prevented via TDD that will require debugger sessions to uncover.

Consider bugs that arise because of unforeseen or unobvious side effects. Unit-tested code is well tested for effects of operations on *this* object but cannot test for the absence of side effects on *other* objects. This class of bug will manifest itself when the system is integrated, even though all unit tests might pass. I think a different technique is called for here. Certainly system testing is one approach. An emphasis on interaction-based testing vs. state-based testing might be helpful as well. Finally, good old modeling and analysis about the relationships between objects, and good encapsulation of objects, all probably will help as well.</description>
		<content:encoded><![CDATA[<p>I think you&#8217;re right to criticize poor debugging technique, though I don&#8217;t think poor technique is necessarily linked with printf. Certainly I&#8217;ve seen people flailing about, adding printfs of values at random places throughout the code in the hopes of stumbling across something interesting. This isn&#8217;t restricted to printf, though. I&#8217;ve seen people do much the same thing with debuggers, that is, single-stepping through the code until the program crashes or exhibits the erroneous behavior.</p>
<p>I think the distinction you really want isn&#8217;t about printf vs not printf, but rather it&#8217;s about the formulation and testing of hypotheses vs lack of doing so.</p>
<p>I&#8217;m also a big fan of TDD (as you might already know) but the connection between TDD and hypothesis-based debugging is a bit tenuous. It&#8217;s probably true that code developed using TDD has fewer bugs. But there are probably classes of bugs that aren&#8217;t necessarily prevented via TDD that will require debugger sessions to uncover.</p>
<p>Consider bugs that arise because of unforeseen or unobvious side effects. Unit-tested code is well tested for effects of operations on *this* object but cannot test for the absence of side effects on *other* objects. This class of bug will manifest itself when the system is integrated, even though all unit tests might pass. I think a different technique is called for here. Certainly system testing is one approach. An emphasis on interaction-based testing vs. state-based testing might be helpful as well. Finally, good old modeling and analysis about the relationships between objects, and good encapsulation of objects, all probably will help as well.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced (User agent is rejected)
Database Caching 2/13 queries in 0.009 seconds using disk: basic

Served from: malvasiabianca.org @ 2012-02-11 17:39:22 -->
