<?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>Basil Vandegriend: Professional Software Development &#187; process</title>
	<atom:link href="http://www.basilv.com/psd/blog/tag/process/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.basilv.com/psd</link>
	<description></description>
	<lastBuildDate>Wed, 25 Jan 2012 13:23:47 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>My System for Writing</title>
		<link>http://www.basilv.com/psd/blog/2012/my-system-for-writing</link>
		<comments>http://www.basilv.com/psd/blog/2012/my-system-for-writing#comments</comments>
		<pubDate>Wed, 25 Jan 2012 13:23:47 +0000</pubDate>
		<dc:creator>Basil Vandegriend</dc:creator>
				<category><![CDATA[productivity]]></category>
		<category><![CDATA[continuous improvement]]></category>
		<category><![CDATA[personal development]]></category>
		<category><![CDATA[process]]></category>
		<category><![CDATA[writing]]></category>

		<guid isPermaLink="false">http://www.basilv.com/psd/?p=767</guid>
		<description><![CDATA[People from time to time ask me how I manage to write all the articles on my website despite having a family and a demanding full-time job. My simplistic, off-the-cuff answer is "one sentence at a time" :) Seriously, however, over the years I have developed a personal writing system that I would like to [...]]]></description>
			<content:encoded><![CDATA[<p>People from time to time ask me how I manage to write all the articles on my website despite having a family and a demanding full-time job. My simplistic, off-the-cuff answer is "one sentence at a time" :) Seriously, however, over the years I have developed a personal writing system that I would like to share with you. My system consists of three interdependent aspects: <em>time</em>, <em>discipline</em>, and <em>motivation</em>.</p>
<h3>Time</h3>
<p>The first key is to make time to write. Ideally this should be a decent period of time each day during which you are undisturbed and at peak mental capacity.</p>
<p>The minimum period of time that I find effective is usually around 15 - 30 minutes. This is because it sometimes takes time to get into a good flow of writing. The maximum period of time that I find effective ranged from 45 minutes to 1.5 hours. This maximum is based on how well I can maintain my flow of writing and my motivation / discipline. If I get stuck, especially on a new section for which I do not have a clear outline, I tend to stop and let it percolate in the back of my mind. The longer the writing session goes, the more likely I am to run out of steam (motivation / discipline) - e.g. by getting distracted by email or my RSS reader. I find that practically this means that I am generally unable to continue writing for more than 1.5 hours.</p>
<p>So how do I find the time to write? I get up early each morning, before the rest of my family, and use the time to write. I sometimes write in the evening, but I find I often do not have the mental energy for this after a long day at work. So I tend to save the evenings for other activities, such as exercising, and dedicate the mornings to writing. Successfully doing this day after day takes motivation and discipline.</p>
<h3>Motivation</h3>
<p>The second aspect of my system is maintaining a high level of motivation. I have found that if I am not motivated to write regarding a particular topic or section then my progress is usually quite slow and I am easily distracted. </p>
<p>One way I keep my motivation high is extremely simple: I primarily choose topics that I am motivated to write about. When a new idea comes along, motivation to write about it is usually quite high initially and decays over time. So the ideal is to start writing about such ideas immediately. Other times I am wrestling with a topic at work or researching it on my own and gain some insights that I feel like sharing. </p>
<p>My motivation in these cases is linked to the goal of helping others learn and grow, which is part of <a href="http://www.basilv.com/psd/blog/2009/evolving-my-vision-and-mission">my professional vision</a>. In some cases, as I have started writing about an idea, I realized that I only had a sentence or two of meaningful content, which by my standards is not enough to share via an article. This typically rapidly deflates my motivation, and I move on to a different idea. </p>
<p>This concept of linking the act of writing to the achievement of a larger, more personally-meaningful goal is another valuable technique for boosting motivation. In the last year I have started to tackle some larger projects (which is one reason for the decrease in my posting frequency), and I find that having this linkage is extremely powerful in maintaining motivation over the long term. Having this motivation helps in dedicating the time to write.</p>
<p>Motivation is powerful, but it tends to fluctuate. When motivation fades, discipline is needed to maintain consistency of purpose.</p>
<h3>Discipline</h3>
<p>The final key to my system of writing is discipline - consistently applying deliberately-designed techniques and practices that help me write. Discipline has also helped me discover these methods through ongoing <a href="http://www.basilv.com/psd/blog/2009/continuous-improvement-framework">reflection and improvement</a> on what is working versus what is not </p>
<p>A large part of discipline is consistency, which helps build up productive practices into positive habits. One example is my practice of getting up early each morning to write - I do this every morning, weekends as well as workdays. </p>
<p>I have found that there is an initial hurdle to overcome when sitting down to write, especially if I am struggling with a section. This difficulty often caused me to switch to email or the web as a distraction from which I tended not to emerge, resulting in me making no progress for that block of time. One practice I have developed to overcome this is to have a firm plan in mind the night before of what specifically I am going to write the next morning. As I get up in the morning, I immediately begin recalling my plan as a way to help prime my mind for action. Not only does this help me stay focused, but I also find it reduces the start-up time necessary to get into the flow, thus allowing me to be productive with even a short block of time.</p>
<p>Outlines are another practice I regularly use, even for short pieces of writing such as this article. These outlines are often quite informal, focusing on the main points I plan to write about. The purpose is not to identify all the content, or how it is organized - I often add more points that come to mind as I write, or restructure as the material comes together. Instead, I use outlines to help eliminate one of the causes of getting stuck - not knowing what content to write about. (It is still possible, unfortunately, to get stuck regarding <em>how</em> to write the content.) Outlines are also helpful in dividing the writing into sections: each section acts as a mini-milestone that I can aim to complete during a writing session, thus helping me remain motivated to write.</p>
<p>I have a technique for maintaining the flow while writing and minimizing distractions that involves the use of 'todo' labels. The general idea is that when I identify something to do or consider that falls outside my current focus, I document it with a 'todo' prefix. This keeps it preserved for later action, which helps to get it out of my mind now. Here are some common examples of how I employ this technique:</p>
<ul>
<li>When I want to link to an article on my website or elsewhere, I leave a 'todo'. Finding the link is often quite quick, but I do this to avoid distractions.</li>
<li>When I have an idea for a piece of content for a future, unwritten section, I jot down a brief note with a 'todo' in that section, then return to what I was writing.</li>
<li>When I get quite stuck on a particular paragraph or section, I leave a 'todo' comment and switch to another area. This is especially common when I have a long list of points outlined: I start writing the points for which I have the most motivation, leaving 'todo' flags on ones I skip. I then use the momentum I have built writing these more motivating points combined with the promise of almost being done them all to return to these few remaining points and grind them out.</li>
<li>When I have an outline consisting of sections, like this article does, I start by writing down the section headings with 'todo' labels on each. This serves as a road-map for me to follow while writing. It also helps me see the overall structure of what I am writing.</li>
</ul>
<p>This is my system for writing - it may not work for you. But I do suggest at least experimenting with some of these techniques and practices if you have not tried them before. I encourage you to leave a comment describing what practices or techniques you have found helpful.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.basilv.com/psd/blog/2012/my-system-for-writing/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>The Shocking Truth about Agile and Waterfall</title>
		<link>http://www.basilv.com/psd/blog/2011/the-shocking-truth-about-agile-and-waterfall</link>
		<comments>http://www.basilv.com/psd/blog/2011/the-shocking-truth-about-agile-and-waterfall#comments</comments>
		<pubDate>Mon, 14 Nov 2011 13:02:28 +0000</pubDate>
		<dc:creator>Basil Vandegriend</dc:creator>
				<category><![CDATA[agile]]></category>
		<category><![CDATA[process]]></category>
		<category><![CDATA[software development]]></category>
		<category><![CDATA[waterfall]]></category>

		<guid isPermaLink="false">http://www.basilv.com/psd/?p=741</guid>
		<description><![CDATA[There is a common perception within I.T. that Agile methods are recent innovations - the new kids on the block - and they are contrasted with the traditional waterfall approach - the old-timer that has been around for ages. This perception is propagated by events such as the widely-discussed 10-year anniversary of the agile manifesto [...]]]></description>
			<content:encoded><![CDATA[<p>There is a common perception within I.T. that Agile methods are recent innovations - the new kids on the block - and they are contrasted with the traditional waterfall approach - the old-timer that has been around for ages. This perception is propagated by events such as the widely-discussed 10-year anniversary of the <a href="http://agilemanifesto.org/">agile manifesto</a> and by the ongoing challenge of the "old guard" - either publicly or within organizations - of the effectiveness of agile versus waterfall. I recently read two articles, however, that convincingly shatter these misperceptions and lay bare the shocking truth.</p>
<p>While the term agile itself is indeed ten years old, the philosophy and approach of iterative and incremental development (IID) has a surprisingly rich and extensive history. The article <a href="http://www.craiglarman.com/wiki/downloads/misc/history-of-iterative-larman-and-basili-ieee-computer.pdf">Iterative and Incremental Development: A Brief History (PDF)</a> by Craig Larman and Victor R. Basili published in IEEE Computer discusses how the ideas of IID actually predate the existence of software, and have been used and promoted in <em>every</em> decade since for over 50 years. This article also discusses a classic 1970 article by Winston Royce well-known for supposedly promoting the use of waterfall, but which actually recommended the development of an initial pilot or preliminary version prior to creating the final version intended for delivery to the client. Larman's and Basili's article also discusses the ongoing evolution of the standard used by the U.S. Department of Defense for software development. The initial standard was document-heavy, gated, single-pass waterfall, but the high rate of project failures led to first the allowance of and eventually the full adoption of IID approaches. </p>
<p>So a limited set of organizations (often governments due to their byzantine contracting restrictions) did experience an evolution from waterfall to agile over time, but notably they started with a misunderstood version of waterfall. The use of IID approaches has always been part of the I.T. industry. </p>
<p>What about the effectiveness of agile? The second article <a href="http://searchsoftwarequality.techtarget.com/news/2240106479/Quality-metrics-The-economics-of-software-quality-Part-One">Quality metrics: Software quality attributes and their rankings</a> is an interview with Capers Jones and Olivier Bonsignour regarding their new book <a href="http://www.amazon.ca/gp/product/0132582201/ref=as_li_tf_tl?ie=UTF8&#038;tag=basilvandegri-20&#038;linkCode=as2&#038;camp=15121&#038;creative=330641&#038;creativeASIN=0132582201">The Economics of Software Quality</a><img src="http://www.assoc-amazon.ca/e/ir?t=basilvandegri-20&#038;l=as2&#038;o=15&#038;a=0132582201" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" />. The authors in this book discuss the effectiveness of over 100 quality factors using research based on over 10,000 software projects. On a scale of -10 for extremely harmful to a scale of +10 for extremely valuable, Agile methods rated a 9 - highly valuable - while waterfall only rated a 1 - barely useful. </p>
<p>These two articles highlight the fact that agile-like methods have been in use since the start of the software field, and are on average far more effective than the waterfall approach. This leads me to conclude that there is really no defensible reason for organizations to mandate or promote the use of waterfall.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.basilv.com/psd/blog/2011/the-shocking-truth-about-agile-and-waterfall/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Top Seven Quality Principles in Software Development</title>
		<link>http://www.basilv.com/psd/blog/2011/top-seven-quality-principles-in-software-development</link>
		<comments>http://www.basilv.com/psd/blog/2011/top-seven-quality-principles-in-software-development#comments</comments>
		<pubDate>Thu, 19 May 2011 13:10:34 +0000</pubDate>
		<dc:creator>Basil Vandegriend</dc:creator>
				<category><![CDATA[quality]]></category>
		<category><![CDATA[lean]]></category>
		<category><![CDATA[process]]></category>
		<category><![CDATA[software development]]></category>

		<guid isPermaLink="false">http://www.basilv.com/psd/?p=656</guid>
		<description><![CDATA[How do you ensure high quality when developing software? The processes that are used, the decisions that are made, and the actions that are taken must be aligned with proven quality principles. In this context I define a principle to be a fundamental truth that is the foundation for a system of behavior. Too often [...]]]></description>
			<content:encoded><![CDATA[<p>How do you ensure high quality when developing software? The processes that are used, the decisions that are made, and the actions that are taken must be aligned with proven quality principles. In this context I define a <em>principle</em> to be a fundamental truth that is the foundation for a system of behavior. </p>
<p>Too often I see projects and even entire organizations misaligned with one or more of these principles and in the worst cases taking actions in complete violation of these principles. The result is predictable: poor quality or significantly extra cost to achieve adequate quality, with the complete absence of high quality. </p>
<p>Achieving high quality is difficult. It suffers from what I call the weakest link problem: no matter how many things you do well, it is the area you are poorest at that generally dictates the overall quality. Another way of putting it is this: there are many ways to fail at developing high quality software and only a few ways to succeed.</p>
<p>So to help you achieve high quality here is my list of the top seven quality principles in software development. For each principle think about the implications - how might your organization be acting in ways that contradict it? How might you change to better align with the principle?</p>
<ol>
<h3>
<li>People as individuals and teams are the most significant factor affecting quality</li>
</h3>
<p><a href="http://forums.construx.com/blogs/stevemcc/archive/2008/03/27/productivity-variations-among-software-developers-and-teams-the-origin-of-quot-10x-quot.aspx">Software engineering research</a> has consistently found that variations between people are by a large margin the single largest contributing factor to quality and productivity. While good process is important, good people have a much greater impact.</p>
<p>Achieving high quality requires people capable of doing high quality work, both individually and as teams. While individual excellence is important, most software is produced by a team of people and it is the team's overall quality of workmanship that ultimately determines the quality of the software being produced. </p>
<p>Within organizations, throughout the blogosphere, and even in many software development books too much attention is placed on process and methodology and too little on the quality of the people doing the work.</p>
<h3>
<li>All software has defects</li>
</h3>
<p>Any significant piece of software has defects, no matter how carefully it has been produced. Zero defects is an Utopian ideal, but not a realistic goal. With extreme discipline and effort you can get very close to zero defects, as evidenced by the <a href="http://www.fastcompany.com/magazine/06/writestuff.html">group working on the space shuttle control software</a>, but under more normal conditions defects are unfortunately a fact of life. </p>
<h3>
<li>It is impossible to fully test software</li>
</h3>
<p>For even the most trivial of functionality like adding two numbers there are a nearly infinite set of tests that could be performed. So completely testing a significant piece of software is impossible. Testers therefore must appropriately choose and perform an extremely small subset of all possible tests. </p>
<h3>
<li>Defects are more expensive to fix the later they are found</li>
</h3>
<p>As time elapses from the point at which a defect is introduced, the effort required to fix the defect grows. There are several reasons for this. The most significant is that as the software moves through subsequent phases of the software development life-cycle - from development into test and then finally into production use - the effort involved to get to that phase increases. Work previously done, like testing and deployments, has to be repeated to some degree. Another reason is that over time, the developer's memory of the problematic functionality in question fades, thus requiring more effort to recover the context. </p>
<h3>
<li>Build quality in</li>
</h3>
<p>This principle comes from the lean thinking literature and addresses the issue highlighted by the prior principle. Finding and fixing defects is considered waste - non-value-add work - and thus according to lean should be minimized. This is accomplished in a twofold manner: first, use practices that help prevent the introduction of defects, such as <a href="http://www.basilv.com/psd/blog/2010/example-based-requirements">specifications with examples</a>, and second use practices such as <a href="http://www.basilv.com/psd/blog/tag/test-driven-development">test driven development</a> and <a href="http://www.basilv.com/psd/blog/tag/code-review">code reviews</a> that find defects as quickly and cheaply as possible after they are added.</p>
<h3>
<li>Adopt your approach to quality based on the level of criticality and complexity</li>
</h3>
<p>Different contexts require different actions. Criticality and complexity are the two most significant factors to consider in order to determine the level of quality you require and the approach you will take to achieve it. Criticality is the measure of how important the application is to the business and/or the users and is generally assessed using categories such as life critical, mission critical, business important, and casual use. Complexity is the measure of how difficult it is to understand and work with the code. A number of factors increase complexity such as complicated algorithms, sheer volume of code, and poor architecture resulting in high coupling.</p>
<h3>
<li>Higher quality requires more quality-focused activities and better execution</li>
</h3>
<p>In order to achieve a higher level of quality corresponding to a lower volume of production defects requires that you introduce less defects and/or find and fix more defects throughout your software development process. This process can be modeled as a series of activities acting as feedback loops or filters that each prevent or remove some percentage of defects. </p>
<p>Using this model it becomes obvious that the only way to reduce the defects remaining at the end of the process is to either make existing activities more effective - what I call <em>better execution</em> - or add more activities to filter out additional defects. The choice of which quality-focused activities to use and the effort to put into each requires deliberate planning which I have written more about in my article titled <a href="http://www.basilv.com/psd/blog/2010/filter-by-failure-mode-matrix-a-method-for-planning-quality">Filter by Failure Mode Matrix: A Method for Planning Quality</a>.
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.basilv.com/psd/blog/2011/top-seven-quality-principles-in-software-development/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Filter by Failure Mode Matrix: A Method for Planning Quality</title>
		<link>http://www.basilv.com/psd/blog/2010/filter-by-failure-mode-matrix-a-method-for-planning-quality</link>
		<comments>http://www.basilv.com/psd/blog/2010/filter-by-failure-mode-matrix-a-method-for-planning-quality#comments</comments>
		<pubDate>Wed, 08 Dec 2010 13:00:42 +0000</pubDate>
		<dc:creator>Basil Vandegriend</dc:creator>
				<category><![CDATA[quality]]></category>
		<category><![CDATA[process]]></category>
		<category><![CDATA[software development]]></category>

		<guid isPermaLink="false">http://www.basilv.com/psd/?p=580</guid>
		<description><![CDATA[For any software development effort a core component of planning how to achieve high quality is the selection of the quality-enhancing activities and practices that will be performed to assess the software. This selection depends on a number of factors including the capabilities of the team, the characteristics, complexity and criticality of the software, the [...]]]></description>
			<content:encoded><![CDATA[<p>For any software development effort a core component of planning how to achieve high quality is the selection of the quality-enhancing activities and practices that will be performed to assess the software. This selection depends on a number of factors including the capabilities of the team, the characteristics, complexity and criticality of the software, the level of quality desired, and the nature of the development effort being undertaken. Given this, selection of activities and practices cannot be a one-time event for the entire enterprise. While an enterprise can define a default selection as a starting point, this should be re-evaluated and customized for each application and each development effort. </p>
<p>One approach for doing this selection is a method I call the <em>Filter by Failure Mode Matrix</em>. The basic idea behind the matrix is to identify the activities and practices that will act as filters to either prevent or mitigate quality-related failure modes in the software development process. This is inspired by <a href="http://en.wikipedia.org/wiki/Failure_mode_and_effects_analysis">failure mode and effects analysis</a> except it is applied to the development process itself rather than a piece of software. The categorization of failure modes in the matrix should be as broad as possible to minimize the size of the matrix, while remaining specific enough to effectively identify specific activities and practices that will be effective at preventing or mitigating each failure mode. Many of the failure modes correspond to defect root cause categories. </p>
<p>The matrix defines two sets of filters for each failure mode: primary filters and secondary filters. Primary filters consist of those activities or practices that the team will rely on as their first line of defense in preventing or mitigating the corresponding failure mode. Secondary filters act as a second line of defense for those issues that make it through the primary activities. The activities and practices assigned as a secondary filter are either less effective in preventing or mitigating that particular failure mode, cost more to perform in terms of budget or schedule compared to the primary filters, or are performed later in the overall development process compared to the primary activities. When the primary filters consist solely of activities performed by developers, then the secondary filter should include activities performed by non-developers in order to serve as an independent assessment of quality with respect to that particular failure mode. This is especially important for mission-critical and life-critical systems.   </p>
<p>Multiple activities can be listed as primary filters or as secondary filters. The intent is not to require only a single activity per filter category. In fact, to obtain higher quality <a href="http://www.drdobbs.com/architecture-and-design/225701139">research tells us</a> that multiple quality-enhancing activities are a necessity.</p>
<p>While most failure modes have general applicability, some are more contextually-dependent so you should ensure that the list of failure modes you use is meaningful to the particular software development effort you are undertaking. </p>
<p>Both the relevant failure modes and the effectiveness or applicability of quality-enhancing activities and practices can vary significantly based on the nature of the application functionality. For example, web-based user interface screens will experience usability defects and automated functional testing is more difficult to apply. In contrast a scheduled batch process does not need to worry about usability defects and automated functional testing is usually much easier to apply. So when a system combines multiple components that differ like this, this can be handled in one of two ways. First, a single matrix can be used with additional failure modes representing the two different components. Based on our above example, you could have a failure mode for web-based functionality defects and a second category for batch process-based functionality defects. This allows the latter category to specify automated functional tests as a primary filter. The second approach is to define separate matrices. This should only be done when there are significant differences between the matrices.</p>
<p>While a filter by failure mode matrix can be defined up front, you should expect to evolve it over time. Examples of how a matrix can evolve are:</p>
<ul>
<li>A particular activity is found to be ineffective and is replaced with another activity in the matrix.</li>
<li>A new failure mode is identified based on defects that occur in user acceptance test or production. A new row is added for this failure mode with corresponding filters identified.</li>
<li>The overall quality level is discovered to be too low, so additional activities and practices are added throughout the matrix.</li>
</ul>
<p>The following table provides a sample filter by failure mode matrix.</p>
<table class="fancy" cellspacing="0">
<tr>
<th>Failure Mode</th>
<th>Primary Filters</th>
<th>Secondary Filters</th>
</tr>
<tr>
<td>Coding logic errors</td>
<td>Code review, Automated unit testing</td>
<td>Functional testing, Domain testing (for boundary errors)</td>
</tr>
<tr>
<td>Integration / interface errors</td>
<td>Clearly defined interfaces, Code review, Automated integration testing</td>
<td>System testing</td>
</tr>
<tr>
<td>Usability problems</td>
<td>Prototyping, Usability testing</td>
<td>Frequent delivery with feedback, Manual functional and scenario testing</td>
</tr>
<tr>
<td>Regressions</td>
<td>Pre-existing automated test suite</td>
<td>Code review, Manual functional and scenario testing</td>
</tr>
<tr>
<td>Performance / capacity / scalability problems</td>
<td>Performance, load, and stress testing</td>
<td>Code review</td>
</tr>
<tr>
<td>Concurrency defects</td>
<td>Code review</td>
<td>-</td>
</tr>
<tr>
<td>Algorithm (design) errors</td>
<td>Design review, code review</td>
<td>Automated unit testing, Functional testing</td>
</tr>
<tr>
<td>Misunderstood requirements</td>
<td>Acceptance criteria per requirement, Frequent communication with client</td>
<td>Frequent delivery with feedback, Prototyping</td>
</tr>
<tr>
<td>Failure to perform quality-enhancing activities</td>
<td>Culture of quality, <a href="http://www.basilv.com/psd/blog/2010/using-feature-done-checklists">Feature done checklist</a></td>
<td>Pair programming, Test-driven development</td>
</tr>
</table>
]]></content:encoded>
			<wfw:commentRss>http://www.basilv.com/psd/blog/2010/filter-by-failure-mode-matrix-a-method-for-planning-quality/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Using Feature Done Checklists</title>
		<link>http://www.basilv.com/psd/blog/2010/using-feature-done-checklists</link>
		<comments>http://www.basilv.com/psd/blog/2010/using-feature-done-checklists#comments</comments>
		<pubDate>Thu, 15 Apr 2010 14:00:23 +0000</pubDate>
		<dc:creator>Basil Vandegriend</dc:creator>
				<category><![CDATA[management]]></category>
		<category><![CDATA[definition of done]]></category>
		<category><![CDATA[process]]></category>
		<category><![CDATA[project management]]></category>
		<category><![CDATA[software development]]></category>

		<guid isPermaLink="false">http://www.basilv.com/psd/?p=504</guid>
		<description><![CDATA[I have written previously about the importance of having a definition of done that the team understands and adheres to. At the level of features (use cases, user stories, etc.) a comprehensive definition of done will often consist of a number of items, some involving non-developer roles such as tester, business analyst, and architect. Tracking [...]]]></description>
			<content:encoded><![CDATA[<p>I have written previously about the importance of having a <a href="http://www.basilv.com/psd/blog/2009/my-definition-of-done">definition of done</a> that the team understands and adheres to. At the level of features (use cases, user stories, etc.) a comprehensive definition of done will often consist of a number of items, some involving non-developer roles such as tester, business analyst, and architect. Tracking the status of a given feature and ensuring it gets to done is thus non-trivial.</p>
<p>One solution to this problem that I have worked with and now recommend is to use a <em>feature done checklist</em> to track the completion of the definition of done for a specific feature. At its essence the checklist consists of the major elements of the definition of done listed as rows in a table with additional columns for the person verifying the completion of the item to enter their name and date. Here is a simple example:</p>
<table class="fancy" cellspacing="0">
<tr>
<th colspan="3">Feature:</th>
</tr>
<tr>
<th>Item</th>
<th>Person Verifying</th>
<th>Date Verified</th>
</tr>
<tr>
<td>Coding completed</td>
<td></td>
<td></td>
</tr>
<tr>
<td>Peer reviewed</td>
<td></td>
<td></td>
</tr>
<tr>
<td>Architect reviewed</td>
<td></td>
<td></td>
</tr>
<tr>
<td>Testing completed</td>
<td></td>
<td></td>
</tr>
<tr>
<td>Meets user requirements</td>
<td></td>
<td></td>
</tr>
<tr>
<td>All defects resolved and tasks completed</td>
<td></td>
<td></td>
</tr>
<tr>
<td>Feature is Done!</td>
<td></td>
<td></td>
</tr>
</table>
<p>You need to decide whether to use digital or printed checklists. I prefer using paper-based checklists for several reasons:</p>
<ul>
<li>I find it more meaningful to sign a piece of paper than to add my name electronically, so I tend to treat the completion of the checklist more seriously than I would an electronic form. This attitude may be due to my engineering background.</li>
<li>A paper copy is more tangible and real. It can be waved around at a team meeting to celebrate the completion of a feature or posted on a team wall. It can be placed on a coworker’s keyboard in order to focus their attention on an outstanding item.</li>
</ul>
<h3>Evolving the Checklist</h3>
<p>I have found it useful on occasion to evolve the basic feature done checklist beyond the team’s definition of done to provide support for the team’s development process. This is usually done as part of <a href="http://www.basilv.com/psd/blog/2009/continuous-improvement-framework">continuous improvement</a> to resolve issues identified during retrospectives. Here are some examples:</p>
<ul>
<li>On one project we had issues with developers rushing into coding new features without fully understanding the requirements, so we added an initial checklist item for feature clarification to focus attention on the activity.</li>
<li>For each item you can specify the role (e.g. developer, tester, architect) responsible for signing that it is done. I strongly recommend doing this for two reasons: it minimizes confusion over who signs off each item, and it minimizes the problem of having the developer of the feature quickly sign off all the checklist items without doing the necessary checking so they can say the feature is done.</li>
<li>You can specify dependencies between the items. On one project we had a problem with people treating the items as a linear sequence of activities, so we defined dependencies to explicitly show that some activities could be done in parallel.</li>
<li>You can add a feature start date to indicate when work began on the feature. This in combination with the feature done date allows you to calculate the duration of time spent on the feature. In lean terminology, this gives you the cycle time for the feature, which you want to minimize. When aggregated across the team, this defines the team’s overall throughput in completing features.</li>
</ul>
<h3>Checklist Challenges</h3>
<p>I have encountered a number of challenges when using feature done checklists. Some of these issues are due to the actual checklists, but many are actually due to using a strict definition of done – the checklists just make the issue visible. </p>
<ol>
<li>The checklist needs to be meaningful to the team - you must avoid the risk of it just becoming a form that people sign without doing the necessary work / checking that the item entails. (This is sometimes called rubber-stamping or pencil-whipping.) I have used many strategies to mitigate this risk:
<ul>
<li>Use a paper-based checklist rather than electronic.</li>
<li>Keep the checklist to a single page with as few items as possible for each role to complete.</li>
<li>For items involving ‘checking’ activities, assign these to roles / people whose primary responsibility is checking, separate from the developers doing the coding.</li>
</ul>
</li>
<li>Extra effort is involved in getting a feature fully complete. This is often not accounted for in estimates, particularly if the estimate is provided by the developer. The time required for checking by other roles can be accommodated by having separate estimated tasks for these activities. What I find particularly challenging is accounting for extra time needed by the developer to resolve issues found in reviews or testing.</li>
<li>Having a through definition of done with multiple hand-offs of the feature to various roles will typically extend the duration of time required to complete the feature. The mitigation is to allow as many items as possible to be done concurrently. The best example is using pair programming as the means for doing the peer code review.</li>
<li>A single role / person with multiple review items per feature can end up becoming a bottleneck that ends up delaying feature completion. This is especially problematic if you are using a methodology like Scrum which focuses on getting features (user stories) done within the iteration – you tend to get a backlog of checklist items forming at the bottleneck near the end of the iteration which jeopardizes their completion.</li>
<li>One problem with using paper-based checklists is that they can get misplaced, or you end up looking for who has a form. This can be addressed by defining a location for checklists to be returned to. One option I like is to post them on a team wall, which provides the additional benefit of visibility.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.basilv.com/psd/blog/2010/using-feature-done-checklists/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using To Do Comments in Code</title>
		<link>http://www.basilv.com/psd/blog/2010/using-to-do-comments-in-code</link>
		<comments>http://www.basilv.com/psd/blog/2010/using-to-do-comments-in-code#comments</comments>
		<pubDate>Tue, 16 Mar 2010 14:37:20 +0000</pubDate>
		<dc:creator>Basil Vandegriend</dc:creator>
				<category><![CDATA[coding]]></category>
		<category><![CDATA[coding standards]]></category>
		<category><![CDATA[process]]></category>
		<category><![CDATA[software development]]></category>

		<guid isPermaLink="false">http://www.basilv.com/psd/?p=498</guid>
		<description><![CDATA[I am a big proponent of using to do comments – comments prefixed by a specific identifier such as "TODO" – in a code base to indicate outstanding tasks or issues with the code. I have encountered developers who are either unfamiliar with the practice or who do not follow it as deliberately as I [...]]]></description>
			<content:encoded><![CDATA[<p>I am a big proponent of using to do comments – comments prefixed by a specific identifier such as "TODO" – in a code base to indicate outstanding tasks or issues with the code. I have encountered developers who are either unfamiliar with the practice or who do not follow it as deliberately as I do, so I thought I would explain my method.</p>
<p>The idea of to do comments really only makes sense with the proper tooling. The <a href="http://www.eclipse.org/">Eclipse integrated development environment</a> calls them task tags, and supports providing any number of custom identifiers that when found in a comment will cause Eclipse to add that comment into its Task view. The default identifiers that Eclipse ships with include "FIXME" and "TODO". You can then browse the task view, sorting or filtering the tasks by various criteria, to see the outstanding work. Continuous integration servers such as <a href="http://hudson-ci.org/">Hudson</a> running the <a href="http://wiki.hudson-ci.org/display/HUDSON/Task+Scanner+Plugin">Task Scanner plugin</a> can produce statistics, reports, and graphs of the outstanding tasks in a code base.</p>
<h3>Why use to do comments?</h3>
<p>When doing my own coding, I use to do comments when ideas come to me regarding code I need to write or special cases I need to handle that are separate from what I am coding right now (usually in order to get the current test to pass, via <a href="http://www.basilv.com/psd/blog/2009/test-driven-development-benefits-limitations-and-techniques">test-driven development</a>). Writing the idea down gets it out of my mind and out of my way. Using a to do tag reassures me that it will not be forgotten: part of <a href="http://www.basilv.com/psd/blog/2009/my-definition-of-done">my definition of done</a> is to ensure that there are no to do comments remaining in the code. </p>
<p>When looking at code written by other team members, I want to be able to quickly tell what state the code is in – is it completely finished, or is it a work-in-progress, with scenarios or requirements left to be handled? The reason I care is that if I think the code is supposed to be finished, and see issues or outstanding work, then I will raise the issue(s) with the developer. Fairly often when I have done this in the past, the developer reassures me that they were already aware of the issue and would resolve it. That is usually when I recommend the use of to do tags as a communications mechanism to the rest of the team as to the status of the code, especially if someone else had to take over working on that code. And as often as not, unrecorded issues that developers say they are aware of and will resolve later end up being forgotten and left unresolved.</p>
<p>I hope I have convinced you of the value of using to do comments. Please leave a comment and let me know what you think about the practice.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.basilv.com/psd/blog/2010/using-to-do-comments-in-code/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Use Understood Methods Rule</title>
		<link>http://www.basilv.com/psd/blog/2009/use-understood-methods-rule</link>
		<comments>http://www.basilv.com/psd/blog/2009/use-understood-methods-rule#comments</comments>
		<pubDate>Mon, 14 Dec 2009 19:19:56 +0000</pubDate>
		<dc:creator>Basil Vandegriend</dc:creator>
				<category><![CDATA[coding]]></category>
		<category><![CDATA[process]]></category>
		<category><![CDATA[software development]]></category>
		<category><![CDATA[unit testing]]></category>

		<guid isPermaLink="false">http://www.basilv.com/psd/?p=467</guid>
		<description><![CDATA[Over the years I have refined the approach I use to write code. Recently I codified a key aspect of this approach as a practice I call the Use Understood Methods Rule. The basic formulation of the rule is quite simple: when coding a method only invoke other methods whose behavior you clearly understand and [...]]]></description>
			<content:encoded><![CDATA[<p>Over the years I have refined the approach I use to write code.  Recently I codified a key aspect of this approach as a practice I call the <em>Use Understood Methods Rule</em>. The basic formulation of the rule is quite simple: when coding a method only invoke other methods whose behavior you clearly understand and are confident will work the way you want. This may sound overly simple or obvious, so let me elaborate further.</p>
<p>This rule is based on a <a href="http://en.wikipedia.org/wiki/Top-down#Bottom-up_approach">bottom-up engineering philosophy</a>: if you completely understand the methods you are invoking, then you should understand the behavior of the method you are coding and know that it will work. This applies recursively up the call stack to the top-level entry point of your application. </p>
<h3>Key Requirements</h3>
<p>My formulation of the rule above specifies two key requirements for using another method:</p>
<ol>
<li><em>Behavior Understood</em>:  The behavior of a method can be defined in terms of its pre-conditions and post-conditions. Knowing the pre-conditions allows you to ensure you are correctly invoking the method, while knowing the post-conditions ensures that you will get the results you want.
</li>
<li><em>Confident Will Work</em>: This is arguably part of the prior requirement - understanding a method’s actual (rather than stated or expected) post-conditions - but it is so important I felt it should be explicitly stated. You need to <em>verify</em> that the method you are using will actually function correctly and not fail due to a defect. This verification is best done via automated tests, but there are scenarios I discuss below when another approach is needed.
</li>
</ol>
<h3>Applying the Rule</h3>
<p>Applying the <em>Use Understood Methods Rule</em> involves, therefore, satisfying these two requirements. Exactly how I do this varies based on the context – specifically the nature of the method I intend to use. Below I describe the common scenarios I encounter and the approach I use to apply the rule to each.</p>
<ul>
<li>
<p>
<em>Method with implementation in code base</em>: Calling a method that has an existing implementation within the code base you are working on is the most common scenario. This can be a method on the same class, on a super class, on a collaborating class, or a static method. This also can be an abstract method defined on an interface or abstract base class for which the implementing class exists and is known. To understand the method’s behavior I refer to the documented pre- and post- conditions if available, otherwise I look at the source code for the method. The correctness of the method should already be verified through automated tests. If necessary I can use code coverage analysis results to confirm that this method has sufficient test coverage.
</p>
</li>
<li>
<p>
<em>Method to be written concurrently in code base</em>: Often when coding a method, I find I have to create a new method, either on the same class or on a separate class. This might be a simple extract-method refactoring of logic to simplify the existing method, or it might be new functionality required on another class. In this scenario I have no issues understanding the behavior of the new method as I am writing it at the same time. If the new method is non-trivial then I ensure it works by creating unit tests for it separate from my tests for the original method I am working on.
</p>
</li>
<li>
<em>Method with unknown implementation in code base</em>: This applies to abstract methods in interfaces and abstract base classes for which no implementation yet exists or for which the implementation cannot be known in the context of the method being written. This latter scenario is typical when there are multiple implementations being processed in a common fashion. In this case I insist on having documented pre- and post- conditions for the method being invoked. </p>
<p>If the method implementation does not yet exist then it is obviously not possible to verify now that it is correct, but it is possible to take steps to gain confidence that the implementation will work once it is written. One option is to ensure that the automated tests for the method you are writing that invokes this not-yet-implemented method sufficiently exercises the functionality of this not-yet-implemented method to ensure it will meet your needs. Another more general option is to ensure that the team has processes in place such as <a href="http://www.basilv.com/psd/blog/2009/test-driven-development-benefits-limitations-and-techniques">test driven development</a> and <a href="http://www.basilv.com/psd/blog/2007/strategies-for-effective-code-reviews">code reviews</a> to ensure that code written in the future will indeed work. </p>
</li>
<li>
<em>Method in third-party code</em>: When using third-party methods I usually rely on the documented API. When this is inadequate I look at the source code if it is available (this is a key benefit of open source libraries – the code is always available).  In some cases the third-party software implements a specification (such as the various Java EE specs) and the specification can be used to understand what the third-party code is supposed to do. </p>
<p>Once third-party software has been selected for use within a project I generally assume it works. The verification of the quality of such software happens previously, in the selection process, when I do my due diligence to evaluate the quality of the software under consideration. </p>
<p>On rare occasions I write a unit test to understand and/or verify how some third-party functionality works. This is something I would probably benefit from doing more often.
</li>
</ul>
<p>Given the prevalent use of automated tests to verify correct behavior, you might be wondering how the application of this rule is impacted by the use of test driven development (TDD). The short answer is there is no impact: this rule applies the same whether or not TDD is being used. I do, however, slightly revise how I do TDD in order to apply this rule for the scenario <em>Method to be written concurrently in code base</em> - I create a second failing test before creating the new method. For further details see <a href="http://www.basilv.com/psd/blog/2009/test-driven-development-benefits-limitations-and-techniques">my article describing this refinement to TDD</a>. </p>
<h3>The Broader Context</h3>
<p>Following the <em>Use Understood Methods Rule</em> is necessary for creating high quality code that <a href="http://www.basilv.com/psd/blog/2009/would-you-trust-your-life-to-your-code">you would trust your life to</a>, but is not sufficient. Correctness also depends on satisfying class and application-wide invariants (such as properly closing database connections or limiting the number of file handles consumed concurrently), understanding the behavior of containers and frameworks (such as the Spring application context or Java EE container), and considering other quality attributes (such as security and scalability) which are and emergent in nature and not easily analyzed by looking at methods independently. I consider my rule to be the foundation on which the code is written, which these more global concepts rest on top of. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.basilv.com/psd/blog/2009/use-understood-methods-rule/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>My Definition of Done</title>
		<link>http://www.basilv.com/psd/blog/2009/my-definition-of-done</link>
		<comments>http://www.basilv.com/psd/blog/2009/my-definition-of-done#comments</comments>
		<pubDate>Mon, 26 Oct 2009 14:50:11 +0000</pubDate>
		<dc:creator>Basil Vandegriend</dc:creator>
				<category><![CDATA[coding]]></category>
		<category><![CDATA[definition of done]]></category>
		<category><![CDATA[process]]></category>
		<category><![CDATA[Scrum]]></category>
		<category><![CDATA[software development]]></category>
		<category><![CDATA[software releases]]></category>

		<guid isPermaLink="false">http://www.basilv.com/psd/?p=450</guid>
		<description><![CDATA[I recently wrote about why you need a definition of done, and it only seems logical to follow this up by presenting what I use for a definition of done for developing software. I use two guiding principles as the basis for constructing my definition. Potentially releasable: Ideally the software can be released (or shipped) [...]]]></description>
			<content:encoded><![CDATA[<p>I recently wrote about <a href="http://www.basilv.com/psd/blog/2009/why-you-need-a-definition-of-done">why you need a definition of done</a>, and it only seems logical to follow this up by presenting what I use for a definition of done for developing software.</p>
<p>I use two guiding principles as the basis for constructing my definition.  </p>
<ol>
<li><strong>Potentially releasable</strong>: Ideally the software can be released (or shipped) once it is done. I've seen many people, particularly in the context of Scrum, use the similar term "potentially shippable".</li>
<li><strong>I would trust my life to my code</strong>: I just wrote an entire article on this titled <a href="http://www.basilv.com/psd/blog/2009/would-you-trust-your-life-to-your-code">Would You Trust Your Life To Your Code?</a></li>
</ol>
<p>These principles are deliberately idealistic in order to set high expectations and motivate <a href="http://www.basilv.com/psd/blog/2009/continuous-improvement-framework">continuous improvement</a> when I fall short of reaching them.</p>
<p>Different definitions of done can be created based on different levels or scopes. The two primary scopes are: </p>
<ol>
<li>Done for a feature / user story.</li>
<li>Done for a release.</li>
</ol>
<p>For this article I am using my definition of done for developing a feature (user story).</p>
<p>My definition of done is essentially a checklist with items grouped into categories. The lists of items and categories are <em>not</em> meant to dictate the process by which these items are done or the chronological order. For example, automated unit testing is listed in a separate category from coding but it is typically done at the same time or before-hand, if doing test-driven development.</p>
<p>Without further ado, here is my definition of done.</p>
<h3>Coding</h3>
<ol>
<li>Code meets functional requirements.</li>
<li>Code meets non-functional requirements. Typical ones include:
<ul>
<li>Performance (capacity, scalability)</li>
<li>Usability</li>
<li>Security</li>
<li>Maintainability</li>
</ul>
</li>
<li>Code is deployment-ready. This means environment-specific settings are extracted from the code base. A past article I wrote on <a href="http://www.basilv.com/psd/blog/2007/designing-for-deployability">designing for deployability</a> provides more context on this.</li>
<li>Code is <a href="http://www.basilv.com/psd/blog/2009/the-five-commandments-of-version-control">checked into version control</a>.</li>
<li>Code complies with coding &#038; architectural standards.</li>
<li>Code has been cleaned up. The goal is to ensure the code is easily readable and has a good design. In the past I have used the terms <a href="http://www.basilv.com/psd/blog/2007/why-you-should-polish-your-code">polishing code</a> and refactoring to describe this. Robert C. Martin's book <a href="http://www.amazon.ca/gp/product/0132350882?ie=UTF8&#038;tag=basilvandegri-20&#038;linkCode=as2&#038;camp=15121&#038;creative=330641&#038;creativeASIN=0132350882">Clean Code: A Handbook of Agile Software Craftsmanship</a><img src="http://www.assoc-amazon.ca/e/ir?t=basilvandegri-20&#038;l=as2&#038;o=15&#038;a=0132350882" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /> provides the best explanation of this that I have seen. Achieving this goes a long way towards meeting the maintainability requirement.
</li>
<li>All TODO-style comments in the code have been addressed and removed.</li>
</ol>
<h3>Static Code Analysis</h3>
<ol>
<li>Code has been analyzed by static code analysis tools. The two primary tools I use for Java development are the <a href="http://www.eclipse.org/">Eclipse compiler</a> and <a href="http://findbugs.sourceforge.net/">FindBugs</a>. Other Java tools include <a href="http://pmd.sourceforge.net/">PMD</a>, <a href="http://checkstyle.sourceforge.net/">Checkstyle</a>, and <a href="http://wiki.architecturerules.org/index.php?title=Main_Page">Architecture Rules</a>.
</li>
<li>All errors and warnings found by the tools have either been corrected or have been suppressed with a comment indicating the reason for suppression.
</li>
</ol>
<h3>Testing</h3>
<ol>
<li>Automated unit tests are written. The tests should be <a href="http://www.basilv.com/psd/blog/2006/how-to-write-good-unit-tests">high quality</a> (e.g. not brittle).</li>
<li>Automated integration tests are written that verify interactions with external systems such as the application database or third-party application / web services.</li>
<li>Code coverage achieved by the automated tests is measured and sufficient coverage is achieved. I use <a href="http://cobertura.sourceforge.net/">Cobertura</a> for measuring code coverage. I do not like using only a numeric percentage coverage target as the sole definition of sufficient coverage, because this can encourage people to write poor-quality tests that merely execute the code rather than verify its correct behavior in order to meet the target. My true definition of sufficient coverage is that the tests execute <em>and verify</em> all code that could reasonably be incorrect. Having said this, I generally aim for at least 80% line (statement) coverage overall, and often achieve 90%+ coverage for individual classes. I am still debating what a reasonable target is for branch (conditional) coverage . I currently aim for at least 50% overall, but I have the feeling that a target of 75% would be better.
</li>
<li>Functional testing by someone other than the developer has been done. Ideally this testing will be done by the customer, involve exercising the complete feature being coded in the way that users would use it, and be fully automated. More frequently I have seen this testing done manually (especially for user interfaces) by business analysts or testers who act as proxies for the customer. The key idea is to have someone other than the developer do testing to validate the assumptions and interpretations made (often implicitly) by the developer.
<p>I use the vague term "functional testing" rather than the more common terms "system testing" or "user acceptance testing" because projects can differ dramatically in what is done for system or user acceptance testing. If acceptance testing is done in a waterfall fashion as a separate phase near the end of the project then it cannot be part of the definition of done for a feature (but it is still part of the definition of done for the release). So I use the term "functional testing" to indicate this potential differentiation. Ideally, based on lean principles, all testing including system and user acceptance testing should be done as part of the work on a feature and not artificially delayed till later.
</li>
</ol>
<h3>Reviewed</h3>
<ol>
<li>Design / approach has been reviewed by the technical lead / architect.</li>
<li>Detailed peer review / inspection has been done. If pair programming is being used then the peer review is automatically done at the same time as the coding. Otherwise, the reviewer should focus on issues that are less likely to be found by the static code analysis or automated testing. This can include items such as security holes, concurrency issues, and correctly meeting requirements.</li>
<li>Issues identified by reviewers have been resolved to the reviewer's satisfaction.</li>
</ol>
<h3>Other</h3>
<ol>
<li>Required documentation has been updated. This may include online help, user manual, or operations manual.</li>
<li>Build and deployment scripts and related configuration files have been updated.</li>
<li>No known defects are outstanding unless the customer has agreed to defer them, in which case they should be logged.</li>
<li>No known tasks related to the feature are outstanding.</li>
</ol>
<p>That concludes my definition of done. I would appreciate hearing about what you use for a definition of done. In particular, if there is anything you think should be added or removed from my definition please let me know via a comment below. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.basilv.com/psd/blog/2009/my-definition-of-done/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Why You Need a Definition of Done</title>
		<link>http://www.basilv.com/psd/blog/2009/why-you-need-a-definition-of-done</link>
		<comments>http://www.basilv.com/psd/blog/2009/why-you-need-a-definition-of-done#comments</comments>
		<pubDate>Mon, 28 Sep 2009 14:09:49 +0000</pubDate>
		<dc:creator>Basil Vandegriend</dc:creator>
				<category><![CDATA[management]]></category>
		<category><![CDATA[definition of done]]></category>
		<category><![CDATA[getting things done]]></category>
		<category><![CDATA[process]]></category>
		<category><![CDATA[Scrum]]></category>
		<category><![CDATA[software development]]></category>

		<guid isPermaLink="false">http://www.basilv.com/psd/?p=442</guid>
		<description><![CDATA[Whether you are working on a small task or a large project, do you and your team have a clear understanding of what it takes to complete a piece of work? The Scrum method of software development calls this Definition of Done and touts this as a critical practice for high-performing teams. While I have [...]]]></description>
			<content:encoded><![CDATA[<p>Whether you are working on a small task or a large project, do you and your team have a clear understanding of what it takes to complete a piece of work? The Scrum method of software development calls this <a href="http://www.scrumalliance.org/articles/105-what-is-definition-of-done-dod">Definition of Done</a> and touts this as a critical practice for high-performing teams. While I have used an implicit, <a href="http://www.basilv.com/psd/blog/2007/strategies-for-effective-code-reviews">informal definition of done for coding</a> for years, recently I have been enlightened as to the value of having an explicit, written definition that the team agrees to and understands. </p>
<p>Why is having a definition of done so valuable? I have grouped the benefits it provides into the following categories:</p>
<h3>Higher Quality</h3>
<p>Definitions of done should typically focus less on the activities people normally do and focus more on the activities that tend to be neglected or forgotten. In software development this means specifying activities that ensure the quality of the code being produced, rather than the actual act of coding. Quality often means much more than just few defects: it can also mean readable code, a clean design, or achieving any number of other non-functional requirements such as security, performance, and scalability. A definition of done that includes quality aspects serves, therefore, as both a reminder of the importance of quality in the day-to-day work and as a set of expectations regarding the level of quality to strive for.</p>
<p>Out of curiosity I decided to check out a number of publicly available definitions of done and count the percentage of items that clearly related to quality. Here are the results:</p>
<table class="fancy" cellspacing="0">
<tr>
<th>Definition of Done</th>
<th>% of Items Relating to Quality</th>
</tr>
<tr>
<td><a href="http://www.agile-software-development.com/2007/07/definition-of-done-10-point-checklist.html">http://www.agile-software-development.com/2007/07/definition-of-done-10-point-checklist.html</a></td>
<td>50% (5 / 10)</td>
</tr>
<tr>
<td><a href="http://www.scrumalliance.org/articles/37-are-we-there-yet">http://www.scrumalliance.org/articles/37-are-we-there-yet</a></td>
<td>46% (6 / 13)</td>
</tr>
<tr>
<td><a href="http://www.scrumalliance.org/articles/107-how-do-we-know-when-we-are-done">http://www.scrumalliance.org/articles/107-how-do-we-know-when-we-are-done</a></td>
<td>60% (3 / 5)</td>
</tr>
</table>
<h3>Standardization</h3>
<p>A written, clearly-specified definition of done is essentially a standard. Standards provide many benefits when properly applied using <a href="http://www.basilv.com/psd/blog/2006/are-you-a-rule-maker-or-a-rule-breaker">a lean (pragmatic) mindset rather than a bureaucratic mindset</a>. The proper mindset can be summarized using the following dichotomy: a standard represents the best way we know today of doing some activity within some context, yet each day we search for a better way so as to improve the standard. As implied by this summary, standards help form the foundation for future improvements. This is because following standards brings consistency which makes it easier to analyze the results of the work being done, determine the root cause of problems, and identify how to improve. For more on how standards help improvement efforts see my article on <a href="http://www.basilv.com/psd/blog/2009/continuous-improvement-framework">a framework for continuous improvement</a>.</p>
<p>Standards have a number of other benefits. Checklists can be created from the standards for use by both the people doing the work (as a reminder of what to do), and by the people verifying the work (as a quality assurance check). Standards are helpful in training new team members. Having documented standards can also be helpful for achieving certain certifications like ISO or passing regulatory requirements such as Sarbanes-Oxley.</p>
<p>Most definitions of done do not mandate the specific step-by-step procedures to follow, but rather set expectations regarding the final product produced. To illustrate, a definition of done for coding features will likely mandate that certain kinds of testing be done (automated unit testing, functional testing, etc.), but will typically not mandate the sequence in which the testing and coding activities are done. (So unit tests could be written before the code as per test-driven development, or they could be written afterward - either approach will satisfy the definition of done.) Team may choose to standardize which procedures are used, but this is typically kept separate from a definition of done.</p>
<h3>More Accurate Estimates</h3>
<p>Having a definition of done helps estimation accuracy in two ways. First, it serves as a checklist of all the steps required to complete an activity that can likewise be used to estimate the effort remaining. When estimating the work left on a feature, for example, a definition of done can help ensure that time is estimated not just for the coding, but also for reviewing and testing. </p>
<p>Second, a definition of done makes it easier to track the actual progress, since activities reported as done are more likely (but not guaranteed, unfortunately) to actually be done. This means there will be less surprises in terms of additional work required for previously 'completed' assignments. These surprises, of course, significantly reduce estimation accuracy, so the more they can be eliminated the better the estimates.</p>
<h3>Better Teamwork</h3>
<p>The previous benefits apply when you are working on your own, but software development is more commonly a team activity. And in addition to these prior benefits, having a definition of done will make your team more effective. Many of the challenges of working in terms such as achieving unity of purpose, clear communication, and coordination of effort, benefit from having a definition of done. When team members are communicating about the work that has been and needs to be done, having a clear definition of done helps avoid misunderstandings. The definition functions, in essence, as a communications technique for ensuring that when team members use the word "done" they all mean the same thing. </p>
<p>For examples of what happens without a clear definition see <a href="http://agilesoftwaredevelopment.com/2006/05/definition-of-done">this story of a team of five having three different viewpoints regarding done</a> and <a href="http://www.scrumalliance.org/articles/37-are-we-there-yet">this story of someone reporting a status of 'finished' that really wasn't</a>.</p>
<h3>Concluding Thoughts</h3>
<p>This article has mostly discussed definition of done in the context of software development and specifically coding, but the concept is much more broadly applicable both within I.T. and beyond. Staying within I.T. I can see the benefits of having definitions of done for activities such as incident resolution by support staff, product high-level requirements definition, and pursuing sales. So I challenge you to look for opportunities to use a definition of done to help achieve superior performance.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.basilv.com/psd/blog/2009/why-you-need-a-definition-of-done/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Five Commandments of Version Control</title>
		<link>http://www.basilv.com/psd/blog/2009/the-five-commandments-of-version-control</link>
		<comments>http://www.basilv.com/psd/blog/2009/the-five-commandments-of-version-control#comments</comments>
		<pubDate>Wed, 23 Sep 2009 03:49:15 +0000</pubDate>
		<dc:creator>Basil Vandegriend</dc:creator>
				<category><![CDATA[tools]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[process]]></category>
		<category><![CDATA[software development]]></category>
		<category><![CDATA[version control]]></category>

		<guid isPermaLink="false">http://www.basilv.com/psd/?p=436</guid>
		<description><![CDATA[Effective use of version control is a fundamental development practice, especially if there is more than one person working on the same code base. Below are the standard rules I use for the proper use of version control in the style of biblical old testament commandments. I like imagining an authoritative voice booming these commandments [...]]]></description>
			<content:encoded><![CDATA[<p>Effective use of version control is a fundamental development practice, especially if there is more than one person working on the same code base. Below are the standard rules I use for the proper use of version control in the style of biblical old testament commandments. I like imagining an authoritative voice booming these commandments from a mountain top. Fire and brimstone are optional :)</p>
<h3>1. Thou shalt not break the build</h3>
<p>This is the first commandment because breaking the build causes immediate problems for the rest of the team. Anyone updating from version control repository will have a non-functional local copy of the code and will be unable to continue with their work until the problem is fixed. A broken build also causes issues for others wanting to commit changes: they cannot verify that their changes do not break the code base. Doing an unrelated commit on top of a broken build risks introducing new breaks that compound the difficulty in getting the code base back to working order. (This exact problem happened quite recently on my project.)</p>
<p>The general principle is to not introduce problems in the code base that interfere with other development activities. Each team needs to have a specific, unambiguous definition. As a minimum standard I require code to always compile and pass 100% of the unit tests. While I prefer that automated integration and functional tests always pass, they are slower to run and depend on external systems, so pragmatically the occasional failure can happen. </p>
<p>An easy way to make your definition of a broken build explicit is to define an automated build process that performs this check. This build process can be executed by the developer prior to committing a change, and can also be configured to execute on a continuous integration server immediately after a change is committed to ensure the code base is not broken.  </p>
<p>I like having a penalty in place for those that break the build. It can be a small monetary fine (that goes into the team pot for the next social event), receiving a mascot of shame, or being assigned an unpleasant task.</p>
<h3>2. Thou shalt put everything in version control</h3>
<p>All code and all related files must be in the version control repository. A new developer or a new instance of a continuous integration server should be able to check out a copy of the software and build a complete release from it. </p>
<p>Too often I have encountered code bases where some key files are not included. I have seen a number of projects not include third-party libraries in version control. This might be deemed acceptable if an enterprise library repository is used (using a tool such as <a href="http://www.basilv.com/psd/blog/2009/using-ivy-to-manage-build-dependencies">Ivy</a>), but in the cases I have seen the code base required a directory of library files to exist on each developer's local workstation without even a definition of the required versions of the libraries being used. Other common omissions include build scripts, configuration files, and documentation.</p>
<h3>3. Thou shalt use the version control repository as the source of truth</h3>
<p>The version control repository is the official source of truth for all versions of the software. Source code distributions may be created and distributed via shared network drives or via the web, but the source of truth remains the repository. </p>
<p>If multiple branches are being used within the repository then the purpose of each branch must be clearly defined. The typical approach is to use the trunk (mainline) for ongoing development work, and create branches for releases. So the trunk is the source of truth for the software overall, while each release branch is the source of truth for a particular release, and in particular the fixes and/or patches made for a  release. Distributed version control systems such as Git, which in essence treat each local workspace as a separate branch, still need to follow these same rules to avoid complete chaos. (For example, running a continuous integration build requires at least one official branch to build from.)</p>
<p>The corollary to this commandment is that changes to source code not in the repository do not officially exist. Committing changes into the repository is therefore a critical part of doing development that is reflected in the next commandment.</p>
<h3>4. Thou shalt commit thy changes daily</h3>
<p>The principle behind this commandment is that the effort and difficulty involved in integrating separate changes increases non-linearly with the size of the changes, so it is best to integrate changes as often as possible. (This is an instance of the lean principle of flow which dictates minimizing large batch sizes and work-in-progress.) Requiring daily commits ensures that conflicts or duplication of effort are found quickly. </p>
<p>There are other benefits of daily commits. It forces developers to decompose their work into smaller, incremental pieces of work and ensure the quality of that work (since it cannot break the build as per commandment number one). Developers are more likely to use step-by-step refactoring rather than big-bang changes that are much riskier (and more likely to negatively impact the rest of the team). Daily commits provide a visible sign of progress per developer that can be used to assess when a developer is stuck or sidetracked (the commits tend to stop). </p>
<h3>5. Thou shalt treat thy version control system as mission critical software</h3>
<p>I have seen more than one company which did not treat their corporate version control system as mission-critical software. In one case the version control server was classified as a under-powered development server that could be bounced at any time or upgraded without prior testing. In another case the source code repository did not have robust backup and restore mechanisms in place.</p>
<p>If the version control server goes down it is safe to assume that regular development activities will start to grind to a halt within the day and any emergency fixes or scheduled releases will likely need to be delayed. It is a good idea to ensure that a version control server is available 24x7 with the ability to restore service within a half-day maximum. Why 24x7? Regular hours of development likely do not correspond to regular business hours (especially for emergency fixes), and scheduled builds typically run at night or the weekend.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.basilv.com/psd/blog/2009/the-five-commandments-of-version-control/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

