<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>bloggo ergo sum &#187; software_engineering</title>
	<atom:link href="http://bloggoergosum.com/tag/software_engineering/feed/" rel="self" type="application/rss+xml" />
	<link>http://bloggoergosum.com</link>
	<description></description>
	<lastBuildDate>Thu, 15 Mar 2012 05:47:53 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Making software better</title>
		<link>http://bloggoergosum.com/2007/01/25/making-software-better/</link>
		<comments>http://bloggoergosum.com/2007/01/25/making-software-better/#comments</comments>
		<pubDate>Thu, 25 Jan 2007 08:38:40 +0000</pubDate>
		<dc:creator>Ben</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[software_engineering]]></category>
		<category><![CDATA[software_quality]]></category>

		<guid isPermaLink="false">http://bloggoergosum.us/2007/01/25/making-software-better/</guid>
		<description><![CDATA[I&#8217;ve now been at work for 15 hours since I last slept, most of which has been devoted to tracking down a problem that makes me want to rip my hair out and a large chunk of which I won&#8217;t get paid for. However, that&#8217;s not a big deal Along the way, I needed to <a href="http://bloggoergosum.com/2007/01/25/making-software-better/"> read more <span class="meta-nav">&#187;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve now been at work for 15 hours since I last slept, most of which has been devoted to tracking down a problem that makes me want to rip my hair out and a large chunk of which I won&#8217;t get paid for.</p>
<p>However, that&#8217;s not a big deal <img src='http://bloggoergosum.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>Along the way, I needed to look at a lot of &#8216;printf&#8217; output.  Normally, our software doesn&#8217;t spew a lot of debug information.  We print a certain amount my default because it allows our customer to self-diagnose to a degree &#8211; but if we print too much, the customer freaks out and that makes more work for us when a vast majority of all of our output is purely informational.  Even some messages that say things like &#8220;ERROR! THE WORLD WILL EXPLODE IN 10 SECONDS&#8221; can safely be ignored, so we keep most of our debug output off.</p>
<p>What that means to me tonight (this morning) is that I need to turn it on.  Ok, great.  There&#8217;s one line in a config file somewhere, right?  Or maybe just one runtime &#8220;knob&#8221; (that reminds me, I should write a post about knobs) that can be turned?  Heh.  Wrong.<br />
<span id="more-247"></span><br />
I haven&#8217;t finished counting yet, but I can think of a <strong>minimum</strong> of 5 different ways to turn on debugging output off the top of my head.  Oh, what&#8217;s even better is that they aren&#8217;t even consistent.  One file has a global variable called &#8216;enableDebug&#8217; that is checked in some files, and another file will have a global called something else, used by a different (and sometimes overlapping) set of files.  Still better, a header file somewhere will have a macro like this:<br />
[code lang="c"]<br />
#if 0<br />
#  define TRACE printf("[%12s:%3d]", __FILE__, __LINE__);printf<br />
#else<br />
#  define TRACE<br />
#endif<br />
[/code]</p>
<p>and a construct like the following somewhere else:</p>
<p>[code lang="c"]<br />
if(enableDbg)<br />
    TRACE("something");<br />
[/code]</p>
<p>What does it mean when you have the above in about 483 various places spread out over 85,000 lines of code? It means I have to run the software a hundred times just to make sure I&#8217;m printing everything I need to see in order to properly analyze my problem.  Clearly, we need to revamp our software so that debugging output is centrally controlled and consistently applied.  A nice logging framework would be nice.  We&#8217;d have to write it ourselves (I&#8217;m in the embedded world, you see), but it should be done.</p>
<p>But I can&#8217;t.  And we can&#8217;t.  There&#8217;s no money or time for it &#8211; and that&#8217;s just the way it is.  The reasons it can&#8217;t happen in my business are different than those for a business in some other industry, but the outcome is the same.  More generally, I come across things almost every day that scream out &#8220;Please!  Kill me!  Replace me with something that has been thought out for 5 minutes!&#8221;, but it&#8217;s not that often that I can do anything about it, and rarely do I ever have specific direction from management to do anything about it. </p>
<p>But why?  Isn&#8217;t there inherent value is making software better?  For every 5 minutes I spend making it better now, doesn&#8217;t that mean that some poor sap down the road saves about 30?  Forget how line counts play into cost estimating &#8211; isn&#8217;t it inherently valuable to keep your code size down, and even more valuable to keep it&#8217;s complexity down?</p>
<p>The answer to all those questions is &#8220;Yes.&#8221;  Then why don&#8217;t companies task their software developers with making their software better?</p>
<p>Here&#8217;s why: because it rarely produces any additional value to the customer, and almost never produces any value to the customer that the customer would be willing to pay for.  I&#8217;m not the most experienced among us, but my experience so far has taught me that the purpose of the software is to be valuable to the customer defined on his own terms, which directly translates into value to me (the company).  </p>
<p>Yes, it&#8217;s true that it&#8217;s a royal pain in the rear to deal with the debugging output issue I described above &#8211; but the 100 hours I&#8217;d spend fixing it (and probably more, if truth be told) creates little or no value to the customer, and none that he can perceive &#8211; which means he won&#8217;t pay for it, which means that it wouldn&#8217;t directly translate into value to the company.  There is an implied value later on down the road, but it&#8217;s one that can never be measured, and thus the company doesn&#8217;t have much interest in &#8220;making software better&#8221; generally.  It&#8217;s painful to people like me because I want to create software I can be proud of, which ideally means creating the best software I can create; it&#8217;s an art, a science, and a matter of craftsmanship &#8211; but I have to be focused on the value the software truly represents, and sometimes &#8220;making software better&#8221; doesn&#8217;t enhance that value.</p>
]]></content:encoded>
			<wfw:commentRss>http://bloggoergosum.com/2007/01/25/making-software-better/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

