<?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"
	>

<channel>
	<title>James Carr</title>
	<atom:link href="http://blog.james-carr.org/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.james-carr.org</link>
	<description>Rants and Musings of an Agile Developer</description>
	<pubDate>Wed, 10 Mar 2010 12:47:11 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.1</generator>
	<language>en</language>
			<item>
		<title>Using The New Mockito Annotations</title>
		<link>http://blog.james-carr.org/2010/03/09/using-the-new-mockito-annotations/</link>
		<comments>http://blog.james-carr.org/2010/03/09/using-the-new-mockito-annotations/#comments</comments>
		<pubDate>Wed, 10 Mar 2010 03:47:13 +0000</pubDate>
		<dc:creator>James Carr</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.james-carr.org/?p=734</guid>
		<description><![CDATA[It&#8217;s only been a few days since the Mockito 1.8.3 release and I have to say that for a minor release there&#8217;s a lot I like about it!
What I like about the new annotations is the ability to have test cases that are completely free of @Before. Observe this example of a class that takes [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s only been a few days since the Mockito 1.8.3 release and I have to say that for a minor release there&#8217;s a lot I like about it!</p>
<p>What I like about the new annotations is the ability to have test cases that are completely free of @Before. Observe this example of a class that takes a text input string, translates it to an AuctionEvent, and fires it off to an AuctionEventListener:</p>
<pre name="code" class="java">
@RunWith(MockitoJUnitRunner.class)
public class AuctionMessageTranslatorTest {
	@Mock AuctionEventListener listener;
	@InjectMocks AuctionMessageTranslator translator = new AuctionMessageTranslator();

	@Test
	public void shouldSendAnEventToTheListener(){
		translator.sendMessage("SOL Version: 1.1; Event: PRICE;");

		verify(listener).handleEvent(any(AuctionEvent.class));
	}
}
</pre>
<p>This is a first step, to just verify an event is passed to the listener (we don&#8217;t care about it&#8217;s contents yet). @Mock creates a mock on each test method run, and @InjectMocks will pass mocks to any matching setters or constructors.</p>
<p>Now I&#8217;ll implement a little code to make the example pass.</p>
<pre name="code" class="java">
public class AuctionMessageTranslator {
	private AuctionEventListener listener;
	public void setListener(AuctionEventListener listener) {
		this.listener = listener;
	}

	public void sendMessage(String message) {
		listener.handleEvent(new AuctionEvent());
	}
}
</pre>
<p>Doesn&#8217;t do much&#8230; so let&#8217;s add a new example that verifies the contents of the message sent to the listener. Since this object is created by the translator (translating a string to an object) we&#8217;ll use an argument captor to capture and verify it&#8217;s value.</p>
<pre name="code" class="java">
@RunWith(MockitoJUnitRunner.class)
public class AuctionMessageTranslatorTest {
	@Mock AuctionEventListener listener;
	@Captor ArgumentCaptor&lt;AuctionEvent&gt; arg;
	@InjectMocks AuctionMessageTranslator translator = new AuctionMessageTranslator();

	@Test
	public void shouldSendAnEventToTheListener(){
		translator.sendMessage("SOL Version: 1.1; Event: PRICE;");

		verify(listener).handleEvent(any(AuctionEvent.class));
	}

	@Test
	public void shouldSendAnEventWithNamePrice(){
		translator.sendMessage("SOL Version: 1.1; Event: PRICE;");

		verify(listener).handleEvent(arg.capture());

		assertThat(arg.getValue().getName(), equalTo("PRICE"));
	}
}
</pre>
<p>It fails, so we implement the code to make it pass:</p>
<pre name="code" class="java">
	public void sendMessage(String message) {
		listener.handleEvent(parseEvent(message));
	}

	private AuctionEvent parseEvent(String message) {
		AuctionEvent auctionEvent = new AuctionEvent();
		auctionEvent.setName(message.split(";")[1].split(":")[1].trim());
		return auctionEvent;
	}
</pre>
<p>This passes as the argument passed to the listener does indeed contain the event name. This is a little ugly, so let&#8217;s refactor it a little bit with our test providing a nice safety net:</p>
<pre name="code" class="java">
	public void sendMessage(String message) {
		listener.handleEvent(parseEvent(message));
	}

	private AuctionEvent parseEvent(String message) {
		AuctionEvent auctionEvent = new AuctionEvent();
		auctionEvent.setName(unpackMessage(message).get("Event"));
		return auctionEvent;
	}

	private Map&lt;String, String&gt; unpackMessage(String message) {
		Map&lt;String, String&gt; pairs = new HashMap&lt;String, String&gt;();
		for(String pairString : message.split(";")){
			String[] pair = pairString.split(":");
			pairs.put(pair[0].trim(), pair[1].trim());
		}
		return pairs;
	}
</pre>
<p>Looks good, and the test case for it is pretty clean although it has a lot of annotations. We could change the injection strategy to use constructor injection since we don&#8217;t really want the object to even exist without a listener:</p>
<pre name="code" class="java">
@RunWith(MockitoJUnitRunner.class)
public class AuctionMessageTranslatorTest {
	@Mock AuctionEventListener listener;
	@Captor ArgumentCaptor&lt;AuctionEvent&gt; arg;
	@InjectMocks AuctionMessageTranslator translator = new AuctionMessageTranslator(listener);
...
}
</pre>
<p>As long as the @InjectMocks annotation is present, the MockitoJunitRunner will initialize the mocks do they&#8217;re available for injection. Drop the @InjectMocks annotation off, and it fails with a null pointer exception.</p>
<p>One interesting thing of note when using @InjectMocks with setter injection is if you do something silly like the following:</p>
<pre name="code" class="java">
@RunWith(MockitoJUnitRunner.class)
public class AuctionMessageTranslatorTest {
	@Mock AuctionEventListener listener;
	@Mock AuctionEventListener listener2;
	@Captor ArgumentCaptor&gt;AuctionEvent&gt; arg;
	@InjectMocks AuctionMessageTranslator translator = new AuctionMessageTranslator();
	...
}
</pre>
<p>It will inject the first @Mock, not the second. Verifications against listener will work, while verifications against listener2 will fail as it was never injected.</p>
<p>Tomorrow I&#8217;ll include some examples of using the @Spy annotation as well as the different answer types you can configure @Mock annotated mocks with as of 1.8.3. <img src='http://blog.james-carr.org/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.james-carr.org/2010/03/09/using-the-new-mockito-annotations/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Another Good Tidbit from GOOSGBT</title>
		<link>http://blog.james-carr.org/2010/03/09/another-good-tidbit-from-goosgbt/</link>
		<comments>http://blog.james-carr.org/2010/03/09/another-good-tidbit-from-goosgbt/#comments</comments>
		<pubDate>Tue, 09 Mar 2010 14:37:46 +0000</pubDate>
		<dc:creator>James Carr</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.james-carr.org/?p=731</guid>
		<description><![CDATA[I&#8217;m currently in chapter 12 of Growing Object Oriented Software Guided By Tests and thought I&#8217;d share another good tidbit from one of the asides:

Put Tests in a Different Package
We&#8217;ve adopted a habit of putting tests in a different package from the code they&#8217;re exercising. We want to make sure we&#8217;re driving the code through [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m currently in chapter 12 of <a href="http://www.growing-object-oriented-software.com/">Growing Object Oriented Software Guided By Tests</a> and thought I&#8217;d share another good tidbit from one of the asides:</p>
<blockquote>
<h3>Put Tests in a Different Package</h3>
<p>We&#8217;ve adopted a habit of putting tests in a different package from the code they&#8217;re exercising. We want to make sure we&#8217;re driving the code through its public interfaces, like any other client, rather than opening up a package-scoped back door for testing.
</p></blockquote>
<p>Good point! Almost everytime I&#8217;ve found my self expose a method that should be private as protected or default it&#8217;s been because that method was really in gross violation of Single Responsibility Principle and I&#8217;ve often taken such code and extracted it to a separate object.</p>
<p>Thoughts?</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.james-carr.org/2010/03/09/another-good-tidbit-from-goosgbt/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Mockito 1.8.3 Released</title>
		<link>http://blog.james-carr.org/2010/03/08/mockito-183-released/</link>
		<comments>http://blog.james-carr.org/2010/03/08/mockito-183-released/#comments</comments>
		<pubDate>Mon, 08 Mar 2010 04:14:27 +0000</pubDate>
		<dc:creator>James Carr</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.james-carr.org/?p=726</guid>
		<description><![CDATA[Szczepan has announced on the Mockito user mailing list that 1.8.3 of Mockito has been released. This released includes several small (but useful) additions as well as bug fixes.
The two parts of this release I like are the new annotations @Spy, @Captor, and @injectMocks. These add to the already useful @Mock annotation to simplify test [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://monkeyisland.pl/">Szczepan</a> has announced on the Mockito user mailing list that 1.8.3 of Mockito has been released. This released includes several small (but useful) additions as well as bug fixes.</p>
<p>The two parts of this release I like are the <a href="http://mockito.googlecode.com/svn/tags/1.8.3/javadoc/org/mockito/Mockito.html#21">new annotations</a> @Spy, @Captor, and @injectMocks. These add to the already useful @Mock annotation to simplify test setup tremendously. Additionally, the @Mock annotation is now configurable so you can add different Mock/Stub styles; previously @Mock only supported the default mock behavior, now you can configure it to RETURNS_MOCKS, CALLS_REAL_METHODS, etc.</p>
<p>This release also includes a <a href="http://code.google.com/p/mockito/issues/detail?id=170&#038;can=1&#038;q=label:Milestone-Release1.8.3">feature</a> I requested that can be useful when trying to get legacy code under test, something I call <a href="http://mockito.googlecode.com/svn/tags/1.8.3/javadoc/org/mockito/Mockito.html#RETURNS_DEEP_STUBS">deep stubs</a>. Ever been in the situation where you have code with something like this in the middle of it:</p>
<pre name="code" class="java">
someCollaborator.getFoo().doBarThings().getBaz().execute().processResult();
</pre>
<p>Normally to stub this call, you&#8217;ll have to mock every object returned by each method call, and then stub the last one. Examples for code like this can be a little verbose, but now you can just @Mock the aggregate root and do something like:</p>
<pre name="code" class="java">
given(someColllaborator.getFoo().doBarThings().getBaz().execute().processResult).willReturn(resultObject);
</pre>
<p>Just remember friends, this is only good for legacy code&#8230; if you are already writing your code exemplar first to drive your design, you should know better than to make your object know too many details about it&#8217;s neighbors. <img src='http://blog.james-carr.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>This release also includes a <a href="http://code.google.com/p/mockito/issues/detail?id=109&#038;can=1&#038;q=label:Milestone-Release1.8.3">patch I submitted</a> to stop having all of the examples in a test run when trying to run a single one in eclipse and intelliJ when using MockitoJunitRunner. </p>
<p>For a complete list of features/fixes, see the <a href="http://code.google.com/p/mockito/issues/list?can=1&#038;q=label:Milestone-Release1.8.3&#038;colspec=ID+Type+Status+Priority+Milestone+Owner+Summary&#038;cells=tiles">release notes</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.james-carr.org/2010/03/08/mockito-183-released/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Presenting at Lambda Lounge This Thursday</title>
		<link>http://blog.james-carr.org/2010/03/01/presenting-at-lambda-lounge-this-thursday/</link>
		<comments>http://blog.james-carr.org/2010/03/01/presenting-at-lambda-lounge-this-thursday/#comments</comments>
		<pubDate>Mon, 01 Mar 2010 17:49:03 +0000</pubDate>
		<dc:creator>James Carr</dc:creator>
		
		<category><![CDATA[BDD]]></category>

		<guid isPermaLink="false">http://blog.james-carr.org/?p=723</guid>
		<description><![CDATA[I&#8217;ll be giving a presentation at Lambda Lounge this Thursday on Behavior Driven Development With Jspec. If you&#8217;re in the St.Louis area come on by and learn about BDD and how you can use it to drive your design. I&#8217;ll be using jspec to demonstrate how to build a functioning feature for a javascript library [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ll be giving a presentation at <a href="http://lambdalounge.org/">Lambda Lounge</a> this Thursday on <em>Behavior Driven Development With Jspec</em>. If you&#8217;re in the St.Louis area come on by and learn about BDD and how you can use it to drive your design. I&#8217;ll be using <a href="http://jspec.info">jspec </a>to demonstrate how to build a functioning feature for a javascript library driven by small, iterative examples.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.james-carr.org/2010/03/01/presenting-at-lambda-lounge-this-thursday/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Retrospective Rules</title>
		<link>http://blog.james-carr.org/2010/02/28/retrospective-rules/</link>
		<comments>http://blog.james-carr.org/2010/02/28/retrospective-rules/#comments</comments>
		<pubDate>Sun, 28 Feb 2010 16:36:43 +0000</pubDate>
		<dc:creator>James Carr</dc:creator>
		
		<category><![CDATA[retrospectives]]></category>

		<guid isPermaLink="false">http://blog.james-carr.org/?p=710</guid>
		<description><![CDATA[I&#8217;m gearing up to put together a retrospective for my team at my current client site, and I&#8217;ve been both thinking about and reading over notes from previous retrospectives I&#8217;ve either sat in or facilitated. Looking over a lot of these notes, especially from the worst ones, I&#8217;ve noticed an emerging pattern of behavior that [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m gearing up to put together a retrospective for my team at my current client site, and I&#8217;ve been both thinking about and reading over notes from previous retrospectives I&#8217;ve either sat in or facilitated. Looking over a lot of these notes, especially from the worst ones, I&#8217;ve noticed an emerging pattern of behavior that can either make or break a retrospective. Here&#8217;s a few that I think are the most important.</p>
<ol>
<li><strong>Retrospective Belongs to the Team</strong>
<p>This is possibly the most important observance I&#8217;ve noticed&#8230; retrospectives are only effective if they truely belong to the team. This means that it should only be attended by the team and only the team can pick a goal and how they&#8217;re going to follow up on them. Management shouldn&#8217;t attend the retrospective imho as they can cause interference, step in, or require metrics to be collected. Several retrospectives I participated in at my previous client had the manager constantly cut people off or tell them that the goal they&#8217;re proposing won&#8217;t work and refuse to let it be considered. These retrospectives were the most useless in my opinion and we never accomplished anything.</p>
</li>
<li><Strong>Don&#8217;t Let It Become a Whine-fest</strong>
<p>Retrospecting is about inspect and adapt&#8230; about looking at our experiences over the past and using root cause analysis to find causes and how we can improve in the future. However, if there is plenty of negativity in the past, it can be easy to succumb to &#8220;crying over spilt milk&#8221; without coming up with any real solutions. And nothing is worse for a team then to spend an hour in a room listening to each other bicker without any from of constructive activity&#8230; it will leave the team feeling down rather than up. Therefore aim to keep the retrospective on track to discuss the facts and observances and put emphasis that the past is only for concrete experience to draw ideas from. Problem solving activiities should be given more focus than pouring over historical data.</p>
</li>
<li>
    <strong>Activities Are Better</strong></p>
<p>I&#8217;ve sat in on hundreds of retrospectives, both with activities and without. On the outset, the no-nonsense, just talk about &#8220;what worked, what didn&#8217;t, what to improve&#8221; sounds good, simple, and to the point. However, my experience indicates these were amongst the lowest in terms of effectiveness. For starters I think it keeps people locked into a &#8220;this is a meeting&#8221; mentality and prevents thoughtful activity. Hell, one place I was at just put a word document up with headings titled &#8220;What Worked, What Didn&#8217;t Work, Action Items&#8221; in which Action Items were items the manager would enter into Rally Project Management and assign to people to work on. </p>
<p>I&#8217;ve found that activities often keep people engaged. In a meeting someone can get by by sitting in front of their laptop staring at the projector, with activities they&#8217;re constantly involved and not given time to disconnect. Additionally, I find the care freeness (or even fun) of activities helps break down some subtle communication barriers and makes people feel more free to speak their minds.
</li>
<li>
    <strong>Pick Only One Goal</strong></p>
<p>In theory picking multiple goals sounds great right? We&#8217;ve identified all these impedments and road blocks in our team,process, or environment that really need to be addressed. Why don&#8217;t we just tackle ALL of them rather than ignore them so we can work on removing all of them? This is long the same lines of the theory that maximizing Work-in-Progress maximizes effeciency and we all know that this often fails. LIkewise, by maximizing the number of goals that you have for an iteration you run the risk of context switching too much (not to mention all the focus you&#8217;ll already have towards the work you&#8217;re doing during the iteration) that the team will lose track and quite possibly not make any headway towards any of the goals listed.</p>
<p>Therefore, limit your Work-in-Progress as a team by selecting one (and only one) goal for the team to work towards during the next iteration. Maybe you&#8217;ll complete it in one day. Maybe you&#8217;ll complete it by the end of the iteration. Maybe you&#8217;ll make progress on it and discover in the next iteration that you uncovered deeper issues that need to be addressed.</p>
</li>
<li>
    <strong>Follow Up</strong></p>
<p>One of my biggest mistakes I ever made as a facilitator was failing to help the team follow up on goals&#8230; I assumed you could just let the team form a goal, work out how they would accomplish it, then just let them leave the room with it to schedule into their iteration and complete. Boy was I wrong. Working towards that goal can possibly even grow future retrospective topics, or like I mentioned previously uncover more serious or deeper issues the team needs to address. Failing to follow up can leave the team with a slew of goals they never complete or superficial goals that only kick some dirt over the issue. So it&#8217;s good to recap on the goal that was formed as part of establishing historical data near the beginning of the retrospective and let it help drive new ideas or delve deeper if it wasn&#8217;t completed. Often times you can find incomplete goals correlate to the iteration&#8230; for example if it wasn&#8217;t reached because there wasn&#8217;t enough time to work on it, maybe there&#8217;s not enough slack in the iteration?</p>
</li>
</ol>
<p>Again, out of all these, I&#8217;d have to say the most important is number one: the retrospective belongs to the team. This is an activity for the team by the team to help them inspect and adapt their process and shouldn&#8217;t be something enforced upon them or led by their manager. I ask all ScrumMasters out there to take special care if you facilitate the retrospective&#8230; in my opinion you really shouldn&#8217;t, but if there&#8217;s an absence of facilitation skills you might need to. If this is the case, remember your position&#8230; you are not a manager and therefore should not use this to dictate goals to the team. Stay as neutral as possible and at all costs do not allow yourself to become the owner of a solution, it needs to belong to the team and the team needs to make whatever needs to happen happen. If they need to schedule a task into the iteration, let them do it rather than do it for them. </p>
<p>Likewise, as a facilitator it is of utmost importance to remain neutral. When I facilitate teams I am on I try to refrain altogether from involvment. Also remember as facilitator it&#8217;s your job to facilitate the discussion, not drive it or offer solutions. I&#8217;ve facilitated a retrospective once where someone called on my expertese with fitnesse to help them solve a recurring fitnesse problem they were having. Sadly, I offered solutions. Looking back, I should have suggested that they come up with a goal, and if they needed help they could come seek me out when I had my developer hat on out on the floor. Further, I often find that when a facilitator from the team participates, they often drive the entire retrospective. Either their ideas lead for the rest to follow (even if they participate last) or the teams participation might fall on deaf ears. I once watched a friend of mine facilitate a retro for our team and draw out a huge value map&#8230; at each time two or three pople would say what they thought the cause was, then he&#8217;d say &#8220;well, I think it&#8217;s really this&#8230;&#8221; and write out his own idea in the map without taking into account what the team said. When I called him out on this he couldn&#8217;t believe he did that. <img src='http://blog.james-carr.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Overall, keep in mind the retrrospective is for finding solutions, not problems. Keep it on track, listen, and help guide the teams to introspect within themselves and find the solutions they need. Most importantly let them do the decision making and above all use the retrospective as their own activity to get better. <img src='http://blog.james-carr.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.james-carr.org/2010/02/28/retrospective-rules/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Scala specs + Mockito == Dead Sexy Examples</title>
		<link>http://blog.james-carr.org/2010/02/24/scala-specs-mockito-dead-sexy-examples/</link>
		<comments>http://blog.james-carr.org/2010/02/24/scala-specs-mockito-dead-sexy-examples/#comments</comments>
		<pubDate>Thu, 25 Feb 2010 03:51:14 +0000</pubDate>
		<dc:creator>James Carr</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.james-carr.org/?p=708</guid>
		<description><![CDATA[Been doing some fooling around with scala for a little bit tonight, and specifically been trying out the BDD framework specs. specs adds some nice stuff to mockito that makes it read like a natural language&#8230; and I like it!
Take this simple example of stubbing:

list.get(0) returns "yo"

Yep&#8230; that&#8217;s perfectly valid scala code&#8230; and totally awesome. [...]]]></description>
			<content:encoded><![CDATA[<p>Been doing some fooling around with scala for a little bit tonight, and specifically been trying out the BDD framework specs. specs adds some nice stuff to mockito that makes it read like a natural language&#8230; and I like it!</p>
<p>Take this simple example of stubbing:</p>
<pre name="code" class="java">
list.get(0) returns "yo"
</pre>
<p>Yep&#8230; that&#8217;s perfectly valid scala code&#8230; and totally awesome. <img src='http://blog.james-carr.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Want to verify that a method was invoked with a specific argument?</p>
<pre name="code" class="java">
notifier.send(order) was called
</pre>
<p>And again yes, that is a real line of code pulled from one of my examples. Take a look at more <a href="http://code.google.com/p/specs/wiki/UsingMockito">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.james-carr.org/2010/02/24/scala-specs-mockito-dead-sexy-examples/feed/</wfw:commentRss>
		</item>
		<item>
		<title>links for 2010-02-20</title>
		<link>http://blog.james-carr.org/2010/02/20/links-for-2010-02-20/</link>
		<comments>http://blog.james-carr.org/2010/02/20/links-for-2010-02-20/#comments</comments>
		<pubDate>Sat, 20 Feb 2010 13:01:08 +0000</pubDate>
		<dc:creator>James Carr</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.james-carr.org/2010/02/20/links-for-2010-02-20/</guid>
		<description><![CDATA[

Functional Testing Swing Applications with Frankenstein


]]></description>
			<content:encoded><![CDATA[<ul class="delicious">
<li>
<div class="delicious-link"><a href="http://www.slideshare.net/vivek_prahlad/functional-testing-swing-applications-with-frankenstein">Functional Testing Swing Applications with Frankenstein</a></div>
</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.james-carr.org/2010/02/20/links-for-2010-02-20/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Git SVN On Windows</title>
		<link>http://blog.james-carr.org/2010/02/19/git-svn-on-windows/</link>
		<comments>http://blog.james-carr.org/2010/02/19/git-svn-on-windows/#comments</comments>
		<pubDate>Fri, 19 Feb 2010 15:18:32 +0000</pubDate>
		<dc:creator>James Carr</dc:creator>
		
		<category><![CDATA[git]]></category>

		<category><![CDATA[svn]]></category>

		<guid isPermaLink="false">http://blog.james-carr.org/?p=703</guid>
		<description><![CDATA[At work we use svn and lately I&#8217;ve been trying git svn to maintain a local git repository that I can push to the svn server. So far, I love it! The best feature is being able to use git stash to &#8220;stash away&#8221; the current dirty workspace, work on something (say a defect), commit [...]]]></description>
			<content:encoded><![CDATA[<p>At work we use svn and lately I&#8217;ve been trying <a href="http://www.kernel.org/pub/software/scm/git/docs/git-svn.html">git svn</a> to maintain a local git repository that I can push to the svn server. So far, I love it! The best feature is being able to use <code><a href="http://www.kernel.org/pub/software/scm/git/docs/git-stash.html">git stash</a></code> to &#8220;stash away&#8221; the current dirty workspace, work on something (say a defect), commit and then call <code>git stash pop</code> to return to what I was working on.</p>
<p>Setup is quite easy&#8230; on windows, you need to install <a href="http://www.cygwin.com/">Cygwin</a> and under <strong>devel</strong> package select <strong>git</strong> and <strong>git-svn</strong>.</p>
<p>Once it&#8217;s installed, just follow the following steps to get started:</p>
<ol>
<li>git svn init http://path/to/svn/project/trunk projectname</li>
<li>cd projectname</li>
<li>git svn fetch -rREVISION (most likely this will be git svn fetch -rHEAD</li>
<li>git svn rebase</li>
</ol>
<p>That&#8217;s it&#8230; all the usual git commands will work, and when you&#8217;re ready to commit just type <strong>git svn dcommit</strong></p>
<p>My only worry is that I have yet to have a conflict, and I&#8217;m afraid I&#8217;ll be hosed without my usual eclipse conflict compare. <img src='http://blog.james-carr.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.james-carr.org/2010/02/19/git-svn-on-windows/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Don&#8217;t Hit the Ground Running</title>
		<link>http://blog.james-carr.org/2010/02/18/dont-hit-the-ground-running/</link>
		<comments>http://blog.james-carr.org/2010/02/18/dont-hit-the-ground-running/#comments</comments>
		<pubDate>Thu, 18 Feb 2010 05:51:01 +0000</pubDate>
		<dc:creator>James Carr</dc:creator>
		
		<category><![CDATA[Agile Software Development]]></category>

		<guid isPermaLink="false">http://blog.james-carr.org/?p=699</guid>
		<description><![CDATA[
When it comes to working in the software industry, I think I can best sum up what a majority of developers and teams do by simply quoting Pink Floyd from the song Breathe: 
Run, rabbit run
Dig that hole, forget the sun
And when at last the work is done
Don&#8217;t sit down
It&#8217;s time to dig another one [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://blog.james-carr.org/wp-content/uploads/2010/02/ground.jpg" alt="" title="ground" width="500" height="375" class="aligncenter size-full wp-image-701" style="display: block; margin: 5px auto" /><br />
When it comes to working in the software industry, I think I can best sum up what a majority of developers and teams do by simply quoting Pink Floyd from the song Breathe: </p>
<blockquote><p>Run, rabbit run<br />
Dig that hole, forget the sun<br />
And when at last the work is done<br />
Don&#8217;t sit down<br />
It&#8217;s time to dig another one </p></blockquote>
<p>I think that verse goes quite well with what I kind of view as the default behavior of developers when they stand beneath an overwhelming amount of work that is ahead of them on a project. It&#8217;s quite easy to &#8220;hit the ground running&#8221; and work as hard and quickly as possible, kind of brute forcing their way through it. The end result can truly mean forgetting the sun and leaving all manner of holes in the codebase with  a rushed, &#8220;the sky is falling&#8221; feeling continuously looming over them while working on multiple tasks at once.</p>
<p><a href="http://industrialxp.org/sustainablePace.html">Sustainable pace</a> is very important because if you don&#8217;t adhere to it you&#8217;ll often find quality will suffer. Working nonstop will burn you out in the long run which can be seen either by silly defects or sporadic performance. Additionally, by maintaining a pace you&#8217;ll also have a better opportunity to manage your relationship with your customer and enjoy a rich communication channel with them rather than succumbing to rushed, last minute conversations over instant message in the eleventh hour with them waiting for each new deploy to &#8220;see if you fixed it&#8221; (and believe me, being in that situation can really suck). </p>
<p>Add <a href="http://www.amazon.com/exec/obidos/tg/detail/-/0767907698/qid=1057641371/sr=8-1/ref=sr_8_1/104-1377909-2055941?v=glance&#038;s=books&#038;n=507846">slack</a> to your iterations, estimate work before committing to it and keep your work in progress limited rather than trying to tackle 900 things at once. Only do what you&#8217;ve committed to for the iteration, and if you get everything done use the slack time to improve the environment or even improve relations with your customer by going over the existing and planned features with them. Don&#8217;t take on the next iteration&#8217;s work early, instead schedule stories to work on during slack time that can make future work simpler. <img src='http://blog.james-carr.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<blockquote><p>
For long you live and high you fly<br />
But only if you ride the tide<br />
And balanced on the biggest wave<br />
You race towards an early grave
</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://blog.james-carr.org/2010/02/18/dont-hit-the-ground-running/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Running EasyB Specs From Gradle</title>
		<link>http://blog.james-carr.org/2010/02/12/running-easyb-specs-from-gradle/</link>
		<comments>http://blog.james-carr.org/2010/02/12/running-easyb-specs-from-gradle/#comments</comments>
		<pubDate>Fri, 12 Feb 2010 05:38:13 +0000</pubDate>
		<dc:creator>James Carr</dc:creator>
		
		<category><![CDATA[BDD]]></category>

		<category><![CDATA[gradle]]></category>

		<category><![CDATA[groovy]]></category>

		<guid isPermaLink="false">http://blog.james-carr.org/?p=691</guid>
		<description><![CDATA[Although the cookbook includes an example of using the easyb ant task to run specs and produce reports, I thought I&#8217;d try my hand at writing a task to manually run easyb specifications from the commandline. Here&#8217;s the result:

task spec 
               [...]]]></description>
			<content:encoded><![CDATA[<p>Although the cookbook includes an example of using the <a href="http://www.easyb.org/">easyb</a> ant task to run specs and produce reports, I thought I&#8217;d try my hand at writing a task to manually run easyb specifications from the commandline. Here&#8217;s the result:</p>
<pre name="code" class="java">
task spec <<{
    ant.java(classname:'org.easyb.BehaviorRunner', fork:false,
      classpath: "${sourceSets.test.runtimeClasspath.asPath}")  {
        sourceSets.test.java.srcDirs.each { testDir ->
            testDir.eachDirRecurse { dir ->
                dir.eachFileMatch(~/.*\.specification/){spec->
                    arg(value:spec.absolutePath)
                }
            }
        }
    }
}
</pre>
<p>Now I can run &#8220;gradle spec&#8221; from the commandline to write all my easyb specs. <a href="http://code.google.com/p/spock/">Spock</a> is next.</p>
<p>I&#8217;ll admit I&#8217;ve just recently gotten back into groovy, so I&#8217;m still kind of a noob. I keep feeling like groovy has a better way to search for file patterns recursively. <img src='http://blog.james-carr.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.james-carr.org/2010/02/12/running-easyb-specs-from-gradle/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
