<?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>thekua.com@work</title>
	<atom:link href="http://www.thekua.com/atwork/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.thekua.com/atwork</link>
	<description>thekua&#039;s reflections on work related topics</description>
	<lastBuildDate>Mon, 30 Aug 2010 13:14:08 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Freedom from Command and Control</title>
		<link>http://www.thekua.com/atwork/2010/08/freedom-from-command-and-control/</link>
		<comments>http://www.thekua.com/atwork/2010/08/freedom-from-command-and-control/#comments</comments>
		<pubDate>Mon, 30 Aug 2010 13:14:08 +0000</pubDate>
		<dc:creator>Patrick</dc:creator>
				<category><![CDATA[Books]]></category>

		<guid isPermaLink="false">http://www.thekua.com/atwork/?p=1068</guid>
		<description><![CDATA[We&#8217;re fortunate to be having John Seddon keynote at our internal conference in a few weeks so I wanted to read some of his material in advance. I bought the Freedom From Command and Control book out of interest to see how he applied systems thinking to the service industry. Depending on what your background [...]]]></description>
			<content:encoded><![CDATA[<p>We&#8217;re fortunate to be having <a href="http://www.systemsthinking.co.uk/home.asp">John Seddon</a> keynote at our internal conference in a few weeks so I wanted to read some of his material in advance. I bought the <a href="http://www.amazon.co.uk/Freedom-Command-Control-Better-Make/dp/0954618300/ref=sr_1_1?ie=UTF8&#038;s=books&#038;qid=1282570688&#038;sr=8-1">Freedom From Command and Control</a> book out of interest to see how he applied systems thinking to the service industry. </p>
<p>Depending on what your background reading has been, it may or may not be heavy going. I really appreciated the background I&#8217;d done in reading about lean thinking, systems thinking and other respects so I found most of my interest seeing how he viewed the application of these tools, rather than the description of the tools themselves.</p>
<p>Despite some warnings from a number of people, I found the book easy to digest &#8211; made all the more entertaining by the repetitive (in a good way) and controversial statements thrown in the book. I figure Seddon wrote them in to intentionally jar your traditional manager into thinking differently. </p>
<p>My biggest takeaways follow:</p>
<p><strong>Stop creating failure demand</strong> &#8211; Lean thinking looks towards the end-to-end flow of value &#8211; starting from customer demand. Seddon articulates on focusing on the idea of shaping the demand and service organisations often get to choose what sort of demand they have (to a degree). More often than not, organisations instead flex their capacity to meet all demand &#8211; not really spending the time to think about whether or the demand they have is what they want or not. </p>
<p>For me, this links into another view such that organisations need to address bigger root causes, improving quality and experience for customers to stop generating failure demand. I see these ideas equally apply in a software context &#8211; many of the practices we adopt is intended to build quality in from the start so the development effort can be focused on helping the flow of business ideas, rather than spending time on fixing &#8220;defects&#8221; for customers that should not have reached them in the first place. Similarly, properly addressing user experience early enough will help to prevent failure demand. </p>
<p><strong>Reaffirmation that arbitrary targets are bad</strong> &#8211; Seddon isn&#8217;t fearful to state his view around the idea that setting targets are bad &#8211; in that, you get what you measure and the targets are often not really related to the purpose of the system. This seems to sit well with the discoveries of the <a href="http://www.bbrt.org/">Beyond Budgeting Movement</a> who&#8217;ve realised you cannot use the same instruments for measurement, planning and setting goals (decouple them!) </p>
<p>I found interestingly Seddon still explain to people the importance of measurement, just not arbitrary ones that managemet set and then create systems around. </p>
<p><strong>Using Capability Charts to map demands</strong> &#8211; Seddon describes the capability chart as a way to visualise the way demand is being generated. Its focus on visualisation is a way of helping people to see natural fluctuations in a system and a way of identified trends not easily seen when boiled down to a matrix of numbers. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.thekua.com/atwork/2010/08/freedom-from-command-and-control/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Powers of Why</title>
		<link>http://www.thekua.com/atwork/2010/08/powers-of-why/</link>
		<comments>http://www.thekua.com/atwork/2010/08/powers-of-why/#comments</comments>
		<pubDate>Sat, 14 Aug 2010 08:39:59 +0000</pubDate>
		<dc:creator>Patrick</dc:creator>
				<category><![CDATA[Agile]]></category>
		<category><![CDATA[Learning]]></category>
		<category><![CDATA[Philosophy]]></category>

		<guid isPermaLink="false">http://www.thekua.com/atwork/?p=1065</guid>
		<description><![CDATA[Although I can&#8217;t say I&#8217;ve been part of many other methodology movements as closely, one of the greatest things I appreciate about the agile community is to explain why things work the way they do. Back at university, when I remember RUP being taught, none of the books or the leaders of the community explained [...]]]></description>
			<content:encoded><![CDATA[<p>Although I can&#8217;t say I&#8217;ve been part of many other methodology movements as closely, one of the greatest things I appreciate about the agile community is to explain why things work the way they do. </p>
<p>Back at university, when I remember RUP being taught, none of the books or the leaders of the community explained <em>why</em> they suggested you do things, other than, &#8220;<em>This is how you do it</em>.&#8221; </p>
<p>I&#8217;ll admit that as more and more people call themselves &#8220;Agile&#8221;, a key characteristic for the community leaders and many of its respected participants is their deep understanding for <em>why</em> we do things. Great examples of this is the community&#8217;s willingness to continually question practices adding value and exploring new practices to add more value. Evolutions of TDD to BDD, the introduction of explicit limits for <a href="http://www.limitedwipsociety.org/">Work in Progress</a>, and levels of automated testing to bring feedback early as possible. </p>
<p>Another great example of this cultural phenomenon is the community&#8217;s willingness to explain how situations arise. The most recent example was <a href="http://agilecoach.typepad.com/">Rachel Davies</a> <a href="http://agilecoach.typepad.com/agile-coaching/2010/08/the-gordon-pask-award.html">explanation</a> of the <a href="http://www.agilealliance.org/show/1656">Gordon Pask</a> award, but stretches as far back as to the origins of the <a href="http://agilemanifesto.org/">Agile Manifesto</a> written by signatories such as <a href="http://martinfowler.com/articles/newMethodology.html">Martin Fowler</a>, <a href="http://pragdave.pragprog.com/pragdave/2007/02/some_agile_hist.html">Dave Thomas</a> and <a href="http://blog.objectmentor.com/articles/2007/07/10/the-founding-of-the-agile-alliance">Uncle Bob Martin</a>. </p>
<p>It&#8217;s easy to criticise situations when they don&#8217;t work or when you dislike something, yet I think we need to appreciate those willing to not only try new things, but help others understand why they tried those new things. Understanding the intent behind actions lets others attempt new ways of achieving the same goal given the same, or even different circumstances. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.thekua.com/atwork/2010/08/powers-of-why/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Just one more thing</title>
		<link>http://www.thekua.com/atwork/2010/08/just-one-more-thing/</link>
		<comments>http://www.thekua.com/atwork/2010/08/just-one-more-thing/#comments</comments>
		<pubDate>Mon, 09 Aug 2010 08:03:40 +0000</pubDate>
		<dc:creator>Patrick</dc:creator>
				<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://www.thekua.com/atwork/?p=1058</guid>
		<description><![CDATA[As a developer, there&#8217;s a tension between doing things consistently and knowing when to make change. Consistency generally means it&#8217;s easier to understand &#8211; there&#8217;s only one pattern for people to learn and then the next time they see something like it they have a pretty good guess at how it&#8217;s going to work. People [...]]]></description>
			<content:encoded><![CDATA[<p>As a developer, there&#8217;s a tension between doing things consistently and knowing when to make change. Consistency generally means it&#8217;s easier to understand &#8211; there&#8217;s only one pattern for people to learn and then the next time they see something like it they have a pretty good guess at how it&#8217;s going to work. </p>
<p>People also generally learn by copying &#8211; and therein lies the problem for inexperienced developers. They look at what&#8217;s there, figure it&#8217;s better to follow the established pattern and then to add <em>just one more thing</em>. Generally it doesn&#8217;t really matter what it is &#8211; another branch to a if statement, another parameter to a method, another function to class, or another (ugh!) static call. </p>
<p>Responsible, experienced developers know where the inflection point is &#8211; where the right thing to do is to refactor the code, and to avoid adding <em>just one more thing</em>. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.thekua.com/atwork/2010/08/just-one-more-thing/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Selectable text with SmartGWT</title>
		<link>http://www.thekua.com/atwork/2010/07/selectable-text-with-smartgwt/</link>
		<comments>http://www.thekua.com/atwork/2010/07/selectable-text-with-smartgwt/#comments</comments>
		<pubDate>Tue, 27 Jul 2010 06:42:37 +0000</pubDate>
		<dc:creator>Patrick</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://www.thekua.com/atwork/?p=1030</guid>
		<description><![CDATA[One of the interesting side effects of using SmartGWT is losing the ability for people to select text on the page. SmartGWT has some pretty nifty widgets and the one to use when you want text selectable is HTMLPane. Be careful not to confuse this with GWT&#8217;s own HTMLPanel]]></description>
			<content:encoded><![CDATA[<p>One of the interesting side effects of using <a href="http://code.google.com/p/smartgwt/">SmartGWT</a> is losing the ability for people to select text on the page. SmartGWT has some pretty nifty widgets and the one to use when you want text selectable is <a href="http://www.smartclient.com/smartgwt/javadoc/com/smartgwt/client/widgets/HTMLPane.html">HTMLPane</a>. Be careful not to confuse this with GWT&#8217;s own <a href="http://google-web-toolkit.googlecode.com/svn/javadoc/1.5/com/google/gwt/user/client/ui/HTMLPanel.html">HTMLPanel</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.thekua.com/atwork/2010/07/selectable-text-with-smartgwt/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Agile Coaches Gathering UK 2010</title>
		<link>http://www.thekua.com/atwork/2010/07/agile-coaches-gathering-uk-2010/</link>
		<comments>http://www.thekua.com/atwork/2010/07/agile-coaches-gathering-uk-2010/#comments</comments>
		<pubDate>Mon, 26 Jul 2010 07:37:51 +0000</pubDate>
		<dc:creator>Patrick</dc:creator>
				<category><![CDATA[Agile]]></category>
		<category><![CDATA[Coaching]]></category>
		<category><![CDATA[Conferences]]></category>
		<category><![CDATA[Learning]]></category>

		<guid isPermaLink="false">http://www.thekua.com/atwork/?p=1033</guid>
		<description><![CDATA[Last year, I missed the announcement, and therefore the Agile Coaches Gathering UK organised by Rachel Davies (author of Agile Coaching). Fortunately I happened to join twitter late last year and saw the announcement for this year&#8217;s gathering shortly after its announcement. I bought a ticket as soon as I could. It&#8217;s a good thing [...]]]></description>
			<content:encoded><![CDATA[<p>Last year, I missed the announcement, and therefore the <a href="http://www.agilecoachesgathering.org/wiki/index.php/">Agile Coaches Gathering UK</a> organised by <a href="http://www.agilexp.com/">Rachel Davies</a> (author of <a href="http://pragprog.com/titles/sdcoach/agile-coaching">Agile Coaching</a>). Fortunately I happened to join <a href="http://twitter.com/patkua">twitter</a> late last year and saw the announcement for this year&#8217;s gathering shortly after its announcement. I bought a ticket as soon as I could. It&#8217;s a good thing too since I think I bought one of the last few tickets for a restricted sixty person gathering. </p>
<p>This year&#8217;s gathering, held at historic <a href="http://www.bletchleypark.org.uk/">Bletchley Park</a> spanned a day and a half with Friday evening opening the Open Space format to be used on Saturday. <a href="http://www.bletchleypark.org.uk/">Bletchley Park</a> ended up an awesome venue, and the open space format worked well with a number of spaces located outside. Given the UK actually had a summer this year, it turned out very nicely. </p>
<div style="text-align:center"><img src="http://www.thekua.com/atwork/wp-content/uploads/2010/07/BletchlyParkMansion.jpg" alt="Bletchley Park Mansion" width="550" height="412"/></div>
<p>One of my favourite things about this sort of gathering is getting a whole bunch of people working in many different environments, contexts and getting them to share ideas and approaches about what works for them. We had a mixture of experienced coaches and coaches new to the role yet there was something about being there on a Saturday and a passion for it that brought people together. What follows are my notes from each of the sessions.</p>
<p><strong>Experiences from the coaching discipline (not just agile practices)</strong><br />
My first session of the day explored other coach&#8217;s experiences working or exploring what coaches from other disciplines do. One person shared their experience working with a swimming coach and how they helped them get better at their practice. </p>
<p>This theme, looking at other coaching disciplines to see what they do, definitely ran throughout the day although I&#8217;m cautious of taking the role too literally. We discussed this during this session as most people being coached (life coaching, sports coaching, etc) tend to do so on a voluntary basis. Working as agile coaches for organisations, not everyone is necessarily there on a voluntary basis. </p>
<p>Another aspect that, I think differs, is that most coaches aren&#8217;t necessarily experts in the field they&#8217;re coaching in. For instance, sports coaches are often not people who&#8217;ve been the most successful in the world. In my experiences, agile coaches are really there to act as shepherds to help people get the most out of thinking and working with agile practices. Unlike other coaches, this often requires a level of mastery than what most other coaches have in their field. I&#8217;ve seen coaches act dangerously with not enough experience with agile practices. </p>
<p>I still think there is value in looking outside of our discipline for ideas and methods of working, yet conscious of the appropriate context to use them in (and there is always a context). </p>
<p><strong>Presentation is not facilitation</strong><br />
<a href="http://agilethinking.net/">Tobias Mayer</a> is really well known in the Scrum community, and proposed a session to rant about the way that most training is done. I think there are plenty of examples where <a href="http://en.wikipedia.org/wiki/Death_by_PowerPoint">Death by Powerpoint</a> is interpreted as effective training and whilst I agree with the premise, I&#8217;m not sure I agree with the end conclusion. I think presentations have a place, just maybe not in training. I also don&#8217;t necessarily think that  training is solely about trying to trigger a complete mindshift in people.  </p>
<p><strong>When a coach gives up</strong><br />
I met <a href="http://www.xqa.com.ar/visualmanagement/">Xavier Quesada Allue</a> at <a href="http://www.xp2009.org/">XP2009</a> and again at <a href="http://agile2009.agilealliance.org/">Agile2009</a> so was interested to hear the premise around is it okay for coaches to give up and when to give up. This was one of those sessions located in the sun and some interesting stories about dealing with difficult teams or organisations where it doesn&#8217;t make sense to try. </p>
<p>We didn&#8217;t attempt to clarify, at the start of this session, what giving up meant to everyone. This probably made it difficult to get an agreement about when or why to give up, although we heard some very interesting stories. </p>
<p>My take on this, is that coaches end up needing to prioritise their work, just like everyone else and thus, not everything is going to get taken care of at the same time. Working with people also means you cannot predict how quickly people will move, or how they will react, therefore there is no way that you can always set completely achievable goals (it relies on others, not just yourself to make them happen). As a result, as a coach, you need to be comfortable with things not always going as planned. </p>
<p>I think that coaches also have the benefit of seeing the system that is driving a lot of the behaviour for the people on teams and unless something is done with that, then they will continue to behave as they always have. Both of these take time. </p>
<p><strong>Game sense approach (what I learned coaching rugby)</strong><br />
Another inter-disciplinary coaching session that I attended briefly although a very loud bus made it difficult to concentrate and I ended up leaving because I had difficulty participating during this session.</p>
<p><strong>Double loop learning + Defensive routines</strong><br />
If you ever get a chance to listen to <a href="http://twitter.com/benjaminm">Benjamin Mitchell</a> in a safe environment, he&#8217;s quite the riot. If anything, perhaps it&#8217;s his self-deprecating and admitting his own faults and looking back at mistakes amidst his jokes that makes it so warming. </p>
<p>During this session, he talked about a book he&#8217;d been reading discussing how people react, and talking about different &#8220;models&#8221; in which the author classified people and using that to be able to project behaviour in different circumstances. </p>
<p>Once again, Benjamin reminded me of some key points I&#8217;ve learned over the years like:</p>
<ul>
<li>What you say and what people hear are completely different</li>
<li>Avoid positional or solutions-based negotiation. Lay your interests on the table and you&#8217;ll often end up in a better position. </li>
</ul>
<p>I&#8217;m not really clear about what double loop learning is, so I&#8217;m going to have to add that to my to do list as well. </p>
<div style="text-align:center"><img src="http://www.thekua.com/atwork/wp-content/uploads/2010/07/Schedule.jpg" alt="Open space schedule" width="550" height="412"/></div>
<p><strong>New books</strong></p>
<ul>
<li><a href="http://www.amazon.co.uk/Training-Back-Room-Aside-Learn/dp/0787996629/ref=sr_1_1?ie=UTF8&#038;s=books&#038;qid=1279963256&#038;sr=8-1">Training from the back of the room</a></li>
<li><a href="http://www.amazon.co.uk/Skilled-Facilitator-Comprehensive-Consultants-Facilitators/dp/0787947237/ref=sr_1_2?ie=UTF8&#038;s=books&#038;qid=1279963321&#038;sr=1-2">The Skilled facilitator</a></li>
<li><a href="http://www.amazon.co.uk/Situational-Leader-Pfeiffer/dp/0446513423/ref=sr_1_1?ie=UTF8&#038;s=books&#038;qid=1279963371&#038;sr=1-1">Situational leader</a></li>
<li><a href="http://www.amazon.co.uk/Discussing-Undiscussable-Overcoming-Jossey-Bass-Management/dp/0787986321/ref=sr_1_1?ie=UTF8&#038;s=books&#038;qid=1279964230&#038;sr=1-1">Discussing the Undiscussable</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.thekua.com/atwork/2010/07/agile-coaches-gathering-uk-2010/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Presented at Universite du Si</title>
		<link>http://www.thekua.com/atwork/2010/07/presented-at-universite-du-si/</link>
		<comments>http://www.thekua.com/atwork/2010/07/presented-at-universite-du-si/#comments</comments>
		<pubDate>Tue, 20 Jul 2010 20:40:11 +0000</pubDate>
		<dc:creator>Patrick</dc:creator>
				<category><![CDATA[Conferences]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Learning]]></category>
		<category><![CDATA[Management]]></category>
		<category><![CDATA[Leadership]]></category>

		<guid isPermaLink="false">http://www.thekua.com/atwork/?p=1026</guid>
		<description><![CDATA[It&#8217;s almost three weeks ago I presented at USI2010 (Universite du SI). Organised wonderfully by the Octo consulting company, the conference&#8217;s tag line, &#8220;The Annual meeting of Geeks and Bosses&#8221; captures a really good essence. Mix over conferences and events are important to ensure that communities don&#8217;t silo themselves in ways that prohibit their growth. [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s almost three weeks ago I presented at USI2010 (<a href="http://www.universite-du-si.com/">Universite du SI</a>). Organised wonderfully by the Octo consulting company, the conference&#8217;s tag line, &#8220;The Annual meeting of Geeks and Bosses&#8221; captures a really good essence. Mix over conferences and events are important to ensure that communities don&#8217;t silo themselves in ways that prohibit their growth. The complexity and chaos community clearly demonstrated the value of idea cross-pollination between between professions with their think tank, the <a href="v">Santa Fe Institute</a>. This event is definitely the seeds of something good like this. </p>
<p>To add to the mix, I had the opportunity to present my session on <a href="http://www.thekua.com/atwork/presentations-and-papers/"><strong>Building the Next Generation of Technical Leaders</strong></a> here. This is the first conference I&#8217;ve been to where the majority of the session were not in English. This made me think a lot about how <a href="http://en.wikipedia.org/wiki/Meme">memes</a> spread, and how quickly this affects how adaptable a community is. </p>
<p>I think it is wonderful for this conference to invite speakers from non-French speaking backgrounds, as I hope that it helped seed some more ideas into a community where translating text into a local language hinders the uptake of new ideas. I know that it is much more difficult for people to understand a language other than their native tongue and I can only admire those French people willing to strike up a conversation with me during the conference where my study of the French language is what tourist books teach. </p>
<p>The conference was very well run and although I would like to comment much more on the presentations since most of them were in French. If you understand French, and you find yourself near Paris, then I think it&#8217;s an excellent one to attend. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.thekua.com/atwork/2010/07/presented-at-universite-du-si/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Downloading specific files through Maven</title>
		<link>http://www.thekua.com/atwork/2010/07/downloading-specific-files-through-maven/</link>
		<comments>http://www.thekua.com/atwork/2010/07/downloading-specific-files-through-maven/#comments</comments>
		<pubDate>Thu, 15 Jul 2010 21:41:01 +0000</pubDate>
		<dc:creator>Patrick</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Maven]]></category>

		<guid isPermaLink="false">http://www.thekua.com/atwork/?p=1011</guid>
		<description><![CDATA[In ant, it&#8217;s pretty easy to use the ant task get to download something for you. Apparently it&#8217;s not something most maven users do (probably because they end up doing something like an ant=run). Even though maven has in-built web communications (this is how it often is found downloading the interweb), it wasn&#8217;t easy finding [...]]]></description>
			<content:encoded><![CDATA[<p>In <a href="http://ant.apache.org/">ant</a>, it&#8217;s pretty easy to use the ant task <a href="http://ant.apache.org/manual/Tasks/get.html">get</a> to download something for you. Apparently it&#8217;s not something most maven users do (probably because they end up doing something like an <a href="http://maven.apache.org/plugins/maven-antrun-plugin/">ant=run</a>). Even though maven has in-built web communications (this is how it often is found downloading the interweb), it wasn&#8217;t easy finding out how to download something not in a maven repository (without having to deploy artefacts into a maven repository which I understand is the &#8220;maven way&#8221;). </p>
<p>Anyway, after sometime, here&#8217;s the plugin configuration I used to do the download. Note that we&#8217;re using Maven 2.1.0 (and it could have changed in the latest version). </p>
<p>The following plugin will download <code><strong>configuration.jar</strong></code> and <code><strong>artifact.jar</strong></code> from the web directory <code><strong>http://host/pathToArtifact</strong></code> and drop it into a folder called <code><strong>target/downloadedFiles</strong></code>. This does this at the start of the maven lifecycle (note the phase it is attached to below).</p>
<pre class="brush: xml;">&lt;plugin&gt;
	&lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;
	&lt;artifactId&gt;wagon-maven-plugin&lt;/artifactId&gt;
	&lt;version&gt;1.0-beta-3&lt;/version&gt;
	&lt;executions&gt;
		&lt;execution&gt;
			&lt;phase&gt;validate&lt;/phase&gt;
			&lt;goals&gt;
				&lt;goal&gt;download&lt;/goal&gt;
			&lt;/goals&gt;
			&lt;configuration&gt;
				&lt;url&gt;http://host/pathToArtifact&lt;/url&gt;
				&lt;includes&gt;
					configuration.jar, artifact.jar
				&lt;/includes&gt;
				&lt;toDir&gt;target/downloadedFiles&lt;/toDir&gt;
			&lt;/configuration&gt;
		&lt;/execution&gt;
	&lt;/executions&gt;
&lt;/plugin&gt;</pre>
<p>Some limitations is that it won&#8217;t fail if it can download some of the artifacts and not others. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.thekua.com/atwork/2010/07/downloading-specific-files-through-maven/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Executable War in Maven</title>
		<link>http://www.thekua.com/atwork/2010/07/executable-war-in-maven/</link>
		<comments>http://www.thekua.com/atwork/2010/07/executable-war-in-maven/#comments</comments>
		<pubDate>Wed, 14 Jul 2010 21:30:21 +0000</pubDate>
		<dc:creator>Patrick</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Maven]]></category>

		<guid isPermaLink="false">http://www.thekua.com/atwork/?p=1015</guid>
		<description><![CDATA[One of the many issues I had (have) with Maven is finding out how to use an appropriate plugin. The site documentation is normally pretty obscure, and examples are sparse. One of the activites we needed to do recently is to turn our war artifact into something that would run standalone. I&#8217;d normally use something [...]]]></description>
			<content:encoded><![CDATA[<p>One of the many issues I had (have) with Maven is finding out how to use an appropriate plugin. The site documentation is normally pretty obscure, and examples are sparse. One of the activites we needed to do recently is to turn our <a href="http://java.sun.com/j2ee/tutorial/1_3-fcs/doc/WCC3.html">war</a> artifact into something that would run standalone. I&#8217;d normally use something like <a href="http://www.eclipse.org/jetty/">jetty</a> for this but I didn&#8217;t find a way to easy bundle jetty and refer to the war within the same classpath (and still have things work). </p>
<p>Another tool I stumbled across was <a href="http://winstone.sourceforge.net/">winstone</a> (<a href="http://hudson-ci.org/">Hudson</a> uses this beast). Wrapping this up seemed pretty easy enough. Note that the configuration below is used to start a war that won&#8217;t have dynamic JSP compilation. If you do, you can add a <code>useJasper=true</code> configuration and add the appropriate maven dependencies for jasper to ensure they&#8217;re available. </p>
<p>The result of this plugin will effectively build an executable jar, that you simply start up. </p>
<p>Need to add these dependencies:</p>
<p>Given that your project is a war package as well</p>
<pre class="brush: xml;">&lt;plugin&gt;
	&lt;groupId&gt;net.sf.alchim&lt;/groupId&gt;
	&lt;artifactId&gt;winstone-maven-plugin&lt;/artifactId&gt;
	&lt;executions&gt;
		&lt;execution&gt;
			&lt;goals&gt;
				&lt;goal&gt;embed&lt;/goal&gt;
			&lt;/goals&gt;
			&lt;phase&gt;package&lt;/phase&gt;
		&lt;/execution&gt;
	&lt;/executions&gt;
	&lt;configuration&gt;
		&lt;filename&gt;executableWebApplication.jar&lt;/filename&gt;
	&lt;/configuration&gt;
&lt;/plugin&gt;
</pre>
<p>You will find this artifact built in your standard <code>target</code> directly. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.thekua.com/atwork/2010/07/executable-war-in-maven/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Who&#8217;s calling you?</title>
		<link>http://www.thekua.com/atwork/2010/06/whos-calling-you/</link>
		<comments>http://www.thekua.com/atwork/2010/06/whos-calling-you/#comments</comments>
		<pubDate>Tue, 15 Jun 2010 05:18:13 +0000</pubDate>
		<dc:creator>Patrick</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://www.thekua.com/atwork/?p=1001</guid>
		<description><![CDATA[I&#8217;ve been working on some performance testing profiling and in trying to diagnose a fix, we found one particular method was being called constantly. Searching for usages (static analysis) tells me who could possibly call the method we were inspecting, but we were interested in the runtime invocations. Since this was quite deep in the [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been working on some performance testing profiling and in trying to diagnose a fix, we found one particular method was being called constantly. Searching for usages (static analysis) tells me who could possibly call the method we were inspecting, but we were interested in the runtime invocations. Since this was quite deep in the code, I used the power of dynamic proxies to do this. </p>
<p>I&#8217;ve rebuilt the code here:</p>
<p><strong>Source:</strong></p>
<pre class="brush: java;">package com.thekua.examples;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;
import java.lang.reflect.Proxy;

public class TraceBackProxy implements InvocationHandler {
    public static interface CallingMethodListener {
        void notify(String method);
    }

    private final Object wrapped;
    private final CallingMethodListener listener;

    private TraceBackProxy(Object wrapped, CallingMethodListener context) {
        this.wrapped = wrapped;
        this.listener = context;
    }

    public static Object wrap(Object target, CallingMethodListener context) {
        Class targetClass = target.getClass();
        return Proxy.newProxyInstance(targetClass.getClassLoader(),
                targetClass.getInterfaces(), new TraceBackProxy(target, context));
    }

    @Override
    public Object invoke(Object proxy, Method method, Object[] arguments) throws Throwable {
        String callingMethod = findCallingMethod(method);
        listener.notify(callingMethod);
        return method.invoke(wrapped, arguments);
    }

    private String findCallingMethod(Method method) {
        try {
            throw new RuntimeException();
        } catch(RuntimeException e) {
            StackTraceElement[] elements = e.getStackTrace();
            int callingMethodIndex = findIndexOfMethod(elements, method) + 1; // caller is next one down in stack
            return elements[callingMethodIndex].getMethodName();
        }
    }

    private int findIndexOfMethod(StackTraceElement[] elements, Method method) {
        for (int i = 0; i &lt; elements.length; i++) {
            StackTraceElement current = elements[i];
            // does not cope with overloaded or duplicate method names
            if (current.getMethodName().equals(method.getName())) {
                return i;
            }
        }
        throw new IllegalStateException(&quot;Something went wrong and couldn't find method in stacktrace&quot;);
    }
}</pre>
<p><strong>Test:</strong></p>
<pre class="brush: java;">package com.thekua.examples;

import org.junit.Test;

import static org.hamcrest.core.Is.is;
import static org.hamcrest.core.IsEqual.equalTo;
import static org.junit.Assert.assertThat;

public class TraceBackProxyTest {

    public static interface SomeRole {
        void doStuff();
    }

    public static class TestSubject implements SomeRole {
        public boolean called;

        @Override
        public void doStuff() {
            called = true;
        }
    }

    @Test
    public void shouldStillDelegate() {
        TestSubject target = new TestSubject();
        SomeRole action = (SomeRole)TraceBackProxy.wrap(target, new TestOnlyListener());

        action.doStuff();

        assertThat(target.called, is(true));
    }

    public static class TestOnlyListener implements TraceBackProxy.CallingMethodListener {
        String lastCalledMethod;

        @Override
        public void notify(String method) {
            lastCalledMethod = method;
        }
    }

    @Test
    public void shouldFindCallingMethod() {
        TestOnlyListener listener = new TestOnlyListener();
        SomeRole action = (SomeRole) TraceBackProxy.wrap(new TestSubject(), listener);

        action.doStuff();

        assertThat(listener.lastCalledMethod, equalTo(&quot;shouldFindCallingMethod&quot;));
    }
}</pre>
<p>Note that your mileage may vary since it probably won&#8217;t work when you have duplicate method names across classes, or overloaded methods on the same. It proved useful for me and hope it helps you. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.thekua.com/atwork/2010/06/whos-calling-you/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Refactoring: Convert static into instance</title>
		<link>http://www.thekua.com/atwork/2010/06/refactoring-convert-static-into-instance/</link>
		<comments>http://www.thekua.com/atwork/2010/06/refactoring-convert-static-into-instance/#comments</comments>
		<pubDate>Sun, 13 Jun 2010 11:59:22 +0000</pubDate>
		<dc:creator>Patrick</dc:creator>
				<category><![CDATA[Agile]]></category>
		<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://www.thekua.com/atwork/?p=994</guid>
		<description><![CDATA[You want to ensure reusing functionality does not have any other side effects in other places that might be using it. Make the static instance explicit by introduce a static instance encapsulating any static state and delegate items to it. Use the instance. Imagine you had this sort of code (below) and there&#8217;s dozens of [...]]]></description>
			<content:encoded><![CDATA[<p><em>You want to ensure reusing functionality does not have any other side effects in other places that might be using it.</em></p>
<p><strong>Make the static instance explicit by introduce a static instance encapsulating any static state and delegate items to it. Use the instance.</strong></p>
<p>Imagine you had this sort of code (below) and there&#8217;s dozens of use throughout a codebase. Static imports make it easy for people to simply increment a count, but in order to use the Counter, you have no assurance nothing else will try to use it.  </p>
<pre class="brush: java;">public class Counter {
  static int totalCount;

  public static void count() {
    totalCount++;
  }
}
</pre>
<p>The following transformations will help you keep existing clients happy:</p>
<ul>
<li>Introduce new method (instance level)</li>
<li>Introduce global instance</li>
<li>Delegate static method to new method (instance level)</li>
<li>Turn static state into instance state</li>
</ul>
<p>The final result is below (note that this code is not thread-safe and not designed for concurrent programs, but is there to demonstrate the result of the refactoring steps): </p>
<pre class="brush: java;">
public class Counter {
   private static final Counter INSTANCE = new Counter();

   private int totalCount;

   public static void count() {
     INSTANCE.recordCount();
   }

   public void recordCount() {
     totalCount++;
   }
}</pre>
<p>Now we had a bit more of a complex example, but this refactoring helped us move to the right direction of using instances where possible, instead of sharing global state. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.thekua.com/atwork/2010/06/refactoring-convert-static-into-instance/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
