<?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>Pervasive Code &#187; process</title>
	<atom:link href="http://www.pervasivecode.com/blog/category/process/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.pervasivecode.com/blog</link>
	<description>Jamie Flournoy's Software Development Blog</description>
	<lastBuildDate>Mon, 26 Jul 2010 05:29:53 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Fancier Stubbing of GeoKit for Rails unit tests</title>
		<link>http://www.pervasivecode.com/blog/2009/07/23/fancier-stubbing-of-geokit-for-rails-unit-tests/</link>
		<comments>http://www.pervasivecode.com/blog/2009/07/23/fancier-stubbing-of-geokit-for-rails-unit-tests/#comments</comments>
		<pubDate>Fri, 24 Jul 2009 00:00:44 +0000</pubDate>
		<dc:creator>Jamie Flournoy</dc:creator>
				<category><![CDATA[process]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[ruby on rails]]></category>
		<category><![CDATA[servers]]></category>
		<category><![CDATA[testing]]></category>

		<guid isPermaLink="false">http://www.pervasivecode.com/blog/?p=108</guid>
		<description><![CDATA[I&#8217;m working on a Rails app that uses the ym4r_gm plugin, getting Google to do the geocoding for Thentic. I liked the idea of stubbing the web service call, because all those calls to an external service add up to over 20 seconds of test suite run time(!). That&#8217;s almost half of the 50 second [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m working on a Rails app that uses the ym4r_gm plugin, getting Google to do the geocoding for <a href="http://www.thentic.com/">Thentic</a>. I liked the idea of stubbing the web service call, because all those calls to an external service add up to over 20 seconds of test suite run time(!). That&#8217;s almost half of the 50 second run time of my unit tests (and 50 seconds is much too long for a unit test suite).</p>
<p>I found a good starting point at <a href="http://beardendesigns.com/blogs/permalink/55">geokit stubbing for faster tests</a>. I also wanted a way to stub a geocoding failure, and a way to prevent any unit tests from using the real geocoding web service.</p>
<p>Here&#8217;s how I did it.<br />
<span id="more-108"></span><br />
In test/test_helper.rb, add this:</p>
<pre>
class ActiveSupport::TestCase
  def setup
    GeoKit::Geocoders::MultiGeocoder.stubs(:geocode).raises(RuntimeError,
      'Use mock_geocoding_success! or mock_geocoding_failure! in your test')
  end

  def mock_geocoding_success!
    geocode_payload = GeoKit::GeoLoc.new(:lat => 123.456, :lng => 123.456)
    geocode_payload.success = true
    GeoKit::Geocoders::MultiGeocoder.expects(:geocode).returns(geocode_payload)
  end

  def mock_geocoding_failure!
    geocode_payload = GeoKit::GeoLoc.new
    geocode_payload.success = false
    GeoKit::Geocoders::MultiGeocoder.expects(:geocode).returns(geocode_payload)
  end
end
</pre>
<p>What this does is to force you to choose either one of those mock_geocoding methods before you call the geocode method. To me this seems like a good idea since the integration tests that exercise the full application stack should probably be written using Cucumber and Webrat (which is what I&#8217;m using).</p>
<p>You will probably want to merge my one-line setup method into your existing setup code in test_helper, if any. Also note that this uses <a href="http://mocha.rubyforge.org/">Mocha</a> for mocking.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.pervasivecode.com/blog/2009/07/23/fancier-stubbing-of-geokit-for-rails-unit-tests/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Extreme Programming Experiences: Conclusion</title>
		<link>http://www.pervasivecode.com/blog/2009/05/30/xp-experiences-conclusion/</link>
		<comments>http://www.pervasivecode.com/blog/2009/05/30/xp-experiences-conclusion/#comments</comments>
		<pubDate>Sat, 30 May 2009 07:21:15 +0000</pubDate>
		<dc:creator>Jamie Flournoy</dc:creator>
				<category><![CDATA[Extreme Programming (XP)]]></category>
		<category><![CDATA[agile development]]></category>
		<category><![CDATA[process]]></category>
		<category><![CDATA[ruby on rails]]></category>

		<guid isPermaLink="false">http://www.pervasivecode.com/blog/?p=94</guid>
		<description><![CDATA[Now that I&#8217;ve worked in a team that really was doing XP (except for our Lack Of Onsite Customer shortcoming) I can say that it works pretty well, but only to the extent that you do all of the practices together. Of course, that&#8217;s what the XP folks said from the beginning: you can&#8217;t just [...]]]></description>
			<content:encoded><![CDATA[<p>Now that I&#8217;ve worked in a team that really was doing XP (except for our Lack Of Onsite Customer shortcoming) I can say that it works pretty well, but only to the extent that you do <b>all</b> of the practices together. Of course, that&#8217;s what the XP folks said from the beginning: you can&#8217;t just apply 1% of it and make a judgement about it.<br />
<span id="more-94"></span><br />
With the recent resurgence of the XP methodology in the Ruby on Rails community (particularly in companies affiliated with Pivotal Labs), I expect a whole new flurry of related controversy. Hopefully with the experiences and advice I&#8217;ve given, this time we can avoid some of the confusion and skepticism, and actually adopt it where it makes sense.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.pervasivecode.com/blog/2009/05/30/xp-experiences-conclusion/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Extreme Programming Experiences: Part 5 of 5 &#8211; Pair Programming is for 100% of production code, not 100% of your workday</title>
		<link>http://www.pervasivecode.com/blog/2009/05/30/xp-experiences-part-5-of-5/</link>
		<comments>http://www.pervasivecode.com/blog/2009/05/30/xp-experiences-part-5-of-5/#comments</comments>
		<pubDate>Sat, 30 May 2009 07:18:36 +0000</pubDate>
		<dc:creator>Jamie Flournoy</dc:creator>
				<category><![CDATA[Extreme Programming (XP)]]></category>
		<category><![CDATA[agile development]]></category>
		<category><![CDATA[process]]></category>

		<guid isPermaLink="false">http://www.pervasivecode.com/blog/?p=93</guid>
		<description><![CDATA[Pair Programming is for 100% of production code, not 100% of your workday
Pair Programming is intense, mentally and physically. You need to take breaks, stretch, walk around, and hopefully go outside for sunshine and fresh air. Even so, 8 hours of solid pair programming is a very tiring day. That much pairing time may be [...]]]></description>
			<content:encoded><![CDATA[<p><b>Pair Programming is for 100% of production code, not 100% of your workday</b></p>
<p>Pair Programming is intense, mentally and physically. You need to take breaks, stretch, walk around, and hopefully go outside for sunshine and fresh air. Even so, 8 hours of solid pair programming is a very tiring day. That much pairing time may be appropriate now and then, but it isn&#8217;t physically sustainable.<br />
<span id="more-93"></span></p>
<p>Also, although a side benefit of working in a pair is that it helps you stay focused on work instead of goofing off, there are other things you need to do while you&#8217;re at work. You may need to make personal calls, shop for a keyboard or a bike, read about some new technology that you might use on the project, or hack up a <a href="http://c2.com/cgi/wiki?SpikeDescribed">technology spike</a>. Those activities require some personal space, and most of them require exclusive solo use of a computer. Without a certain amount of privacy and a small amount of storage for personal items, developers can feel dehumanized and unattached to the workplace, like a guest at their own job.</p>
<p>One option is to expect every developer to bring a personal laptop to work with them. If you do this, you will need to provide some physically secure place for them to put their laptop when they are not using it, such as a small locker. A bit of extra desk space to the side of the pairing station is required if a small separate desk is not possible.</p>
<p>Another option is to provide a small number of inexpensive, low-end computers (such as a 3 or 4 year old, semi-obsolete computer that used to be somebody&#8217;s main work computer) to act as shared &#8220;personal time&#8221; workstations. These can be laptops (in which case they need at minimum a bit of available desk space next to the pairing station) or desktops (in which case a separate desk is required).</p>
<p>In either case, it&#8217;s necessary to have a private area that can act as a phone booth, and some long term storage available for personal items. A locking drawer unit on casters is good enough for a developer to have a sense of personal space. A tiny conference room or storage room that can accomodate a single occupant can provide enough privacy for personal calls.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.pervasivecode.com/blog/2009/05/30/xp-experiences-part-5-of-5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Extreme Programming Experiences: Part 4 of 5: Technical Debt and Cruft</title>
		<link>http://www.pervasivecode.com/blog/2009/05/30/xp-experiences-part-4-of-5/</link>
		<comments>http://www.pervasivecode.com/blog/2009/05/30/xp-experiences-part-4-of-5/#comments</comments>
		<pubDate>Sat, 30 May 2009 07:15:55 +0000</pubDate>
		<dc:creator>Jamie Flournoy</dc:creator>
				<category><![CDATA[Extreme Programming (XP)]]></category>
		<category><![CDATA[agile development]]></category>
		<category><![CDATA[process]]></category>

		<guid isPermaLink="false">http://www.pervasivecode.com/blog/?p=92</guid>
		<description><![CDATA[Technical Debt and Cruft
There is a fundamental tension in software development between delivering something quickly now, and being able to deliver something quickly later. Over time, quick and dirty hacks pile up, and code becomes difficult to work with.

Even if you practice test-first coding, your tests may be badly written, and the code can be [...]]]></description>
			<content:encoded><![CDATA[<p><b><a href="http://c2.com/cgi/wiki?TechnicalDebt">Technical Debt</a> and Cruft</b></p>
<p>There is a fundamental tension in software development between delivering something quickly now, and being able to deliver something quickly later. Over time, quick and dirty hacks pile up, and code becomes difficult to work with.<br />
<span id="more-92"></span></p>
<p>Even if you practice test-first coding, your tests may be badly written, and the code can be badly written, even if they produce the correct answer.</p>
<p>Examples include:<br />
- The test was copied and pasted from an existing test and then hacked, but you didn&#8217;t bother to <a href="http://c2.com/cgi/wiki?DontRepeatYourself">DRY up</a> the duplication.<br />
- The API doesn&#8217;t lend itself to pre-test setup because you wrote the code before the tests or failed to refactor the API when you found you had to write ugly test code in order to test it, and so your tests incorporate large chunks of setup code.<br />
- The setup for a test is slow because you have to load a lot of data or do a lengthy computation before you can check to see if the result is correct.</p>
<p>All of these mean that at some point you cut corners on refactoring. Ugly test setup code isn&#8217;t <a href="http://www.pervasivecode.com/blog/2009/05/30/xp-experiences-part-1-of-5/">The Simplest Thing That Could Possibly Work</a>.</p>
<p>Having a <a href="http://c2.com/cgi/wiki?OptimizingUnitTests">fast unit test suite</a> is a technical requirement that you may have forgotten to build into the test suite. Your unit test suite should fail if all of the individual tests pass but it takes more than 30 seconds total. If it takes longer, you don&#8217;t get to see if your recent changes worked, you rapidly exit the <a href="http://c2.com/cgi/wiki?MentalStateCalledFlow">Flow state</a>, and productivity plummets.</p>
<p>(Note: The integration test suite, which should be running on a separate continuous integration server, can take a lot longer since it&#8217;s not in the innermost loop of the <a href="http://c2.com/cgi/wiki?TestDrivenDevelopment">Test Driven Development</a> process.  Just don&#8217;t mix slow-running full-stack integration and acceptance tests in with your fast, isolated unit tests.)</p>
<p>Keep in mind that it&#8217;s okay to refactor code that satisfies customer requirements, but is hard to test with a reasonable amount of setup, or takes too long to test.</p>
<p>Accumulated technical debt has a three-pronged attack on team productivity:<br />
- Features take several times longer to implement than they would with well designed, clean code.<br />
- It becomes harder to estimate how long a seemingly simple feature will take to implement.<br />
- Good programmers get stressed out and discouraged because they know they are performing far below their ability, and they quit. Bad programmers who are used to producing slow, buggy code while missing deadlines will hang around.</p>
<p>&#8230;and all of these are true even if you are doing test-first development!</p>
<p>My own mistake in this area has been to allow too much input into the ebb and flow of source code entropy by non-programmers. Managers percieve code quality as if it were a programmer luxury like a foosball table or a team party, that can be taken away when the schedule is tight. It isn&#8217;t.</p>
<p>In short, just don&#8217;t offer to do shoddy work now in exchange for a repair period later. You&#8217;re obligated to keep the code (including tests!) in excellent condition, as a matter of professional competence. You achieve this not by <a href="http://c2.com/cgi/wiki?GoldPlating">Gold Plating</a> (satisfying your ego by trying to predict features that will be needed and building them in now; see <a href="http://c2.com/cgi/wiki?YouArentGonnaNeedIt">YAGNI</a>), but by keeping the code simple and clear.</p>
<p>Maybe there&#8217;s an exceptional case where there&#8217;s a super important demo deadline to a <a href="http://c2.com/cgi/wiki?GoldOwner">Gold Owner</a>, and you need to hack something in as fast as possible by Tuesday. That must be followed by a symmetrically urgent cleanup effort starting on Wednesday. Be firm. The longer you wait to clean it up, the harder it will be: it&#8217;s a lot easier to stand firm and insist on a day of cleanup than a month of cleanup.</p>
<p>Non-programmers will never be in a position to realize that this week we should just stop implementing new features and <a href="http://c2.com/cgi/wiki?SharpenTheSaw">Sharpen the Saw</a>. So, don&#8217;t let a week of cleanup work pile up. Just explain that the feature is barely working and demoable, but that it isn&#8217;t finished yet. Then clean it up, and declare it done when it really is done. If you have to start a half dozen user stories and then leave them all &#8220;in progress&#8221; while you do the demo, and then clean all of them up because they&#8217;re all in desperate need of additional tests and refactoring, then do that. Whatever you do, don&#8217;t create a pile of Engineering Tasks for &#8220;go back and write tests for [feature]&#8221; and &#8220;go back and refactor [feature]&#8220;. Those tasks will never get done.</p>
<p>If the demand for emergency demo hackery happens often, there&#8217;s something seriously wrong with your scheduling and estimation process: why are you expected to drastically outperform your effort estimate? If the feature was so important, why wasn&#8217;t it prioritized high enough to be ready for the demo without the desperate hackery?</p>
<p>Remember, the biggest broken promise that developers hear is &#8220;we&#8217;ll make time to clean this up later.&#8221; And usually it&#8217;s a promise you&#8217;ve made to yourself.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.pervasivecode.com/blog/2009/05/30/xp-experiences-part-4-of-5/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Extreme Programming Experiences: Part 3 of 5: Lack of Onsite Customer</title>
		<link>http://www.pervasivecode.com/blog/2009/05/30/xp-experiences-part-3-of-5/</link>
		<comments>http://www.pervasivecode.com/blog/2009/05/30/xp-experiences-part-3-of-5/#comments</comments>
		<pubDate>Sat, 30 May 2009 06:48:19 +0000</pubDate>
		<dc:creator>Jamie Flournoy</dc:creator>
				<category><![CDATA[Extreme Programming (XP)]]></category>
		<category><![CDATA[agile development]]></category>
		<category><![CDATA[process]]></category>

		<guid isPermaLink="false">http://www.pervasivecode.com/blog/?p=91</guid>
		<description><![CDATA[Lack of Onsite Customer
This is a serious problem. Your project exists to serve somebody, and your success is directly proportional to understanding what they want, so that you can build it. You need as much communication bandwidth between the programmers and those people as possible.

If you have one customer and they can&#8217;t come to you, [...]]]></description>
			<content:encoded><![CDATA[<p><b><a href="http://c2.com/cgi/wiki?LackOfOnSiteCustomer">Lack of Onsite Customer</a></b></p>
<p>This is a serious problem. Your project exists to serve somebody, and your success is directly proportional to understanding what they want, so that you can build it. You need as much communication bandwidth between the programmers and those people as possible.<br />
<span id="more-91"></span><br />
If you have one customer and they can&#8217;t come to you, consider going to them. Can you co-locate on their premises? Can a fragment of your development team visit the customer for a few days of intensive collaboration on requirements? The quality of information you get from a customer will probably be better if the developers go to where the customer is, due to &#8220;knowledge accidents&#8221;. The customer may be distracted in their own office by their day to day work, but to the extent that the developers can witness and understand the customer&#8217;s daily life, this can actually be a good thing.</p>
<p>However, many software companies have more than one customer, or are trying to build something for multiple prospective customers. They may not consider your product important enough to dedicate someone to be your onsite customer, nor to let you colocate your team on their site.</p>
<p>One option is to choose a single customer and treat them as though their requirements are typical of others. There is a risk that their requirements are atypical, but in exchange you avoid the risk of building something that doesn&#8217;t satisfy anyone&#8217;s requirements enough for them to buy it.</p>
<p>In any case, when you&#8217;re hoping to sell to a large number of customers, you still have to focus on a small number of customers (a particular type of company, a vertical market, etc.) in order to be able to prioritize your efforts.</p>
<p>In the case where no customer is willing to co-locate with you or allow you to co-locate with them, the key is to reduce the number of layers of communication between the customer and development team. The usual substitute for an actual customer is an internal employee acting as a <a href="http://c2.com/cgi/wiki?CustomerProxy">Customer Proxy</a>, who talks to the real customer very often, preferrably in person, preferrably while demoing the current software.</p>
<p>The thing to avoid is an arrangement where multiple layers of opinion and guesswork sit between the customer and the developers. Perhaps sales and marketing folks have gathered wishes from prospective customers, and customer account reps have gathered feedback and wishes from existing customers, and they filter and reword and interpret everything before giving this information to the product manager. Then the product manager synthesizes this into a requirements document and hands this down to the development team, and acts as the Customer, answering requirements questions without consulting a real customer. This is broken. The fix is to have the product manager act as a true Customer Proxy rather than a Mock Customer: the synthesized requirements and their prioritization must be validated with multiple customers to ensure their correctness, and questions about requirements must be relayed to real customers in order to obtain a real answer. And if you can get a customer to come in and visit once in a while (or if you can visit them), by all means do so.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.pervasivecode.com/blog/2009/05/30/xp-experiences-part-3-of-5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Extreme Programming Experiences: Part 2 of 5: &#8220;Lazy YAGNI&#8221;</title>
		<link>http://www.pervasivecode.com/blog/2009/05/30/xp-experiences-part-2-of-5/</link>
		<comments>http://www.pervasivecode.com/blog/2009/05/30/xp-experiences-part-2-of-5/#comments</comments>
		<pubDate>Sat, 30 May 2009 06:44:10 +0000</pubDate>
		<dc:creator>Jamie Flournoy</dc:creator>
				<category><![CDATA[Extreme Programming (XP)]]></category>
		<category><![CDATA[agile development]]></category>
		<category><![CDATA[process]]></category>

		<guid isPermaLink="false">http://www.pervasivecode.com/blog/?p=90</guid>
		<description><![CDATA[&#8220;Lazy YAGNI&#8221;
You Aren&#8217;t Gonna Need It can lead to some silly situations if you interpret it too pessimistically. The pessimistic (and wrong) interpretation is that you should pretend that the user story you&#8217;re implementing is the only one you know about. This equates to doing zero up-front design, because you&#8217;re only concerned with whether the [...]]]></description>
			<content:encoded><![CDATA[<p><b>&#8220;Lazy YAGNI&#8221;</b></p>
<p><a href="http://c2.com/cgi/wiki?YouArentGonnaNeedIt">You Aren&#8217;t Gonna Need It</a> can lead to some silly situations if you interpret it too pessimistically. The pessimistic (and wrong) interpretation is that you should pretend that the user story you&#8217;re implementing is the only one you know about. This equates to doing zero up-front design, because you&#8217;re only concerned with whether the design satisfies the user story you&#8217;re currently implementing. The price of making this mistake is design churn: each new requirement may incur a large rewrite of existing code. This is obviously not a recipe for productivity.<br />
<span id="more-90"></span><br />
Since you have a <a href="http://c2.com/cgi/wiki?ReleasePlan">Release Plan</a> which contains a list of <a href="http://c2.com/cgi/wiki?UserStory">User Stories</a> that you&#8217;re going to need, you can tell that <a href="http://c2.com/cgi/wiki?YouAreGonnaNeedIt">You Are Gonna Need It</a>. YAGNI defends against programmer-initiated imaginary user requirements that divert attention away from actual documented user requirements.</p>
<p>If you&#8217;re coming up with a design for a user story and see that another story coming up soon could influence your design decision, you are in the most informed position compared to whoever estimated the stories when they were being prioritized. You may be able to avoid a lot of wasted effort by adopting a design now that will support both requirements. This is why <a href="http://c2.com/cgi/wiki?XpDoesDesign">XP Does Design</a> before writing the tests and implementation.</p>
<p>However, user stories that are far in the future (> 6 months away) are likely to change, and their existence at all is probably a sign of premature planning. Looking even 3 months ahead is probably excessive. Your customer will learn a lot between now and then about what they really need, and may reprioritize or rewrite that future story. They&#8217;ve already prioritized it as being less important than the next 3 months of user stories, so you&#8217;re taking a risk when you decide to accommodate it in advance.</p>
<p>Note that I&#8217;m not talking about reprioritizing user stories. That is not something that engineers are allowed to do outside of the current iteration (only the customer may do that). I&#8217;m talking about extracting an <a href="http://c2.com/cgi/wiki?EngineeringTask">Engineering Task</a> from the future story and pulling it into the present iteration, so that the tests you write in the current iteration force you to use a particular design that will better accommodate the future story when you eventually write it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.pervasivecode.com/blog/2009/05/30/xp-experiences-part-2-of-5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Extreme Programming Experiences: Part 1 of 5: Do The Simplest Thing That Could Possibly Work</title>
		<link>http://www.pervasivecode.com/blog/2009/05/30/xp-experiences-part-1-of-5/</link>
		<comments>http://www.pervasivecode.com/blog/2009/05/30/xp-experiences-part-1-of-5/#comments</comments>
		<pubDate>Sat, 30 May 2009 06:39:20 +0000</pubDate>
		<dc:creator>Jamie Flournoy</dc:creator>
				<category><![CDATA[Extreme Programming (XP)]]></category>
		<category><![CDATA[agile development]]></category>
		<category><![CDATA[process]]></category>

		<guid isPermaLink="false">http://www.pervasivecode.com/blog/?p=89</guid>
		<description><![CDATA[Do The Simplest Thing That Could Possibly Work
This does not mean &#8220;do the least work possible&#8221;. Doing the least possible is not XP, it is hackery, which is the methodology that leads to a Big Ball of Mud.

You do want to do the least work possible in between the Red and Green steps, perhaps even [...]]]></description>
			<content:encoded><![CDATA[<p><b><a href="http://c2.com/cgi/wiki?DoTheSimplestThingThatCouldPossiblyWork">Do The Simplest Thing That Could Possibly Work</a></b></p>
<p>This does not mean &#8220;do the least work possible&#8221;. Doing the least possible is not XP, it is hackery, which is the methodology that leads to a <a href="http://www.laputan.org/mud/">Big Ball of Mud</a>.<br />
<span id="more-89"></span><br />
You do want to do the least work possible in between the Red and Green steps, perhaps even by following the <a href="http://c2.com/cgi/wiki?PairProgrammingPingPongPattern">Pair Programming Ping Pong Pattern</a>, a.k.a. <a href="http://www.peterprovost.org/blog/post/The-Pair-Programming-TDD-Game.aspx">The Pair Programming TDD Game</a>.</p>
<p>But once you reach Green, you still need to <a href="http://c2.com/cgi/wiki?RefactorMercilessly">Refactor Mercilessly</a>. That step obligates you to eliminate duplication (<a href="http://c2.com/cgi/wiki?DontRepeatYourself">Don&#8217;t Repeat Yourself</a> / <a href="http://c2.com/cgi/wiki?OnceAndOnlyOnce">Once and Only Once</a> / the <a href="http://c2.com/cgi/wiki?ZeroOneInfinityRule">Zero One Infinity Rule</a>) and to make sure that the <i>code</i> Does The Simplest Thing That Could Possibly Work. </p>
<p>This is very important, because this is how you avoid <a href="http://c2.com/cgi/wiki?AddingEpicycles">AddingEpicycles</a>. That is, if you skip the Refactor stage and just keep on doing Red-Green over and over, the code and tests quickly become very hard to work with, because you&#8217;re just hacking on top of a design that no longer fits the requirements. Pretty soon you will find that your feature velocity has dropped dramatically, because it&#8217;s so darn hard to make a simple change without breaking pre-existing tests.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.pervasivecode.com/blog/2009/05/30/xp-experiences-part-1-of-5/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Extreme Programming Experiences: Introduction</title>
		<link>http://www.pervasivecode.com/blog/2009/05/30/xp-experiences-introduction/</link>
		<comments>http://www.pervasivecode.com/blog/2009/05/30/xp-experiences-introduction/#comments</comments>
		<pubDate>Sat, 30 May 2009 06:32:51 +0000</pubDate>
		<dc:creator>Jamie Flournoy</dc:creator>
				<category><![CDATA[Extreme Programming (XP)]]></category>
		<category><![CDATA[agile development]]></category>
		<category><![CDATA[process]]></category>
		<category><![CDATA[ruby on rails]]></category>

		<guid isPermaLink="false">http://www.pervasivecode.com/blog/?p=88</guid>
		<description><![CDATA[Extreme Programming Experiences: Introduction
Over the last six months I&#8217;ve had the privilege of working in a software development team that was practicing the closest thing to a full implmentation of XP that I&#8217;ve ever seen.

This team was incubated in Pivotal Labs, who are experts at the Ruby on Rails software framework and the XP methodology.
I&#8217;ve [...]]]></description>
			<content:encoded><![CDATA[<p>Extreme Programming Experiences: Introduction</p>
<p>Over the last six months I&#8217;ve had the privilege of working in a software development team that was practicing the closest thing to a full implmentation of <a href="http://en.wikipedia.org/wiki/Extreme_Programming">XP</a> that I&#8217;ve ever seen.<br />
<span id="more-88"></span><br />
This team was incubated in <a href="http://www.pivotallabs.com/">Pivotal Labs</a>, who are experts at the <a href="http://rubyonrails.org/">Ruby on Rails</a> software framework and the XP methodology.</p>
<p>I&#8217;ve read a lot about XP over the last ten years, and tried some of the <a href="http://c2.com/cgi/wiki?ExtremeProgrammingCorePractices">practices</a> when it seemed to make sense for the project I was working on at the time. I&#8217;ve tended to feel a mix of curious optimism and curmudgeonly skepticism toward some of the practices: could these ideas really work?</p>
<p>Well, I have tried to think critically in my analysis of fuzzy topics like <a href="http://www.pervasivecode.com/blog/2007/01/10/rapid-application-development-vs-big-design-up-front/">how much design to do</a>, so that I could figure out not whether something was a universally Great Idea or not, but rather when it would work well and when it wouldn&#8217;t. The only way to find out for sure is to try them.</p>
<p>Well, now I&#8217;ve worked in an XP shop and I&#8217;ve learned a lot about how to make XP work, and about the challenges that a team following an agile methodology faces. Here are the most important things I&#8217;ve learned, in the next few posts (broken up by topic to help keep the comments focused).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.pervasivecode.com/blog/2009/05/30/xp-experiences-introduction/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Software Project Estimation: Inaccurate and Unavoidable</title>
		<link>http://www.pervasivecode.com/blog/2008/08/06/software-project-estimation-inaccurate-and-unavoidable/</link>
		<comments>http://www.pervasivecode.com/blog/2008/08/06/software-project-estimation-inaccurate-and-unavoidable/#comments</comments>
		<pubDate>Thu, 07 Aug 2008 04:04:04 +0000</pubDate>
		<dc:creator>Jamie Flournoy</dc:creator>
				<category><![CDATA[labor]]></category>
		<category><![CDATA[management]]></category>
		<category><![CDATA[process]]></category>
		<category><![CDATA[strategy]]></category>
		<category><![CDATA[testing]]></category>

		<guid isPermaLink="false">http://www.pervasivecode.com/blog/2008/08/06/software-project-estimation-inaccurate-and-unavoidable/</guid>
		<description><![CDATA[This is a follow up to On Our Project, We&#8217;re Always 90% Done.
The coder is the one on the hook for long nights, weekends, and stress-related health problems if the estimates suck. It&#8217;s in your interest to exert as much control over estimation and scheduling as you can. If you&#8217;re not making the estimate, someone [...]]]></description>
			<content:encoded><![CDATA[<p>This is a follow up to <a href="http://www.codinghorror.com/blog/archives/001161.html">On Our Project, We&#8217;re Always 90% Done</a>.</p>
<p>The coder is the one on the hook for long nights, weekends, and stress-related health problems if the estimates suck. It&#8217;s in your interest to exert as much control over estimation and scheduling as you can. If you&#8217;re not making the estimate, someone is making it for you.</p>
<p><span id="more-76"></span></p>
<p>If you think about it, <strong>you&#8217;re opting out of an ongoing salary negotiation process</strong>. You&#8217;re going to work more for the same amount of money, and worse yet, you&#8217;re going to have to squeeze that work into the same amount of time, under stressful conditions. Why would you do that?</p>
<p><a href="http://www.amazon.com/Software-Estimation-Demystifying-Practices-Microsoft/dp/0735605351">McConnell&#8217;s &#8220;Software Estimation&#8221; book</a> addresses this problem of wildly inaccurate early estimates quite well. I highly recommend it. In a nutshell, estimates need to carry error bars, so early estimates would be given but with a disclaimer of +/- 100% (or more!), and later estimates get closer to being correct.</p>
<p>You will have to manage expectations, though. Human nature leads to the shortest end of the date range becoming the remembered end date, the guess being remembered as a promise, and the latest feature set being remembered as if it were the original feature set.</p>
<p>This is a big reason to hire a good project manager: they&#8217;re there to facilitate the change control process, or planning game, or whatever you call it in your organization when the paying folks want more stuff, and the PM reminds them that need to pay more and wait longer in order to get more out of the dev team. A good project manager can make a huge difference to the stress level and likelihood of success of a project.</p>
<p>It&#8217;s psychologically icky for developers to have to participate in the estimation and scheduling process &#8212; &#8220;eww, it&#8217;s a non deterministic domain with lots of ill-defined inputs!&#8221; &#8212; and I&#8217;ve seen some managers play head games like &#8220;Oh, you need more time? I thought you were really good at programming&#8230; I guess not&#8230;&#8221; to try and manipulate developers into working nights and weekends out of a sense of guilt or wounded pride. But you need to suck it up and keep providing status updates and reminding people how the process works, because you-the-programmer are the expert on the nature of programming.</p>
<p>Yes, it&#8217;s more like Lewis and Clark or the Apollo project than like building a house, and there are just going to be a lot of surprises, but you can still provide a framework and exert a tremendous amount of control over how the team will operate. Things like whether you plan to build a technology proof-of-concept to make sure your architecture doesn&#8217;t suck, or whether you intend to spend lots of time writing automated tests and doing daily code reviews in order to control that horrible &#8220;bug fixing&#8221; phase toward the end are in your hands if you participate in the estimation process. You&#8217;re being offered an opportunity to make sure that all those important tasks like performance testing and cross-browser testing and writing an installation guide and an operations manual for the sysadmin get done. <strong>It doesn&#8217;t matter if the estimates for those tasks are completely wrong at first &#8211; what matters is that they&#8217;re on the list.</strong></p>
<p>And really, the largest battle you&#8217;ll probably have to fight is the one over scope creep: we can&#8217;t launch until it has all the original features plus all these additional changes and new features perfectly working, but we need to launch tomorrow. That&#8217;s also human nature, and you need to train people to release early and often. Agile methodologies can help here, if you can get your software working and stable from a very early point in the project, and keep it that way. Then you probably have a launchable product very early, and you can just push highly-desired features into post-1.0 releases.</p>
<p>In any case, a list with a bunch of crappy numbers and low confidence factors is a lot better than no list, or a one-item list with a crappy number and an implied 100% confidence factor.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.pervasivecode.com/blog/2008/08/06/software-project-estimation-inaccurate-and-unavoidable/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Thoughts about using Git for closed source projects</title>
		<link>http://www.pervasivecode.com/blog/2008/04/14/thoughts-about-using-git-for-closed-source-projects/</link>
		<comments>http://www.pervasivecode.com/blog/2008/04/14/thoughts-about-using-git-for-closed-source-projects/#comments</comments>
		<pubDate>Mon, 14 Apr 2008 16:11:41 +0000</pubDate>
		<dc:creator>Jamie Flournoy</dc:creator>
				<category><![CDATA[git]]></category>
		<category><![CDATA[management]]></category>
		<category><![CDATA[process]]></category>
		<category><![CDATA[tools]]></category>

		<guid isPermaLink="false">http://www.pervasivecode.com/blog/2008/04/14/thoughts-about-using-git-for-closed-source-projects/</guid>
		<description><![CDATA[Git is getting a lot of press in the open source world lately, but hasn&#8217;t got much traction in the closed source corporate development world. There&#8217;s a reason for this, and it&#8217;s more than conservatism on the part of the corporate developers. Git (or any DVCS, really) embodies a development culture that isn&#8217;t very enterprise-y.

This [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://git.or.cz/">Git</a> is getting a lot of press in the open source world lately, but hasn&#8217;t got much traction in the closed source corporate development world. There&#8217;s a reason for this, and it&#8217;s more than conservatism on the part of the corporate developers. Git (or any DVCS, really) embodies a development culture that isn&#8217;t very enterprise-y.<br />
<span id="more-66"></span><br />
This is something that I&#8217;ve noticed when talking to some of my developer friends who are working on closed source projects, in software companies or in teams building in-house custom applications. Big companies like central control, hierarchy, policies, and audit trails, and centralized software version control systems fit this very well. You get one big server in the sky that has all the source code, central control over permissions, a log of changes, and usually a way to add pre and post commit hooks to integrate the VCS repo with related systems.</p>
<p>With a DVCS, everybody can be a lone ranger, unless you build a process on top that puts back these features (i.e. a remote repository that everybody pushes to). This is something that many of the introductory documents I&#8217;ve seen regarding Git try to downplay &#8212; you don&#8217;t need a central repository, yippee! Just pass changes around from developer to developer &#8212; but while that may thrill the solo coder hacking on his laptop on a long flight, it isn&#8217;t music to the ears of a CIO.</p>
<p>In Git&#8217;s case, there is no central list of version numbers, and the history can be altered using <code>git-rebase</code> and <code>git-commit --amend</code>. Do you really need to see the precise history of every change ever made to the code? Perhaps you think you do because it gets screwed up so easily in some version control tools, and you need to at least be able to backtrack and manually unsnarl a really big screw-up. In that case, you probably don&#8217;t need it, as long as the version control tool can be trusted.</p>
<p>Or maybe you&#8217;re guarding against human error, and what you really want is granular remote backups. Just as you can use <code>svnadmin dump</code> and <code>svnadmin load</code> to intentionally truncate the history that the repository knows about, you could use <code>git rebase</code> to squash a bunch of commits together into a single big change, and thereby lose the ability to go back to one of those intermediate steps. So you probably should think about archiving the full-granularity repository before you consolidate the old historical steps for developer convenience reasons. And even if you&#8217;re a lone ranger, you should think about using rsync or duplicity to regularly put your local .git repositories someplace safe, or push to a remote git repository that no one else has access to, or both.</p>
<p>One solution to make Git more enterprise-friendly <a href="http://www.kernel.org/pub/software/scm/git/docs/git-svn.html">git-svn</a>, which gives you the tool integration and centralness of Subversion, with the local branch/merge and offline commit benefits of Git (which are <i>very very nice</i>). I haven&#8217;t used it but I am told that it works very well. It&#8217;s also a very low-risk way to try out Git, since you can just check your changes in and go back to using Subversion at any time.</p>
<p>Git is challenging to learn, partly because the command language is not very intuitive, and partly because the folks documenting it so far are obsessed with explaining how radically new and different it is rather than how you probably will want to use it. And for folks reading this documentation, the &#8220;look how different your process could be&#8221; examples are not necessarily very appealing, since the benefits gained by using a centralized VCS are not addressed.</p>
<p>Still, I think Git has enough hype around it that in a year or two there will be some very slick, usable tools that conceal the complex inner workings that you currently have to understand well in order to be productive. They may also include features that make backups or the setup and shared use of a remote repository easy. So if you&#8217;re not convinced that it&#8217;s time to migrate Git now, just wait. It will probably come to where you are eventually.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.pervasivecode.com/blog/2008/04/14/thoughts-about-using-git-for-closed-source-projects/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
