<?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 &#187; Development</title>
	<atom:link href="http://www.thekua.com/atwork/category/development/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>Tue, 27 Jul 2010 06:42:37 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<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>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>
		<item>
		<title>Maven. What&#8217;s it good for?</title>
		<link>http://www.thekua.com/atwork/2010/06/maven-whats-it-good-for/</link>
		<comments>http://www.thekua.com/atwork/2010/06/maven-whats-it-good-for/#comments</comments>
		<pubDate>Fri, 04 Jun 2010 09:54:59 +0000</pubDate>
		<dc:creator>Patrick</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://www.thekua.com/atwork/?p=963</guid>
		<description><![CDATA[Just like a certain number of speakers, Maven seems to divide developers into two camps: Those who like it; and Those who loathe it I try to be objective as much as possible about tools, so let&#8217;s explore what Maven is and what it&#8217;s good for. What&#8217;s Maven all about? Maven has two major responsibilities [...]]]></description>
			<content:encoded><![CDATA[<p>Just like a certain number of speakers, <a href="http://maven.apache.org/">Maven</a> seems to divide developers into two camps:</p>
<ol>
<li>Those who like it; and</li>
<li>Those who loathe it</li>
</ol>
<p>I try to be objective as much as possible about tools, so let&#8217;s explore what Maven is and what it&#8217;s good for. </p>
<p><strong>What&#8217;s Maven all about?</strong><br />
Maven has two major responsibilities (with a handful of minor ones). These two are:</p>
<ol>
<li><strong>Library dependency management</strong> &#8211; Anyone who&#8217;s worked on a java project will know the large number of libraries you might end up with. Part of this is the JDKs inability to solve some of the simplest programming problems (solved with Apache Commons, various logging frameworks, etc). Maven was one of the first successful attempts at fixing this, focusing on applications on what version of libraries they&#8217;d like with its dependencies automatically resolved.</li>
<li><strong>Build lifecycle tool</strong> &#8211; Maven provides a standard set of fixed build lifecyles with hooks for each step in the lifecycle should you need to extend it. </li>
</ol>
<p><strong>Why was Maven developed?</strong><br />
To better understand Maven&#8217;s design, let&#8217;s look at the context developers built it in. Maven sprung forth out of the growing complexities in the Java Apache community. New Apache projects started off almost all the time and there was no &#8220;standard&#8221; way of building, or creating them. More than that, many Apache projects built on the work of other projects and managing the versioning of libraries started to become an onerous task. </p>
<p>Each Apache project characteristically depended on several other projects although generated its own single distributable (i.e. jar, war, etc). </p>
<p>Maven helped simplify these by assuming a default project structure, a default build lifecycle common to all many Apache projects. </p>
<p><strong>Where is Maven most useful?</strong><br />
If you&#8217;re on a project that is similar to a single Apache project (a single distributable with a single set of unit tests) then you&#8217;ve hit Maven&#8217;s sweet spot. </p>
<p><strong>Where does Maven start to break?</strong><br />
Here are some of the situations I&#8217;ve faced where Maven is not the best tool for the job:</p>
<ul>
<li>When one team is producing a number of artefacts, you find yourself needing to work around the Maven structure, often with resorting to &#8220;Pom Inheritence&#8221;. You have to do ugly things like maven installs before hand. </li>
<li>If you need to do anything more complex than the standard build, then you start to obfuscate the build process. Strange things like different processes running under different profiles (whether or not the build is running on a build server or not) can be very confusing for lots of people. </li>
<li>Maven adds more complexity to your development environment as you rely on either a public artefact server, or need to set up an internal one. Whilst this seems simple, it is yet another environmental factor that affects how you develop, and its external nature adds variability to projects that often cause false negative build failures. </li>
</ul>
<p>What other situations would your recommend using Maven or not? </p>
]]></content:encoded>
			<wfw:commentRss>http://www.thekua.com/atwork/2010/06/maven-whats-it-good-for/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>QCon London 2010 Day 3</title>
		<link>http://www.thekua.com/atwork/2010/03/qcon-london-2010-day-3/</link>
		<comments>http://www.thekua.com/atwork/2010/03/qcon-london-2010-day-3/#comments</comments>
		<pubDate>Wed, 17 Mar 2010 07:56:46 +0000</pubDate>
		<dc:creator>Patrick</dc:creator>
				<category><![CDATA[Conferences]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Organisations]]></category>

		<guid isPermaLink="false">http://www.thekua.com/atwork/?p=922</guid>
		<description><![CDATA[The pace of the conference and the speakers drinks event on Thursday night meant that I missed the first session on the final day. It&#8217;s a shame since I think Joe Armstrong would have been good to listen to. I look forward to reading anyone&#8217;s report of that session in the blogosphere. Track: The Concurrency [...]]]></description>
			<content:encoded><![CDATA[<p>The pace of the conference and the speakers drinks event on Thursday night meant that I missed the first session on the final day. It&#8217;s a shame since I think Joe Armstrong would have been good to listen to. I look forward to reading anyone&#8217;s report of that session in the blogosphere. </p>
<p><strong>Track: The Concurrency Challenge &#8211; Session: Embracing Concurrency at Scale</strong></p>
<p>I really appreciated this speaker for being very pragmatic and conscious about helping people think more explicitly about tradeoffs. He encouraged people to actively think about what solution is most appropriate considering there is always some trade off. </p>
<p>This session resonated another one of those ideas that we use &#8220;models&#8221; all the time and that models are inherently limited by simplifying things. As the speaker said, &#8220;There are many models in science, all of them wrong but some of them useful.&#8221; He used time as an example in that there are many ways of looking at it although we have a tendency to want to structure it linearly. &#8220;When you admit time is a difficult problem, you will have problems with multiple actors&#8221;. </p>
<p>He talked about the ideas that we like convenient mechanisms (such as distributed transactions) because they&#8217;re easy to grok and we&#8217;re comfortable with those ideas but because they have implicit state, you&#8217;re throwing away the value of distributed systems. He went on to talk about how we&#8217;re taught about the goodness of <a href="http://en.wikipedia.org/wiki/ACID">ACID</a> properties (particularly around database-centric applications). The alternative he presents is BASE (Basic, Availability, Soft State, <a href="http://en.wikipedia.org/wiki/Eventual_consistency">Eventual Consistency</a>). There&#8217;s apparently a paper on this found <a href="http://queue.acm.org/detail.cfm?id=1394128">here (ACM login required)</a>. He referenced Pat Helland&#8217;s <a href="http://www.eaipatterns.com/ramblings/68_acid.html">alternative definition</a> of the acronym, Associative, Commutative, Idempotent and Distributed. </p>
<p>Once again, he emphasises the importance of making the decision on alternatives an explicit one and there is a real tradeoff. This was yet another time someone talked about the <a href="http://www.julianbrowne.com/article/viewer/brewers-cap-theorem">CAP theorem</a> that describes three different system properties but you can only guarantee two of them. It&#8217;s great as a reminder and highly recommend you read about it as a refresher. </p>
<p>He talks about the world being Eventually Consistent and that &#8220;We shouldn&#8217;t try to model a world more perfect than it actually is&#8221;. He gave a number of examples of using this in practice, and there are ways to make sure that you try to do this. One such example was a Shopping Cart situation where a service should tell the &#8220;stock to decrement by 1&#8243; instead of &#8220;reduce stock from 99 to 98&#8243;. I think this is just another example of good OO (tell, don&#8217;t ask). </p>
<p><strong>Track: Solution &#8211; Session: Scenario Driven Development</strong></p>
<p>Our own Ben Butler Cole ran this session that attracted a huge audience considering it was running in the Solution Track. Ben attempted to help people understand how to use Scenario based testing instead of alternatives such as exhaustive acceptance testing or story based acceptance testing as the regression suite. </p>
<p>I think the audience were largely sceptical but Ben&#8217;s views align very similarly to the things I&#8217;ve seen on projects, particularly when doing development using stories. One of the misunderstandings about automated testing and stories is that everyone always views stories as additive. For me, you not only have stories that add functionality, you also have stories that change functionality (replace) and stories that also cause functionality to disappear. I tend to think the set of tests also goes hand in hand &#8211; if you&#8217;re deleting functionality, you should be deleting existing tests as well, or if you&#8217;re changing tests, you should be changing existing tests. </p>
<p>I think part of the problem is that stories are kind of fractal in nature and the scenarios that Ben talked about were like at an epic level (maybe even a use case level). What is interesting is how you go about enhancing, maintaining that scenario over time and how the team works around those scenarios &#8211; something we unfortunately only got a taster for in the hour. </p>
<p>I heard a lot of people still come away with lots of interesting insights and I would highly recommend everyone go and listen to Ben speak even if it&#8217;s just to hear him present. Totally worth it. </p>
<p><strong>Track: The Concurrency Challenge &#8211; Session: Modelling Concurrency with Actors in Java &#8211; Lessons learned from Erjang</strong></p>
<p>This session was fairly packed out, I guess given the hype of people working with or wanting to work with Erlang. This presenter&#8217;s take was interesting because in order to better understand concurrency and Erlang, this guy decided to implement an interpreter on top of the JVM (instead of simply playing around with the language). </p>
<p>The premise behind his talk was that Object Orientation as a paradigm brought with it plenty of productivity and that Actor-based modelling was going to be the thing to give us the next boost. Whilst I admire his premise, I don&#8217;t necessarily agree. I don&#8217;t think we&#8217;re all that good (as an industry) as implementing Object Orientation. I do think things like the JVM have helped raise the abstraction level so that we don&#8217;t need to think as much about the lower level memory management (although you have a memory leak in these languages if you&#8217;re not careful). </p>
<p>He spent a long time fascinating all the language geeks with his ability to run a simply Erlang program on top of his project, Erjang (Erlang on the JVM) but I really wanted to hear about the lessons learned from programming instead of the technical details of writing an interpreter on the JVM, something he spent a majority of the time on. I don&#8217;t think there were very many interesting bits other than designing parts of a system with different ideas. As he said, &#8220;Imagine treating parts of system as different actors with different responsibilities?&#8221; to which I was thinking, &#8220;That&#8217;s what good Object Orientation is about. Treating objects playing different roles with the right set of (small) responsibilities&#8221;. Nothing new unfortunately. </p>
<p><strong>Track: How do you want to test that? &#8211; Session: Performance Testing at the Edge</strong><br />
This session brought a lot of mixed reactions. I agree that the start of it seemed a little bit commercial, talking about their product and the complexities of performance testing. I like discussing the importance of performance testing for applications because it&#8217;s one of those things that are often neglected and really not treated very well. This presenter eventually got around to talking about some of these aspects, but like many of the talks still ended up being fairly late in the talk. </p>
<p>I think that this speaker had a lot of great things to say and although much of it was very common sense, didn&#8217;t give people an impression about how they could go about doing it well. They had some interesting approaches to monitoring performance such as running it on the same set of dedicated hardware (that wasn&#8217;t even a replica of production). This has a trade off of being able to compare results over time which they had some interesting graphs, although it is at a cost of being a proper representative sample of what the software might actually run on. </p>
<p>I found that some of the good things he talked about were similar to the talk that Alistair and I had, although it still sounded like the performance testing team was a predominantly split responsibility that worked orthogonally to the actual development team. It also sounds like there was a big cultural barrier that they have been trying to break down by getting developers to write performance tests and have some more ownership. </p>
<p>The crowd also had a lot of scepticism about convincing a business to invest in the automation of performance testing. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.thekua.com/atwork/2010/03/qcon-london-2010-day-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>QCon London 2010 Day 2</title>
		<link>http://www.thekua.com/atwork/2010/03/qcon-london-2010-day-2-2/</link>
		<comments>http://www.thekua.com/atwork/2010/03/qcon-london-2010-day-2-2/#comments</comments>
		<pubDate>Mon, 15 Mar 2010 22:25:37 +0000</pubDate>
		<dc:creator>Patrick</dc:creator>
				<category><![CDATA[Coaching]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Organisations]]></category>
		<category><![CDATA[Philosophy]]></category>

		<guid isPermaLink="false">http://www.thekua.com/atwork/?p=918</guid>
		<description><![CDATA[Keynote: Ralph Johnson on Living and working with aging software The final keynote of the conference kicked off the second day of QCon and presented to us by Ralph Johnson of the Gang of Four fame and whose students contributed to Fowler&#8217;s timeless Refactoring book. Ralph was asking about the number of people who work [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Keynote: Ralph Johnson on Living and working with aging software</strong><br />
The final keynote of the conference kicked off the second day of QCon and presented to us by <a href="http://qconlondon.com/london-2010/speaker/Ralph+Johnson">Ralph Johnson</a> of the Gang of Four fame and whose students contributed to <a href="http://martinfowler.com/">Fowler&#8217;s</a> timeless <a href="http://www.amazon.com/exec/obidos/ASIN/0201485672">Refactoring</a> book. </p>
<p>Ralph was asking about the number of people who work on systems they created (versus systems that other created) and then argued about the meaning of maintenance programmer arguing for software evolutionists instead. Whilst I agree that no one likes to be labelled a maintenance programmer, changing the name doesn&#8217;t really matter. </p>
<p>I like the different perspectives that Ralph brought. He talked about <em>Software Capital</em> as about truly understanding how the software works. Code is one example of this, but actually there are many other things that go into understanding how the software works. He argues that the right sort of documentation (and other artefacts) that helps understand how the software works is another part of Software Capital. As a result, you also need the people around the software to help keep the story alive. </p>
<p>My observations of various organisations also backs up some of the things that he says such as, the larger a system gets, the more likely you need some form of documentation and social structure around the software. </p>
<p>I think a lot of people didn&#8217;t like Ralph&#8217;s keynote because he talked about refactoring as if it was a new idea and, unfortunately this audience is one that has been exposed to these ideas for a long time. </p>
<p><strong>Track: Beyond Tools and Technologies</strong><br />
I spent the rest of my time on the <a href="http://qconlondon.com/london-2010/tracks/show_track.jsp?trackOID=345">track</a> that I was speaking at later that day. The first talk of the day was Martin Fowler whose talk, &#8220;<em>What are we programming for?</em>&#8221; brought the tiny room to a stand still. The room was so full (although it was a small room) that they had to turn people away. </p>
<div style="text-align:center"><a href="http://www.thekua.com/atwork/wp-content/uploads/2010/03/WhatAreWeProgrammingFor.jpg" rel="lightbox[pics918]" title="WhatAreWeProgrammingFor"><img src="http://www.thekua.com/atwork/wp-content/uploads/2010/03/WhatAreWeProgrammingFor.jpg" alt="WhatAreWeProgrammingFor" width="550" height="412" class="attachment wp-att-919 " /></a></div>
<p>Martin used the talk to highlight the importance of going beyond acting like hired guns and actually thinking about how to use the skills for something good. He asked people to consider the <em>essence</em> of the firms that they work for and whether or not they are benefiting humanity. </p>
<p><a href="http://www.thoughtworks.co.uk/who-we-are/leadership-profiles/rebecca-parsons.html">Rebecca Parsons</a>, ThoughtWorks&#8217; CTO then talked about the importance of team diversity in her talk, &#8220;<em>How to avoid &#8216;We never even thought of that&#8217;!</em>&#8221; She talked about the role that diversity played in creating innovations in science and how too much of the &#8220;sameness&#8221; creates problems with creating too many assumptions. I like the idea of a balancing tradeoffs of not enough diversity leading to problems in teams and too much diversity to the point that the team don&#8217;t share the same vocabulary. </p>
<p>After the lunch break, I ran my session, &#8220;<em>Building the next generation of Technical Leaders</em>&#8220;. I was very happy with the turnout and had some great feedback from the participants. It&#8217;s an issues I think is sorely neglected in our industry and has a huge impact on the team effectiveness. </p>
<p>The next session was run by our Director of Social Engagement (Jeff Wishnie) and Merrick Schaefer of Unicef discussing the importance that technology has on developing countries and the significant impact it can have on the lives. They talked about the <a href="http://www.rapidftr.com/">Rapid FTR</a> project that is being developed to help capture information about children who&#8217;ve been separated from their parents with hope of quickly reconnecting them, and at worst, giving them legal status by registering them with an agency such as Unicef. </p>
<p>The final session of the day rounded out with Mick Blowfield with a presentation titled, &#8220;<em>IT in a Low Carbon Future</em>&#8220;.</p>
<p>Whilst there were many other potentially interesting sessions, I was really happy to hear about the issues that go beyond just <em>Tools and Technology</em>. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.thekua.com/atwork/2010/03/qcon-london-2010-day-2-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>QCon London 2010 Day 1</title>
		<link>http://www.thekua.com/atwork/2010/03/qcon-london-2010-day-1/</link>
		<comments>http://www.thekua.com/atwork/2010/03/qcon-london-2010-day-1/#comments</comments>
		<pubDate>Sun, 14 Mar 2010 18:20:40 +0000</pubDate>
		<dc:creator>Patrick</dc:creator>
				<category><![CDATA[Conferences]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Organisational]]></category>

		<guid isPermaLink="false">http://www.thekua.com/atwork/?p=912</guid>
		<description><![CDATA[I&#8217;ve never been to a QCon before and being run by the same organisers of JAOO and the folks behind the ever popular InfoQ, I was looking forward to being both an attendant and presenter. Lasting three conference days and two tutorial days, this conference focuses mainly on being talked at &#8211; quite a different [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve never been to a <a href="http://qconlondon.com/">QCon</a> before and being run by the same organisers of <a href="http://jaoo.dk/">JAOO</a> and the folks behind the ever popular <a href="http://www.infoq.com/">InfoQ</a>, I was looking forward to being both an attendant and presenter. Lasting three conference days and two tutorial days, this conference focuses mainly on being talked at &#8211; quite a different experience to the Agile 20xx and the XP 20xx conferences I normally run workshops/talks at. Being focused on the cutting edge and practical technologies side, I can really understand this because it&#8217;s hard to target people with the right level of experience. </p>
<p>Talking to most of the attendees, it also attracts a noticeably different side with the majority of people already in architect or senior developer roles with a relatively smaller proportion of people in other ancillary roles such as PMs, testers or BAs. </p>
<p><strong>Feedback that works</strong><br />
I like the feedback note for the conference, asking people tweet, email or talk to people at the conference. I think some of the feedback mechanisms even worked as we saw a lack of caffeine/water during the breaks on the first day change for the other remaining days. </p>
<p><strong>The Keynote</strong><br />
The first day&#8217;s keynote started with the evangelical <a href="http://www.objectmentor.com/omTeam/martin_r.html">Uncle Bob Martin</a>. He&#8217;s a great speaker and channels a lot of opinion towards the crowd wandering back and forth on stage. I saw a version of this at the <a href="http://agile2009.org/">Agile 2009</a> conference. I&#8217;m glad he adjusted it somewhat more appropriately for this conference. He talked about some good principles that should be followed after a few bumpy technical glitches. He is all about the drama (which I guess is part and parcel of a keynote) such as showing us a video that scrolled through a single java class for something like two to three minutes backed up by a song from the movie from 2001 (thanks Ola!) <span style="text-decoration:line-through">that almost sounded like the flight of the bumblebee</span>. The point of this showmanship was to demonstrate how we can sense bad code visually without even looking at the specifics. He went through a number of his mantras such as &#8220;The Boy Scout&#8221; rule, leaving things better than how you found them, or that functions should be no more than four or five lines long. </p>
<p>Whilst I don&#8217;t think I learned anything new, Uncle Bob Martin was entertaining and had good things to say, despite how preacher-like he comes across. </p>
<p><strong>Track: Architecture&#8217;s You&#8217;ve Always Wondered About &#8211; Session: BWin &#8211; P5 a future proof poker platform</strong><br />
The rest of the day was split into six different tracks. I went to the first of these and was truly disappointed. The two presenters came from <a href="https://www.bwin.com/" rel="nofollow">BWin</a>, apparently one of the largest poker and gaming sites in Europe. They spent half an hour talking about their problems of performance (many of the -iliites) and where the history of their application came from. They even had to include a three minute video from their marketing folks. They finally flashed up a screenshot of their architecture diagram which I think everyone had come to hear about it. Unfortunately they moved onto the next screen very quickly and said that they couldn&#8217;t actually talk about their architecture. How disappointing! Indeed this might have been an &#8220;Architecture You&#8217;ve Always Wondered About&#8221;, and after this session was one to still, indeed, wonder about it. </p>
<p>They proceeded to pick a single example about two processes that concurrently wrote and read from the same database table and their architectural change simply transitioning it to a disk persistent queue and the reporting service reading from that queue and writing to its own database. Neither very profound, or a very interesting tidbit that failed to give the audience any more insight into any interesting part of how they architected their system. </p>
<p>I found it interesting they spent a long time (something like 250 man years) rewriting this version of their architecture so I asked the question about how they went about moving from their old to their new platform at which they pretty much described a big bang approach &#8211; neither iterative or incremental. Pretty disappointing. </p>
<p><em>My lesson learned from this</em>: Regardless of how pretty your slides are, make sure your abstract matches what you&#8217;re going to actually talk about. </p>
<p><strong>Track: Dev and Ops: A Single Team &#8211; Session: Devs and Ops Cooperation when the Worst Happens</strong><br />
My next session was much more fulfilling with <a href="http://www.michaelnygard.com/">Michale Nygard</a> (author of <a href="http://www.pragprog.com/titles/mnee/release-it">Release It</a>) describing some of the stories that were the basis for the book but wouldn&#8217;t have been publishable. Michael is really down to earth and happy to chat about many of the details behind the book. It&#8217;s really obvious that he is also a very pragmatic person, understanding that models are just that and recommending people look into the details because there is often something much more complex underneath. </p>
<p>Many of the things that Michael talked about also resonated very strongly with ideas that I&#8217;ve seen on applications. Many of them included focusing on ensuring documentation artefacts should be tested by those who will consume them. As he put it, &#8220;UML is virtually useless to the deployment and operations team&#8221;. Other gems included, &#8220;From a high enough view, everything starts to look the same&#8221;</p>
<p>His stories also reinforced the importance of having a ubiquitous language will all members of the company in the shared domain. One of his most successful rescue missions dealing with a production problem only worked because the architect (on the dev side) and Michael (on the ops side) understood enough to really communicate the real problems.  Michael also kept (understandably) hammering home the point of lack of information on both sides really hurts the problem solving process. </p>
<p>A lot of Michael&#8217;s stories also described their successes working around the existing (organisational) systems in order to deal with the problems at hand. To me, this was just another great example of organisations that structure themselves for efficiency over effectiveness. </p>
<p>I like the way that Michael finished off his talk as well, focusing on the fact that you&#8217;re not just trying to build software, that you need to care about the organisation (and I would also argue, the systems and procedures in that organisation) that support the software. Design them for effectiveness, not efficiency.</p>
<p><strong>Architectures you&#8217;ve always wondered about: Facebook</strong><br />
The next session I attended was by Aditya Agarwal (one of the engineering directors of Facebook). He shared some great insights and lessons learned into what things Facebook did that got them to where they were. Admittedly they had some strange choices like writing something that converted PHP into compiled C++ and using MySQL is a very &#8220;reliable bitstore&#8221;. </p>
<p>They have a lot of great things to say, like being very proud of the low number of engineers ratio to actual users. Like Alistair, I&#8217;m puzzled why they&#8217;re secretive of the exact number of their employees. </p>
<p>Aditya has some good things to say and although he means well, I don&#8217;t support everything that he says. it&#8217;s obvious a lot of what he says is based on a start up culture. Things like, &#8220;don&#8217;t worry about it until it becomes a problem&#8221; encourages the recklessness we see in many software companies. Same thing about the choice of programming language such as &#8220;every programming language will have problems at our scale&#8221;. </p>
<p>On the plus side, I was pleased to hear them encouraging the innovative engineering culture that I don&#8217;t see in many organisations. </p>
<p><strong>Track: Non relational DBs and Web Oriented Data &#8211; Session: Social networks and the richness of data: getting it done with</strong><br />
After going through my notes the most interesting tidbit was about using a partitioning mechanism to deal with data updates based on the number of connections. There was plenty of buzzwords (both internal and external) that I think I had a hard time fitting it all together. Some things I&#8217;m going to look at include:</p>
<ul>
<li>Bit versus <a href="http://en.wikipedia.org/wiki/Bloom_filter">bloom</a> filters &#8211; Not familiar with this term or how to use it.</li>
<li>Tools &#8211; <a href="http://www.jboss.org/resteasy">RESTeasy</a> (I now see it&#8217;s a JBoss project). <a href="http://code.google.com/p/redis/">Redis</a> and <a href="http://project-voldemort.com/">Voldemort</a> &#8211; something they used heavily all over the place.</li>
</ul>
<p>That&#8217;s about all I got out of this session though I&#8217;m not sure if it was about the lack of familiarity with the tools, or the excessive use of acronyms and unfamiliar terms or just plain tiredness. </p>
<p><strong>Track: Functional Programming &#8211; Session: Demystifying Monads</strong><br />
<a href="http://grahamis.com/blog">Josh Graham</a> did a great job stepping into fill in for his ill wife talking through some of the different ideas behind monads. I haven&#8217;t done functional programming since university and I&#8217;ll be the first to admit Monad&#8217;s are still a mystery to me but I came away with some key learnings. </p>
<p>Firstly, to understand monads properly, you really just have to see several examples in action. There&#8217;s a high barrier to entry  because it means:</p>
<ol>
<li>Learning a new language</li>
<li>Learning a new development environment</li>
<li>Playing with plenty of examples</li>
</ol>
<p>When I find some time, I&#8217;ll do those. In the meantime, I understand a bit more about the properties of a monad, and that they can be a powerful abstraction for functional languages. </p>
<p><strong>Final keynote &#8211; <a href="http://en.wikipedia.org/wiki/Daniel_Henry_Holmes_Ingalls,_Jr.">Dan Ingalls</a>: Forty Years of Fun with Computers</strong><br />
For being so late in the day, this was a very entertaining keynote. Just like any modern day small talk person, this entire demonstration took place in the <a href="http://www.squeak.org/">Squeak</a> development environment. Dan demonstrated some interesting and interactive elements. </p>
<p>I had a few key takeaways including:</p>
<ul>
<li>We&#8217;re really bad at learning the lessons from the past. Partially because we don&#8217;t have enough storytellers and that our generation doesn&#8217;t listen very well. </li>
<li>I&#8217;m going to read <a href="http://www.smalltalk.org/smalltalk/TheEarlyHistoryOfSmalltalk_Abstract.html">this article</a> at some point. </li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.thekua.com/atwork/2010/03/qcon-london-2010-day-1/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
