<?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>Building Better Software &#187; Quality</title>
	<atom:link href="http://www.stellman-greene.com/category/quality/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.stellman-greene.com</link>
	<description>because people want their software to work</description>
	<lastBuildDate>Sat, 05 Nov 2011 14:19:07 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Nonfunctional Requirements Q&amp;A</title>
		<link>http://www.stellman-greene.com/2010/02/17/nonfunctional-requirements-qa/</link>
		<comments>http://www.stellman-greene.com/2010/02/17/nonfunctional-requirements-qa/#comments</comments>
		<pubDate>Wed, 17 Feb 2010 17:47:50 +0000</pubDate>
		<dc:creator>Andrew Stellman</dc:creator>
				<category><![CDATA[Q&A]]></category>
		<category><![CDATA[Quality]]></category>
		<category><![CDATA[Requirements]]></category>

		<guid isPermaLink="false">http://www.stellman-greene.com/?p=436</guid>
		<description><![CDATA[Non-functional requirements Q&#38;A: We answer questions from readers about using nonfunctional requirements on a real software project, and how to use them on a real software project. Non-functional requirements: Planning out how well your software will work A couple of months ago I wrote a post called Using nonfunctional requirements to build better software. It&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p><em>Non-functional requirements Q&amp;A: We answer questions from readers about using <strong>nonfunctional requirements</strong> on a real software project, and how to use them on a real software project.</em></p>
<p><em><a href="http://www.stellman-greene.com/blog/wp-content/uploads/2009/10/jeez.-lady.png"><img class="alignnone size-full wp-image-402" title="Jeez, lady" src="http://www.stellman-greene.com/blog/wp-content/uploads/2009/10/jeez.-lady.png" alt="" width="550" height="346" /></a></em></p>
<h3>Non-functional requirements: Planning out how well your software will work</h3>
<p>A couple of months ago I wrote a post called <a id="aptureLink_KwUExBHA6H" href="../../2009/10/03/using-nonfunctional-requirements/"><em>Using nonfunctional requirements to build better software</em></a>. It&#8217;s basically a step-by-step guide for creating an easy, practical technique to use nonfunctional requirements on a real software project, treating them in a way that&#8217;s similar to how a lot of Agile teams treat user stories, scenarios and other functional requirements: by sticking them on index cards and using them to do some lightweight planning.</p>
<p>Since then, I&#8217;ve gotten a lot of questions about nonfunctional requirements (or, as some people call them, non functional requirements, behavioral requirements, quality attributes, and probably half a dozen other names). Based on the questions I&#8217;ve been getting, a lot of people really seem to want a solid overview of exactly what they are:</p>
<ul>
<li>What are nonfunctional requirements?</li>
<li>What goes into a <em>good</em> nonfunctional requirement?</li>
<li>Is there a nonfunctional requirements checklist that I can use?</li>
<li>How do I write down a nonfunctional requirement? Is there a nonfunctional requirements template I can use?</li>
</ul>
<p>Luckily, Jenny and I addressed exactly those questions in our first book, <a href="http://www.amazon.com/Applied-Software-Project-Management-Stellman/dp/0596009488/">Applied Software Project Management</a>, and I&#8217;ve gotten feedback over the years from people who read it (and other <a href="../../category/requirements/">writing I&#8217;ve done about requirements</a>), and tell me it helped them get a handle on the concepts behind nonfunctional requirements. So I&#8217;ll do a little requirements Q&amp;A and address those questions one by one, drawing from the book where possible. And I&#8217;ve posted an O&#8217;Reilly Community blog post called <a href="http://broadcast.oreilly.com/2010/02/nonfunctional-requirements-how.html">Understanding nonfunctional requirements</a> with some additional information, which should also help get to the bottom of the issue.</p>
<h3>Q: What are non-functional requirements?</h3>
<p>Non-functional requirements &#8212; or behavioral requirements, or quality attributes &#8212; describe how well a system performs its function. This is fundamentally different than the typical functional requirements that most of us are used to, which describe what that system does.</p>
<p>Here&#8217;s a quick example. Whenever I&#8217;m talking about requirements, I like to use a &#8220;search and replace&#8221; feature in a word processor or text editor as an example, because we&#8217;re all familiar with how it works. So while a functional requirement for &#8220;search and replace&#8221; might describe how the case-sensitive matching works: &#8220;If the original text was all uppercase, then the replacement text must be inserted in all uppercase.&#8221; A nonfunctional requirement, on the other hand, might describe the performance (&#8220;it must be able to replace 1000 search terms in a 3MB document in under 250ms on one of our standard test VMs running at 50% load&#8221;).</p>
<h3>Q: What goes into a <em>good</em> nonfunctional requirement?</h3>
<p>A <em>good</em> nonfunctional requirement is one that makes it clear to everyone on the project &#8212; including the user (or someone who really understands what the user needs) &#8212; exactly how the software has to perform. Remember, a good requirement (functional or nonfunctional) is about understanding and addressing the needs of a user.</p>
<p>Here&#8217;s what Jenny and I wrote about nonfunctional requirements in our first book:</p>
<blockquote><p>Users have implicit expectations about how well the software will work. These characteristics include how easy the software is to use, how quickly it executes, how reliable it is, and how well it behaves when unexpected conditions arise. The nonfunctional requirements define these aspects about the system.<em> — <a href="http://www.amazon.com/Applied-Software-Project-Management-Stellman/dp/0596009488/">Applied Software Project Management</a>, p113 (O&#8217;Reilly 2005)</em></p></blockquote>
<p>It&#8217;s really easy for non functional requirements to be unclear or ambiguous. The best way to make sure a nonfunctional requirement is clear and easy to use is to <em>quantify</em> it. So instead of saying that a task must be done quickly, write down the maximum number of seconds it must take to perform a task. The maximum size of a database on disk, the number of hours per day a system must be available, and the number of concurrent users supported are examples of requirements that the software must implement but do not change its behavior.</p>
<h3>Q: Is there a nonfunctional requirements checklist that I can use?</h3>
<p>We put together a nonfunctional requirements checklist that I&#8217;ve used many times on real projects. It&#8217;s based on a list of nonfunctional requirements we included in <em>Applied Software Project Management</em>.</p>
<p>Here&#8217;s one thing to keep in mind about this (or any other) non functional requirements checklist: as you&#8217;re reading it, you&#8217;ll probably find yourself thinking, &#8220;Wait a minute, all my software needs to be flexible (or efficient, or robust, etc.).&#8221; Yes, that&#8217;s true, of course. But are there <strong>specific</strong> non-functional requirements that affect your project in particular, above and beyond what you do on every project? That&#8217;s what this checklist is for, and that&#8217;s what you should be thinking about when you write down nonfunctional requirements.</p>
<ul>
<li>Availability: Are their constraints on the system&#8217;s availability or uptime?</li>
<li>Efficiency: Are there resources the system needs to be careful about monopolizing?</li>
<li>Flexibility: Will the system need to be altered after deployment?</li>
<li>Portability: How easy it is to move to another platform?</li>
<li>Integrity: How sensitive is the project to data security, access, and privacy?</li>
<li>Robustness: Do error conditions need to be handled gracefully?</li>
<li>Scalability: Will the system need to handle a wide range of configuration sizes?</li>
<li>Usability: Are there specific constraints on how the users will understand, learn and use the software?</li>
</ul>
<p>If you&#8217;re interested in using this on a real project , you can read more about it in that <a href="http://broadcast.oreilly.com/2010/02/nonfunctional-requirements-how.html">O&#8217;Reilly Broadcast post about non-functional requirements</a>: I post a relevant excerpt from <em>Applied Software Project Management</em> that goes into more detail about each of these.</p>
<h3>Q: How do I write down a nonfunctional requirement? Is there a nonfunctional requirements template I can use?</h3>
<p>Yes. We put together a <a href="../../Software_requirements_specification">software requirements specification template</a>, and I&#8217;ve helped a lot of teams adopt it for their own projects over the years. When we put together our requirements templates, we put a lot of effort into streamlining them as much as possible. So this is a sort of &#8220;bare minimum&#8221; template for writing down use cases, functional requirements, and nonfunctional requirements.</p>
<p>Here&#8217;s an example of how we&#8217;d specify a functional requirement:</p>
<table border="1px">
<tbody>
<tr>
<td><strong>Name</strong></td>
<td>Nonfunctional requirement #7: Performance constraints for search-and-replace</td>
</tr>
<tr>
<td><strong>Summary</strong></td>
<td>The search-and-replace feature must perform a search quickly.</td>
</tr>
<tr>
<td><strong>Rationale</strong></td>
<td>If a search is not fast enough, users will avoid using the software.</td>
</tr>
<tr>
<td><strong>Requirements</strong></td>
<td>A case-insensitive search-and-replace performed on a 3MB document with twenty 30-character search terms to be replaced with a different 30-character search term must take under 500ms on one of our standard testing VMs at 50% CPU load.</td>
</tr>
<tr>
<td><strong>References</strong></td>
<td>See use case #8: <em>Search</em></td>
</tr>
</tbody>
</table>
<p>And that gets back to the blog post I mentioned earlier, <a id="aptureLink_KwUExBHA6H" href="../../2009/10/03/using-nonfunctional-requirements/"><em>Using nonfunctional requirements to build better software</em></a>. If you&#8217;re working on a team that uses an agile process to build software, there&#8217;s a good chance that you already write down a lot of your requirements on index cards. In that post, I outline a method that I&#8217;ve had a lot of success with in my own projects.</p>
<p>I went into a lot more detail in that post, but here&#8217;s a quick recap. First, I write the requirement itself on the front of an index card:</p>
<p><img src="http://broadcast.oreilly.com/2010/02/17/stellman/nf_index_card_front.jpg" alt="Nonfunctional requirement index card (front)" width="450" height="271" /></p>
<p>and on the back I&#8217;ll write a specific test to make sure the requirement is implemented:</p>
<p><img src="http://broadcast.oreilly.com/2010/02/17/stellman/nf_index_card_back.jpg" alt="nf_index_card_back.jpg" width="450" height="267" /></p>
<p>Then I use it for planning the project to make sure it actually gets included &#8212; you can see more about it in the post. As far as documenting nonfunctional requirements goes, that&#8217;s actually a really efficient way of doing it, and I&#8217;ve seen it work well on agile projects.</p>
<p>I hope that answers some of your questions about using nonfunctional requirements in software projects. Obviously, I&#8217;d be thrilled if you took a look at the requirements chapter in <a href="http://www.amazon.com/Applied-Software-Project-Management-Stellman/dp/0596009488/">Applied Software Project Management</a> &#8212; Jenny and I gave a lot of practical advice about how to use requirements on a software project. And I&#8217;ve got other <a href="../../category/requirements/">requirements posts on Building Better Software</a> as well. But if they don&#8217;t answer your questions, feel free to ask (or <a href="../../contact-us/">send them to us</a>).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.stellman-greene.com/2010/02/17/nonfunctional-requirements-qa/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Using nonfunctional requirements to build better software</title>
		<link>http://www.stellman-greene.com/2009/10/03/using-nonfunctional-requirements/</link>
		<comments>http://www.stellman-greene.com/2009/10/03/using-nonfunctional-requirements/#comments</comments>
		<pubDate>Sat, 03 Oct 2009 20:14:44 +0000</pubDate>
		<dc:creator>Andrew Stellman</dc:creator>
				<category><![CDATA[Architecture]]></category>
		<category><![CDATA[Quality]]></category>
		<category><![CDATA[Requirements]]></category>

		<guid isPermaLink="false">http://www.stellman-greene.com/?p=397</guid>
		<description><![CDATA[Understanding nonfunctional requirements — which some people call software quality attributes or nonbehavioral requirements — can make a big difference when you&#8217;re building software. But a lot of people have trouble taking a somewhat theoretical idea and applying it to a real-life project. Luckily, we&#8217;ve got an easy, practical technique to use nonfunctional requirements on [...]]]></description>
			<content:encoded><![CDATA[<p><em>Understanding <strong>nonfunctional requirements</strong> — which some people call software quality attributes or nonbehavioral requirements — can make a big difference when you&#8217;re building software. But a lot of people have trouble taking a somewhat theoretical idea and applying it to a real-life project. Luckily, we&#8217;ve got an <strong>easy, practical technique</strong> to use nonfunctional requirements on a real software project.</em></p>
<p><img class="alignnone size-full wp-image-402" title="Jeez, lady" src="http://www.stellman-greene.com/blog/wp-content/uploads/2009/10/jeez.-lady.png" alt="Jeez, lady" width="550" height="346" /></p>
<h4>How well does your program do&#8230; well, whatever it does?</h4>
<p>I&#8217;ve wanted to write a post about <a href="http://en.wikipedia.org/wiki/Non-functional_requirement">nonfunctional requirements</a> for a while. But I&#8217;ve been trying to find a good angle for talking about them, because while they can be really practical and useful on a software project, it&#8217;s a little hard to get that practicality across in a useful way.</p>
<p>Luckily, I&#8217;ve been spending a lot of time lately talking about architecture, since Jenny and I are going to give our <a href="http://www.stellman-greene.com/2009/04/23/our-new-beautiful-teams-talk-at-boston-spin/">Beautiful Teams talk </a>at the <a title="IT Architects Conference 2009" href="http://www.iasahome.org/web/itarc/2009/NYC">ITARC New York conference</a> next week. And that&#8217;s got me thinking a lot about how architects work. I&#8217;ve been asked more than once recently about what, exactly, the term &#8220;architecture&#8221; refers to. The quick answer is the textbook definition — designing, documenting and verifying the structure, components and properties of a system. But I always want to go beyond that. Any time I come across an interesting idea (and software architecture is full of them!), I try to come up with a way that it can help a developer out today, on a project that developer is working on. In fact, I&#8217;ve got a quick technique to help you do exactly that — it&#8217;s at the end of this post. And like many great software practices, it involves index cards.</p>
<p>So I started thinking about some common problems that software architects run into, especially junior ones who are still building up their experience. And that leads me straight to a problem that I&#8217;ve seen over and over again. A lot of people jump into architecture and design by starting with the question, &#8220;What&#8217;s this system going to do?&#8221; We&#8217;ve got a lot of very useful tools for that (like <a href="http://www.stellman-greene.com/2009/05/03/requirements-101-user-stories-vs-use-cases/">user stories and use cases</a>). Obviously, you can&#8217;t design a system well without understanding what it does.</p>
<p>But I&#8217;ve had the opportunity to work with some very talented, very experienced software architects lately, and I&#8217;ve noticed something critically different about how they approach designing a system, and it&#8217;s really pointed me to an important difference that separates a senior architect from a junior one. When one of these guys gets started on a system, they don&#8217;t just think about what it&#8217;s going to do. They also think about <strong>how</strong> it&#8217;s going to do whatever it does.</p>
<p>That&#8217;s a really subtle point, and it&#8217;s a very easy one to overlook. But it&#8217;s very important. Important enough, in fact, to have a name: <strong>nonfunctional requirements</strong>.</p>
<p>Most of us have read about nonfunctional requirements. In fact, it&#8217;s a pretty common interview question: &#8220;Name a few nonfunctional requirements.&#8221; Someone who took a class in software architecture recently might be able to rattle a few of them off (usability, reliability, performance, scalability, availability&#8230;). And lots of project managers and business analysts I talk seem to be on an eternal quest for the perfect nonfunctional requirements template.</p>
<p>If you&#8217;re not familiar with nonfunctional requirements, here&#8217;s how Jenny and I defined them in our first book:</p>
<blockquote><p><em><span style="color: #003366;">Users have implicit expectations about how well the software will work. These characteristics include how easy the software is to use, how quickly it executes, how reliable it is, and how well it behaves when unexpected conditions arise. The nonfunctional requirements define these aspects about the system. (The nonfunctional requirements are sometimes referred to as &#8220;nonbehavioral requirements&#8221; or &#8220;software quality attributes.&#8221;)</span></em></p>
<p><em><span style="color: #003366;">– Andrew Stellman &amp; Jennifer Greene, </span></em><a title="Applied Software Project Management" href="http://www.stellman-greene.com/aspm"><em><span style="color: #003366;">Applied Software Project Management</span></em></a><em><span style="color: #003366;">, chapter 6 (O&#8217;Reilly 2005)</span></em></p></blockquote>
<p>And that&#8217;s a good starting point. But there&#8217;s an art to actually using nonfunctional requirements to make your software better. So how do we do that?</p>
<h4>Thinking &#8220;how well&#8221; from the start</h4>
<p>One of those senior architects I mentioned gave me a really good tip recently, one that really rings true. He told me, &#8220;Always think about performance from day one of your project, and test for it until you deliver.&#8221; Now, this particular person works on software tools used to design high-availability, high-performance server systems, so he thinks about performance a lot. But his point was that to design systems well, you need to think about performance — and other nonfunctional requirements — from the start.</p>
<p>Take a minute and think about that, because I think it&#8217;s an important point. I like it a lot for two reasons.</p>
<p>I like the fact that he&#8217;s thinking about how well the software works from the beginning of the project. I&#8217;m a firm believer in the old QA saying that &#8220;you can&#8217;t test quality in.&#8221; Yes, I know that saying rubs some people the wrong way because they think it sometimes lets people off the hook for testing at the end of the project. But there&#8217;s definitely a lot of truth in the idea that developers who think about quality from the beginning of the project build better software. If you design for performance, and if you then code for performance, then it&#8217;s pretty likely that you&#8217;ll end up with a more performant design than if only start thinking about performance at the very end of the project.</p>
<p>The other thing I like is that he didn&#8217;t say, &#8220;Think about performance, scalability, usability, robustness, etc., from the beginning of the project.&#8221; He narrowed it down to the single quality attribute that was most important to his particular project. I&#8217;ve talked to a lot of developers, project managers, designers, testers and business analysts over the years about nunfunctional requirements, and what I often find is that people seem overwhelmed. There are so many facets to quality beyond what the software does, and if you&#8217;re just trying to get started thinking about these things, it&#8217;s hard to know where to start.</p>
<p>Which leads me to my advice for developers. If you&#8217;re a programmer working on a project, here&#8217;s something that you can do today to improve the final product. Start with just three areas: availability, performance and reliability. I like these three because they&#8217;re easy to understand, it&#8217;s not hard to brainstorm examples of how they can go wrong.</p>
<p>Start with some definitions. Here are ones that Jenny and I gave in <a href="http://www.amazon.com/Applied-Software-Project-Management-Stellman/dp/0596009488/">Applied Software Project Management</a>:</p>
<blockquote><p><strong><em><span style="color: #003366;">Performance:</span></em></strong><em><span style="color: #003366;"> The performance constraints specify the timing characteristics of the software. Certain tasks or features are more time-sensitive than others; the nonfunctional requirements should identify those software functions that have constraints on their performance.</span></em></p>
<p><strong><em><span style="color: #003366;">Flexibility:</span></em></strong><em><span style="color: #003366;"> If the organization intends to increase or extend the functionality of the software after it is deployed, that should be planned from the beginning; it influences choices made during the design, development, testing, and deployment of the system.</span></em></p>
<div><strong><em><span style="color: #003366;">Reliability:</span></em></strong><em><span style="color: #003366;"> Reliability specifies the capability of the software to maintain its performance over time. Unreliable software fails frequently, and certain tasks are more sensitive to failure (for example, because they cannot be restarted, or because they must be run at a certain time).</span></em></div>
</blockquote>
<p>Now, make them <strong>practical and useful to your project</strong> by doing thee simple steps. To do this, you&#8217;ll need three index cards. Here&#8217;s what to do:</p>
<ol>
<li>On the front of each of the three index cards, write one a type of nonfunctional requirement at the top. So on the first card, write &#8220;Performance&#8221;. On the second one, write &#8220;Flexibility&#8221;. And on the third one, write &#8220;Reliability&#8221;. Write these words on the front and the back of the card. If bright colors grab your attention, use a bright-colored highlighter to highlight them. (Personally, they don&#8217;t really do anything for me.)</li>
<li>Take each of the cards. On each of them write down the name of one feature f your software and what this particular attribute means for that feature. I like to use <a href="http://www.stellman-greene.com/use_cases">Search and Replace</a> as an example whenever I talk about this sort of thing, because we&#8217;ve all used it and understand it. So on the Performance card I might write, &#8220;Search and replace: searching through a large document needs to be fast.&#8221;
<ul>
<li><img class="alignnone size-full wp-image-408" title="Performance index card" src="http://www.stellman-greene.com/blog/wp-content/uploads/2009/10/nf_index_card_front1.jpg" alt="Performance index card" width="450" height="271" /></li>
</ul>
</li>
<li>Here&#8217;s the hard part. On the back of each card, write down a single test that you can do to figure out how well your software meets that requirement. So on the back of the performance card I might write, &#8220;Replacing 100 occurrences of a 4-character string in a 25MB document has to take under 750 milliseconds.&#8221; (The more concrete you can make this test, the better this works.)
<ul>
<li><img class="alignnone size-full wp-image-406" title="Performance index card (back)" src="http://www.stellman-greene.com/blog/wp-content/uploads/2009/10/nf_index_card_back.jpg" alt="Performance index card (back)" width="450" height="267" /></li>
</ul>
</li>
</ol>
<p>Now that you&#8217;ve got those three cards, tack them up on your cubicle wall (or, even better, on your task board). Make sure the feature you wrote down in step #2 is facing forward. Make sure they&#8217;re someplace you&#8217;ll see them. Take just a minute or two each day to look at them and figure out if you&#8217;re headed in the right direction. What you&#8217;ll find more often than not is that as you&#8217;re designing your system, you won&#8217;t forget about those three things. Just spending a small amount of time writing down and thinking about these things can color your whole project.</p>
<p>Once you&#8217;ve moved from the design phase into the programming phase, flip the cards around so the test side is showing forward. (If you&#8217;re on an agile project with a three-week iteration, this might happen during the first week, but this works equally well for projects with a longer design phase.) As you&#8217;re writing the code for each of the features you wrote down, run that test by hand. It should only take a few minutes to do, and it will give you an idea of how well you&#8217;re doing. If you do this enough, you might end up figuring out a way to automate that test. If you do, and if you have a build server, then you can add it to the build. That way you&#8217;ll know any time you check in code that causes your project to see its performance (or reliability, or flexibility) degrade.</p>
<p>Try doing that on your next project, and what you should find is that you spend more time thinking about these things. When opportunities to improve those three specific things come up, you&#8217;ll recognize them and take them. And that&#8217;s a great way to build better software.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.stellman-greene.com/2009/10/03/using-nonfunctional-requirements/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to hold a more effective code review</title>
		<link>http://www.stellman-greene.com/2008/09/20/how-to-hold-a-more-effective-code-review/</link>
		<comments>http://www.stellman-greene.com/2008/09/20/how-to-hold-a-more-effective-code-review/#comments</comments>
		<pubDate>Sat, 20 Sep 2008 18:45:21 +0000</pubDate>
		<dc:creator>Andrew Stellman</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Quality]]></category>

		<guid isPermaLink="false">http://www.stellman-greene.com/?p=158</guid>
		<description><![CDATA[A lot of programmers feel like being asked to go to a code review is like being told by mom to eat our veggies. We&#8217;ll complain about it, and even if we do eventually swallow them we&#8217;re determined not to enjoy them. It&#8217;s something I&#8217;ve seen over and over again: programmers groaning about having to [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.stellman-greene.com/blog/wp-content/uploads/2008/09/sally-code-review.png"><img class="alignnone size-full wp-image-157" title="Sally learns an important lesson about code reviews" src="http://www.stellman-greene.com/blog/wp-content/uploads/2008/09/sally-code-review.png" alt="" width="500" height="428" /></a></p>
<p>A lot of programmers feel like being asked to go to a code review is like being told by mom to eat our veggies. We&#8217;ll complain about it, and even if we do eventually swallow them we&#8217;re determined not to enjoy them.</p>
<p>It&#8217;s something I&#8217;ve seen over and over again: programmers groaning about having to go to a code review, usually because someone gets some big idea about making things better, and decides this is how you do it. There&#8217;s sometimes a little nervous joking at the beginning of the meeting about how nobody really wants to be there. And after it&#8217;s done, a lot of us get the distinct feeling that it was a waste of time.</p>
<p>The thing is, code reviews can be a really good thing. And not only that, they don&#8217;t have to be a chore. If you do them right, people on the team can start to appreciate them and even &#8211; heaven forbid &#8211; <em>enjoy</em> them.</p>
<p>So how do we make code reviews more palatable? We need to think about what motivates us as programmers. Programmers love to code. We love building things, and we love solving problems. But we hate anything that seems bureaucratic or tedious, and we definitely hate meetings. But most of all, we hate being in uncomfortable social situations that require us to confront people face-to-face. We&#8217;re not alone in that; most people hate situations like that.</p>
<p>I think that&#8217;s a pretty big part of why programmers intuitively dislike code reviews. It&#8217;s not that we&#8217;re afraid of putting our work out there for our peers to see. That&#8217;s actually something we look forward to: we love to show off code that we&#8217;ve worked so hard on, and we definitely appreciate the input from the people around us. But it&#8217;s almost never the person whose code is being reviewed who groans about it. No, it&#8217;s usually the people who are asked to attend the review. And I think I know why: it&#8217;s because we don&#8217;t like being asked to criticize the work of others, openly and without hesitation, for the good of the team. I think we naturally feel uncomfortable putting someone else in the position of having to openly confront their errors, because it&#8217;s so easy to imagine ourselves in that same position.</p>
<p>And that may be the secret to holding code reviews that people <em>actually look forward to attending</em>: make it about helping make the code better, not criticizing and finding its flaws. If you can come up with a way to avoid bitter arguments about tiny details and stubbornly-held opinions, and instead concentrate on helping someone improve his or her code, then people will stop thinking about code reviews as an uncomfortable meeting and start thing about them as a way to build better software.</p>
<p>That sounds like a tall order. How do you do it?</p>
<p>Well, you start out by thinking about one of the best things that can happen in a code review, something that I&#8217;ve seen many times. It usually happens about two thirds of the way through the review, about the time when the first signs of meeting fatigue are starting to set in. Someone points out another problem with the code, and a conversation starts up about an aspect of it that nobody really thought of. Uh-oh &#8212; it&#8217;s a bug, a particularly nasty one that. Then everyone kind of looks at each other with a weird mixture of relief and disgust, because we found a bug that a) definitely would have made it into production, and b) would have taken hours or days to track down and fix.</p>
<p>I&#8217;ve said this many times before: programmers are very practical people, especially when it comes to our own time. If something will save us time down the road, we&#8217;ll definitely do it. If you can show a programmer that a tool or technique (like a code review) saves more time than it costs, that&#8217;s a great way to get him or her to start thinking positively about it.</p>
<p>That doesn&#8217;t change the fact that a lot of people get nervous about code reviews, even people who have done them a bunch of times. So I spent a little time thinking of advice I&#8217;ve given about code reviews over the years. Some of this is pretty standard code review stuff, but I think it&#8217;s worth repeating because people have so many different views on how to do code reviews effectively. And I think that if you think about them, and get other people on your team thinking the same way, it could definitely help you hold effective code reviews.</p>
<p>So here&#8217;s some advice about holding better code reviews &#8212; you can think of them as code review tools (or even code review best practices, although I&#8217;m not a huge fan of that term) that can make your software better:</p>
<ul>
<li>First things first: there are a lot of different ways to do a code review. Some people like to follow a very strict process. Personally, I like to keep them informal; the more it seems like an everyday conversation, the more work we actually get done.</li>
</ul>
<ul>
<li>It&#8217;s important to keep the meeting to under two hours &#8212; any more than that and meeting fatigue sets in. Most code review teams can handle between 200 and 400 lines of code in a two-hour review meeting. (Your mileage may vary.)</li>
</ul>
<ul>
<li>Don&#8217;t forget to distribute the code before the review, and make sure you give everyone enough time to actually look through it. Send around a PDF of the code (<a href="http://www.gnu.org/software/a2ps/">a2ps</a> is a good way to make it readable, and it&#8217;s got stylesheets for almost every language). Also make sure that everyone also has access to the source, and that they know how to build and run it. Sometimes it&#8217;s a lot easier to prepare for a code review if you can actually debug your way through the code.</li>
</ul>
<ul>
<li>Make sure that everyone knows you appreciate their time. It&#8217;s easy to forget that, but it helps the team see the review as a useful tool and not just another boring meeting. Remember, you&#8217;re pulling half a dozen or more people into a room for two hours, plus preparation time &#8212; that&#8217;s the equivalent of taking a top developer off of all projects for two days. That&#8217;s also why it&#8217;s very important to choose a good block of code to review. Choose one that&#8217;s inherently risky: a difficult algorithm, code from a library that many other people depend on, an interface a lot of people will use, a particularly nasty bit of spaghetti code.</li>
</ul>
<ul>
<li>Code reviews and <a href="http://refactoring.com/">refactoring</a> work really well together. Look for opportunities to extract methods, rename variables, replace literals with constants, etc.</li>
</ul>
<ul>
<li>Pay attention to <a href="http://en.wikipedia.org/wiki/Object-oriented_programming#Fundamental_concepts">OOP principles</a>, especially encapsulation. Improving encapsulation is an easy and effective way to prevent bugs.</li>
</ul>
<ul>
<li>The code review isn&#8217;t just about bringing up issues &#8212; it should also be about giving some indication of how to resolve those issues. Ideally, the programmer whose code is being reviewed should be able to read through the results of the review and very quickly implement the fixes, because in the meeting we wrote down exactly what needs to be fixed and how to fix it. (We don&#8217;t actually have to write down lines of code, of course &#8212; just enough information so it&#8217;s clear what to do.) A good way to do this is to make the goal of the meeting to be to <strong>produce a log</strong>, or a list of fixes that need to be made to the code.</li>
</ul>
<ul>
<li>Instead of storing the log in a spreadsheet, Word document, or wiki page (I&#8217;ve done all three), try having the moderator put the results of the review directly into the code as comments (which includes an easily searchable unique string like &#8216;// %%TODO: CODE REVIEW 8/28/08%%&#8217;, so the programmer can find them all). The results of the review meeting can be e-mailed out a link to a diff report in the source repository. When the programmer goes back to update the code, he or she can alter the comments to make sure they make sense in context &#8212; but they can stay in the code because they&#8217;ll make more sense, and it&#8217;ll be clear why the code is the way it is if someone is maintaining it in the future.</li>
</ul>
<ul>
<li>A good way to focus the discussion is to guide the conversation away from arguments about coding in general, and towards what to write down in the log to resolve the current issue. Make a good effort to figure out how to resolve the issue: most can be resolved in the meeting. Any issue that can&#8217;t be resolved in a reasonable amount of time gets added to the log as an open issue.</li>
</ul>
<ul>
<li>I&#8217;ve always gotten a lot of mileage out of using a moderator. The moderator&#8217;s job is to keep track of the discussion, and keep the discussion on track. If people are getting off onto a tangent that won&#8217;t benefit the code, or if they&#8217;ve gotten into a disagreement where there are merits on both sides of the issue and it clearly won&#8217;t be resolved, the moderator should suggest that we log it as an open issue and move on. You can always follow up later and resolve the issue.</li>
</ul>
<ul>
<li>Some people get very strict about making sure that the moderator stays at arm&#8217;s length, and doesn&#8217;t get involved with the review. Personally, I think code reviews are hard enough without imposing arbitrary rules like that (because we&#8217;re laying someone&#8217;s code bare and dissecting it, which can be difficult for anyone who&#8217;s not used to it). We&#8217;re all adults here, and we can trust any of us not to &#8220;abuse&#8221; a moderator role. If the moderator has something to say, he or she should say it. If it&#8217;s easier, replace &#8220;moderator&#8221; with &#8220;note-taker&#8221; or something like that.</li>
</ul>
<ul>
<li>Don&#8217;t be pedantic, and try to avoid theoretical discussions. It&#8217;s really easy to get bogged down with a discussion that doesn&#8217;t go anywhere about whether this variable declaration should be here or there, whether this type of structure or that is slightly more efficient, if we could do something better in theory if we scrapped a large amount of code and rewrote it. If a discussion isn&#8217;t going to directly lead to a change, even if it&#8217;s an interesting topic, note it in the log as an open issue and move on. And <strong>definitely don&#8217;t point out spelling errors</strong><em>.</em> A lot of grate programmers are lousy spelers.</li>
</ul>
<ul>
<li>Make sure variable names make sense, but don&#8217;t worry about naming conventions. Some people love underscores in front of parameters, some people hate them. I&#8217;m sure you can come up with at least three different &#8220;official&#8221; conventions for any programming language. There are few things less useful during a code review than an argument over whether to use <a href="http://en.wikipedia.org/wiki/CamelCase">PascalCase or camelCase</a>.</li>
</ul>
<ul>
<li>One way people like to do reviews is to have people &#8220;read&#8221; the code &#8211; interpret it out loud. I&#8217;ve had some success with going around the table and having people take turns &#8220;reading&#8221; each chunk of code. If there&#8217;s a chunk that is difficult to &#8220;read&#8221;, it&#8217;s not clear enough and is a good candidate for refactoring.</li>
</ul>
<ul>
<li>Before you distribute the code to the team, run it through a static code analyzer (like <a href="http://findbugs.sourceforge.net/">FindBugs</a> or <a href="http://msdn.microsoft.com/en-us/library/bb429476.aspx">FxCop</a>) and fix issues that are found. There&#8217;s no need to waste discussion time on problems that a tool can catch and log for us.</li>
</ul>
<ul>
<li>I&#8217;ve had a lot of success with a kind of review called a &#8220;high impact inspection&#8221; (that&#8217;s a term that was developed at HP about fifteen years ago). Basically, it boils down to having everyone do the code review independently and e-mailing their issues to a moderator. The moderator puts the issues into one big list, sends them back out to everyone, and then the review meeting itself is focused on just going through those issues. Jenny and I developed a <a title="Inspections for distributed teams" href="http://www.stellman-greene.com/aspm/content/view/25/40/">code review process similar to high impact inspections</a> to let us hold inspections in teams outsourced to India (where time zone differences make it very difficult to regularly schedule two-hour meetings). We ran it a bunch of times, and it worked really well.</li>
</ul>
<p>When Jenny and I were writing the section on code review techniques in our first book,<a title="Applied Software Project Management" href="http://www.stellman-greene.com/aspm"> Applied Software Project Management</a>, we came up with <a title="Code reviews" href="http://www.stellman-greene.com/code_reviews">a checklist of things that you should look for during a code review</a>. That should give you a good starting point for coming up with a good review.</p>
<p>Good luck with your code reviews! If you end up with a good code review success (or failure!) story, I&#8217;d love to hear about it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.stellman-greene.com/2008/09/20/how-to-hold-a-more-effective-code-review/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Unit testing and the narrowly averted Citicorp Center disaster</title>
		<link>http://www.stellman-greene.com/2008/05/24/unit-testing-and-the-narrowly-averted-citicorp-center-disaster/</link>
		<comments>http://www.stellman-greene.com/2008/05/24/unit-testing-and-the-narrowly-averted-citicorp-center-disaster/#comments</comments>
		<pubDate>Sat, 24 May 2008 21:18:33 +0000</pubDate>
		<dc:creator>Andrew Stellman</dc:creator>
				<category><![CDATA[Quality]]></category>
		<category><![CDATA[Test-driven development]]></category>

		<guid isPermaLink="false">http://www.stellman-greene.com/?p=145</guid>
		<description><![CDATA[I was working on a project earlier today. Now, typically I always do test-driven development, where I&#8217;ll build unit tests that verify each class first and then build the code for the class after the tests are done. But once in a while, I&#8217;ll do a small, quick and dirty project, and I&#8217;ll think to [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.stellman-greene.com/blog/wp-content/uploads/2008/05/it-was-almost-a-disaster.png"><img class="alignnone size-full wp-image-147" title="Citigroup Center" src="http://www.stellman-greene.com/blog/wp-content/uploads/2008/05/it-was-almost-a-disaster.png" alt="It was almost a disaster..." width="500" height="592" /></a></p>
<p>I was working on a project earlier today. Now, typically I always do test-driven development, where I&#8217;ll build <a href="http://www.stellman-greene.com/images/stories/Library/Refactoring%20and%20Unit%20Testing.pdf">unit tests</a> that verify each class first and then build the code for the class after the tests are done. But once in a while, I&#8217;ll do a small, quick and dirty project, and I&#8217;ll think to myself, &#8220;Do I really need to write unit tests?&#8221; And then, as I start building it, it&#8217;s obvious: yes, I do. It always comes at a point where I&#8217;ve added one or two classes, and I realize that I have no idea if those classes actually work. I&#8217;ll realize that I&#8217;ve written a whole bunch of code, and I haven&#8217;t tested any of it. And that starts making me nervous. So I turn around and start writing unit tests for the classes I&#8217;ve written so far&#8230; and I always find bugs. This time was no exception.</p>
<p>This time, for some reason, that <a href="http://www.willbeta.com/lose-weight-exercise/"><span style="display:none;">Lose Weight </span>Exercise</a> reminded me of the story of the nearly disastrous Citicorp Center building.</p>
<p>Citicorp Center was one of the last skyscrapers built in the New York City skyscraper and housing boom in the 1960s and 1970s. A lot of New Yorkers today probably don&#8217;t realize that it was actually one of the more interesting feats of structural engineering at the time. The building was built on a site occupied by St. Peter&#8217;s, a turn-of-the-century Lutheran church that would have to be demolished to make way for the skyscraper. The church agreed to let Citigroup demolish it, on one condition: that it be rebuilt on the same site.</p>
<p>The engineer, Bill LeMessurier, came up with an ingenious plan: put the base of the building up on columns, and cantilever the edge of the building over the church. Take a <a href="http://maps.google.com/maps?f=q&amp;hl=en&amp;geocode=&amp;sll=40.677012,-73.975573&amp;sspn=0.007567,0.009935&amp;ie=UTF8&amp;ll=40.760895,-73.970298&amp;spn=0.003779,0.00766&amp;z=18&amp;layer=c&amp;cbll=40.759,-73.97054&amp;panoid=gSo1IjErJ-yc7qDPNK-fyA&amp;cbp=2,169.14704424110687,,0,-13.5457675113405">look at it on Google Maps&#8217; Street View</a> &#8212; you can pan up, navigate around, and see just how much of a structural challenge this was.</p>
<p>The building was completed in 1977. A year later, LeMessurier got a call from an engineering student studying the Citicorp building. <a href="http://www.duke.edu/~hpgavin/ce131/citicorp1.htm">Joe Morgenstern&#8217;s excellent 1995 New Yorker article about the building</a> describes it like this:</p>
<blockquote><p>The student wondered about the columns&#8211;there are four&#8211;that held the building up. According to his professor, LeMessurier had put them in the wrong place.</p>
<p>&#8220;I was very nice to this young man,&#8221; LeMessurier recalls. &#8220;But I said, &#8216;Listen, I want you to tell your teacher that he doesn&#8217;t know what the hell he&#8217;s talking about, because he doesn&#8217;t know the problem that had to be solved.&#8217; I promised to call back after my meeting and explain the whole thing.&#8221;</p></blockquote>
<p>Unfortunately, LeMessurier was mistaken, and in the article he describes the problem in all its gory detail. It&#8217;s a fascinating story, and I definitely recommend reading it &#8212; it&#8217;s a great example of how engineering projects can go wrong. It&#8217;ll probably seem eerily familiar to most experienced developers: after a project is done, someone uncovers something that seems to be a tiny snag, which turns out to be disastrous and requires a huge amount of rework.</p>
<p>Rework in a building isn&#8217;t pretty. In this case, it required a team to go through and weld steel plates over hundreds of bolted joints throughout the building, all over the weekends so nobody would find out and panic.</p>
<p>But what I found especially interesting about the story had to do with testing the building:</p>
<blockquote><p>On Tuesday morning, August 8th, the public-affairs department of Citibank, Citicorp&#8217;s chief subsidiary, put out the long delayed press release. In language as bland as a loan officer&#8217;s wardrobe, the three-paragraph document said unnamed &#8220;engineers who designed the building&#8221; had recommended that &#8220;certain of the connections in Citicorp Center&#8217;s wind bracing system be strengthened through additional welding.&#8221; The engineers, the press release added, &#8220;have assured us that there is no danger.&#8221; When DeFord expanded on the handout in interviews, he portrayed the bank as a corporate citizen of exemplary caution&#8211;&#8221;We wear both belts and suspenders here,&#8221; he told a reporter for the News&#8211;that had decided on the welds as soon as it learned of new data based on dynamic-wind tests conducted at the University of Western Ontario.</p>
<p>There was some truth in all this. During LeMessurier&#8217;s recent trip to Canada, one of Alan Davenport&#8217;s assistants had mentioned to him that probable wind velocities might be slightly higher, on a statistical basis, than predicted in 1973, during the original tests for Citicorp Center. At the time, LeMessurier viewed this piece of information as one more nail in the coffin of his career, but later, recognizing it as a blessing in disguise, he passed it on to Citicorp as the possible basis of a cover story for the press and for tenants in the building.</p></blockquote>
<p>Tests were at the center of this whole situation. It turned out that insufficient testing was done at the beginning of the project. Now, more tests were used to figure out how to handle the situation. Tests got them into the situation, and tests got them out.</p>
<p>So what does this have to do with software?</p>
<p>I have a hunch that anyone who&#8217;s done a lot of test-driven development will see the relevance pretty quickly. The quality of your software &#8212; whether it does its job or fails dramatically &#8212; depends on the quality of your tests. It&#8217;s easy to think that you&#8217;ve done enough testing, but once in a while your tests uncover a serious problem that would be painful &#8212; even disastrous &#8212; to repair. And as LeMessurier found, it&#8217;s easy to run tests that give a false sense of security because they&#8217;re based on faulty assumptions.</p>
<p>I&#8217;ve had arguments many times over my career with various people about how much testing to do. I can&#8217;t say that I&#8217;ve always handled them perfectly, but I have found a tactic that works. I point to the software and ask which of the features doesn&#8217;t have to work properly. But it&#8217;s good to remind myself how easy it is to question the importance of tests. It&#8217;s so easy, in fact, that I did it myself earlier today. And that&#8217;s why it&#8217;s important to have examples like Citicorp Center to remind us of how important testing can be.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.stellman-greene.com/2008/05/24/unit-testing-and-the-narrowly-averted-citicorp-center-disaster/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How spending a little extra time and money on design might have saved Microsoft over a billion bucks</title>
		<link>http://www.stellman-greene.com/2007/08/15/how-spending-a-little-extra-time-and-money-on-design-might-have-saved-microsoft-over-a-billion-bucks/</link>
		<comments>http://www.stellman-greene.com/2007/08/15/how-spending-a-little-extra-time-and-money-on-design-might-have-saved-microsoft-over-a-billion-bucks/#comments</comments>
		<pubDate>Wed, 15 Aug 2007 21:32:22 +0000</pubDate>
		<dc:creator>Andrew Stellman</dc:creator>
				<category><![CDATA[Quality]]></category>
		<category><![CDATA[Software Engineering]]></category>

		<guid isPermaLink="false">http://www.stellman-greene.com/2007/08/15/how-spending-a-little-extra-time-and-money-on-design-might-have-saved-microsoft-over-a-billion-bucks/</guid>
		<description><![CDATA[I really wanted an Xbox 360. My old PS2 is showing its age, and I wanted to upgrade to a new system as soon as I finished the last few missions of GTA: Vice City Stories &#8212; especially now that it looks like Manhunt 2 won&#8217;t be coming out for PS2 any time soon. I&#8217;m [...]]]></description>
			<content:encoded><![CDATA[<p>I really wanted an Xbox 360.</p>
<p>My old PS2 is showing its age, and I wanted to upgrade to a new system as soon as I finished the last few missions of <a href="http://www.rockstargames.com/vicecitystories/">GTA: Vice City Stories</a> &#8212; especially now that it looks like <a href="http://www.rockstargames.com/manhunt2/">Manhunt 2</a> won&#8217;t be coming out for PS2 <a href="http://wii.ign.com/articles/798/798639p1.html">any time soon</a>. I&#8217;m a huge fan of the GTA series, and I&#8217;m especially psyched about <a href="http://www.rockstargames.com/IV/">GTA4</a>. I grew up in Brooklyn, on a block that looks a more than a little like <a href="http://www.rockstargames.com/IV/screenshots/007.jpg">a GTA4 screenshot</a>.</p>
<p>But then something happened&#8230;</p>
<p><img src="http://www.stellman-greene.com/blog/wp-content/uploads/2007/08/viva-pinata.png" alt="Viva Pinata.png" /></p>
<p>But a couple of weeks ago my plans changed. <a href="http://www.stellman-greene.com/jennifer-greene/">Jenny</a> was happily thrashing away on <a href="http://www.guitarhero.com/">Guitar Hero</a>, when her TV screen just went blank. She looked down at her console, which had suddenly gone quiet. (That&#8217;s pretty noticeable, apparently, because the Xbox 360 is a really loud machine&#8230; which, as it turns out, is important to our story.) Much to her disappointment, she saw those three telltale LEDs that every Xbox owner dreads: <a href="http://en.wikipedia.org/wiki/RROD">the red ring of death</a>.</p>
<p>Luckily, Jenny&#8217;s 360 lasted long enough so that she could take advantage of the <a href="http://service.xbox.com/">Xbox 360 service site</a> that <a href="http://www.joystiq.com/2007/08/04/microsoft-launches-new-xbox-360-repair-web-site/">Microsoft launched earlier this month</a>. But her poor console was just the latest in a long line of casualties. Some retailers estimate that <a href="http://gizmodo.com/gadgets/gaming/xbox-360-failure-rate-30-says-retailers-271487.php">30% of Xbox 360s need repair</a>, and we&#8217;ve seen plenty of <a href="http://www.engadget.com/2007/02/22/xbox-360-diehard-loses-loyalty-after-seven-bricked-consoles/">anecdotal</a> <a href="http://www.engadget.com/2007/01/15/towel-trick-provides-temporary-fix-to-xbox-360s-red-ring-of-d/">evidence</a> that gamers are unhappy. It&#8217;s <a href="http://www.informationweek.com/news/showArticle.jhtml?articleID=201200157">costing Microsoft sales</a> and <a href="http://ce.seekingalpha.com/article/32642">spooking investors</a>. Microsoft is doing everything they can to fix the problem &#8212; they&#8217;ve extended the warranty to three years, and it&#8217;s <a href="http://www.engadget.com/2007/07/05/xbox-360-warranty-extended-to-three-years/">costing them over a billion dollars</a>. But it&#8217;s a real mess.</p>
<p>As much as I want a new console, I&#8217;m not going to buy one until I know that it won&#8217;t break. I still plan on getting a 360, but not until I can be reasonably sure that I won&#8217;t have to return it. By the time I eventually get one, hopefully they&#8217;ll have figured out how to make it quieter. I&#8217;m certain that I&#8217;m not the only one who&#8217;s decided to put off buying an Xbox. And that&#8217;s bad news for Microsoft.</p>
<p><em>So what can we, as software developers, learn from the Xbox 360 fiasco?</em></p>
<p><img src="http://www.stellman-greene.com/blog/wp-content/uploads/2007/08/productive-meeting.png" alt="Productive meeting" /></p>
<p>Software people like us have a nasty habit of dismissing hardware problems as if they have nothing to do with us. We tend to think that designing software is really different from building hardware. And sure, there are definitely differences. We don&#8217;t have to worry about assembly lines, product getting damaged in shipment, or those pesky laws of physics that can prove to be such an irritating limitation when you have to design physical objects.</p>
<p>And it&#8217;s easy to dismiss the Xbox 360 failure as one of those unfortunate things that falls into that last category of physical faults. There&#8217;s a <a href="http://techon.nikkeibp.co.jp/english/NEWS_EN/20070801/137224/" title="Tech-On! investigates the red ring of death">great Tech-On! article</a> that gives us the dirt on exactly what&#8217;s caused the problem. It&#8217;s an excellent post-mortem on what amounts to terrible thermal design.</p>
<p>For those of you who&#8217;ve never taken a computer apart, here&#8217;s a little background information. Dealing with heat is an important part of modern computer design. Computer processors generate a lot of heat &#8212; so much that if you don&#8217;t come up with a way to get rid of it, they&#8217;ll fry themselves. So computer manufacturers will typically attach a heat sink to a processor. A heat sink is basically just a big radiator with fins or poles that lets air circulate and draw away the heat. (I once roasted a Pentium 4 processor by popping its heat sink off while the computer was running, just to see what would happen. It went &#8220;poof&#8221;.) A lot of processors are too hot even for heat sinks; in that case, you&#8217;ll need to stick a fan on top of it to cool it off. That&#8217;s why some computers are so noisy: they need fans to keep them cool.</p>
<p>It turns out that the Xbox 360 generates far too much heat, and a lot of people speculate that when that heat builds up past a critical point it unseats the GPU (a separate processor that&#8217;s used for graphics). Microsoft has so far refused to comment on exactly what the problem is, but as time goes on there does seem to be some <a href="http://kotaku.com/gaming/microsoft-says/no-single-issue-with-xbox-360-286668.php">consensus</a> forming about it. And that Tech-On! article seems to have found a smoking (heh) gun.</p>
<p>But that&#8217;s just the hardware stuff. What does that have to do with building better software?</p>
<p>The punchline for all of this came at the end of that Tech-On! article, and it&#8217;s why I think this whole incident is so interesting. Here&#8217;s what it said:</p>
<blockquote><p> Finally, we opened the chassis of the Xbox 360 repaired in May 2007 and compared it with the other Xbox 360 we purchased in late 2005.</p>
<p>&#8220;Huh? The heat sinks and fans are completely identical, aren&#8217;t they?&#8221;</p>
<p>To our surprise, the composition of the repaired Xbox 360 looked completely the same as that of the Xbox 360 purchased in late 2005. It turned out that Microsoft provided repair without changing the Xbox 360&#8242;s thermo design at least until May 2007.</p></blockquote>
<p>The repaired units weren&#8217;t replaced with ones that had a better design. They were the same &#8212; as far as they could tell, Microsoft just replaced a broken unit with one that hadn&#8217;t broken yet. That&#8217;s probably why we&#8217;re seeing <a href="http://blogs.mercurynews.com/aei/2006/05/the_unluckiest_.html">various</a> <a href="http://www.1up.com/do/newsStory?cId=3160603">reports</a> of repeated breakdowns.</p>
<p>What that tells me is that <em>the design of the Xbox 360 is deeply flawed</em>, and that design flaw has already cost Microsoft well over a billion dollars. And it&#8217;s that flawed design that can teach us a whole lot about our own software projects.</p>
<p><img src="http://www.stellman-greene.com/blog/wp-content/uploads/2007/08/shoddy-workmanship.png" alt="Shoddy workmanship" /></p>
<p>So what does this all mean for us developers? Well, for the more cynical among us, it could just mean a whole lot of job security. I&#8217;ve met <a href="http://en.wikipedia.org/wiki/COBOL">COBOL</a> programmers who charge ridiculous amounts of money to maintain aging systems. But while their jobs pay well, personally they sound tedious and awful to me. Does anyone really aspire to spend years patching an aging software system? Most programmers will tell you that maintaining old systems is the worst part of the job. If you love designing new and innovative software, then the last thing you want to do is get your career stuck in maintenance mode.</p>
<p>And that&#8217;s what Microsoft is learning with the Xbox 360. I&#8217;m not a thermal design expert, but I am absolutely positive that they could have come up with a different design that wouldn&#8217;t fail so often. And while it may have cost more money to design the system and build each unit, I sincerely doubt those extra costs would have added up to over a billion dollars. And maybe the extra design time might have cost them more time&#8230; but now there are plenty of us who aren&#8217;t buying the system because we don&#8217;t want to be stung by the rampant quality problems.</p>
<p>Had Microsoft designed the system properly in the first place, they wouldn&#8217;t be in this mess now. And that&#8217;s the big lesson for us to learn. Oddly enough, it&#8217;s not a new lesson&#8230; in fact, it&#8217;s a pretty old one. One way to look at the Xbox thermal problem is to see it as <em>a design defect that wasn&#8217;t caught until after the product was shipped</em>.</p>
<p>Look what I found in an old 1997 issue of <a href="http://www.yesterpc.com/Press/WinTechj/item.htm">Windows Tech Journal</a>&#8230; it&#8217;s an article by one of our favorite authors, Steve McConnell, called <a href="http://stevemcconnell.com/articles/art08.htm" title="McConnell, Steve. ">&#8220;Upstream Decisions, Downstream Costs&#8221;</a>. The article lays out a scenario that most of us will recognize immediately: a fictional software company runs into problems because they don&#8217;t do enough planning up front, and end up getting buried with bugs, which cause awful delays. It also has a chart that anyone who&#8217;s read a few software engineering textbooks will recognize, showing that the earlier a bug is introduced in the project and the later it&#8217;s caught, the more expensive it is to fix.</p>
<p>So now we&#8217;ve seen a good, real-world situation where better design practices would have saved a whole lot of money. But what can we do about it in our own projects?</p>
<p>First and foremost, this gives us more ammunition when arguing with our coworkers and our bosses for more time to design our software. It&#8217;s really easy to get frustrated during the design phase of a software project, when a few people are generating a lot of paper or diagrams but nobody&#8217;s working on the code yet. That&#8217;s one of the things that we pointed out in our first book, <a href="http://stellman-greene.com/aspm" title="Applied Software Project Management"><em>Applied Software Project Management</em></a> &#8212; that finding problems too late can sink projects. Luckily, there&#8217;s a relatively painless fix: adopt <a href="http://stellman-greene.com/reviews">good review practices</a>.</p>
<p>This is something that our friends in the open source world are really good at. Jenny and I talked about this in an ONLamp.com article we wrote last year called <a href="http://www.onlamp.com/pub/a/onlamp/2006/02/27/what-corp-projects-learn-from-open-source.html?page=3" title="What Corporate Projects Should Learn from Open Source">&#8220;What Corporate Projects Should Learn from Open Source&#8221;</a>. A lot of high-profile, successful open source projects have very careful reviews, where they scrutinize scope and design decisions <em>before</em> they start coding. (To be fair, a lot of high-profile, successful closed source projects do the same, but we can&#8217;t just go to their websites and see their review results.)</p>
<p>So the moral of the story is that it often costs less to spend more time and money on design up front. And I bet there are some Microsoft shareholders that will agree.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.stellman-greene.com/2007/08/15/how-spending-a-little-extra-time-and-money-on-design-might-have-saved-microsoft-over-a-billion-bucks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Why &#8220;gold plating&#8221; is a lousy name</title>
		<link>http://www.stellman-greene.com/2007/06/09/why-gold-plating-is-a-lousy-name/</link>
		<comments>http://www.stellman-greene.com/2007/06/09/why-gold-plating-is-a-lousy-name/#comments</comments>
		<pubDate>Sat, 09 Jun 2007 05:13:53 +0000</pubDate>
		<dc:creator>Andrew Stellman</dc:creator>
				<category><![CDATA[Gold Plating]]></category>
		<category><![CDATA[Quality]]></category>
		<category><![CDATA[Software Engineering]]></category>

		<guid isPermaLink="false">http://www.stellman-greene.com/2007/06/09/why-gold-plating-is-a-lousy-name/</guid>
		<description><![CDATA[A few days ago I posted an answer to a question about gold plating and scope creep to the Head First PMP forum. I&#8217;m not surprised the question came up &#8212; people really seem to have trouble with the concept of gold plating. And I don&#8217;t think it&#8217;s because it&#8217;s a tough concept to get. [...]]]></description>
			<content:encoded><![CDATA[<p>A few days ago I posted an <a href="http://www.headfirstlabs.com/phpBB2/viewtopic.php?t=2615" title="Forum post about gold plating">answer to a question about gold plating and scope creep</a> to the Head First PMP forum. I&#8217;m not surprised the question came up &#8212; people really seem to have trouble with the concept of gold plating. And I don&#8217;t think it&#8217;s because it&#8217;s a tough concept to get. I think it&#8217;s because it&#8217;s got a lousy name.</p>
<p><img src="http://www.stellman-greene.com/blog/wp-content/uploads/2007/06/silverware.png" alt="Gold plated silverware" /></p>
<p>In the usual gold plating scenario, a programmer adds features that were never requested because they&#8217;re &#8220;cool&#8221; or fun or seem like they&#8217;d be really useful. And sometimes they are &#8212; but more often, they&#8217;re just wasted effort, at least from the perspective of the person paying the programmer&#8217;s salary. Like I pointed out in <a href="http://www.stellman-greene.com/2007/05/30/the-kitchen-of-the-future/" title="Kitchen of the Future">my last post that mentioned gold plating</a>, I completely sympathize. I&#8217;m definitely guilty of gold plating. There was one project I led about ten years ago where I created an entire scripting language, complete with interpreter, that was totally unnecessary. As far as I know, that product is still being used today, and not a single person has ever written one script for it. But it was definitely cool (or, at least, I thought so). More importantly, I really did think it would be useful, and make the software better. Classic gold plating.</p>
<p>On the surface, the &#8220;gold plating&#8221; does seem intuitive, but the analogy starts to break down under closer scrutiny. Think about what gets gold plated: all sorts of stuff, from <a href="http://www.walmart.com/catalog/product.do?product_id=4901673">cheap jewelry</a> to <a href="http://www.montblanc.com/products/precious_gold_metals_solitaire_gold_black.35979.php">expensive pens</a>. All sorts of things get encrusted with, for lack of a better word, <a href="http://gizmodo.com/gadgets/cellphones/million-dollar-cellphone-185445.php">bling</a>. And that&#8217;s what I pointed out in that <a href="http://www.headfirstlabs.com/phpBB2/viewtopic.php?t=2615" title="Forum post about gold plating">forum post</a>:</p>
<blockquote><p><span class="postbody"> Gold plating is what we call it when the project team does work on the product to add features that the requirements didn&#8217;t call for, and that the stakeholder and customer didn&#8217;t ask for and don&#8217;t need. It&#8217;s called &#8220;gold plating&#8221; because of the tendency a lot of companies have to make a product more expensive by covering it in gold, without actually making any functional changes. (For example, there are plenty of watches and fountain pens you can buy from luxury companies that are identical to their cheaper versions, except that they&#8217;re covered in gold.)  </span></p></blockquote>
<p>This got me thinking about gold plating, and why it gives people so much trouble. Is gold plating in a software project actually similar to gold plating in real life? Or is it an odd, somewhat mismatched analogy?</p>
<p>To answer that question, we&#8217;ll need to take a step back and look at gold plating in the real world. There are a few different strains of gold plating, and they serve different purposes. First there&#8217;s the traditional, purely decorative gold plating. That&#8217;s the one we know and love: take an ordinary object, slap some gold on it, and charge a whole lot more. That&#8217;s the sort of product that&#8217;s associated with decadence and conspicuous consumption. It&#8217;s where the <a href="http://www.pbs.org/wgbh/amex/carnegie/gildedage.html" title="the Gilded Age">Gilded Age</a> got its name.</p>
<p>Certainly, making a product arbitrarily more expensive is certainly a way to sell more of it to a certain sort of consumer. But while there are certainly numerous <a href="http://boingboing.net/2006/02/14/worlds_most_expensiv.html" title="Mmmm, yummy!">modern examples of opulent gold plating</a>, it&#8217;s fallen out of favor somewhat. More importantly, it&#8217;s not really a great analogy for gold plating in software.</p>
<p>What it&#8217;s been replaced with is a somewhat similar but definitely distinct way to enhance (read: sell &#8220;upscale&#8221; versions of) products. This &#8220;enhancement&#8221; is done by adding features that are actually useful, but go far beyond the needs of the typical consumers of the product.</p>
<p>Here&#8217;s an example. Hhow many suburban homes really need an industrial refrigerator or restaurant-quality range? Those appliances have been a selling point of &#8220;luxury&#8221; and &#8220;upscale&#8221; homes&#8217; kitchens for years. But the difference between that and, say, gilded kitchen items is that the &#8220;professional&#8221; applicances almost certainly worth the price &#8212; if you actually need them. Which you don&#8217;t, if you only use your kitchen to cook dinner for four every couple of days and thaw the occasional frozen turkey. But that&#8217;s not the point. The kitchen itself has been &#8220;upgraded&#8221; with cool but unnecessary items. And, in this case, it sells.</p>
<p><a href="http://www.youtube.com/watch?v=pgV9Kp8QzOA" title="The Canyonero"><img src="http://www.stellman-greene.com/blog/wp-content/uploads/2007/06/canyonero.png" alt="Canyonero" /></a></p>
<p>That&#8217;s certainly not the only example of products packed with features that are potentially useful, but which are, for the average owner of those products, essentially unnecessary (and by and large unused). There&#8217;s the slowly fading <a href="http://www.youtube.com/watch?v=pgV9Kp8QzOA">American love affair with the SUV</a>; the top-of-the-line faucets, fixtures, and general home accouterments that litter the country&#8217;s McMansions; and pretty much everything in the Brookstone, Hammacher Schlemmer and Sharper Image catalogs. We&#8217;ve got our fill of amateur hill climbers with professional mountaineering gear, weekend golfers with $1,500 titanium clubs, and basement workshops stocked with industrial hardware used to build the occasional birdhouse. Every single one of those things, in the right hands, is almost certainly worth it. I&#8217;ve been playing bass guitar for about 20 years, and I know that there&#8217;s a big difference between the average $300 instrument and one that cost ten times as much. (Which is not to say you can&#8217;t spend $3,000 on a crappy bass, but that&#8217;s a whole different issue entirely.) Certainly, a beginner will see some small benefit from using a better instrument. But it&#8217;s probably not worth the price for someone who will only pick it up once every few months.</p>
<p>Neither of these two ideas is a perfect analogy for software gold plating. In some ways gold plating in software is a lot like like gilded products. In other ways, it&#8217;s similar to the kind of overkill that people perform when they use &#8220;top-of-the-line&#8221; products unnecessarily. More accurately, it&#8217;s really a mixture of the two.</p>
<p>So what drives us to gold plating? We add unrequested (and eventually unused) features because we want to build stuff that&#8217;s cool, and it never occurs to us that we&#8217;re building something our users won&#8217;t need. I like to think of Google as the ultimate in gold plating. Their latest offering, <a href="http://maps.google.com/help/maps/streetview/">Google Street View</a>, is a great example of cool software that doesn&#8217;t seem to meet an obvious need. And I love it &#8212; I think they did a great job with it, and I&#8217;m honestly impressed with the way a whole lot of moving parts came together the way they did. Maybe someone will think of a really great use for it. But isn&#8217;t that a solution in search of a problem, by definition?</p>
<p>A good rule of thumb is that people will generally only pay for a product that&#8217;s useful. One of my favorite ways to describe quality is to consider two pieces of software. The first one is beautifully designed, very well built, very stable, never crashes, has a very intuitive user interface, is extremely secure, and is generally a pleasure to use &#8212; but it doesn&#8217;t do the job you need it to do. The other is terribly built, painful to use, crashes at least once a day, and does 50% of what you need. And that&#8217;s the one you&#8217;re going to use. It meets your needs. And any feature in that software that doesn&#8217;t meet your needs (or the needs of any other users) is pure gold plating.</p>
<p>Which brings me back to the name. I don&#8217;t think &#8220;gold plating&#8221; does justice to the real phenomenon it refers to. It&#8217;s more than just gilding software by making it pretty (and/or more expensive). It&#8217;s about the way we genuinely feel that we&#8217;re making the software better by adding features that may be really cool, but which we, as programmers, simply don&#8217;t recognize are useless.</p>
<p>And the sooner we can figure out how to avoid doing that, the better our software will be.</p>
<p><em>(Luckily, we&#8217;ve got some really good tools to help us avoid gold plating. I&#8217;ll talk about </em><em>them</em><em> soon in another post.)</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.stellman-greene.com/2007/06/09/why-gold-plating-is-a-lousy-name/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Quality Really IS Free</title>
		<link>http://www.stellman-greene.com/2006/03/29/quality-really-is-free/</link>
		<comments>http://www.stellman-greene.com/2006/03/29/quality-really-is-free/#comments</comments>
		<pubDate>Wed, 29 Mar 2006 18:30:50 +0000</pubDate>
		<dc:creator>Andrew Stellman</dc:creator>
				<category><![CDATA[Quality]]></category>

		<guid isPermaLink="false">http://www.stellman-greene.com/blog/2006/03/29/quality-really-is-free/</guid>
		<description><![CDATA[Scott Berkun recently brought up Philip Crosby&#8217;s classic Quality is Free on his PMClinic mailing list, in a discussion about how to &#8220;successfully argue for time for higher quality&#8221;. If argued on its merits, that should be an easy one: it really is cheaper to introduce activities that raise the quality of the software than [...]]]></description>
			<content:encoded><![CDATA[<p>Scott Berkun recently brought up Philip Crosby&#8217;s classic <a href="http://www.amazon.com/gp/product/0451625854" target="_self"><em>Quality is Free</em></a> on his <a href="http://www.scottberkun.com/forums/pmclinic/" target="_self">PMClinic</a> mailing list, in a discussion about how to &#8220;successfully argue for time for higher quality&#8221;. If argued on its merits, that should be an easy one: it really is cheaper to introduce activities that raise the quality of the software than it is to omit them.</p>
<p>Scott is right. Crosby&#8217;s work is definitely the place to start when you&#8217;re trying to get a bead on quality. In <em>Quality is Free</em>, Crosby defines quality as &#8220;conformance to requirements,&#8221; and this has become the standard definition of quality &#8212; not just in software engineering, but universally across all modern product engineering and manufacturing industries.</p>
<p>This is a slightly counterintuitive idea, but it&#8217;s not hard to understand why it makes sense to define quality that way. I usually explain it using a hypothetical &#8220;black box&#8221;. Say you&#8217;re a tester, and someone hands you a black box with a big red button on it and tells you to test it. Consider the following three scenarios:</p>
<ol>
<li>You press the button and nothing happens.</li>
<li>You press the button, and the box plays a recording telling you that you pressed the button incorrectly.</li>
<li>You press the button, and the box immediately heats up to precisely 472 degrees C, causing you to drop it. It breaks into a dozen pieces.</li>
</ol>
<p>In each of these scenarios, does the box work? That depends on whether it&#8217;s a children&#8217;s toy or the heating element for an industrial oven. What this illustrates is that there&#8217;s no way to validate a product unless you know what it&#8217;s supposed to do. And that&#8217;s Crosby&#8217;s point &#8212; that if you don&#8217;t know the requirements of a product, you can&#8217;t judge its quality.</p>
<p>In the PMClinic thread, <a href="http://www.faisal.com/" target="_self">Faisal Jawdat</a> had a good post summing some of the ways that Crosby shows us how quality is free. It takes effort to do quality improvement, but it leads to a lower cost to the project overall. It&#8217;s a lot cheaper &#8212; by orders of magnitude &#8212; to fix a defect when it&#8217;s still on paper than it is to fix it after the code has been built. In practice, it&#8217;s not hard to show that quality activities like <a href="http://www.stellman-greene.com/content/blogcategory/32/40/" target="_self">inspections, walkthroughs, deskchecks, code reviews</a>, test-driven development, continuous integration, static code verification, etc., save more time than they cost. If you hold a code review that takes three people two hours, and if you&#8217;ve done a good job selecting the code to be reviewed, then you almost always find bugs which would have cost far more than six man-hours to fix. And you often catch at least one defect which would have made it out and been caught by a user. So by introducing code reviews, you can reduce the total effort required for the project while increasing the quality of the code (by shipping it with fewer defects).</p>
<p>The other side of this idea was championed by W. Edwards Deming who, along with Crosby and Juran, is seen as one of the &#8220;grandfathers&#8221; of modern quality. One important idea that he wrote about in &#8220;Out of the Crisis&#8221; is that there the requirements themselves also have their own notion of quality. High-quality requirements address the needs of the people who will use the product (the users) and the people who need it (the stakeholders). He spends a lot of time talking about how getting the people who build the product to understand what it&#8217;s needed for is the best way to get them to innovate in the right direction. He has some great examples, drawn from industrial engineering and automotive manufacturnig, that taught me a lot about fostering communication between the people who need the software and the people who build it. (Like Crosby, Deming doesn&#8217;t write specifically about software. The reason for this was that modern software engineering has its roots, via <a href="http://www.sei.cmu.edu/tsp/watts-bio.html" target="_self">Watts Humphrey</a>, in both Deming and Crosby.)</p>
<p>All of this adds up to the idea that understanding the needs of the users and stakeholders, and then agreeing upon the behavior of the software and verifying that the behavior will actually satisfy the needs, will lead to higher quality software and a more efficient team.</p>
<p>Which brings me to a classic counterargument (brought up by another PMClinic poster) which is often used to shoot down quality ideas: &#8220;The perfect is the enemy of the good.&#8221;</p>
<p>This is certainly true, and if you have a QA team that&#8217;s trying to get the software &#8220;perfect&#8221;, then they aren&#8217;t doing their jobs. But I&#8217;ve never met an experienced software tester who thought his job was to make the code perfect.</p>
<p>I have, however, seen many senior managers try to remove quality activities from the schedule, justifying it by saying that the software doesn&#8217;t have to be perfect. Ironically, I often hear the same people blaming the QA team for problems that they didn&#8217;t catch. It seems that there&#8217;s a double-standard here: when testers want to test software, they are guilty of trying to reach perfection, but when they miss defects they&#8217;re guilty of not being perfect. (I&#8217;m not doing a great job of explaining this &#8212; Jenny could probably do it better.)</p>
<p>That&#8217;s why Crosby&#8217;s definition of quality is so important. It makes quality very specific: the more closely the product conforms to its requirements, the higher its quality. It also makes the job of the testers very specific: to validate the software against the requirements. It also makes it clear why the verification and defect prevention activities (reviews and inspections) are so important &#8212; they reduce the number of defects in the requirements, before those defects can be reflected in the software. With these ideas in mind, it&#8217;s easy to challenge the senior manager who wants to cut down the testing schedule as &#8220;too perfectionist&#8221;. Whenever I&#8217;ve been in that situation, I&#8217;ve simply said, &#8220;Just tell me which requirements you don&#8217;t need to work, and we&#8217;ll cut out the tests for them. And in the future, we&#8217;ll do this earlier so that we don&#8217;t build those features in the first place!&#8221;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.stellman-greene.com/2006/03/29/quality-really-is-free/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Iterative Development and the Efficiency Gap</title>
		<link>http://www.stellman-greene.com/2006/03/16/iterative-development-and-the-efficiency-gap/</link>
		<comments>http://www.stellman-greene.com/2006/03/16/iterative-development-and-the-efficiency-gap/#comments</comments>
		<pubDate>Thu, 16 Mar 2006 18:51:15 +0000</pubDate>
		<dc:creator>Andrew Stellman</dc:creator>
				<category><![CDATA[Quality]]></category>

		<guid isPermaLink="false">http://www.stellman-greene.com/blog/2006/03/16/iterative-development-and-the-efficiency-gap/</guid>
		<description><![CDATA[Jenny and I were talking yesterday about short, time-boxed releases. Breaking a project into short, frequently delivered releases is a technique which has been gaining in popularity lately. Agile methodologies like SCRUM and XP rely on them, but they can be found as phased releases in traditional development shops as well. It&#8217;s clear why they&#8217;re [...]]]></description>
			<content:encoded><![CDATA[<p>Jenny and I were talking yesterday about short, time-boxed releases. Breaking a project into short, frequently delivered releases is a technique which has been gaining in popularity lately. Agile methodologies like SCRUM and XP rely on them, but they can be found as phased releases in traditional development shops as well. It&#8217;s clear why they&#8217;re popular with clients &#8212; working software is delivered frequently, and is an intuitive and satisfying measure of progress. And there are definite advantages to iteration from the development perspective. It&#8217;s easier to respond to changes in scope and requirements. Project planning is easier as well: instead of estimating how long the project will take, the team can select a subset of the scope which will fit in iterations. And, of course, iteration planning works very well with other techniques like continuous integration, refactoring and test-driven development, all of which can be explicitly planned for within the release cycle.</p>
<p>But is there a cost?</p>
<p>Jenny pointed out to me that there is one, and I think she&#8217;s right. Even when the feature set of the project can be neatly broken down &#8212; and not every project can be broken down into time-boxed releases &#8212; there is additional overhead that&#8217;s added. Each release must be planned. The team needs to package and deploy the software. The project needs to be wrapped up and the team needs to get trained up on the next release. And while the development team may be able to handle that relatively seamlessly, users tend to move more slowly and be less adaptive or responsive to change.</p>
<p>The problem is compounded if there is a software testing component. Any time the development team touches existing code, the testers need to run regression tests to make sure the current behavior is intact. And just because the iterations are relatively easy on the developers, it doesn&#8217;t mean that the testers will also be able to finish quickly. If there are small changes to many parts of the software, it can require a large testing effort. This is why iteration can mean a great deal of rework for the test team.</p>
<p>Any time there a project is broken into a set of time-boxed release cycles, there&#8217;s going to be an &#8220;efficiency gap&#8221; &#8212; the difference between the effort required to develop the project all at once, and the larger effort required to build and deliver the software in small, iterative phases. The question of whether or not to apply iterative development to a particular project can then come down to a question of whether the cost of iteration or phase planning is offset by the gain in flexibility and stakeholder perception.</p>
<p>So can this efficiency gap be measured? Obviously, it&#8217;s not possible to measure the actual efficiency gap, so it would be necessary to come up with a proxy for it. One way to measure might be to look for regression defects: keep track of the effort or lines of code required to repair defects discovered by unit tests or functional tests which passed for previous releases. Another way would be to compare the number of lines of code added to the number of lines modified or deleted &#8212; the higher this ratio, the less overlap between releases. These metrics could be useful for determining exactly how long a phase should be: if it seems like the interations are inefficient, it might make sense to add more scope and time to each iteration. If this improves efficiency, then it may be possible to keep modifying the iteration size until the team finds a good &#8220;sweet spot&#8221;.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.stellman-greene.com/2006/03/16/iterative-development-and-the-efficiency-gap/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Focus Testing on Conformance To Requirements</title>
		<link>http://www.stellman-greene.com/2006/02/05/focus-testing-on-conformance-to-requirements/</link>
		<comments>http://www.stellman-greene.com/2006/02/05/focus-testing-on-conformance-to-requirements/#comments</comments>
		<pubDate>Sun, 05 Feb 2006 21:54:07 +0000</pubDate>
		<dc:creator>Jennifer Greene</dc:creator>
				<category><![CDATA[Quality]]></category>

		<guid isPermaLink="false">http://www.stellman-greene.com/blog/2006/02/05/focus-testing-on-conformance-to-requirements/</guid>
		<description><![CDATA[Many projects I have worked on in my career have suffered from misunderstandings about quality from the very beginning.  Software testers were told to &#8220;bang on&#8221; the software and do some &#8220;try to break it&#8221; tests (usually for some prescribed amount of time) and report back on what they found.  Sometimes,  work like that will [...]]]></description>
			<content:encoded><![CDATA[<p>Many projects I have worked on in my career have suffered from misunderstandings about quality from the very beginning.  Software testers were told to &#8220;bang on&#8221; the software and do some &#8220;try to break it&#8221; tests (usually for some prescribed amount of time) and report back on what they found.  Sometimes,  work like that will find bugs &#8212; but there is always this nagging feeling that the testers might miss something important or that they might be looking at the wrong functionality entirely.  If you work on a project and find yourself worrying that the test team isn&#8217;t testing enough or is testing too much, the best way to address the problem is to focus your test on conformance to requirements.</p>
<p>By <a href="http://www.stellman-greene.com/srs" target="_self">nailing down requirements</a> early in the process and then testing to be sure they have been implemented correctly, the test team always stays on track.   The work that they do is, after all, being used to ensure that the product you release does what it was meant to do.  Effective test efforts are built around well-understood product requirements. In finding bugs, the test team is usually finding problems the product should address. Leaving the product quality up to some standard in your test team&#8217;s head will most likely lead to tests that are not focused on product functionality and that can mean that requirements of the software don&#8217;t get developed.  If the test team doesn&#8217;t understand the requirements from the beginning of the test effort, they have no way of knowing when those requirements aren&#8217;t met.</p>
<p>It&#8217;s commonly said  that testers and programmers don&#8217;t like each other.  I think that&#8217;s silly and wrong.  More often than not, the tester&#8217;s role is just left undefined.  Programmers, the story goes, feel antagonized by the tester&#8217;s criticism of their work and often dread having to deal with their test teams.  Focusing on software requirements, both in your development and your test effort can really help to alleviate some of this tension also.  Instead of seeing testers as annoying critics, programmers can see them as partners in implementing and validating the sofware project&#8217;s goals.  Good <a href="http://www.stellman-greene.com/testplan" target="_self">test plans and test cases</a> can help to bring the programmers and testers together in their understanding of how this work will be done.  Allowing everyone to have a hand in understanding and approving of the requirements and the test strategy as a whole gives a test effort one focus and allows everyone on the team to feel a part of the work.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.stellman-greene.com/2006/02/05/focus-testing-on-conformance-to-requirements/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting started with use cases</title>
		<link>http://www.stellman-greene.com/2006/01/30/getting-started-with-use-cases/</link>
		<comments>http://www.stellman-greene.com/2006/01/30/getting-started-with-use-cases/#comments</comments>
		<pubDate>Mon, 30 Jan 2006 18:54:50 +0000</pubDate>
		<dc:creator>Andrew Stellman</dc:creator>
				<category><![CDATA[Quality]]></category>

		<guid isPermaLink="false">http://www.stellman-greene.com/blog/2006/01/30/getting-started-with-use-cases/</guid>
		<description><![CDATA[A friend of mine is introducing use cases to his company, and asked for some advice. It sounds like an interesting project &#8212; they&#8217;ll be using it for both a hardware and software component. Here&#8217;s what I told him: Spend a lot of time talking about what&#8217;s actually going to be covered in the use [...]]]></description>
			<content:encoded><![CDATA[<p>A friend of mine is introducing <a href="http://www.stellman-greene.com/use_cases" target="_self">use cases</a> to his company, and asked for some advice.  It sounds like an interesting project &#8212; they&#8217;ll be using it for both a hardware and software component.</p>
<p>Here&#8217;s what I told him:</p>
<ul>
<li>Spend a lot of time talking about what&#8217;s actually going to be covered in the use cases up front, and try to stay flexible.</li>
<li>When you&#8217;re working on the use cases, there&#8217;s a good chance that you&#8217;ll spend some time talking to people and eventually think, &#8220;I understand now, I don&#8217;t have to talk about this any more.&#8221; It&#8217;s useful to learn to recogize that feeling as an indicator that you need to verify everything one more time.</li>
<li>Also, recognize that when you think, &#8220;This person doesn&#8217;t really understand this, but I&#8217;ll give them what I know they need&#8221; that roughly translates to, &#8220;There&#8217;s something here that I don&#8217;t understand, and I need to tease it out of the person.&#8221;</li>
<li>Don&#8217;t be afraid to scrap everything and start over. It&#8217;s a lot cheaper to do that now than after you start coding.</li>
<li>And don&#8217;t let anyone convince you not to do that one last review &#8212; that&#8217;s the one that will find the really BIG problem.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.stellman-greene.com/2006/01/30/getting-started-with-use-cases/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

