<?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>&#62;kloctalk&#187; Software Quality</title>
	<atom:link href="http://www.klocwork.com/blog/category/quality/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.klocwork.com/blog</link>
	<description>&#62;kloctalk is a blog and a community for software development professionals who create and maintain mission-critical software and the challenges they face on a daily basis.</description>
	<lastBuildDate>Wed, 08 Feb 2012 13:45:32 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.4</generator>
		<item>
		<title>Answering questions about your code base &#8211; Part 1</title>
		<link>http://www.klocwork.com/blog/2012/02/answering-questions-about-your-code-base-part-1/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=answering-questions-about-your-code-base-part-1</link>
		<comments>http://www.klocwork.com/blog/2012/02/answering-questions-about-your-code-base-part-1/#comments</comments>
		<pubDate>Wed, 08 Feb 2012 13:45:32 +0000</pubDate>
		<dc:creator>Patti Murphy</dc:creator>
				<category><![CDATA[Deployment]]></category>
		<category><![CDATA[Software Quality]]></category>
		<category><![CDATA[Static Analysis]]></category>
		<category><![CDATA[source code analysis]]></category>

		<guid isPermaLink="false">http://www.klocwork.com/blog/?p=1444</guid>
		<description><![CDATA[Static analysis captures the current state of your code base and helps you answer key questions about the quality, security and maintainability of your software project. Think Magic 8 Ball with build omniscience and powerful reporting tools. OK, maybe Magic 8 Ball isn&#8217;t a good analogy. Answers to what questions, you ask? One we often [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.klocwork.com/blog/wp-content/uploads/2012/02/Magic8ball_x.jpg"><img class="alignright size-full wp-image-1445" title="Magic8ball_x" src="http://www.klocwork.com/blog/wp-content/uploads/2012/02/Magic8ball_x.jpg" alt="" width="203" height="203" /></a>Static analysis captures the current state of your code base and helps you answer key questions about the quality, security and maintainability of your software project.</p>
<p>Think Magic 8 Ball with build omniscience and powerful reporting tools. OK, maybe Magic 8 Ball isn&#8217;t a good analogy.</p>
<p>Answers to what questions, you ask? One we often hear from customers is: <strong>Where do I start?</strong></p>
<p>A good place to start is a report that captures the distribution of defect types from your current build.  For example, we recommend that our customers glance over the Top 10 Issues report in our web-based build reporting tool, <a href="http://www.youtube.com/watch?feature=player_embedded&amp;list=PL1A2FCC17F8F213D5&amp;v=G20amVkXw0g" target="_blank">Klocwork Review</a> while indulging in their morning cup of coffee:</p>
<div id="attachment_1447" class="wp-caption aligncenter" style="width: 624px"><a href="http://www.klocwork.com/blog/wp-content/uploads/2012/02/top10-21.png"><img class="size-full wp-image-1447 " title="top10-2" src="http://www.klocwork.com/blog/wp-content/uploads/2012/02/top10-21.png" alt="" width="614" height="505" /></a><p class="wp-caption-text">Magic 8 Ball can&#39;t do this. Here&#39;s a defect distrubtion view of your build.</p></div>
<p>With this build snapshot and your caffeine jolt,  you can quickly identify defects of interest to your organization, such as null pointer dereferences and memory leaks. If you wish, you can set up filters (we call <a href="http://www.klocwork.com/products/documentation/current/Customizing_your_view_of_the_integration_build_analysis" target="_blank">views</a>) to show only these defect types in your report.</p>
<p>Your next step is to get your developers using static analysis on their desktops to prevent the injection of these high-priority defects into the build in the first place.</p>
<p>Once a policy of pre-checkin static analysis usage is put in place, pay attention to new defects injected into the build from that point on. If you see a spike in new defects, then investigate.</p>
<p>The magnitude of that y-axis is not what matters most; it&#8217;s the overall trend that counts.</p>
<p>For my next post, I&#8217;ll take a look at reports that track your cost of ownership and show you what success looks like.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.klocwork.com/blog/2012/02/answering-questions-about-your-code-base-part-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Golden rules of AST checker development</title>
		<link>http://www.klocwork.com/blog/2012/01/golden-rules-of-ast-checker-development/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=golden-rules-of-ast-checker-development</link>
		<comments>http://www.klocwork.com/blog/2012/01/golden-rules-of-ast-checker-development/#comments</comments>
		<pubDate>Tue, 24 Jan 2012 14:57:10 +0000</pubDate>
		<dc:creator>Patti Murphy</dc:creator>
				<category><![CDATA[Coding Standards]]></category>
		<category><![CDATA[General Coding]]></category>
		<category><![CDATA[Software Quality]]></category>
		<category><![CDATA[Static Analysis]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[coding standards]]></category>
		<category><![CDATA[software development]]></category>
		<category><![CDATA[source code analysis]]></category>

		<guid isPermaLink="false">http://www.klocwork.com/blog/?p=1427</guid>
		<description><![CDATA[In my previous post, It&#8217;s time to create a custom checker&#8230;, we looked at the considerations involved in deciding which checker to create&#8211;AST or path? In this post, we&#8217;re going to use a custom checker to enforce an internal coding standard that extends the default set of checkers in our source code analysis tool. To [...]]]></description>
			<content:encoded><![CDATA[<p>In my previous post, <a href="http://www.klocwork.com/blog/2011/11/its-time-to-create-a-custom-checker-but-what-kind/" target="_blank">It&#8217;s time to create a custom checker&#8230;</a>, we looked at the considerations involved in deciding which checker to create&#8211;AST or path?</p>
<p>In this post, we&#8217;re going to use a custom checker to enforce an internal coding standard that extends the default set of checkers in our source code analysis tool.</p>
<p>To do this, I&#8217;ve called upon Steve Howard, our head of Partner Support in Europe, to get us started with an AST checker to accomplish our goal.</p>
<p>Steve has coached many customers through the checker creation process. In his experience, the appeal of custom checkers lies in their ability  to <a href="http://www.klocwork.com/blog/2011/01/in-standards-we-unite-in-agile-we-diverge/" target="_blank">enforce naming conventions and code constructions across organizations</a>.</p>
<p>The standard we want to enforce is the use of a compound statement block rather than single statements as the body of a <em>for loop</em>. An AST checker is the way to go because detection depends solely on the syntax of the code itself and not runtime behavior.</p>
<p>See the example below:</p>
<table>
</table>
<table cellspacing="5" cellpadding="2">
<tbody>
<tr>
<td><strong>Incorrect:</strong></td>
<td><strong>Correct:</strong></td>
</tr>
<tr>
<td>for( i &#8211; 0; i &lt; 10; i++ )<br />
 doSomething( );</td>
<td>for( i &#8211; 0; i &lt; 10; i++ ) {<br />
 doSomething();<br />
 }</td>
</tr>
</tbody>
</table>
<p>To flag this violation, we need to instruct the checker to find all instances of <em>for loop</em> nodes that contain a <em>Statement </em>node as an immediate descendant.</p>
<p>A tool that shows you a visual representation of the AST for the test case is quite helpful in the checker creation process. Here at Klocwork, we use <a href="http://www.klocwork.com/products/documentation/current/Tutorial_1_-_Introducing_Checker_Studio" target="_blank">Checker Studio</a> to:</p>
<ul>
<li>browse the AST structure of test cases,</li>
<li>identify nodes of interest, and </li>
<li>test XPath-like expressions that identify node types, qualifiers, conditions and variables to traverse the AST and flag the defect.</li>
</ul>
<p><strong>Note</strong>: If we wanted to enforce the compound statement rule in all loops, then we’d need to have one pattern (created using the XPath-like expression) for each possible kind, such as <em>while loops</em> and <em>do while  loops</em>.</p>
<p>Armed with the test case, Checker Studio, and a <a href="http://www.klocwork.com/products/documentation/current/All_about_C/C%2B%2B_KAST_expressions" target="_blank">syntax guide</a>, Steve identified the following expression that flags the infraction:</p>
<p>// ForStmt [not (Stmt::CompoundStmt)]</p>
<p>Here&#8217;s how the test case and expression appear in Checker Studio:</p>
<p><a href="http://www.klocwork.com/blog/wp-content/uploads/2012/01/GoldenRules_Studio2.png"><img class="aligncenter size-full wp-image-1436" title="GoldenRules_Studio" src="http://www.klocwork.com/blog/wp-content/uploads/2012/01/GoldenRules_Studio2.png" alt="" width="623" height="516" /></a></p>
<p><strong>Golden rules</strong></p>
<p>Based on his experience, Steve has a number of golden rules that get you from idea to defect detection faster:</p>
<ul>
<li><strong>Start simple</strong>: Use a simple test case that contains the defect you want to detect and work with one simple pattern at a time. Add more complexity as you go along</li>
<li><strong>Start rough and refine later:</strong> Don&#8217;t worry about false positives at first. In some cases it may even be easier to search for  instances that are OK and then negate the rule at the end</li>
<li><strong>Divide and conquer:</strong> With a more complex checker, work separately on each aspect of the defect you want to detect and then bring it all together at the end for testing in Checker Studio</li>
<li><strong>Watch your levels:</strong> Make the highlighting as relevant as possible for the issue you&#8217;re trying to find. For example, “// ClassType [MemberDecls[*]::MemberDecl]” will highlight classes that match, whereas “// ClassType/MemberDecls[*]::MemberDecl”  will highlight class members that match. The rule is the same, but the focus is different</li>
<li><strong>Weed out false negatives:</strong> Add negative examples (good code) to check for false negatives</li>
</ul>
<p>For more information about our custom AST checkers, watch our <a href="http://www.klocwork.com/resources/video/tag/insight-9.5/static-analysis-custom-checkers/display" target="_blank">Checker Studio video</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.klocwork.com/blog/2012/01/golden-rules-of-ast-checker-development/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Evolution of Static Code Analysis &#8211; Part 3: The Present Day</title>
		<link>http://www.klocwork.com/blog/2011/06/the-evolution-of-static-code-analysis-part-3-the-present-day/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=the-evolution-of-static-code-analysis-part-3-the-present-day</link>
		<comments>http://www.klocwork.com/blog/2011/06/the-evolution-of-static-code-analysis-part-3-the-present-day/#comments</comments>
		<pubDate>Wed, 08 Jun 2011 20:10:37 +0000</pubDate>
		<dc:creator>Todd Landry</dc:creator>
				<category><![CDATA[General Coding]]></category>
		<category><![CDATA[General Industry]]></category>
		<category><![CDATA[Software Quality]]></category>
		<category><![CDATA[Software Security]]></category>
		<category><![CDATA[code analysis]]></category>
		<category><![CDATA[software development]]></category>
		<category><![CDATA[source code analysis]]></category>
		<category><![CDATA[Static Analysis]]></category>

		<guid isPermaLink="false">http://www.klocwork.com/blog/?p=1322</guid>
		<description><![CDATA[My first 2 posts looked at 2 different eras of Static Code Analysis, the Early Years and the Early 21st Century. The SCA solutions of these times were revolutionary, and helped software development teams a great deal. But they had their warts. In the final post in this series, I’m going to introduce you to [...]]]></description>
			<content:encoded><![CDATA[<p>My first 2 posts looked at 2 different eras of Static Code Analysis, the <a href="http://www.klocwork.com/blog/2011/05/the-evolution-of-static-code-analysis-part-1-the-early-years/">Early Years</a> and the <a href="http://www.klocwork.com/blog/2011/05/the-evolution-of-source-code-analysis-part-2-the-early-21st-century/">Early 21</a><sup><a href="http://www.klocwork.com/blog/2011/05/the-evolution-of-source-code-analysis-part-2-the-early-21st-century/">st</a></sup><a href="http://www.klocwork.com/blog/2011/05/the-evolution-of-source-code-analysis-part-2-the-early-21st-century/"> Century</a>. The SCA solutions of these times were revolutionary, and helped software development teams a great deal. But they had their warts.</p>
<p>In the final post in this series, I’m going to introduce you to the present day Static Code Analysis technology and how it is impacting developers.</p>
<p><strong>The Present Day</strong></p>
<p>I’m a huge fan of Reece’s Peanut Butter Cups. I love them. I keep active so I don&#8217;t feel guilty eating them. In a strange, convoluted way, the 3<sup>rd</sup> generation of static code analysis tools are like this delicious combination of chocolate and peanut butter. Let me explain.</p>
<p><a href="http://www.klocwork.com/blog/wp-content/uploads/2011/05/reeces.jpeg"><img class="size-full wp-image-1323 alignright" title="reeces" src="http://www.klocwork.com/blog/wp-content/uploads/2011/05/reeces.jpeg" alt="" width="259" height="194" /></a></p>
<div class="mceTemp">I’m sure you remember from my previous posts how the 1<sup>st</sup> generation tools (i.e. Lint) gave questionable results but was still considered by developers as a tool exclusively for them, and the 2<sup>nd</sup> generation tools gave really good results but moved away from being a developer tool.</div>
<div class="mceTemp">The 3<sup>rd</sup> generation tools recognized that the developer must be an integral part of the process of identifying, fixing and preventing bugs from reaching the code stream and so, they took the proven results from the 2<sup>nd</sup> gen tools and delivered them right to the developer’s desktop.</div>
<p>Eureka! Now developers are able to perform an analysis locally, using their development environment of choice, while still getting the high accuracy and consistency that was previously only possible by checking in their code and waiting for the integration build to take place.</p>
<p>Think about the ramifications of this:</p>
<ul>
<li>cleaner code is being checked in </li>
<li>the ‘rinse-repeat’ vicious cycle of rework is drastically reduced</li>
<li>quality teams are now able to focus on testing the product’s functionality rather than spending cycles uncovering something that could easily and quickly be found by automated tools. </li>
</ul>
<p>Mmmm-mmmm good. Sounds like a win-win-win to me!</p>
<p>I think the best thing about these 3rd generation tools is simply the fact that developers are now able to resume ownership of the quality and security of the code they are producing.</p>
<p>Well, I hope you enjoyed this walk down memory lane. I sure did. Now I&#8217;m looking for spare change because I see a trip to the vending machine in my immediate future.</p>
<p>If you want to know more about the 3rd Generation tools, feel free to drop me a line.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.klocwork.com/blog/2011/06/the-evolution-of-static-code-analysis-part-3-the-present-day/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>To report, or not to report&#8230;</title>
		<link>http://www.klocwork.com/blog/2011/06/to-report-or-not-to-report/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=to-report-or-not-to-report</link>
		<comments>http://www.klocwork.com/blog/2011/06/to-report-or-not-to-report/#comments</comments>
		<pubDate>Mon, 06 Jun 2011 20:10:20 +0000</pubDate>
		<dc:creator>Gwyn Fisher</dc:creator>
				<category><![CDATA[Nasty Bugs]]></category>
		<category><![CDATA[Software Quality]]></category>
		<category><![CDATA[Software Security]]></category>
		<category><![CDATA[Static Analysis]]></category>

		<guid isPermaLink="false">http://www.klocwork.com/blog/?p=1333</guid>
		<description><![CDATA[Creating a source code analysis (SCA) engine is a balancing act, a decision process of where you believe the most value can be found along the spectrum that is the signal-to-noise ratio of the detection process. At one end lies the realm of massive noise and hopefully complete coverage, whilst at the other is the [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright" style="margin-left: 5px; margin-right: 5px;" src="http://images.all-free-download.com/images/graphiclarge/balance_scale_clip_art_10655.jpg" alt="Balance" width="425" height="274" />Creating a source code analysis (SCA) engine is a balancing act, a decision process of where you believe the most value can be found along the spectrum that is the signal-to-noise ratio of the detection process. At one end lies the realm of massive noise and hopefully complete coverage, whilst at the other is the quiet calm of the theoretically useful but ultimately useless realm of no noise, but ultimately no signal either.</p>
<p>That may sound counter-intuitive. Shouldn’t a zero noise point on the spectrum be accompanied by an infinitely strong signal? Perhaps in the world of DSP this is true, but in the world of SCA reducing noise comes right along with a reduction in detection capability &#8211; it’s unfortunately almost a straight-line correlation.</p>
<p>So if we assume that we’re trying to balance a couple of dials on our theoretical tuner, we might start by reducing or dampening noise – it’s the most obvious place to start, after all. Nobody likes to listen to their favorite FM station through the curtain of hissing and popping that accompanies the act of driving through a major city.  Likewise no developer likes sifting through a long list of bogus detection errors in order to find the hidden gems. But to drag out the analogy, assume that the only way of reducing hiss on your FM signal is to turn down the volume… now you’ve got less hiss, but also less Bruce Springsteen goodness to accompany it.</p>
<p>Balance is what we need here, obviously. Enough Boss to make us ignore the hiss, or to put it in a more SCA-like context, enough interesting bugs to make us ignore the incorrect, or the irrelevant (correct detections on the part of the engine that the developer just doesn’t care about, e.g. low memory conditions in a memory-insensitive environment).</p>
<p>Consider the following simple example that clearly lies &#8220;on the line&#8221;:</p>
<pre><span style="font-size: small;"><span style="font-family: courier new,courier;">    void foo(char* s, int a)</span><span style="font-family: courier new,courier;">
    {
</span><span style="font-family: courier new,courier;">        char* s1 = s;
</span><span style="font-family: courier new,courier;">        if( a &gt; 0 )
</span><span style="font-family: courier new,courier;">            *s1 = 'a';   // potentially use an uninitialized ‘s1’</span><span style="font-family: courier new,courier;">
    }
</span><span style="font-family: courier new,courier;">
    void bar(int m)
    {
        char *s;
        foo(s, m);       // s is not initialized prior to calling ‘foo’
    }</span></span></pre>
<p>So&#8230; to report, or not to report?</p>
<p>Lacking any other information, it is obvious that function ‘foo’ interacts under certain situations (when parameter ‘a’ is positive) with parameter ‘s’ (aliased as local variable ‘s1’). As we have no knowledge about the provenance of parameter ‘s’ when analyzing ‘foo’, however, there’s nothing here to cause a report and so we squirrel away the knowledge of what ‘foo’ does for later use.</p>
<p>When analyzing ‘bar’ we know what ‘foo’ does, and we know we’ve got an uninitialized local pointer, ‘s’. But again we’re lacking enough knowledge to know the valid values, or ranges, that parameter ‘m’ may take. There are definitely a set of circumstances here in which we know a problem will occur (if parameter ‘m’ is positive), and a set of circumstances in which we know a problem will not occur (if parameter ‘m’ is zero or negative) – this much is encoded in the functional behavior of ‘foo’. But is it a defect, or should we filter out the report in favor of providing only those situations in which we can be “sure” the bug not only exists, but can be proven to be exercised?</p>
<p>There’s the art of balance in a nut-shell, and it revolves around the phrase “lacking any other information.” In the ideal world, lacking any restrictions in terms of time, memory or computing power (or indeed actual from-the-wall power, as we have to worry about now), we might defer all such decisions until we categorically know that a particular data value is passed down the call graph far enough to get to ‘foo’. But in the real world of multi-million LOC projects, that approach simply can’t scale.</p>
<p>And so, calling on balance as our friend, we can bias a localized decision to report or not, given that we know to at least one order of approximation that bad things could happen here. Different engines pronounce that bias differently, leading to one of the greatest divides between prevalent solutions.</p>
<p>Now ask yourself, as the developer, is it a worthy report if you know that 10 levels up the call graph there’s a check on what eventually becomes parameter ‘m’ to ensure that it’s never positive? Perhaps you’d automatically classify this as a false positive and, annoyed at the tool, move onto the next report. Or perhaps, seeing the size of the gap in the call graph, you might just choose to code defensively, initializing ‘s’ to NULL in ‘bar’ and adding guard code to &#8216;foo&#8217; because, hey, you never know.</p>
<p>And as we’ve all seen so many times over the years, “you never know” might just as well be written “and so it came to pass&#8230;”</p>
]]></content:encoded>
			<wfw:commentRss>http://www.klocwork.com/blog/2011/06/to-report-or-not-to-report/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Evolution of Source Code Analysis &#8211; Part 2: The Early 21st Century</title>
		<link>http://www.klocwork.com/blog/2011/05/the-evolution-of-source-code-analysis-part-2-the-early-21st-century/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=the-evolution-of-source-code-analysis-part-2-the-early-21st-century</link>
		<comments>http://www.klocwork.com/blog/2011/05/the-evolution-of-source-code-analysis-part-2-the-early-21st-century/#comments</comments>
		<pubDate>Thu, 26 May 2011 13:17:27 +0000</pubDate>
		<dc:creator>Todd Landry</dc:creator>
				<category><![CDATA[General Coding]]></category>
		<category><![CDATA[Software Quality]]></category>
		<category><![CDATA[Static Analysis]]></category>
		<category><![CDATA[software development]]></category>
		<category><![CDATA[source code analysis]]></category>
		<category><![CDATA[testing]]></category>

		<guid isPermaLink="false">http://www.klocwork.com/blog/?p=1313</guid>
		<description><![CDATA[In my last post, I took us back in time to an era of bad fashion, questionable music, legendary television shows, and source code analysis tools that were made specifically for software developers. It was the 1970s. In this post, I fast forward to just after the turn of the century to discuss the next [...]]]></description>
			<content:encoded><![CDATA[<p>In my <a href="http://www.klocwork.com/blog/2011/05/the-evolution-of-static-code-analysis-part-1-the-early-years/">last post</a>, I took us back in time to an era of bad fashion, questionable music, legendary television shows, and source code analysis tools that were made specifically for software developers. It was the 1970s. In this post, I fast forward to just after the turn of the century to discuss the next evolution of static analysis tools.</p>
<p><strong>The Early 21</strong><sup><strong>st</strong></sup><strong> Century</strong></p>
<p>Not long after we first viewed hairy-footed <a href="http://en.wikipedia.org/wiki/The_Lord_of_the_Rings">Hobbits</a> on the silver screen, and the sham that was affectionately known as <a href="http://en.wikipedia.org/wiki/Year_2000_problem">Y2K</a>, a new generation of source code analysis tools emerged to cure the errors of the first-generation tools.</p>
<p>These new tools looked beyond the syntactical analysis of previous tools, and instead provided inter-procedural and data-flow analysis. Low hanging fruit was definitely not the target for these tools.</p>
<p>These new techniques were serious&#8211;finding complex defects that could impact code quality and security, and they did that while ensuring that the “noise” (i.e. false positive rate) was greatly reduced compared to the first-generation tools. In addition to local defects, they were now identifying resource management issues, security vulnerabilities, concurrency issues, and so on. These were serious defects that,  if left undetected and unfixed, had the potential for massive problems to the code stream.<a href="http://www.klocwork.com/blog/wp-content/uploads/2011/04/hobbit_feet.jpg"><img class="alignright size-medium wp-image-1314" title="hobbit_feet" src="http://www.klocwork.com/blog/wp-content/uploads/2011/04/hobbit_feet-300x258.jpg" alt="" width="300" height="258" /></a></p>
<p>In order to perform this much deeper analysis, a fundamental change in the analysis techniques had to occur. These engines needed an unfiltered view of the entire code stream, and so they became tightly integrated with the integration build process.</p>
<p>Umm, Houston, we have a problem. If the analysis takes place at integration build time, then that means the analysis is no longer being initiated by the developers. Source code analysis tools became centralized and moved into a more downstream process such as part of a code audit function.</p>
<p>Developers were now being <em>told</em> they created bugs well after they actually checked in the code. They had already moved onto something entirely different, so now bringing them these day-old, or week-old defects was certainly not the most productive use of their time. It is well documented that the earlier you find defects in your code, the more cost effective it is to fix them, so you can clearly see the problems with these second-generation tools.</p>
<p>If only there was a way to bring these second-generation analysis capabilities to the developer desktop. More about that in my next entry.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.klocwork.com/blog/2011/05/the-evolution-of-source-code-analysis-part-2-the-early-21st-century/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Klocwork Developer Network Set to Go Live</title>
		<link>http://www.klocwork.com/blog/2011/03/klocwork-developer-network-set-to-go-live/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=klocwork-developer-network-set-to-go-live</link>
		<comments>http://www.klocwork.com/blog/2011/03/klocwork-developer-network-set-to-go-live/#comments</comments>
		<pubDate>Tue, 22 Mar 2011 16:55:18 +0000</pubDate>
		<dc:creator>Alan Weekes</dc:creator>
				<category><![CDATA[Code Review]]></category>
		<category><![CDATA[Coding Standards]]></category>
		<category><![CDATA[General Coding]]></category>
		<category><![CDATA[Software Quality]]></category>
		<category><![CDATA[Static Analysis]]></category>
		<category><![CDATA[User Documentation]]></category>
		<category><![CDATA[code analysis]]></category>
		<category><![CDATA[coding standards]]></category>
		<category><![CDATA[developer productivity]]></category>
		<category><![CDATA[software development]]></category>

		<guid isPermaLink="false">http://www.klocwork.com/blog/?p=1269</guid>
		<description><![CDATA[Our dilemma: How do we remove the barriers to knowledge about Klocwork's toolset, and developer best practices for creating high-quality code?
The answer: Klocwork Developer Network--a new online portal designed for learning, sharing and discussing all things source code analysis. ]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.klocwork.com/blog/wp-content/uploads/2011/03/DN_Home.png"><img class="alignright size-medium wp-image-1271" title="DN_Home" src="http://www.klocwork.com/blog/wp-content/uploads/2011/03/DN_Home-300x242.png" alt="Klocwork Developer Network" width="300" height="242" /></a><strong>Our dilemma:</strong> How do we remove the barriers to knowledge about Klocwork&#8217;s toolset and developer best practices for creating high-quality code?</p>
<p><strong>The answer:</strong> Klocwork Developer Network&#8211;a new online portal designed for learning, sharing and discussing all things source code analysis. We have had a lot of fun and a few sleepless nights as we assembled industry knowledge, online forums, computer-based training, best practices from industry experts, and lots of reference and learning resources.</p>
<p>A significant portion of the content on the Developer Network is open for public consumption. By registering and logging in, you get additional videos, demos, CBT and more.</p>
<p>We have a lot of fresh content to add to the site in the upcoming weeks and months, and we want to hear from you about what you would like to see. Why not register now at developer.klocwork.com? Then tell other Klocwork users about the portal too.</p>
<p>Visit Klocwork&#8217;s Developer Network at <a href="http://developer.klocwork.com">developer.klocwork.com</a>.</p>
<p>Already a my.klocwork.com user? Access the Klocwork Developer Network using your existing my.klocwork.com login. (But note that my.klocwork.com remains the place to go for support tickets and for FTP access to the latest software releases.)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.klocwork.com/blog/2011/03/klocwork-developer-network-set-to-go-live/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dealing with a different type of backlog&#8230;your bug backlog</title>
		<link>http://www.klocwork.com/blog/2011/02/dealing-with-a-different-type-of-backlog-your-bug-backlog/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=dealing-with-a-different-type-of-backlog-your-bug-backlog</link>
		<comments>http://www.klocwork.com/blog/2011/02/dealing-with-a-different-type-of-backlog-your-bug-backlog/#comments</comments>
		<pubDate>Thu, 03 Feb 2011 14:00:53 +0000</pubDate>
		<dc:creator>Todd Landry</dc:creator>
				<category><![CDATA[General Coding]]></category>
		<category><![CDATA[Nasty Bugs]]></category>
		<category><![CDATA[Software Quality]]></category>
		<category><![CDATA[backlog]]></category>
		<category><![CDATA[bugs]]></category>
		<category><![CDATA[defect detection]]></category>
		<category><![CDATA[software development]]></category>
		<category><![CDATA[source code analysis]]></category>
		<category><![CDATA[Static Analysis]]></category>

		<guid isPermaLink="false">http://www.klocwork.com/blog/?p=1230</guid>
		<description><![CDATA[As a product manager, the only backlog I typically care about is my product backlog. Do I have the right stories in there? Do the stories have enough detail? Are they properly prioritized? You know, that kind of stuff. Today, however, I&#8217;m going to write about a very different backlog, that is the static analysis defect [...]]]></description>
			<content:encoded><![CDATA[<p>As a product manager, the only backlog I typically care about is my <a href="http://www.mountaingoatsoftware.com/scrum/product-backlog">product backlog</a>. Do I have the right stories in there? Do the stories have enough detail? Are they properly prioritized? You know, that kind of stuff. Today, however, I&#8217;m going to write about a very different backlog, that is the <a href="http://codeintegrity.blogspot.com/2009/06/cost-of-static-analysis-backlogs.html">static analysis defect backlog</a>.</p>
<p>A static analysis backlog is created when you run a static analysis product on your code base for the very first time. Chances are pretty good that the first analysis is going to list a large number of defects, some that are without question real, and some that perhaps are not. Do not freak out! This is the first time that analysis engine has &#8216;laid eyes&#8217; upon your code and it is going to flex its muscles and show you any weaknesses it believes exist. So how does one deal with this? Here are a few strategies to help you:</p>
<p>1) Don&#8217;t <a href="http://www.urbandictionary.com/define.php?term=%22boiling%20the%20ocean%22">boil the ocean</a>. Before you even run that first analysis, don&#8217;t have a &#8220;wouldn&#8217;t it be cool&#8221; moment, where you decide to turn on every single rule the analysis engine has. There is a reason why static analysis tools haven&#8217;t turned on everything.  They are showing the most accurate and critical issues first.  So unless you have unlimited time and resources, your best bet is to start with a core set of rules and run the analysis based on that set. This core set of rules should include things such as memory/resource leaks, buffer overruns, null pointer dereferences, uninitialized variables, and so on. Add other rules once you have this core set under control.</p>
<div id="attachment_1237" class="wp-caption alignright" style="width: 310px"><a href="http://www.klocwork.com/blog/wp-content/uploads/2011/02/opossum.png"><img class="size-medium wp-image-1237" title="opossum" src="http://www.klocwork.com/blog/wp-content/uploads/2011/02/opossum-300x190.png" alt="" width="300" height="190" /></a><p class="wp-caption-text">Is your issue backlog making you cross eyed? Try these coping strategies.</p></div>
<p><br class="spacer_" /></p>
<p>2) Baseline your defects. Consider that first analysis your baseline and choose to &#8216;park&#8217; them for the time being. Chances are the product that the analysis was run on is one that has already been released to the public, and in good working order. Zero out these defects for now, and start to triage them, which leads into strategy #3.</p>
<p>3) This is going to sound pretty obvious, but when it comes to <a href="http://www.klocwork.com/products/documentation/current/Managing_your_issue_backlog_in_Klocwork_Review">managing your issue backlog</a> start looking at the most critical issues first. These are the ones that are most likely to cause a failure of some sort, so determine if these issues are real, and if so, fix them immediately. Once you&#8217;re done with the most critical issues, move to the next level of severity, and continue on that way.</p>
<p>4) Finally, tune your analysis. Any good vendor will allow you to tune your analysis. The benefits of tuning are twofold; 1) you can find code issues that would otherwise go undetected and, 2) reduce the number of issues that the engine reports incorrectly in the context of your source code. You should think of ways to give the tool more context about your code base to increase accuracy.</p>
<p>If you follow these suggestions, you&#8217;ll definitely have a better grasp of your bug backlog, and you&#8217;ll be able to execute on reducing that backlog quickly and efficiently. If you don&#8217;t, then at some point, you may feel a little like the critter pictured here.</p>
<p>If there are any other strategies you&#8217;ve tried to deal with your bug backlog, leave a comment or two. I&#8217;d love to hear about them.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.klocwork.com/blog/2011/02/dealing-with-a-different-type-of-backlog-your-bug-backlog/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Rootkitting a PLC &#8211; who would have thought they were vulnerable</title>
		<link>http://www.klocwork.com/blog/2010/10/rootkitting-a-plc-who-would-have-thought-they-were-vulnerable/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=rootkitting-a-plc-who-would-have-thought-they-were-vulnerable</link>
		<comments>http://www.klocwork.com/blog/2010/10/rootkitting-a-plc-who-would-have-thought-they-were-vulnerable/#comments</comments>
		<pubDate>Tue, 19 Oct 2010 18:05:12 +0000</pubDate>
		<dc:creator>Eric Hollebone</dc:creator>
				<category><![CDATA[General Coding]]></category>
		<category><![CDATA[Software Quality]]></category>
		<category><![CDATA[Software Security]]></category>
		<category><![CDATA[software security]]></category>
		<category><![CDATA[Static Analysis]]></category>

		<guid isPermaLink="false">http://www.klocwork.com/blog/?p=1115</guid>
		<description><![CDATA[Part of my life has been spent in the manufacturing sector working with industrial automation devices, but the discovery of the Stuxnet virus is the first time I&#8217;ve ever heard of specifically virus targeting and even rootkitting a PLC (programmable logic controller) or  SCADA (supervisory control and data acquisition) network. When working in industrial plants, we took [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.klocwork.com/blog/wp-content/uploads/2010/10/PLC_Control_Simple.jpg"><img class="alignleft size-medium wp-image-1116" style="margin-right: 10px;" title="Stuxnet infection" src="http://www.klocwork.com/blog/wp-content/uploads/2010/10/PLC_Control_Simple-300x102.jpg" alt="" width="300" height="102" /></a>Part of my life has been spent in the manufacturing sector working with industrial automation devices, but the discovery of the <a title="Wikipedia description: Stuxnet" href="http://en.wikipedia.org/wiki/Stuxnet" target="_blank">Stuxnet</a> virus is the first time I&#8217;ve ever heard of specifically virus targeting and even <a title="Wikipedia definition: rootkit" href="http://en.wikipedia.org/wiki/Rootkit">rootkitting</a> a <a title="Wikipedia definition: PLC" href="http://en.wikipedia.org/wiki/Programmable_Logic_Controller">PLC</a> (programmable logic controller) or  <a title="Wikipedia definition: SCADA" href="http://en.wikipedia.org/wiki/SCADA" target="_blank">SCADA</a> (supervisory control and data acquisition) network.</p>
<p>When working in industrial plants, we took the standard precautions with regard to Windows viruses and even started to add virus protection for Linux, but never did it occur to any of us that the industrial automation equipment might be at risk. Whenever the subject was even brought up, which was rare in itself, there were the standard arguments:</p>
<ul>
<li>Oh, it&#8217;s on a physically separate network (or VLAN configuration), only USB (thumb/flash) drives are allowed and they&#8217;re virus checked before use.</li>
<li>Oh, it&#8217;s running a completely different processor/operating system/architecture &#8211; there&#8217;s no way it can be infected.</li>
</ul>
<p>The consequences of infection are severe.   These devices run everything from our nuclear power plants to complex manufacturing assembly lines, aircraft controls (<a title="Wikipedia definition: FADEC" href="http://en.wikipedia.org/wiki/FADEC" target="_blank">FADECs</a>) and chemical refineries, just to name a few.  In its most basic of functions, industrial automation is used for two purposes: to keep humans safe and to produce products for less cost.  Interrupting either of these is going to kill someone or cost a company a large chunk of change.</p>
<p>So, what does this all mean?  It means that industrial automation and PLC vendors had better start hardening their solutions for security vulnerabilities and elevate the quality of their firmware and software components using security vulnerability tools such as <a title="Klocwork's static analysis" href="http://www.klocwork.com/products/insight/klocwork-truepath/">Klocwork&#8217;s static analysis</a> just as the general computing industry has done for the past 30 years.</p>
<p>For an in-depth analysis and timeline, refer to either Symantec&#8217;s whitepaper on their <a href="http://www.symantec.com/content/en/us/enterprise/media/security_response/whitepapers/w32_stuxnet_dossier.pdf" target="_blank">Stuxnet analysis</a> or the work done by ESET on their version of <a href="http://www.eset.com/resources/white-papers/Stuxnet_Under_the_Microscope.pdf" target="_blank">Stuxnet</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.klocwork.com/blog/2010/10/rootkitting-a-plc-who-would-have-thought-they-were-vulnerable/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Remote Code Reviews &#8211; how do you support them?</title>
		<link>http://www.klocwork.com/blog/2010/08/remote-code-reviews-how-do-you-support-them/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=remote-code-reviews-how-do-you-support-them</link>
		<comments>http://www.klocwork.com/blog/2010/08/remote-code-reviews-how-do-you-support-them/#comments</comments>
		<pubDate>Tue, 17 Aug 2010 18:55:22 +0000</pubDate>
		<dc:creator>Eric Hollebone</dc:creator>
				<category><![CDATA[Code Review]]></category>
		<category><![CDATA[General Coding]]></category>
		<category><![CDATA[Software Quality]]></category>
		<category><![CDATA[software developer]]></category>

		<guid isPermaLink="false">http://www.klocwork.com/blog/?p=1049</guid>
		<description><![CDATA[Most code reviews are done in-person, 60%  according to data  from a Forrester Consulting study commissioned by Klocwork.  So how do you accommodate remote sites, out-of-office employees  or off-shore development shops? Most software developer teams will face some form of remote development challenge during their careers or product cycles.  As demonstrated from the data above, the breakdown of remote need [...]]]></description>
			<content:encoded><![CDATA[<p>Most code reviews are done in-person, 60%  according to data  from a <a title="Code Review Resource Centre" href="http://www.klocwork.com/resources/code-review/" target="_blank">Forrester Consulting study commissioned by Klocwork</a>.  So how do you accommodate remote sites, out-of-office employees  or off-shore development shops?</p>
<p><a href="http://www.klocwork.com/blog/wp-content/uploads/2010/08/klocwork-code-review-remote-support.png"><img class="alignleft size-large wp-image-1050" title="klocwork-code-review-remote-support" src="http://www.klocwork.com/blog/wp-content/uploads/2010/08/klocwork-code-review-remote-support-1024x362.png" alt="" width="800" /></a></p>
<p>Most software developer teams will face some form of remote development challenge during their careers or product cycles.  As demonstrated from the data above, the breakdown of remote need is as follows:</p>
<ul>
<li>76% use some form of outsourcing,</li>
<li>64% have some developers  located outside of the main campus,</li>
<li>40% of reviews are conducted with remote participants.</li>
</ul>
<p>You can&#8217;t let development come to a grinding halt simply because a critical team member is not physically available at the scheduled time or location.  For most organizations, code reviews need to be performed and employee travel is not the solution for cost and timing reasons.  This has driven the adoption of lightweight review processes and new tools that support it.</p>
<p>Klocwork built a code review tool for this express purpose.  Other ones exist like Code Collaborator and the open source <a href="http://www.reviewboard.org">Review Board</a> .  How do you support your remote code reviews?  Email?  Wiki? Or a purpose-built tool like one of the ones mentioned?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.klocwork.com/blog/2010/08/remote-code-reviews-how-do-you-support-them/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>0010 0000 or 0000 0010 which one are you?</title>
		<link>http://www.klocwork.com/blog/2010/08/0010-0000-or-0000-0010-which-one-are-you/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=0010-0000-or-0000-0010-which-one-are-you</link>
		<comments>http://www.klocwork.com/blog/2010/08/0010-0000-or-0000-0010-which-one-are-you/#comments</comments>
		<pubDate>Tue, 10 Aug 2010 20:08:27 +0000</pubDate>
		<dc:creator>Eric Hollebone</dc:creator>
				<category><![CDATA[General Coding]]></category>
		<category><![CDATA[Software Quality]]></category>
		<category><![CDATA[Static Analysis]]></category>
		<category><![CDATA[big endian and little endian]]></category>
		<category><![CDATA[memory model]]></category>
		<category><![CDATA[network stacks]]></category>
		<category><![CDATA[porting]]></category>
		<category><![CDATA[processor architecture]]></category>
		<category><![CDATA[source code analysis]]></category>

		<guid isPermaLink="false">http://www.klocwork.com/blog/?p=1045</guid>
		<description><![CDATA[I love this quote by Carl Ek from  Code Integrity solutions: There are 0010 0000 kinds of people in the world: Those that understand the difference between Big Endian and Little Endian, and those that do not. Issues with Endianism and processor architecture ports are becoming more and more common these days as more desktop source code [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.klocwork.com/blog/wp-content/uploads/2010/08/Endian.gif"><img class="size-medium wp-image-1047 alignright" style="margin-left: 10px; margin-right: 10px; border: 2px solid black;" title="Big and Little Endian" src="http://www.klocwork.com/blog/wp-content/uploads/2010/08/Endian-300x291.gif" alt="" width="300" height="291" /></a>I love this quote by Carl Ek from  <a href="http://codeintegrity.blogspot.com">Code Integrity solutions</a>:</p>
<blockquote><p><em>There are 0010 0000 kinds of people in the world: Those that understand the difference between Big Endian and Little Endian, and those that do not.</em></p>
</blockquote>
<p>Issues with <a href="http://en.wikipedia.org/wiki/Endian">Endianism</a> and processor architecture ports are becoming more and more common these days as more desktop source code moves into different arenas.  Gone are the days when the 32-bit memory model or little-endian format dominate. Software changes are required to support the growth occurring not at the desktop, but in the server  and mobile platforms.</p>
<p>Mobile devices especially have opened a Pandora&#8217;s box of Endian and memory problems, with variety of processor architectures with <a href="http://www.arm.com/">ARM</a><sup>[1]</sup> leading the way.  Add to this mix,  end-consumers are demanding desktop features like <a title="Flash on Android" href="http://www.androidapk.net/?p=53">Adobe Flash</a> or <a title="Documents to Go" href="http://www.dataviz.com/">Office apps</a> on mobile devices, many a stable codebase will fall apart when ported to either mobile or server.</p>
<p>For developers porting to different platforms, there are some significant challenges.  Just to list a few:</p>
<ul>
<li>CPU optimizations need to be reviewed</li>
<li>inline assembly calls require rewriting or removal</li>
<li><a href="http://en.wikipedia.org/wiki/Word_(computing)">machine word (WORD)</a> allocations may require refactoring</li>
<li> any binary data exchanged over the network stacks require verification</li>
</ul>
<p>None of these are  new, they&#8217;re just not a common skillset for most developers.</p>
<p><a title="Source code analysis tools" href="http://www.klocwork.com/products">Source code analysis </a>can be a boon in two ways. Firstly, in the planning phase by helping you determine the breadth of the effort,  and secondly by identifying any existing  issues, particularly of the memory allocation and Endian varieties.</p>
<p>For more in depth information, there are two recent articles available from Dr. Dobbs:</p>
<ul>
<li><a href="http://www.drdobbs.com/cpp/226600156">Porting to 64-bit Platforms</a> by Irving Rabin</li>
<li><a href="http://www.drdobbs.com/windows/226000073">Detecting Endian Issues with Static Analysis Tools</a> by Carl Ek</li>
</ul>
<p><sup>[1]</sup> Note: Some ARM processors support both <a href="http://search.arm.com/search?site=Site-Search&amp;q=endian">big and little Endian formats</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.klocwork.com/blog/2010/08/0010-0000-or-0000-0010-which-one-are-you/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>7 habits for highly ineffective source code analysis</title>
		<link>http://www.klocwork.com/blog/2010/06/7-habits-of-highly-ineffective-sourc-code-analysis/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=7-habits-of-highly-ineffective-sourc-code-analysis</link>
		<comments>http://www.klocwork.com/blog/2010/06/7-habits-of-highly-ineffective-sourc-code-analysis/#comments</comments>
		<pubDate>Tue, 29 Jun 2010 13:30:09 +0000</pubDate>
		<dc:creator>Patti Murphy</dc:creator>
				<category><![CDATA[General Coding]]></category>
		<category><![CDATA[Software Quality]]></category>
		<category><![CDATA[software development]]></category>
		<category><![CDATA[source code analysis]]></category>
		<category><![CDATA[Static Analysis]]></category>

		<guid isPermaLink="false">http://www.klocwork.com/blog/?p=1010</guid>
		<description><![CDATA[Mark Grice is a pretty unflappable guy, but when you ask him a question about barriers to successful adoption of Source Code Analysis (SCA) technology, he starts to splutter. “There are things I see over and over that make me want to bang my head against a wall,” says the Klocwork Director and Manager of [...]]]></description>
			<content:encoded><![CDATA[<p>Mark Grice is a pretty unflappable guy, but when you ask him a question about barriers to successful adoption of <a title="Klocwork's source code analysis engine" href="http://www.klocwork.com/products/insight/klocwork-truepath/">Source Code Analysis</a> (SCA) technology, he starts to splutter.</p>
<div id="_mcePaste">“There are things I see over and over that make me want to bang my head against a wall,” says the Klocwork Director and Manager of our International Reseller/Partner Network.  For the past nine years, Grice has helped companies from around the world to successfully implement SCA.</div>
<div id="_mcePaste">There are many companies that <a href="http://www.klocwork.com/blog/2010/05/leveraging-static-analysis/">deploy SCA</a> tools and reap their ROI, but there are others that can’t get to first base.  Below are barriers Grice has consistently encountered from a persistent minority.</div>
<div></div>
<div id="_mcePaste">Here are 7 sure-fire ways to ensure that your organization will fail at SCA:</div>
<div id="_mcePaste">
<ol>
<li> Make sure your SCA tool evaluation process is long and costly.<br />
 “I’ve seen companies spend three years in the analysis phase, involving a number of key staff,” Grice  says. His advice? “Buy them all and just start using them. At least you’ll have spent three years producing better code instead of just testing and evaluating.” Or, just buy one and start using it. If it doesn’t do everything you want it to, buy another one.</li>
<li>Cling to your tool-selection criteria to the point of impotence.<br />
 “I’ve seen companies not buy a tool because they couldn’t check off one requirement out of 100.  It didn’t matter that the other 99 criteria were met,“ Grice says.  Often, these checklists eliminate every tool.  These companies opt to do nothing rather than something about their code quality.</li>
<li>Insist that one tool must do everything.<br />
 No one tool will do everything. Buy a couple of them.  “If I’m working on a construction project and I need to drive some nails and cut some wood, I’m going to go and buy a hammer and a saw.” What? There’s no such thing as a sammer (or a haw) for both those tasks?</li>
<li>Focus solely on the number of false positives the tools throw.<br />
 “A zero false-positive rate is ridiculous,” Grice says.  A very low false positive rate is often tied to a higher false negative rate. It’s easier to manage false positives than false negatives, particularly since the latter rear their ugly mugs after your product is shipped, he says.  If a tool is tunable and customizable, you can just filter or turn off the defect types that don’t interest you.</li>
<li>Denial:  You don’t have to fix problems if you don’t find them.<br />
 “Gack!” Grice has to do deep breathing to get through this one. “If you don’t want to find anything, then don’t test! I mean, jeez!”</li>
<li> Have a persecution complex: Management will use the information against us.<br />
 Developers sometimes worry that they’ll be ranked by number of defects per lines of code. But if you’re finding and fixing defects before you check in, your numbers will actually improve. “I’ve seen one team resist the SCA tool because they were at the top of their game. Then that team saw their ranking fall because teams using the SCA tool made consistent quality gains with every build and then caught up and then surpassed them,” Grice says.</li>
<li>Make non-development staff responsible for rolling out the SCA tools.<br />
 “I know we’re in for it when the prime asks, ‘What’s a build?’ or ‘What’s make?’”<br />
 To successfully roll out, Grice says, you need a code expert&#8211;someone who really understands your build process, the development environments and how to evaluate the findings.</li>
</ol>
</div>
<div id="_mcePaste">And there you have it—your SCA-failure habits. We’ll end here because Grice has to go and get his  blood pressure checked.</div>
]]></content:encoded>
			<wfw:commentRss>http://www.klocwork.com/blog/2010/06/7-habits-of-highly-ineffective-sourc-code-analysis/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>So many developer tools &#8211; which ones to pick</title>
		<link>http://www.klocwork.com/blog/2010/05/so-many-developer-tools-which-ones-to-pick/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=so-many-developer-tools-which-ones-to-pick</link>
		<comments>http://www.klocwork.com/blog/2010/05/so-many-developer-tools-which-ones-to-pick/#comments</comments>
		<pubDate>Wed, 19 May 2010 15:51:25 +0000</pubDate>
		<dc:creator>Eric Hollebone</dc:creator>
				<category><![CDATA[Code Review]]></category>
		<category><![CDATA[General Coding]]></category>
		<category><![CDATA[Software Quality]]></category>
		<category><![CDATA[Static Analysis]]></category>

		<guid isPermaLink="false">http://www.klocwork.com/blog/?p=972</guid>
		<description><![CDATA[What is the ROI to the company for developer tools?  This has always been and continues to be a struggle in any development organization. Developer productivity to date has been very poorly measured and studied. Programming has always been a creative task bound within the constraints of  a framework.  Many people have tried to measure direct individual [...]]]></description>
			<content:encoded><![CDATA[<p>What is the ROI to the company for developer tools?  This has always been and continues to be a struggle in any  development organization. Developer productivity to date has been very poorly measured and studied. Programming has always been a creative task bound within the constraints of  a framework.  Many people have tried to measure direct individual developer productivity with less than convincing results:</p>
<blockquote><p>Bugs per dev, bugs per team, bug regression rates, bug trend lines, comparative .NET Framework book sales rates,  # of [static analysis] violations per kloc, etc, etc.. the list is really endless…</p>
</blockquote>
<p>So when it comes to assessing the value of development tools, what are the motivational and productivity drivers?  During my time as a development manager, my focus was always on reducing roadblocks and mindless repetitive tasks.  When you are well compensating developers to use their grey matter, you don&#8217;t want their efforts to be wasted on the simple stuff.</p>
<p>Focusing on a bottom-up approach, I base the tool choices on the marginal cost for adding a developer.  After getting the basics out of the way, including corporate overhead, dev box, standard  software load and a complier, what&#8217;s next?</p>
<p>Well, there are a plethora of vendors all screaming at you to buy their product, but let&#8217;s take a step back and look at what makes a developer produce better code.</p>
<p>Here is my list in order and why.  It starts at the developer desktop and depends on frequency of use and then spreads out to the rest of the development team:</p>
<ul>
<li>Source control (with nightly backups) &#8211; Even for a development team of one, don&#8217;t leave home without it.  The benefits of source control really can&#8217;t be overstated: revision control, easy diffs, build integration, product branching  and maintenance, etc.</li>
</ul>
<ul>
<li><a href="http://www.klocwork.com/products/insight/klocwork-truepath/" target="_blank">static analysis</a> &#8211; like grammar checking for Office but so much deeper. It has been proven time and time again that getting rid of the minor flaws and style inconsistencies right when the developer is working and the code is fresh in their brain is the most productive.  Waiting 2 hours, a  day and for some even a week costs a context switch.  When you add in the regression analysis for the maintainability, this tool just shines and pays for itself quickly</li>
</ul>
<ul>
<li>Issue tracking &#8211; some might debate that this tool&#8217;s placement should be above static analysis, but as I said,  my focus here is on the developer&#8217;s desktop and not team or management needs.</li>
</ul>
<ul>
<li>refactoring &#8211; only sightly better than find/search/replace - not essential but when used frequently and consistently can be used for good productivity benefits .  It&#8217;s one of the small tools that get you through the day.</li>
</ul>
<ul>
<li><a href="http://www.klocwork.com/solutions/code-review/">code review</a> &#8211; similar to static analysis but now we have widened our view off of the desktop and include the team to build better code. No one person can know everything and extra pairs of eyes on the code is only going to make it better.</li>
</ul>
<ul>
<li>unit testing &#8211; anything to take away the drudgery of building simple test cases that completely cover the class/api interfaces and maintaining with the refactoring that will happen over time.  You might ask why unit testing is lower on the list. Simple. You can&#8217;t test code that has not been written yet.</li>
</ul>
<ul>
<li>dynamic/performance profiling and input injection &#8211; your customer will like you for this one.  Over time, most applications grow, add new features and become sluggish pigs.  Version performance testing and making critical judgments in trading off performance for value is one of the  keys to repeat customers.</li>
</ul>
<p>There you have it.  A list of tools for developers (note I said developers not PMs or teams) that I consider essential to have on each desktop to get them through their day.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.klocwork.com/blog/2010/05/so-many-developer-tools-which-ones-to-pick/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>MISRA rules that don&#8217;t make sense</title>
		<link>http://www.klocwork.com/blog/2010/05/misra-rules-that-dont-make-sense/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=misra-rules-that-dont-make-sense</link>
		<comments>http://www.klocwork.com/blog/2010/05/misra-rules-that-dont-make-sense/#comments</comments>
		<pubDate>Thu, 13 May 2010 20:18:11 +0000</pubDate>
		<dc:creator>Alen Zukich</dc:creator>
				<category><![CDATA[Compliance]]></category>
		<category><![CDATA[Software Quality]]></category>
		<category><![CDATA[coding standards]]></category>
		<category><![CDATA[MISRA]]></category>
		<category><![CDATA[MISRA C]]></category>

		<guid isPermaLink="false">http://www.klocwork.com/blog/?p=967</guid>
		<description><![CDATA[Previously I posted the value of using coding standards, specifically MISRA C and MISRA C++.  This time I wanted to go through some general experiences we had with some of the checkers, specifically the ones that seem to throw a lot of violated rules, to the point that on some code bases MISRA flagged more [...]]]></description>
			<content:encoded><![CDATA[<p>Previously I <a href="http://www.klocwork.com/blog/2010/03/misra-more-irrelevant-software-requirements-again/" target="_blank">posted</a> the value of using coding standards, specifically MISRA C and MISRA C++.  This time I wanted to go through some general experiences we had with some of the checkers, specifically the ones that seem to throw a lot of violated rules, to the point that on some code bases MISRA flagged more than one error per LOC!</p>
<p>There are still tons of great rules you can apply even if you don&#8217;t make an embedded product.  But as I said before, it doesn&#8217;t make sense to turn on all the MISRA rules.  After running through many code bases and looking at the value of MISRA we certainly noticed a trend with a few culprits.  Here are a few examples that we found to be noisy with non-MISRA compliant code.</p>
<p>MISRA C 6.3 and MISRA C++ 3-9-2:</p>
<p>MISRA has the distinction of &#8220;required&#8221; rules and &#8220;advisory&#8221; rules.  This is an &#8220;advisory&#8221; rule.  Essentially it wants you to avoid using types like char, int, short, long etc. and to use specific length typedefs instead.  Obviously, many code bases use the basic types, so be prepared for many issues.</p>
<p>MISRA C 14.9 and MISRA C++ 6-4-1:</p>
<p>This is a &#8220;required&#8221; rule.  This rule  is really about making sure you have braces for your if/else keywords.  Good practice to have but how many of us really do this?</p>
<p>MISRA C 12.13 and MISRA C++ 5-2-10:</p>
<p>This is an &#8220;advisory&#8221; rule.  The rule doesn&#8217;t want you to mix increment and decrement operators into an expression.  This makes sense because it can be pretty confusing to read.  But in our experiments this seems to be something that many developers do.</p>
<p>MISRA C 17.4 and MISRA C++ 5-0-15:</p>
<p>This is a &#8220;required&#8221; rule.  The rule only wants to allow you to use array indexing for pointer arithmetic.  Everything else is non-compliant.</p>
<p>MISRA C 14.7 and MISRA C++ 6-6-5:</p>
<p>This is a &#8220;required&#8221; rule and another control flow example.  A function can only have one point of exit at the end of a function.  I can understand this but as you know, that is not reality.</p>
<p>MISRA C 13.2:</p>
<p>This is an &#8220;advisory&#8221; rule.  It states that tests against zero should be made explicit.  In other words: if (x != 0) is the proper way, not if (x).  The exception to this is if the operand is Boolean.  I don&#8217;t know about you, but you can crown me the super wiener on this? I never make it explicit.<br class="spacer_" /></p>
<p>So if you plan to pick up MISRA on your existing project beware of these rules.  I&#8217;d like to hear if you do any of those things in your code base.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.klocwork.com/blog/2010/05/misra-rules-that-dont-make-sense/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>If Agile is going Lean, then get it right</title>
		<link>http://www.klocwork.com/blog/2010/04/if-agile-is-going-lean-then-get-it-right/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=if-agile-is-going-lean-then-get-it-right</link>
		<comments>http://www.klocwork.com/blog/2010/04/if-agile-is-going-lean-then-get-it-right/#comments</comments>
		<pubDate>Thu, 08 Apr 2010 15:21:48 +0000</pubDate>
		<dc:creator>Eric Hollebone</dc:creator>
				<category><![CDATA[Agile Development]]></category>
		<category><![CDATA[Software Quality]]></category>
		<category><![CDATA[agile]]></category>
		<category><![CDATA[communication]]></category>
		<category><![CDATA[software development]]></category>

		<guid isPermaLink="false">http://www.klocwork.com/blog/?p=947</guid>
		<description><![CDATA[There has been a start to bring the concepts of  lean manufacturing  into agile development. Recently, Mike Cottmeyer in How to Build a Large Agile Organization proposes that Agile on its own is not enough for a large organization.  In his view, Agile falls short and needs to be supplemented by additional methodologies like Lean or Kanban when coordinating [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.klocwork.com/blog/wp-content/uploads/2010/04/Kanban-LeanAgile-WithBacklog.png"><img class="alignleft size-medium wp-image-951" style=" margin-right: 10px;" title="Kanban-LeanAgile-WithBacklog" src="http://www.klocwork.com/blog/wp-content/uploads/2010/04/Kanban-LeanAgile-WithBacklog-300x171.png" alt="" width="300" height="171" /></a>There has been a start to bring the concepts of  lean manufacturing  into <a title="Agile development and static analysis" href="http://www.klocwork.com/solutions/agile-development/" target="_blank">agile  development</a>. Recently, Mike Cottmeyer in <a href="http://www.leadingagile.com/2010/03/okay.html" target="_blank">How to Build a Large Agile Organization</a> proposes that Agile on its own is not enough for a large organization.  In his view, Agile falls short and needs to be supplemented by additional methodologies like Lean or Kanban when coordinating outside the development team.</p>
<p>If adoption of Agile is impeded by its very nature in large organizations and Kanban is the proposed answer, then the Agile solution is insufficient. Agile needs to expand its scope to be relevant and useful for non-developers as well as across development teams.</p>
<p>To understand how Lean applies to Agile development, I&#8217;m going to take a short detour though history.</p>
<p>Mapping manufacturing principles to software development is an interesting cross-pollination of ideas. Discrete manufacturing is quite different from application development, but that doesn&#8217;t mean the software industry can&#8217;t learn a thing or two from a different sector.</p>
<p>Lean was born out of a need to re-invent the manufacturing industry, which had not really evolved since the inventions of Henry Ford and the production line. From Ford&#8217;s time to the post second world war period, most manufacturing was very good at making enormous quantities of the same product, regardless of the demand. Ford&#8217;s famous quote about color clearly exemplified the thinking of the day: &#8220;Any customer can have a car painted any colour that he wants so long as it is black&#8221;. In other words, Ford&#8217;s production line was optimized for manufacturing, not profit, and turned out to be quite inflexible when market conditions changed.</p>
<p>In the 1950s, Sakichi Toyoda made a revolutionary leap forward with two principles:</p>
<ol>
<li>Pull vs. push &#8211; at any point in the production process, the trigger to start work on a production unit is governed by its upstream neighbor.  As an example, I do not start my work on a product unit until the guy following me says he will be able to receive it.</li>
<li>Efficient manufacturing depends on the management of three key inefficiencies: overburden (muri), inconsistency (mura), and eliminating waste (muda).</li>
</ol>
<p>Together, these elements formed the underlying principles that Sakichi spearheaded into what is now known as <a href="http://en.wikipedia.org/wiki/Toyota_production_system">The Toyota Production System (TPS)</a>.  The TPS has subsequently been used as the the basis for Western derivatives such as Just-In-Time, value-stream mapping, Six Sigma and Lean, to name a few.</p>
<p>So what does this have to do with Agile and large organizations?</p>
<p>There are well-documented cases where <a title="Agility XL by Robert Schaaf" href="http://www.sstc-online.org/Proceedings/2007/pdfs/RJS1722.pdf" target="_blank">agile alone was not enough</a>, and that&#8217;s where Lean/TPS can add value.  For the most part though, the application of Lean principles has been limited to just one part: Kanban.</p>
<p>The TPS Kanban methodology has two aspects. First,  a Kanban card is attached to every unit under production and carries contextual information (metadata) about the tasks that need to be performed on that unit  and second, task readiness and data are used to trigger an specific action (work).</p>
<p>Over the past decade, the Agile methodology has been used successfully within  development teams, usually sized between  8 and 15 people. Agile&#8217;s benefits and values for this type of environment have been well articulated by many others (including on <a title="Agile Development" href="http://www.klocwork.com/blog/category/agile-development/">this blog</a>), but most Agile adopters may not have realized the close mapping to Lean/TPS.</p>
<ul>
<li>Muri (overburden) &#8211; overproduction &#8211; in an Agile context, this is usually expressed as over-planning</li>
<li>Mura (inconsistency) - elimination of bugs at the earliest stages, resulting in more  stable and reliable iterations</li>
<li>Muda (waste) &#8211; close interaction with the customer to absorb change and prevent wasted iterations</li>
<li><a title="Kaizen" href="http://en.wikipedia.org/wiki/Kaizen">Kaizen</a> (continuous improvement) &#8211; refactoring, unit testing, system integration</li>
</ul>
<p>Secondly and more importantly for large teams, the TPS/Lean idea of pull vs. push is key. But there are other aspects of Lean/TPS that would benefit software development, Kanban being an important one but not the only one.</p>
<p>In an Agile context, Kanban is usually expressed as a board or wall with movable index cards to visualize units of customer value and work flow. This is where I think the rails have come off Agile/Kanban compared to the original TPS philosophy.  Kanban is just one gear in the whole TPS methodology.  Its an integral part but no more important than the other parts.  To function optimally, the TPS/Lean requires all the piece to be implemented not just one.</p>
<p>The other aspects of TPS/Lean are:</p>
<ul>
<li>Andon (signage, early warning)  - literally means paper lantern and is used to call attention to a problem in the process.  For Agile, it should be express as how do you measure your team&#8217;s progress and convey that information to the whole organization.</li>
<li>Jidoka (autonomation) &#8211; automation with human intelligence.  The efficient use of tools like <a href="http://www.klocwork.com/products/insight/klocwork-truepath/">static analysis</a> and continuous build to aid in development.</li>
<li>Poka-yoke (fail-safing) &#8211; not just exception handling, but actual prevention of faults and counter-measure strategies to prevent the fault from reoccurring.</li>
</ul>
<p>These other parts of the TPS were not born because people like more processes and rules; they came out of need, something the agile methodology has yet to realize it requires.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.klocwork.com/blog/2010/04/if-agile-is-going-lean-then-get-it-right/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Code Reviews &#8211; Mandatory but Ad-Hoc?</title>
		<link>http://www.klocwork.com/blog/2010/03/code-reviews-mandatory-but-ad-hoc/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=code-reviews-mandatory-but-ad-hoc</link>
		<comments>http://www.klocwork.com/blog/2010/03/code-reviews-mandatory-but-ad-hoc/#comments</comments>
		<pubDate>Thu, 18 Mar 2010 12:33:52 +0000</pubDate>
		<dc:creator>Brendan Harrison</dc:creator>
				<category><![CDATA[Agile Development]]></category>
		<category><![CDATA[Code Review]]></category>
		<category><![CDATA[Software Quality]]></category>
		<category><![CDATA[Forrester]]></category>
		<category><![CDATA[software verification]]></category>

		<guid isPermaLink="false">http://www.klocwork.com/blog/?p=936</guid>
		<description><![CDATA[The importance of code reviews has already been well covered by lots of smart people like Jack Ganssle and Jason Cohen. Recently, the subject has become more important around here, so we want to offer our take. In particular, we’re looking at the best way(s) to incorporate code reviews into an overall software verification strategy [...]]]></description>
			<content:encoded><![CDATA[<p>The importance of <a href="http://www.klocwork.com/solutions/code-review/">code reviews</a> has already been well covered by lots of smart people like <a title="Peer Code Reviews in Embedded Software" href="http://www.ganssle.com/inspections.htm" target="_blank">Jack Ganssle</a> and <a title="Lightweight Peer Code Reviews" href="http://www.methodsandtools.com/archive/archive.php?id=66" target="_blank">Jason Cohen</a>. Recently, the subject has become <a title="Klocwork Code Review Tool" href="http://www.klocwork.com/products/insight-pro/inspect-code-review/" target="_blank">more important</a> around here, so we want to offer our take. In particular, we’re looking at the best way(s) to incorporate code reviews into an overall software verification strategy and how automated tools (such as <a title="Static Analysis" href="http://www.klocwork.com/products/insight/klocwork-truepath/" target="_blank">static analysis</a>, no shock there) can help unleash the benefits of peer code review. More on that angle another time, first the bigger picture.</p>
<p>Klocwork recently commissioned a survey conducted by Forrester research on this whole topic and the results are pretty interesting. While there’s a whole bunch of data that can’t be covered in a single blog post, a general theme we found is that developers see the value of code reviews, they’re often mandatory, but the process itself seems to be ad-hoc and quite ‘behind the times’. Here’s an example of what I mean:</p>
<div id="attachment_938" class="wp-caption aligncenter" style="width: 642px"><a href="http://www.klocwork.com/blog/wp-content/uploads/2010/03/code_review_data11.png"><img class="size-full wp-image-938 " title="Code Review Survey Data" src="http://www.klocwork.com/blog/wp-content/uploads/2010/03/code_review_data11.png" alt="" width="632" height="336" /></a><p class="wp-caption-text">Code Reviews - Mandatory but Ad-Hoc</p></div>
<p>So, code reviews are mandatory but you can kinda invite whoever you want to review the code. Shouldn’t who reviews the code be pretty important? (Hint: Yes)</p>
<p>We’re gonna keep talking about different aspects of this important development milestone, so stay tuned and we’d be interested to hear anything you have to say on the topic.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.klocwork.com/blog/2010/03/code-reviews-mandatory-but-ad-hoc/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>The Joy of&#8230; Code Review (part 3)</title>
		<link>http://www.klocwork.com/blog/2010/03/the-joy-of-code-review-part-3/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=the-joy-of-code-review-part-3</link>
		<comments>http://www.klocwork.com/blog/2010/03/the-joy-of-code-review-part-3/#comments</comments>
		<pubDate>Thu, 04 Mar 2010 20:59:17 +0000</pubDate>
		<dc:creator>Gwyn Fisher</dc:creator>
				<category><![CDATA[Agile Development]]></category>
		<category><![CDATA[Code Review]]></category>
		<category><![CDATA[General Coding]]></category>
		<category><![CDATA[Software Quality]]></category>
		<category><![CDATA[agile]]></category>

		<guid isPermaLink="false">http://www.klocwork.com/blog/?p=916</guid>
		<description><![CDATA[Part III – Joy is All Around Us When you think of a social activity, what do you think of? Perhaps a rave? Or maybe a quiet bridge foursome is more your style? Or even a Matrix-style meet-and-greet complete with latex and contortionists? Ahem… Or maybe you’ve finally let go of this old-world requirement to [...]]]></description>
			<content:encoded><![CDATA[<p>Part III – Joy is All Around Us</p>
<p>When you think of a social activity, what do you think of? Perhaps a rave? Or maybe a quiet bridge foursome is more your style? Or even a Matrix-style meet-and-greet complete with latex and contortionists? Ahem…</p>
<p>Or maybe you’ve finally let go of this old-world requirement to actually be in the presence of an individual to enjoy a social encounter with them, and instead have <a href="http://www.chatroulette.com">embraced</a> the <a href="http://omegle.com/">reality</a> of the 21<sup>st</sup> century, that <a href="http://www.reddit.com">society</a> and social interactions no longer require physical presence, and instead surround us every day, at every minute, as long as we (virtually) get out there and find them. Speaking as a long-time <a href="http://www.worldofwarcraft.com">online gamer</a>, I have a circle of folks I consider friends, with whom I <a href="http://www.ventrilo.com">talk most evening</a>s<a href="http://www.ventrilo.com/"></a>, with whom I’ve spent quality time learning and beating goal-based activities, yet none of whom I’ve ever met. And whilst their reaction to some family tragedy on my part may result in no more than a weak “dude, that blows…” on some forum or other, in every other aspect of social interplay, they fulfill exactly the same role as those few- and far-between actual, you know, <em>friends</em> that each of us cling to throughout life.</p>
<p>According to a <a href="http://en.wikipedia.org/wiki/Friendship#Decline_of_friendships_in_the_U.S.">study on the topic</a> conducted earlier this decade, friendship is becoming something of a luxury for the average American adult. Rather than expanding our circle of friends as travel has become more reachable for the masses, we’ve instead decreased that circle from an average of 3 to just above 1. So are we all just becoming obnoxious, introverted, “bah humbug!” Ebenezer Scrooge wannabes? Perhaps, and certainly that’s the <a href="http://www.usatoday.com/news/nation/2006-06-22-friendship_x.htm">trite response</a> to the statistics for people in search of a quick buzzword or appliance to blame.</p>
<p>But perhaps instead of this reflecting a net diminution of our quality of life, we’re simply replacing much of what was considered necessary in previous generations (beer with the boys, poker night, ice fishing trips, whatever floats your boat) with a more constant, more consistent, but at the same time more arms length notion of <a href="http://www.facebook.com">friendship</a> and <a href="http://www.twitter.com">social interaction</a>. Though different, it fulfills everything we need in terms of <a href="http://news.bbc.co.uk/2/hi/7920434.stm">communication</a> and <a href="http://jcmc.indiana.edu/vol12/issue4/ellison.html">support</a>, but leaves us free to concentrate on our family lives, or personal hobbies, or whatever else makes us happy to be, well, us.</p>
<p>Friendship when <em>we </em>want it, on <em>our </em>terms, and only then.</p>
<p>One potential projection of all of this can be found in the ongoing trending of the social nexus of life, business and relationships towards the online marketplaces that have sprung up around activity-, or focus-based requirements (I referred to this in my first post on this topic, drawing the correlation between <a href="http://www.facebook.com">Facebook</a> and dating, <a href="http://www.linkedin.com">LinkedIn</a> and prospecting, etc.).</p>
<p>Find a marketplace, find a life (or maybe, a <a href="http://www.secondlife.com">Second Life</a>) – and frankly, is that really any different from the actual bricks-and-mortar reality of the rat-infested, smelly locales of the distant past (minus, you know, the scary crone shouting on the street corner, and the propensity for picking up the Black Death at a moment’s notice…)?</p>
<p>Indeed, my Chief Architect likes to describe an attendee at a recent conference as saying something like, “But what should we do about all these <em>old people</em> who can only e-mail or even worse need to use the phone? I mean, how am I supposed to communicate with somebody who doesn’t have a Facebook account, or doesn’t keep up with Twitter?” Note that this wasn’t a casual conversation over a beer, but rather a key point in a presentation (presumably to a room full of people with the requisite qualifications to be able to laugh affably at such an observation).</p>
<p>Whether we like it or not, whether we can personally deal with our relationships migrating into the ether, that’s where they’re headed, at double-quick time. So are you the guy with a red flag making sure that cars only drive at the same speed as horses, or are you busy building a Formula 1 car in your back yard?</p>
<p>And actually, perhaps more importantly, whether you’re either of these, you&#8217;d better believe your staff are busy climbing onboard with everything the new paradigm has to offer, so do you really want to be left playing catch up?</p>
<p>At a recent customer meeting I was surprised to hear that this highly compartmentalized, classified installation was putting a social media strategy in place (they termed it “our space”) to embrace what was happening anyway, and obviously to attempt to contain it within the security mechanisms required by their business. If they can do it, with all the restrictions and fenced-off classified strictures they have to deal with, why can&#8217;t we all?</p>
<p><a href="http://www.klocwork.com/products/insight-pro/inspect-code-review/">Code review</a>, you say? <em>Social</em> code review, more like. The current means of accomplishing the goal is fundamentally broken and will never scale, just like the requirement to only befriend people you could physically reach out and touch. The paradigm is changing, time to keep up&#8230;</p>
<p>And now in a deferential nod to the awesome Douglas Adams, this trilogy of posts on code review as a social activity will be continued in <a title="Code Review Part IV – Joy is in the eye of the beholder" href="http://www.klocwork.com/blog/2010/04/the-joy-of-code-review-part-4/">part IV</a>, coming to a blog near you soon.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.klocwork.com/blog/2010/03/the-joy-of-code-review-part-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Code metrics</title>
		<link>http://www.klocwork.com/blog/2010/02/code-metrics/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=code-metrics</link>
		<comments>http://www.klocwork.com/blog/2010/02/code-metrics/#comments</comments>
		<pubDate>Tue, 23 Feb 2010 19:24:23 +0000</pubDate>
		<dc:creator>Alen Zukich</dc:creator>
				<category><![CDATA[Compliance]]></category>
		<category><![CDATA[Software Complexity]]></category>
		<category><![CDATA[Software Quality]]></category>
		<category><![CDATA[agile]]></category>
		<category><![CDATA[complexity]]></category>
		<category><![CDATA[coverage]]></category>
		<category><![CDATA[metric]]></category>

		<guid isPermaLink="false">http://www.klocwork.com/blog/?p=885</guid>
		<description><![CDATA[Just came across this post about the 5 code metrics you need to watch.  I thought it was worth mentioning as I just blogged about this below (including something similar a while back).  These are interesting metrics and more high level, but certainly important.  I like labeling duplicated code as something important.  I think we [...]]]></description>
			<content:encoded><![CDATA[<p>Just came across this <a href="http://maxheapsize.com/2010/02/23/5-code-metrics-you-need-to-watch/" target="_blank">post </a>about the 5 code metrics you need to watch.  I thought it was worth mentioning as I just blogged about this <a title="Software metrics for the developer" href="http://www.klocwork.com/blog/2010/02/software-metrics-for-the-developer/" target="_blank">below </a>(including something similar a while <a title="Software metrics for measuring quality" href="http://www.klocwork.com/blog/2010/01/software-metrics-for-measuring-quality/" target="_blank">back</a>).  These are interesting metrics and more high level, but certainly important.  I like labeling duplicated code as something important.  I think we often forget how much we reuse code and have the same mistakes in many places.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.klocwork.com/blog/2010/02/code-metrics/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Joy of&#8230; Code Review (part 2)</title>
		<link>http://www.klocwork.com/blog/2010/01/the-joy-of-code-review-part-2/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=the-joy-of-code-review-part-2</link>
		<comments>http://www.klocwork.com/blog/2010/01/the-joy-of-code-review-part-2/#comments</comments>
		<pubDate>Thu, 28 Jan 2010 16:58:20 +0000</pubDate>
		<dc:creator>Gwyn Fisher</dc:creator>
				<category><![CDATA[Agile Development]]></category>
		<category><![CDATA[Code Review]]></category>
		<category><![CDATA[Compliance]]></category>
		<category><![CDATA[Software Quality]]></category>
		<category><![CDATA[agile]]></category>

		<guid isPermaLink="false">http://www.klocwork.com/blog/?p=708</guid>
		<description><![CDATA[Part II &#8211; Joy is the word… OK, so Grease is really the word, but it didn’t fit my theme, gimme a break… Anyway, back on topic, since Joy of code review &#8211; part one of this series was published last year we’ve seen our new code review product in action in a variety of [...]]]></description>
			<content:encoded><![CDATA[<p>Part II &#8211; Joy is the word…</p>
<p>OK, so Grease is really the word, but it didn’t fit my theme, gimme a break… Anyway, back on topic, since <a href="http://www.klocwork.com/blog/2009/11/the-joy-of-code-review/">Joy of code review &#8211; part one</a> of this series was published last year we’ve seen our new <a href="http://www.klocwork.com/products/insight-pro/inspect-code-review/">code review</a> product in action in a variety of customer and prospect situations, and much like the eponymous hair product in the musical mentioned above, what we thought of as an interesting twist on an existing paradigm has turned into a bit of a barn burner. I refer, in this case, to the notion of what constitutes a code review if you remove the formalism of the invite from the process.</p>
<p>Consider what I’ll call, for the sake of being what marketers insist on terming “edgy” (for no really good reason as far as I can make out), <em>old fashioned</em> code reviews. You know the type, we talk about how we really should do more of them all the time. Check in your code, mail out a bunch of invites, mail some more when those get declined, gather around a table, project your code and wait for the insults to come rolling in.</p>
<div id="attachment_709" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.klocwork.com/blog/wp-content/uploads/2010/01/Review.jpg"><img class="size-medium wp-image-709 " title="Code Review, the old fashioned way" src="http://www.klocwork.com/blog/wp-content/uploads/2010/01/Review-300x224.jpg" alt="" width="300" height="224" /></a><p class="wp-caption-text">You want to try that again, Mr. Coding Specialist...?</p></div>
<p>On the down side of these things are all the obvious problems… People don’t like getting reviewed, and unless you have a particularly unpleasant architect, the reviewer is no happier about being in the room than the person on the sharp end. Factor in the time, the annoyance of the arrangements, the opportunity cost of yanking the architect away from whatever they were previously doing, and you’ve got a really expensive, not very productive, but very important from a pointy-haired-manager-perspective process.</p>
<p>It’s really the classical no-win situation. Your manager requires it to be done. You hate it, and you know everybody else in the room hates it too. It’s like a giant dose of spinach to a five year old – doesn’t matter how good it is for you, you’d rather scream and sit in the naughty chair all day than let that stuff past your lips.</p>
<p>So when we were thinking about changing the approach to code review, it seemed obvious to us that whilst code review itself is valuable, the means by which it gets accomplished is fundamentally broken. Factor in peoples’ unthinking delight when confronted with anything <a href="http://www.facebook.com" target="_blank"><em>social</em></a> and what the heck, we figured, let’s turn the whole thing on its head. Instead of going top-down into a software organization and helping the manager enforce something unpleasant in an all new and collaborative-y, enterprise-y way, how about reaching out and encouraging bottom-up engagement through a model that people are comfortable with anyway, namely formless (a.k.a. social) communities.</p>
<p>Who’s the most obvious person to review the code of a good developer, after all? It might be their architect, but the chances of a good developer making a blunder of the architectural type (or any kind of dumb error) is probably reasonably low. Not saying it doesn’t happen, but we pay people at that level a good amount of money on the understanding that they produce decent code, so why then treat them like kids? Instead, if the code produced by that guy is made available for <em>anybody</em> to review, quite literally, then rather than getting the architect grumpy because he’d rather be thinking about the next huge money maker than what this guy happened to have done mostly right but nit-pickingly-wrong in this one situation, you get other team members taking part who have (in most cases) more useful input to impart anyway.</p>
<p>Instead of feedback of the “so… rather than using that particular transitive constructor, I’ve found that explicitly instantiating a new object and then initializing only what I need saves me, on average, 3 cycles a day” type, you might get the “hey, I was hacking on that a while back… might want to filter that data, cuz Bob’s front end passes in all kinds of crap… just saying” type instead – your choice, but personally I’d rather hear an hour’s worth of the latter than a moment’s worth of the former…</p>
<p>So who is at the review turns out to be much more important than whether it’s held, given some arbitrary set of “holding” conditions. But of course this comes with its own set of challenges, notably how do you know when you’re done if there’s no formal “meeting” to review your code (and to insult you, have we mentioned that part?).</p>
<p>In fact, it’s much like how the transition from waterfall to Agile was accompanied by many a gnashing of management gums and misplaced wails of “but how will I know if it’s going to be done on time?” But hey, that didn’t work out so bad, did it? People got used to time boxing, to changing requirement sets, to not waiting until it was arbitrarily “finished” and instead shipping it so as to gather feedback faster.</p>
<p>In my next post I’ll look at this new world order from the top down and examine the benefits to encouraging (rather than imposing) a social code review paradigm, and how it can make those metrics we know you care about look better than ever before.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.klocwork.com/blog/2010/01/the-joy-of-code-review-part-2/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Software metrics for measuring quality</title>
		<link>http://www.klocwork.com/blog/2010/01/software-metrics-for-measuring-quality/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=software-metrics-for-measuring-quality</link>
		<comments>http://www.klocwork.com/blog/2010/01/software-metrics-for-measuring-quality/#comments</comments>
		<pubDate>Tue, 26 Jan 2010 18:26:25 +0000</pubDate>
		<dc:creator>Alen Zukich</dc:creator>
				<category><![CDATA[Compliance]]></category>
		<category><![CDATA[Software Quality]]></category>

		<guid isPermaLink="false">http://www.klocwork.com/blog/?p=704</guid>
		<description><![CDATA[How do you measure your software?  There are simple metrics that help with quality, such as keeping track of the number of bugs or security vulnerabilities in your system.  Trending these metrics is a no-brainer. When trending is in place, action can be taken because everyone knows 6 security vulnerabilities is worse than 5.  But [...]]]></description>
			<content:encoded><![CDATA[<p>How do you measure your software?  There are simple metrics that help with quality, such as keeping track of the number of bugs or security vulnerabilities in your system.  Trending these metrics is a no-brainer. When trending is in place, action can be taken because everyone knows 6 security vulnerabilities is worse than 5.  But what about other types of software metrics (and there are many)?  Have you ever heard of a maintainability metric? Halstead program volume? McCabe cyclomatic complexity?  Coupling/Cohesion?  The question becomes what do you do with these metrics and are they valuable?</p>
<p>Choosing a metric will really depend on what you’re after.  A good reason for measuring your code is to get predictable quality.   If you don’t have a metric in mind, the easiest place to start is with McCabe’s cyclomatic complexity metric.  I’ve seen many software organizations implement this as a good measure to help predict system “complexity”.  In other words, to help them understand where they may need to refactor or redesign their code.  <a href="http://en.wikipedia.org/wiki/Cyclomatic_complexity" target="_blank">McCabe cyclomatic complexity</a> uses a measure of the linearly independent paths in the source code and is measured on functions or methods.</p>
<p>McCabe’s Cyclomatic complexity uses values to define what is complex.  Something greater than 20 is considered very complex.  You should think about re-writing that function because it is getting out of control.  Since the inception of McCabe’s Cyclomatic complexity metric,  several other variations have appeared, including Extended Cyclomatic Complexity and Plain Cyclomatic Complexity.  Back to the question, with so many metrics, which ones do you use and are they valuable?</p>
<p>No one can answer that question. In fact, software metrics is quite <a href="http://www.compaid.com/caiinternet/ezine/capers-strongweak.pdf" target="_blank">ambiguous</a>.  It is hard to find anyone who says,’Thou shall use metric “x” because it will help you improve quality by “y” amount.’  The value “x” and “y” just don’t exist (although many have tried to put some data together).  Even more ambiguous are the values that may be defined with these metrics.  Don’t get caught up with these values; they are really arbitrary.  I’ve run into organizations where the majority of their code was deemed “very complex”.  Does this mean they should redesign their entire code base?  Certainly not. These numbers will vary depending on what you’re building.  So be careful if you use the “recommended” values for any metric.</p>
<p>Instead of focusing on the value of your next metric, what you really should be doing is trending that metric.  Find out if that value went up or down.  Up bad; down good.   Taking it one step further (if you really have a “thing” for the values), you could start by finding the standard deviation of your metrics.  In other words, find the average value of any metric, say complexity, plus the standard deviation.  Now, you can keep track of that value knowing that if you go outside your bounds of deviation, then you may want to look.</p>
<p>Software metrics certainly have their place and can help give some predictability on your system.  In another post, I’ll talk about how you can take some low level metrics for the developers and give them insight into the software system.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.klocwork.com/blog/2010/01/software-metrics-for-measuring-quality/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Developing Software for Medical Devices &#8211; Interview with SterlingTech</title>
		<link>http://www.klocwork.com/blog/2010/01/developing-software-for-medical-devices-interview-with-sterlingtech/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=developing-software-for-medical-devices-interview-with-sterlingtech</link>
		<comments>http://www.klocwork.com/blog/2010/01/developing-software-for-medical-devices-interview-with-sterlingtech/#comments</comments>
		<pubDate>Tue, 05 Jan 2010 15:58:25 +0000</pubDate>
		<dc:creator>Brendan Harrison</dc:creator>
				<category><![CDATA[Compliance]]></category>
		<category><![CDATA[Medical Device Software]]></category>
		<category><![CDATA[Software Quality]]></category>
		<category><![CDATA[Software Testing]]></category>
		<category><![CDATA[fda software validation]]></category>
		<category><![CDATA[iso 13485]]></category>
		<category><![CDATA[medical device software]]></category>
		<category><![CDATA[software validation]]></category>
		<category><![CDATA[software verification]]></category>

		<guid isPermaLink="false">http://www.klocwork.com/blog/?p=609</guid>
		<description><![CDATA[I had a chance to speak with Bruce Swope, the VP of Engineering at SterlingTech, an ISO13485 Registered full-service medical device software organization offering software development and validation services. SterlingTech has developed software for an array of medical products including implantable devices as well as external support and monitoring equipment. Their team has worked on Class I, [...]]]></description>
			<content:encoded><![CDATA[<p>I had a chance to speak with Bruce Swope, the VP of Engineering at SterlingTech, an ISO13485 Registered full-service medical device software organization offering software development and validation services. <img class="alignleft size-medium wp-image-614" title="Medical Device Software" src="http://www.klocwork.com/blog/wp-content/uploads/2009/12/medical-device-software-200x300.jpg" alt="Medical Device Software" width="200" height="300" />SterlingTech has developed software for an array of medical products including implantable devices as well as external support and monitoring equipment. Their team has worked on Class I, II, and III devices that resulted in successful FDA 510(k)s, PMAs, and CE submissions.</p>
<p>Bruce has extensive experience in medical device software development and he is an expert in leading Class III medical software products to commercial release. His depth of experience also spans the development of enterprise solutions, security applications, internal applications, and process control systems. He has been an early adopter of quality practices including ISO 9000 processes, Common Criteria Certification and Capability Maturity Model implementation.</p>
<p>I wanted to talk to him more about the challenges developing software in an FDA-regulated context and what all this means to medical device software development teams.</p>
<p><strong>[Brendan]</strong> Given your experience working with a variety of medical device companies, what do you see as the biggest business challenge they face?</p>
<p><strong>[Bruce]</strong> The biggest challenge is developing a medical product in a cost effective manner that meets FDA and international regulatory regulations.  Most companies have very limited resources available and have boards or investors that are not used to the rigors of regulated development.  This often leads to a gap between investor expectations and the reality of getting the product ready for market.</p>
<p><strong>[Brendan]</strong> What about technology challenges?</p>
<p><strong>[Bruce]</strong> The hardware platforms that the systems are developed for are very expensive in time and money to update once fielded.  Often, the hardware is impossible to update without dramatic impact to the patient such as surgery.  This creates a need for software developers to find creative ways to extend the life of the hardware by introducing new functionality without updating the hardware. This can often cause the software to become much more complex than planned.</p>
<p>Further, device manufacturers must balance the expectations of customers against the rigor and security required with making a medical product.  Consumers are very accustomed to seeing feature rich devices reach the palm of their hand and wonder why their heart pump can’t double as a PDA or MP3 player or why they can’t plug their device into the internet to download new alarm tones.</p>
<p><strong>[Brendan]</strong> What’s the most common problem your firm is hired to solve?</p>
<p><strong>[Bruce]</strong> Many of our customers are looking for an organization that has experience in working with a given technology to create a product that will be approved by the FDA and international regulatory authorities. They are looking for someone that has the experience to deliver a quality product and a complete design history file without wasted effort or significant delays.</p>
<p><strong>[Brendan]</strong> In your experience, do most medical device companies have a clear understanding of the regulatory environment or is there still confusion in the market?</p>
<p><strong>[Bruce]</strong> Many of our customers are early stage companies that are looking for us to provide the knowledge of the regulatory environment.  Other clients may have an understanding of some aspects of the regulatory environment such as mechanical or electrical but need assistance with the software aspects.</p>
<p>Unless companies invest in dedicated regulatory resources early on and get the FDA or notified body involved sooner rather than later, there will always be confusion and opportunity to misdirect effort.</p>
<p><strong>[Brendan]</strong> Any common misconceptions related to compliance issues you can share?</p>
<p><strong>[Bruce]</strong> Companies have come to us with a misunderstanding of the impact “level of the concern” will have on the development process for their proposed device.  Companies will often put in place a Quality System that is overly burdensome on the software development process.</p>
<p>The result of these mistakes is often that either too much or too little is done to develop the software.  Either outcome is damaging.  In the case where too much is done, extra cost is incurred and the project completion and entry to the market is delayed.  In the case where too little is done, a rejected submission could result leading to further cost and delays.</p>
<p><strong>[Brendan]</strong> What’s the #1 recommendation you give to clients as it relates to the intersection of compliance issues and software development?</p>
<p><strong>[Bruce]</strong> Make sure that your company has a good solid Quality System as it applies to software development. Do not put a Quality System into place that you can not follow. This is the cause of most audit problems. Use automated tools in your process to allow your developers to focus on the creative parts of the software development.  Keep things as simple as possible.  Drive out risk early.</p>
<p><strong>[Brendan]</strong> Where can people go to get more information? Any good online resources out there?</p>
<p><strong>[Bruce]</strong> For an executive overview for determining whether a new device is a medical device or for ideas on how to use a static code analysis tool in medical device development, we have a <a title="Whitepapers on FDA &amp; Software Development" href="http://sterlingtechsoftware.com/html/resources/literature.php" target="_blank">library of whitepapers </a>people can download.</p>
<p><strong>[Brendan]</strong> Thanks!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.klocwork.com/blog/2010/01/developing-software-for-medical-devices-interview-with-sterlingtech/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Embedded Systems Engineering &#8211; German 2009 Edition</title>
		<link>http://www.klocwork.com/blog/2009/12/embedded-systems-engineering-german-2009-edition/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=embedded-systems-engineering-german-2009-edition</link>
		<comments>http://www.klocwork.com/blog/2009/12/embedded-systems-engineering-german-2009-edition/#comments</comments>
		<pubDate>Thu, 10 Dec 2009 18:53:58 +0000</pubDate>
		<dc:creator>Todd Landry</dc:creator>
				<category><![CDATA[Agile Development]]></category>
		<category><![CDATA[General Coding]]></category>
		<category><![CDATA[Software Quality]]></category>
		<category><![CDATA[Static Analysis]]></category>
		<category><![CDATA[agile]]></category>
		<category><![CDATA[backlog]]></category>
		<category><![CDATA[bugs]]></category>
		<category><![CDATA[code reviews]]></category>
		<category><![CDATA[source code analysis]]></category>

		<guid isPermaLink="false">http://www.klocwork.com/blog/?p=542</guid>
		<description><![CDATA[Just wrapped up a successful 2 day Embedded System Engineering conference in Stuttgart, Germany. This &#8220;all-German&#8221; show had just shy of 600 attendees, as well as about 60 individuals (representing the 20 or so companies exhibiting), so this was considered very good by the show organizers (who by the way did a fantastic job&#8230; the [...]]]></description>
			<content:encoded><![CDATA[<p>Just wrapped up a successful 2 day <a href="http://www.ese-kongress.de/english/">Embedded System Engineering </a>conference in Stuttgart, Germany. This &#8220;all-German&#8221; show had just shy of 600 attendees, as well as about 60 individuals (representing the 20 or so companies exhibiting), so this was considered very good by the show organizers (who by the way did a fantastic job&#8230; the food here, for example, was as good as I’ve ever seen for such an event). The Klocwork booth was shared with our good friends at <a href="http://www.emenda.eu/index.php?option=com_content&amp;view=article&amp;id=15&amp;Itemid=5&amp;lang=de">Emenda</a>, and we had a choice spot that allowed a good flow of people. We had an interesting mix at our booth as well&#8230; a Scotsman who now lives in Germany and speaks flawless German (albeit with a hint of a wee Scottish accent), an Englishman who had numerous stories that kept us entertained during the quiet times, and myself, the jetlagged Canadian.</p>
<p><img class="aligncenter size-medium wp-image-544" title="IMG_0070" src="http://www.klocwork.com/blog/wp-content/uploads/2009/12/IMG_0070-300x225.jpg" alt="IMG_0070" width="300" height="225" /></p>
<p>As I mentioned earlier, this show is advertised as the only German-language conference around&#8230; and it was. So other than saying &#8220;hello&#8221;, &#8220;goodbye&#8221;, &#8220;thank you&#8221;, or &#8220;<a href="http://translate.google.com/?hl=de#en|de|">another beer please</a>&#8220;, my German is, uhm, lacking. However, not a problem here; the Germans all speak very good English&#8230; which was a good thing since my presentation was in English. I had over 40 attendees at my session about how Source Code Analysis fits into Agile development environments, and it went very well. A number of attendees came to our booth after the talk to pick up our White Paper on<a href="http://www.klocwork.com/resources/white-paper/source-code-analysis-agile">static analysis and agile</a>, and to get a demo of our latest release.</p>
<p>My two-week stint of planes, trains and automobiles continues tomorrow when I head up to Berlin for the weekend to see some good friends (and a football game in the Olympic Stadium), then it is back home on Monday. It has been a great couple of weeks in Europe, but I am looking forward to being back on good ole EST.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.klocwork.com/blog/2009/12/embedded-systems-engineering-german-2009-edition/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>From Static Analysis to 0day Exploit &#8211; a demonstration</title>
		<link>http://www.klocwork.com/blog/2009/12/from-static-analysis-to-0day-exploit-a-demonstration/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=from-static-analysis-to-0day-exploit-a-demonstration</link>
		<comments>http://www.klocwork.com/blog/2009/12/from-static-analysis-to-0day-exploit-a-demonstration/#comments</comments>
		<pubDate>Wed, 09 Dec 2009 22:32:40 +0000</pubDate>
		<dc:creator>Eric Hollebone</dc:creator>
				<category><![CDATA[Nasty Bugs]]></category>
		<category><![CDATA[Software Quality]]></category>
		<category><![CDATA[Software Security]]></category>
		<category><![CDATA[Static Analysis]]></category>
		<category><![CDATA[0day exploit]]></category>
		<category><![CDATA[buffer overrun]]></category>
		<category><![CDATA[software security]]></category>

		<guid isPermaLink="false">http://www.klocwork.com/blog/?p=528</guid>
		<description><![CDATA[I have always been fascinated by the whole area of code vulnerabilities and security exploits and how hackers turn those issues into real-world problems for the rest of us. Jeremy Brown posted an interesting article on Jeremy&#8217;s Computer Security blog where he uses his security know-how to draw a straight line between a software vulnerability found with [...]]]></description>
			<content:encoded><![CDATA[<p>I have always been fascinated by the whole area of code vulnerabilities and security exploits and how hackers turn those issues into real-world problems for the rest of us.</p>
<p>Jeremy Brown posted an interesting article on <a title="From Static Analysis to 0day Exploit" href="http://jbrownsec.blogspot.com/2009/12/from-static-analysis-to-0day-exploit.html" target="_blank">Jeremy&#8217;s Computer Security blog</a> where he uses his security know-how to draw a straight line between a software vulnerability found with <a href="http://www.klocwork.com/products/insight/klocwork-truepath/">static analysis</a> and a real <a href="http://en.wikipedia.org/wiki/0day">0day</a> exploit on an open source project called <a title="The Graphical Audio Language" href="http://galan.sourceforge.net/" target="_blank">gAlan</a>.</p>
<p>Jeremy takes us on a short journey where he finds an unprotected buffer with static analysis, creates an exploit payload to cause a buffer overrun, rewrites the instruction pointer and executes a telnet session, demonstrating how easy it is to turn a run of the mill application into a tunnel into the OS.</p>
<p>One of my colleagues did a similar <a title="Firefox vulnerability" href="http://www.klocwork.com/resources/on-demand-webinar/exploit-software-defect-firefox" target="_blank">presentation</a> like this a few years back with a Firefox vulnerability but this is a much better example! Very cool work Jeremy.</p>
<p>Enjoy&#8230;<br />
<object id="viddler" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="437" height="370" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowScriptAccess" value="always" /><param name="allowFullScreen" value="true" /><param name="flashvars" value="fake=1" /><param name="src" value="http://www.viddler.com/player/2af2aaf3/" /><param name="name" value="viddler" /><param name="allowfullscreen" value="true" /><embed id="viddler" type="application/x-shockwave-flash" width="437" height="370" src="http://www.viddler.com/player/2af2aaf3/" name="viddler" flashvars="fake=1" allowfullscreen="true" allowscriptaccess="always"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://www.klocwork.com/blog/2009/12/from-static-analysis-to-0day-exploit-a-demonstration/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Joy of &#8230; Code Review?</title>
		<link>http://www.klocwork.com/blog/2009/11/the-joy-of-code-review/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=the-joy-of-code-review</link>
		<comments>http://www.klocwork.com/blog/2009/11/the-joy-of-code-review/#comments</comments>
		<pubDate>Tue, 24 Nov 2009 21:18:37 +0000</pubDate>
		<dc:creator>Gwyn Fisher</dc:creator>
				<category><![CDATA[Agile Development]]></category>
		<category><![CDATA[Code Review]]></category>
		<category><![CDATA[General Coding]]></category>
		<category><![CDATA[Software Quality]]></category>
		<category><![CDATA[agile]]></category>

		<guid isPermaLink="false">http://www.klocwork.com/blog/?p=506</guid>
		<description><![CDATA[Part I – Ode to Joy Since the launch of the seminal “Joy” work which hopefully doesn’t need mention here, we’ve seen everything from The Joy of Cooking to The Joy of Not Working (my personal favorite!), and so further to that deeply mined vein of authoritative works we bring you the necessarily over burdened… [...]]]></description>
			<content:encoded><![CDATA[<p>Part I – Ode to Joy</p>
<p>Since the launch of the seminal “Joy” work which hopefully doesn’t need mention here, we’ve seen everything from The Joy of Cooking to The Joy of Not Working (my personal favorite!), and so further to that deeply mined vein of authoritative works we bring you the necessarily over burdened… Joy of <a href="http://www.klocwork.com/products/insight-pro/inspect-code-review/">Code Review</a>!</p>
<p>Joy, you say? Let me count the ways…</p>
<ul>
<li>I implement a task, using what I consider to be best practice patterns and guidelines; I slave over this, my creation, and when it’s done, I stand back and admire, much in the tone of an old master, this latest image of my greatness.</li>
<li>Then I remember I need to get it reviewed…</li>
<li>So, I timidly invite my Architect and 3 of his best friends to the war room to review my new baby</li>
<li>After many rescheduling pauses, we finally gather…</li>
<li>I hold my breath, turn on the projector, and bare my soul to the collective seniors in attendance</li>
<li>30 minutes later, having endured a ritual mind flaying, and the predictable but nevertheless enjoyable tortured examination of my parentage, education, upbringing and such fun rhetorical musings as “why do they let people like you graduate?” I slink out</li>
<li>Follow up is, if anything, more painful as I’m reminded moment-by-moment of just how badly I’ve lived up to the expectations laid out for me by the senior team members</li>
</ul>
<p>Anyway, so code reviews suck, <em>amirite</em>? <a href="http://www.artima.com/lejava/articles/javaone_2007_matt_quail.html">But we all know we need to do them</a>. Of course, we all know we need to do them for completely different reasons from each other…</p>
<ul>
<li> Kids right out of grad school know they need to do code reviews because although their code is, like, totally perfect, it’ll be good to show the old dudes their skillz, and for the old dudes to check out some rad new stuff that they might have missed along the way.</li>
<li>Senior guys know they need to do code review because otherwise all kinds of terrible cruft will get promoted into the head branch and somebody (are you looking at me??) will have to fix it…</li>
<li>Managers know they need to do code reviews because they read all about them in a book with a cool cover, and it’s all <em>Agile</em> and stuff, and let’s face it they’re being measured on code review coverage, so come hell or high water you’re going to do code reviews!</li>
<li>And of course, regular professional developers know that code reviews, however painful, genuinely lead to better code, regardless of the pain involved in getting there.</li>
</ul>
<p style="text-align: center;"><a href="http://www.stellman-greene.com"><img class="aligncenter" title="Missteps in code review" src="http://www.klocwork.com/blog/wp-content/uploads/2009/11/sally-code-review.png" alt="" width="432" height="370" /></a></p>
<p>What we have here, folks, is a social organization, complete with the crazy uncle, the embarrassing grandma and the pimply teenagers. And social organizations, as we’ve all come to know and love, are at their best when the forum in which they’re fostered exists for a reason that encourages the unstated, but nevertheless in-your-face activity of which those in the respective societal groups are desperately in need:</p>
<ul>
<li>Facebook? Getting a date. And then getting another one while simultaneously trying desperately to avoid the previous partner. Rinse/repeat. Seriously, I have no idea how kids manage today. At least when I was young and awkward we could hide behind the silence and foot shuffling of real face-to-face meetings. Now with a keyboard and the internet in the way, there’s <em>nowhere to hide!!!! </em>I’m off topic again… ahem…</li>
<li>Linked-In? Getting a job.</li>
<li>Myspace? Getting a clue.</li>
</ul>
<p>You get the idea.</p>
<p>So code review as a social engagement… really? Parts 2 and 3 of this series of posts will examine how such interactions, fostered by social networking tools, are the best way to ensure code review gets done and returns value both to the participants and to the companies in which they work.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.klocwork.com/blog/2009/11/the-joy-of-code-review/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Compiler warnings, Coding standards, Code quality&#8230;oh my! (Part 2)</title>
		<link>http://www.klocwork.com/blog/2009/11/compiler-warnings-coding-standards-code-quality-oh-my-part-2/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=compiler-warnings-coding-standards-code-quality-oh-my-part-2</link>
		<comments>http://www.klocwork.com/blog/2009/11/compiler-warnings-coding-standards-code-quality-oh-my-part-2/#comments</comments>
		<pubDate>Tue, 03 Nov 2009 20:20:01 +0000</pubDate>
		<dc:creator>Alen Zukich</dc:creator>
				<category><![CDATA[Compliance]]></category>
		<category><![CDATA[General Coding]]></category>
		<category><![CDATA[Software Quality]]></category>
		<category><![CDATA[Static Analysis]]></category>
		<category><![CDATA[code quality]]></category>
		<category><![CDATA[coding standards]]></category>
		<category><![CDATA[compiler warnings]]></category>

		<guid isPermaLink="false">http://www.klocwork.com/blog/?p=493</guid>
		<description><![CDATA[In the first blog series, we discussed the value of compiler warnings and wondered why a static analysis tool would have similar error checking features. In this installment, we want to dive deeper into this question by reviewing errors that can be found by compilers, why they matter, and what limitations compilers have in this [...]]]></description>
			<content:encoded><![CDATA[<p>In the <a title="Part 1" href="http://www.klocwork.com/blog/2009/10/compiler-warnings-coding-standards-code-quality-oh-my-part-1/" target="_blank">first blog series</a>, we discussed the value of compiler warnings and wondered why a <a href="http://www.klocwork.com/products/insight/klocwork-truepath/">static analysis</a> tool would have similar error checking features. In this installment, we want to dive deeper into this question by reviewing errors that can be found by compilers, why they matter, and what limitations compilers have in this area.</p>
<p>Let’s take an example of the “implicit int” rule:</p>
<pre><code>int foo() {
   const x = 0;
   return x;
}</code></pre>
<p>This is a situation where failure to specify a type results in this compiler warning from (gcc v.3.4.4) or Microsoft cl (v.14):</p>
<pre><code>gcc -Wall -c main.c
main.c: In function `foo':
main.c:2: warning: type defaults to `int' in declaration of `x'

cl -c -Wall main.c
main.c(2) : warning C4431: missing type specifier - int assumed. Note: C no longer
supports default-int</code></pre>
<p>You can’t rely on the standard C/C++ implementations to support the implicit int anymore and these compilers alert you to that.  I do have to say, I’ve never seen anyone do this in practice, but it’s nice to know it’s there.</p>
<p>Let’s look at another example:</p>
<pre><code>void foo() {
   if (sizeof(char) &amp;lt; 2)  // defect - the condition is constant
   {
      /* ... */
   }
}</code></pre>
<p>The issue above is that the condition is constant.  See the <a title="C99 standard" href="http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1256.pdf" target="_blank">C99 standard</a> for details on this (section 6.6).  If we run the cl compiler we get:</p>
<pre><code>cl -c -Wall main2.c
main2.c(2) : warning C4127: conditional expression is constant</code></pre>
<p>Here, the cl compiler finds the issue, gcc does not (well, at least my version).   Okay, interesting let’s take a look at a C++ example:</p>
<pre><code>class A
{
   public:
   // non-virtual destructor
   ~A();
   virtual void f1();
};</code></pre>
<p>With this example, if you run either gcc or cl you get the same thing:</p>
<pre><code>gcc -Wall -c main3a.cpp
main3a.cpp:2: warning: `class A' has virtual functions but non-virtual destructor

cl -c -Wall main3a.cpp
main3a.cpp(7) : warning C4265: 'A' : class has virtual functions, but destructor is
not virtual instances of this class may not be destructed correctly</code></pre>
<p>According to the output from both compilers, we made a boneheaded mistake and forgot to assign the destructor as virtual.  Let’s go one step further and define a new method:</p>
<pre><code>void deleteA(A *a) {
   delete a;
}</code></pre>
<p>This method adds a new level of complexity.  When an object of a class derived from the given one is deleted through a pointer to the given class, the destructor of the derived class is not executed, and members of the derived class are not disposed of properly.  In this case, you will not get any warnings from any compiler.  The difference here is that compilers only work within the context of the file/function.  In this case, you are out of luck with compilers, but luckily source code analysis excels in this.</p>
<p>So, the message here is that compiler warnings are quite useful, but they do have their limitations.  Not all compilers report the same things consistently, nor do they cover analysis beyond a single function or file.  Still, make sure you run the compiler warnings, then implement static source code analysis as part of your process to go deeper and find some more complex issues in your code.</p>
<p>For the next blog of this series I’ll cover coding standards and where they fit in your code quality process.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.klocwork.com/blog/2009/11/compiler-warnings-coding-standards-code-quality-oh-my-part-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Top 5 Java quality bugs</title>
		<link>http://www.klocwork.com/blog/2009/10/top-5-java-quality-bugs/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=top-5-java-quality-bugs</link>
		<comments>http://www.klocwork.com/blog/2009/10/top-5-java-quality-bugs/#comments</comments>
		<pubDate>Tue, 13 Oct 2009 14:58:33 +0000</pubDate>
		<dc:creator>Alen Zukich</dc:creator>
				<category><![CDATA[General Coding]]></category>
		<category><![CDATA[Nasty Bugs]]></category>
		<category><![CDATA[Software Quality]]></category>
		<category><![CDATA[bugs]]></category>
		<category><![CDATA[embedded development]]></category>
		<category><![CDATA[java]]></category>

		<guid isPermaLink="false">http://www.klocwork.com/blog/?p=451</guid>
		<description><![CDATA[In a previous posts I reviewed the Top 5 C/C++ and Top 5 C# quality bugs that I that I see time and time again looking at customer code. I wrote my Java Top 5 with an embedded programming focus and the folks at www.embedded.com decided to publish it on their site. Here’s a snippet [...]]]></description>
			<content:encoded><![CDATA[<p>In a previous posts I reviewed the <a href="http://www.klocwork.com/blog/2009/07/top-5-cc-quality-bugs/" target="_blank">Top 5 C/C++</a> and <a href="http://www.klocwork.com/blog/2009/09/top-5-c-quality-bugs/" target="_blank">Top 5 C#</a> quality bugs that I that I see time and time again looking at customer code. I wrote my Java Top 5 with an embedded programming focus and the folks at <a href="http://www.embedded.com" target="_blank">www.embedded.com</a> decided to publish it on their site. Here’s a snippet below and the full Top 5 Java bugs article can be found <a title="Top 5 Java bugs" href="http://www.embedded.com/columns/guest/220300859" target="_blank">here</a>.</p>
<p style="padding-left: 30px;">While C dominates as the programming language of choice for embedded development, the use of Java is definitely on the rise. In fact, according to a recent VDC survey, 12.3% of respondents currently use Java in the embedded space, and 17.9% expect to be using Java in the next two years.</p>
<p style="padding-left: 30px;">For those transitioning from embedded development using C, you might find yourself falling into the hype that Java is a &#8220;safe&#8221; language. For example, Java developers face no requirement for managing memory associated with objects. However, this is where the trap may be laid. Even though there&#8217;s no need for memory management, developers may need to keep track of specific resources the object allocates. This is especially true in an embedded context where resources are often constrained. Even for experienced developers, these traps pop up time and again and can easily jeopardize your code quality and security.</p>
<p style="padding-left: 30px;">Here&#8217;s a round-up of the top five programming issues developers should be aware of in embedded Java development [<a href="http://www.embedded.com/columns/guest/220300859" target="_blank">More...</a>]</p>
]]></content:encoded>
			<wfw:commentRss>http://www.klocwork.com/blog/2009/10/top-5-java-quality-bugs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

