<?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>Valtech UK &#187; Andrew Rendell</title>
	<atom:link href="http://blog.valtech.co.uk/author/delivering-software/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.valtech.co.uk</link>
	<description>Aggregated works of Valtech UK consultants</description>
	<lastBuildDate>Mon, 30 Jan 2012 12:23:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Testing and concurrency</title>
		<link>http://blog.valtech.co.uk/development/testing-and-concurrency-2/</link>
		<comments>http://blog.valtech.co.uk/development/testing-and-concurrency-2/#comments</comments>
		<pubDate>Sat, 15 Jan 2011 09:36:00 +0000</pubDate>
		<dc:creator>Andrew Rendell</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[concurrency]]></category>
		<category><![CDATA[testing]]></category>

		<guid isPermaLink="false">http://www.rendell.org:80/pebble/software/2010/08/24/1282689360000.html</guid>
		<description><![CDATA[          
Our team is currently working with a client on a medium sized, medium complexity Java application which has quite low test coverage. We are introducing characterisation tests to snapshot functionality. These will give us the confidence to r...]]></description>
			<content:encoded><![CDATA[<div class="bottomcontainerBox" style="background-color:#F0F4F9;">
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fblog.valtech.co.uk%2Fdevelopment%2Ftesting-and-concurrency-2%2F&amp;layout=button_count&amp;show_faces=false&amp;width=85&amp;action=like&amp;font=verdana&amp;colorscheme=light&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width=85px; height:21px;" allowTransparency="true"></iframe></div>
			<div style="float:left; width:80px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<g:plusone size="medium" href="http://blog.valtech.co.uk/development/testing-and-concurrency-2/"></g:plusone>
			</div>
			<div style="float:left; width:95px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<a href="http://twitter.com/share" class="twitter-share-button" data-url="http://blog.valtech.co.uk/development/testing-and-concurrency-2/"  data-text="Testing and concurrency" data-count="horizontal" data-via="valtech">Tweet</a>
			</div>			
			</div><div style="clear:both"></div><div style="padding-bottom:4px;"></div><p><span id="comment1279100807283.author" class="unauthenticated"><br />
Our team is currently working with a client on a medium sized, medium complexity Java application which has quite low test coverage. We are introducing <a href="http://en.wikipedia.org/wiki/Characterization_test">characterisation </a>tests</span><span id="comment1279100807283.author" class="unauthenticated"> to snapshot functionality. These will give us the confidence to refactor away technical debt and extend the application without regression. One of the problems we are experiencing is the concurrent nature of the application. I have have worked on applications in the past which supported very high concurrency without issue but this application is different. I have not fully thought through why this application does differ but there are some obvious points:</span></p>
<ul>
<li><span id="comment1279100807283.author" class="unauthenticated"> This application spawns threads in Java code a lot. In previous applications we have always avoided this complexity by utilising somebody else&#8217;s thread pool code.</span></li>
<li>I am used to stateless service classes which operate on domain objects. The stateless service classes obviously have no concurrency issues and the domain objects can be protected using synchronisation blocks. This application seems to have a lot more stateful objects that interact (this is anecdotal, I am have not analysed the code specifically for this attribute).</li>
</ul>
<p><span id="comment1279100807283.author" class="unauthenticated"><span id="more-390"></span> One of the first refactorings we are looking at is to remove all the Thread.sleep calls from test classes. The CI server reports significant number of test failures which turn out to be false positives. In a significant number of cases the use of Thread.sleep is to blame. I have seen two slightly different uses of Thread.sleep in the test code. </span></p>
<ol>
<li><span id="comment1279100807283.author" class="unauthenticated"> The test spawns a thread which is calling some method of the class under test whilst the main test thread interacts with the class under test in some other way. The test thread calls Thread.sleep to ensure that the second thread has time to complete its processing before the test verifies the post conditions.</span></li>
<li>The class under test contains some internal thread spawning code. The test thread again needs to execute a Thread.sleep to remove the chances of a race condition before firing the asserts.</li>
</ol>
<p><span id="comment1279100807283.author" class="unauthenticated"><br />
Both these approaches suffer from the same problems.</span></p>
<ul>
<li><span id="comment1279100807283.author" class="unauthenticated"> The Thread.sleep might be long enough to allow the second thread to complete processing on one machine (e.g. the developers high spec workstation) but it is not long enough to allow the thread to complete its processing on a heavily loaded, differently configured, usually more resource constrained CI server. Under certain load situations the test fails. It works in others. The use of Thread.sleep has made the test non-deterministic.</span></li>
<li>Often the response to the above problem is to make the sleep longer. Yesterday I saw a very simple test which took over thirteen seconds to execute. Most of that test duration was sleeps. Refactoring to remove the sleeps resulted in a test that executed in 0.4 seconds. Still a slowish test but a vast improvement. The last application I worked on had 70% coverage with 2200 tests. If each one had taken thirteen seconds to execute then a test run would have taken almost eight hours. In reality that suite took just over a minute on my workstation to complete. You can legitimately ask a developer to run a test suite which takes one minute before every checkin and repeat that execution on the CI server after checkin. The same is not true of a test suite that takes eight hours. You are probably severely impacting the teams velocity and working practices if the build before checkin takes eight minutes. There are very few excuses for tests with arbitrary delays built into them.</li>
</ul>
<p><span id="comment1279100807283.author" class="unauthenticated"><br />
To resolve both issues we introduce a <a href="http://download.oracle.com/javase/6/docs/api/java/util/concurrent/CountDownLatch.html">count down latch</a>. </span></p>
<p>Where the test spawns a thread, the latch is decremented inside the spawned thread and where the test code had a sleep a latch.await(timeout) is used. We always specify a timeout to prevent a test that hangs in some odd situation. The timeout can be very generous, e.g. ten seconds where before a one second sleep was used. The latch will only wait until the work is done in the other thread and the race condition has passed. On your high spec workstation it might well not wait at all. On the overloaded CI server it will take longer, but only as long as it needs. A truly massive delay is probably not a great idea as there is a point where you want the test to fail to indicate there is a serious resource issue somewhere.</p>
<p>Where the class under test spawns a thread (an anti-pattern I suspect) then we amend the code so it creates a latch which it then returns to callers. The only user of this latch is the test code. Intrusive as it is, it is often the only way to safely test the code without more significant refactoring.</p>
<p>There are some larger issues here. Is the code fundamentally wrong in its use of threading? Should it be recoded to use a more consistent and simple concurrency model and rely more on third party thread pool support?</p>
<p>At risk of straying from my comfort zone of simple, pragmatic, software delivery, deep down, I have never been very happy about the implications of complicated multi-threaded code and automated testing. You can write a class augmented with a simple and straightforward test class which verifies the classes operation and illustrates its use. You can apply coverage tools such as Emma and Cobutura which can give a measure of the amount of code under test and even the amount of complexity that is not being tested. I am not convinced it is always possible to write simple tests that &#8216;prove&#8217; that a class works as expected when multiple threads are involved (note I say always and simple).</p>
<p>I do not know of any tools that can give you an assurance that you code will always work no matter what threads are involved. Perhaps a paradigm shift such as that introduced by languages such as Scala and Erlang will remove this issue?</p>
<p><span id="comment1279100807283.author" class="unauthenticated">There is some good advice available regarding <a href="http://www.theserverside.com/news/1365191/Testing-Concurrent-Programs">testing concurrent code</a> and I am sure lots of very clever people have spent lots of time thinking this through but its certainly not straight in my head yet.</span><br />
<span id="comment1279100807283.author" class="unauthenticated"><br />
</span></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.valtech.co.uk/development/testing-and-concurrency-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Testing and concurrency</title>
		<link>http://blog.valtech.co.uk/agile/testing-and-concurrency/</link>
		<comments>http://blog.valtech.co.uk/agile/testing-and-concurrency/#comments</comments>
		<pubDate>Wed, 08 Sep 2010 15:29:42 +0000</pubDate>
		<dc:creator>Andrew Rendell</dc:creator>
				<category><![CDATA[Agile]]></category>
		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://blog.valtech.co.uk/?p=373</guid>
		<description><![CDATA[Tweet Our team is currently working with a client on a medium sized, medium complexity Java application which has quite low test coverage. We are introducing characterisation tests to snapshot functionality. These will give us the confidence to refactor away technical debt and extend the application without regression. One of the problems we are experiencing [...]]]></description>
			<content:encoded><![CDATA[<div class="bottomcontainerBox" style="background-color:#F0F4F9;">
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fblog.valtech.co.uk%2Fagile%2Ftesting-and-concurrency%2F&amp;layout=button_count&amp;show_faces=false&amp;width=85&amp;action=like&amp;font=verdana&amp;colorscheme=light&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width=85px; height:21px;" allowTransparency="true"></iframe></div>
			<div style="float:left; width:80px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<g:plusone size="medium" href="http://blog.valtech.co.uk/agile/testing-and-concurrency/"></g:plusone>
			</div>
			<div style="float:left; width:95px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<a href="http://twitter.com/share" class="twitter-share-button" data-url="http://blog.valtech.co.uk/agile/testing-and-concurrency/"  data-text="Testing and concurrency" data-count="horizontal" data-via="valtech">Tweet</a>
			</div>			
			</div><div style="clear:both"></div><div style="padding-bottom:4px;"></div><p>Our team is currently working with a client on a medium sized, medium complexity Java application which has quite low test coverage. We are introducing <a href="http://en.wikipedia.org/wiki/Characterization_test">characterisation </a>tests to snapshot functionality. These will give us the confidence to refactor away technical debt and extend the application without regression. One of the problems we are experiencing is the concurrent nature of the application. I have have worked on applications in the past which supported very high concurrency without issue but this application is different. I have not fully thought through why this application does differ but there are some obvious points:<span id="more-373"></span></p>
<ul>
<li>This application spawns threads in Java code a lot. In previous applications we have always avoided this complexity by utilising somebody else&#8217;s thread pool code.</li>
<li>I am used to stateless service classes which operate on domain objects. The stateless service classes obviously have no concurrency issues and the domain objects can be protected using synchronisation blocks. This application seems to have a lot more stateful objects that interact (this is anecdotal, I am have not analysed the code specifically for this attribute).</li>
</ul>
<p>One of the first refactorings we are looking at is to remove all the Thread.sleep calls from test classes. The CI server reports significant number of test failures which turn out to be false positives. In a significant number of cases the use of Thread.sleep is to blame. I have seen two slightly different uses of Thread.sleep in the test code.</p>
<ol>
<li>The test spawns a thread which is calling some method of the class under test whilst the main test thread interacts with the class under test in some other way. The test thread calls Thread.sleep to ensure that the second thread has time to complete its processing before the test verifies the post conditions.</li>
<li>The class under test contains some internal thread spawning code. The test thread again needs to execute a Thread.sleep to remove the chances of a race condition before firing the asserts.</li>
</ol>
<p>Both these approaches suffer from the same problems.</p>
<ul>
<li>The Thread.sleep might be long enough to allow the second thread to complete processing on one machine (e.g. the developers high spec workstation) but it is not long enough to allow the thread to complete its processing on a heavily loaded, differently configured, usually more resource constrained CI server. Under certain load situations the test fails. It works in others. The use of Thread.sleep has made the test non-deterministic.</li>
<li>Often the response to the above problem is to make the sleep longer. Yesterday I saw a very simple test which took over thirteen seconds to execute. Most of that test duration was sleeps. Refactoring to remove the sleeps resulted in a test that executed in 0.4 seconds. Still a slowish test but a vast improvement. The last application I worked on had 70% coverage with 2200 tests. If each one had taken thirteen seconds to execute then a test run would have taken almost eight hours. In reality that suite took just over a minute on my workstation to complete. You can legitimately ask a developer to run a test suite which takes one minute before every checkin and repeat that execution on the CI server after checkin. The same is not true of a test suite that takes eight hours. You are probably severely impacting the teams velocity and working practices if the build before checkin takes eight minutes. There are very few excuses for tests with arbitrary delays built into them.</li>
</ul>
<p>To resolve both issues we introduce a <a href="http://download.oracle.com/javase/6/docs/api/java/util/concurrent/CountDownLatch.html">count down latch</a>.</p>
<p>Where the test spawns a thread, the latch is decremented inside the spawned thread and where the test code had a sleep a latch.await(timeout) is used. We always specify a timeout to prevent a test that hangs in some odd situation. The timeout can be very generous, e.g. ten seconds where before a one second sleep was used. The latch will only wait until the work is done in the other thread and the race condition has passed. On your high spec workstation it might well not wait at all. On the overloaded CI server it will take longer, but only as long as it needs. A truly massive delay is probably not a great idea as there is a point where you want the test to fail to indicate there is a serious resource issue somewhere.</p>
<p>Where the class under test spawns a thread (an anti-pattern I suspect) then we amend the code so it creates a latch which it then returns to callers. The only user of this latch is the test code. Intrusive as it is, it is often the only way to safely test the code without more significant refactoring.</p>
<p>There are some larger issues here. Is the code fundamentally wrong in its use of threading? Should it be recoded to use a more consistent and simple concurrency model and rely more on third party thread pool support?</p>
<p>At risk of straying from my comfort zone of simple, pragmatic, software delivery, deep down I have never been very happy about the implications of complicated multi-threaded code and automated testing. You can write a class augmented with a simple and straightforward test class which verifies the classes operation and illustrates its use. You can apply coverage tools such as Emma and Cobutura which can give a measure of the amount of code under test and even the amount of complexity that is not being tested. I am not convinced it is always possible to write simple tests that &#8216;prove&#8217; that a class works as expected when multiple threads are involved (note I say always and simple).</p>
<p>I do not know of any tools that can give you an assurance that you code will always work no matter what threads are involved. Perhaps a paradigm shift such as that introduced by languages such as Scala and Erlang will remove this issue?</p>
<p>There is some good advice available regarding <a href="http://www.theserverside.com/news/1365191/Testing-Concurrent-Programs">testing concurrent code</a> and I am sure lots of very clever people have spent lots of time thinking this through but its certainly not straight in my head yet.</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.valtech.co.uk/agile/testing-and-concurrency/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Importance of real time performance monitors</title>
		<link>http://blog.valtech.co.uk/uncategorized/importance-of-real-time-performance-monitors/</link>
		<comments>http://blog.valtech.co.uk/uncategorized/importance-of-real-time-performance-monitors/#comments</comments>
		<pubDate>Wed, 17 Mar 2010 22:16:00 +0000</pubDate>
		<dc:creator>Andrew Rendell</dc:creator>
		
		<guid isPermaLink="false">http://www.rendell.org:80/pebble/software/2010/03/17/1268864160000.html</guid>
		<description><![CDATA[
          
Decent log entries are essential. On our current project we aim to write enough data to allow off-line analysis of performance and usage plus errors. I am also an advocate of more immediate and accessible runtime information. Log analysis i...]]></description>
			<content:encoded><![CDATA[<div class="bottomcontainerBox" style="background-color:#F0F4F9;">
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fblog.valtech.co.uk%2Funcategorized%2Fimportance-of-real-time-performance-monitors%2F&amp;layout=button_count&amp;show_faces=false&amp;width=85&amp;action=like&amp;font=verdana&amp;colorscheme=light&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width=85px; height:21px;" allowTransparency="true"></iframe></div>
			<div style="float:left; width:80px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<g:plusone size="medium" href="http://blog.valtech.co.uk/uncategorized/importance-of-real-time-performance-monitors/"></g:plusone>
			</div>
			<div style="float:left; width:95px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<a href="http://twitter.com/share" class="twitter-share-button" data-url="http://blog.valtech.co.uk/uncategorized/importance-of-real-time-performance-monitors/"  data-text="Importance of real time performance monitors" data-count="horizontal" data-via="valtech">Tweet</a>
			</div>			
			</div><div style="clear:both"></div><div style="padding-bottom:4px;"></div><p>
Decent log entries are essential. On our current project we aim to write enough data to allow off-line analysis of performance and usage plus errors. I am also an advocate of more immediate and accessible runtime information. Log analysis is great but sometimes you need empirical data right away. On our current project we use the Java MBean facility. These MBeans can be easily accessed in a graphically rich way using tools like JConsole or VisualVM.
</p>
<p>
We have a couple of different types of analyzer which we expose through MBeans. One simply records how many times an event has occurred in a short time period. Another calculates an real time average, again across a short time period. For example, we have analyzers which record the length of time it takes to make a call to a particular downstream application. Each duration is recorded and an average over the last ten seconds is reported via the MBean. This calculation has been implemented to make it very efficient from a CPU perspective since 99.999% of the time the average discarded before anybody bothers to look at it. Originally we were only using two or three of these average analyzers in the system. As developers found them useful they were placed around every single external interaction and we suddenly found ourselves with several thousand per application. These used about 25% of the heap and consumed significant CPU resource. The analyzer was then optimized and now consumes negligible resources.
</p>
<p>
I have been personally a little disappointed that our operations team have not made as much as of this facility as I expected. They are happy with their existing log analysis tools. As a team, we have questioned whether our investment in MBeans is worthwhile. We concluded that it was as even though the Ops team don&#8217;t use it in Production the development group rely on the data exposed through JMX for trouble shooting, especially in system test, monitoring load tests and as a quick way to gauge the health of Production.
</p>
<p>
Last week I was reminded again how useful this immediately accessible data was. After a system restart Production was doing &#8216;something funny&#8217;. We had ambiguous portents of doom and various excited people considering some fairly drastic remedial action, including switching off a production system which was serving several thousand users. The fear was that something in the affected system might be placing unbearable demands on downstream applications. This seemed unlikely as we have many layers of throttles and queues to prevent just such an occurrence but there was something odd going on. The first port of call for the developers were the log files. With several thousands transactions being performed a second there was a lot of log lines whizzing past. Panic began to creep in as it was impossible to discern what, if anything was going on in the explosion of data. I was able to walk over to my workstation and bring up VisualVM. In about thirty seconds I could see that right at that very moment we were sending a great many messages but well within the tolerances we had load tested against. I was able to use VisualVMs graphing function to track various data and within a minute or so could see that there was an unexpected correlation between two sets of events. (The number of messages sent to mobile phones and the number of identification requests made to a network component were drawing the same shaped graph, with a slight lag between the first and second sets of data and an order of magnitude difference in volume). Again these events were both within tolerances. Yes something unexpected was occurring. No it was not going to kill the system right now. We went to lunch instead of pulling the plug.
</p>
<p>
The data we collected pointed us in the right direction and we were able to find, again using VisualVM, that a database connection pool had been incorrectly set to a tenth of its intended size. The Ops guys made some tuning changes to the configuration based on what we had discovered. The application stayed up through the peak period.
</p>
<p>
In summary, log files are essential but there is still a need for real time, pre-processed data available via a easy to access channel. MBeans hit the spot in the Java world. Developers should not be scared of calculating real time statistics, like average durations, on the fly. They do need to make sure that the system does not spend a disproportionate amount of resources monitoring itself rather than delivering its function.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.valtech.co.uk/uncategorized/importance-of-real-time-performance-monitors/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Concrete problems when developers opt out of TDD</title>
		<link>http://blog.valtech.co.uk/uncategorized/concrete-problems-when-developers-opt-out-of-tdd/</link>
		<comments>http://blog.valtech.co.uk/uncategorized/concrete-problems-when-developers-opt-out-of-tdd/#comments</comments>
		<pubDate>Sat, 27 Feb 2010 22:36:00 +0000</pubDate>
		<dc:creator>Andrew Rendell</dc:creator>
		
		<guid isPermaLink="false">http://www.rendell.org:80/pebble/software/2010/02/27/1267310160000.html</guid>
		<description><![CDATA[
          We have two major classifications of automated test in common use: 

    Acceptance tests which execute against the application in its fully deployed state.
    Unit tests which typically target a single class and are executed without instan...]]></description>
			<content:encoded><![CDATA[<div class="bottomcontainerBox" style="background-color:#F0F4F9;">
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fblog.valtech.co.uk%2Funcategorized%2Fconcrete-problems-when-developers-opt-out-of-tdd%2F&amp;layout=button_count&amp;show_faces=false&amp;width=85&amp;action=like&amp;font=verdana&amp;colorscheme=light&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width=85px; height:21px;" allowTransparency="true"></iframe></div>
			<div style="float:left; width:80px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<g:plusone size="medium" href="http://blog.valtech.co.uk/uncategorized/concrete-problems-when-developers-opt-out-of-tdd/"></g:plusone>
			</div>
			<div style="float:left; width:95px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<a href="http://twitter.com/share" class="twitter-share-button" data-url="http://blog.valtech.co.uk/uncategorized/concrete-problems-when-developers-opt-out-of-tdd/"  data-text="Concrete problems when developers opt out of TDD" data-count="horizontal" data-via="valtech">Tweet</a>
			</div>			
			</div><div style="clear:both"></div><div style="padding-bottom:4px;"></div><p>          We have two major classifications of automated test in common use: </p>
<ul>
<li>Acceptance tests which execute against the application in its fully deployed state.</li>
<li>Unit tests which typically target a single class and are executed without instantiating a Spring container. 
    </li>
</ul>
<p>The acceptance tests are written in language which should make them accessible outside of the development team. They are used to measure completeness, automatically test environments and provide regression tests. Their usefulness is widely accepted across the team and they tend to be very longevid, i.e. tests that were written a year ago against a particular API are relevant today and will continue to be relevant as long as that API is supported in production. The unit tests are written by developers and will almost certainly never be read by anybody other than the developers or possibly the technical leads. I program using TDD as I find it a natural way to construct software. I personally find that the tests are most useful as I am writing the code, like scaffolding. Once the code is stablized the tests still have a use but are no longer as critical. A refactoring of the application in some future sprint may see those tests be heavily amended or retired. They are not as longevid as the acceptance tests.</p>
<p>I have been reflecting on the usefulness and investment in test code for as long as I had been doing TDD. I had come to a conclusion that whilst acceptance tests are non-negotiable on projects where I have delivery responsibility, perhaps unit tests for TDD are not mandatory in certain situations. I have worked with several developers who are very very good and simply do not see the value in TDD as it is contrary to their own, very effective, development practices. I know in my team right now a couple of the very best developers do not use TDD the way everybody else does. Education and peer pressure has had no effect. They are delivering high quality code as quickly as anybody else. Its hard to force them to do differently &#8211; especially when some of them pay lip service to TDD and do have a high test coverage count. I know that they write those tests after they write their code.</p>
<p>In the last few weeks I came across a couple of concrete examples where TDD could have helped those developers deliver better code. In the future I will try and use these examples to persuade others to modify their practice</p>
<p><strong>1. Too many calls to downstream service.</strong></p>
<p>The application in question has a mechanism for determining identity of a client through some network services. Those network services are quite expensive to call. The application endeavors to call them infrequently as is safe and cache identity when is is resolved. We recently found a defect where one particular end point in the application was mistakenly making a call to the identity services. It was not that the developer had made a call in error, it was that the class inheritance structure effectively defaulted to making the call so did so without the developer realizing. The identity returned was never used. I suspect that this code was not built using TDD. If it had been then the developer would have mocked out the identity service (it was a dependency of the class under construction) but would not have set an expectation that the identity service would not have been called. The use of mocks not only to specify what your code should be calling but what it should not be calling is extremely useful. It encourages that top down (from the entry point into the system) approach where you build what you need when you need it. </p>
<p>Its likely that the defect would never have been introduced had the developer been using TDD. As it is we have a application which is making a large number (and it is a large number) of irrelevant calls to a contentious resource. We now have to schedule a patch to production. </p>
<p>Coincidentally, there was an acceptance test for this service, which was passing. This highlights a deficiency in our acceptance tests we have to live with. They test the &#8216;what&#8217; but not the &#8216;how&#8217;. The tests were running against a fully deployed application which had downstream services running in stub mode. The test proved that functionally the correct result was returned but it had no way of detecting that an additional spurious call to another service had been made during the process.</p>
<p><strong>2. Incorrect error handling</strong></p>
<p>In a recent refactoring exercise we came across a piece of code which expected a class it was calling to through an exception whenever it had an error processing a request. The error recovery in the code in question was quite elaborate and important. Unfortunately, the class being called never threw an exception in the scenarios in question. It had a status object it returned which indicated if corrective action needed to be taken. (It was designed to be used in conjunction with asynchronous message queues where throwing an exception would have introduced unnecessary complexity). The developer could have easily used mock objects and set an expectation that the exception would be thrown and the problem would have remained. But, if TDD was being used and the developer was working top down then the expected behavior of the mocks would have guided the implementation of downstream classes. Nothing is foolproof but I think this manner of working should have caught this quite serious error.</p>
<p><strong>More subjective problems</strong></p>
<p>I have also noted two other potential consequences of having some developers opt out of TDD. I do note that some developers on the team produce code that is more complex than others. It is fine from a cyclomatic complexity perspective but when you try and understand what it is doing you find yourself with a higher WTF count than you would expect. I think (again this is subjective, I have not gathered any empirical evidence) that a lot of the complexity comes from a lack of cohesion in the code. Logic is spread around in a way which made sense to the original developer as they had internalized all the classes concerned. That logic is not obvious to a new pair of eyes. If you are using TDD then this encourages cohesion in classes because it focuses the mind on what the class is responsible for before the developer has to worry about how it delivers those responsibilities.</p>
<p>This is a very subjective point and I would happily agree that several of the team members who do use TDD occasionally produce nasty code. My gut feeling however, is that it happens less often.</p>
<p>One final problem with some of the high flyers not using TDD is that bad practices tend to propagate through the team just as quickly as good ones. I have caught a couple of new joiners following a bad example or simply not using TDD becuase the developer they look to as a mentor is not evangelizing about the technique because they themselves do not buy into the practice. This is a shame as those new joiners often have a greater need of the rigor that TDD imposes than the more experienced developers.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.valtech.co.uk/uncategorized/concrete-problems-when-developers-opt-out-of-tdd/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Anti-pattern: The release vehicle.</title>
		<link>http://blog.valtech.co.uk/uncategorized/anti-pattern-the-release-vehicle/</link>
		<comments>http://blog.valtech.co.uk/uncategorized/anti-pattern-the-release-vehicle/#comments</comments>
		<pubDate>Tue, 09 Feb 2010 23:07:24 +0000</pubDate>
		<dc:creator>Andrew Rendell</dc:creator>
		
		<guid isPermaLink="false">http://www.rendell.org:80/pebble/software/2010/02/09/1265756844985.html</guid>
		<description><![CDATA[
          At my current client site you cannot get a piece of compiled code into production unless you can find an appropriate 'release vehicle', i.e. a planned high ceremony release of the component which has been officially prioritised, scheduled an...]]></description>
			<content:encoded><![CDATA[<div class="bottomcontainerBox" style="background-color:#F0F4F9;">
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fblog.valtech.co.uk%2Funcategorized%2Fanti-pattern-the-release-vehicle%2F&amp;layout=button_count&amp;show_faces=false&amp;width=85&amp;action=like&amp;font=verdana&amp;colorscheme=light&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width=85px; height:21px;" allowTransparency="true"></iframe></div>
			<div style="float:left; width:80px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<g:plusone size="medium" href="http://blog.valtech.co.uk/uncategorized/anti-pattern-the-release-vehicle/"></g:plusone>
			</div>
			<div style="float:left; width:95px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<a href="http://twitter.com/share" class="twitter-share-button" data-url="http://blog.valtech.co.uk/uncategorized/anti-pattern-the-release-vehicle/"  data-text="Anti-pattern: The release vehicle." data-count="horizontal" data-via="valtech">Tweet</a>
			</div>			
			</div><div style="clear:both"></div><div style="padding-bottom:4px;"></div><p>          At my current client site you cannot get a piece of compiled code into production unless you can find an appropriate &#8216;release vehicle&#8217;, i.e. a planned high ceremony release of the component which has been officially prioritised, scheduled and funded. (Note: The same does not apply to non-compiled code such as JSPs or XML templates containing complex XPath expressions).</p>
<p>Somebody very clever, who probably had a beard (Grady Booch?), once said that &quot;Regular releases into production are the lifeblood of the software development process.&quot;. I agree. My current client also seems to be in agreement but cannot extract themselves from the constraints their existing processes.</p>
<p>The client in question has a successful agile adoption. Walking round the development teams you see task boards, burn downs and SCRUM meetings. Go to a management meeting and you&#8217;ll hear them talk about two week iterations and the importance of continuous integration. At a strategic level, the organisation (which is very large) is still waterfall orientated. This has implications for the way in which work is financed. Funds for the development, testing and deployment of a certain application are released on waterfall inspired milestones. This, in conjunction with a legacy of long development cycles has led the this &#8216;release vehicle&#8217; anti-pattern.</p>
<p>The organisation has an unwillingness to make a deployment of a component into production unless there is named and funded change request which covers its release. Activities within development, possibly funded internally as &#8216;business as usual&#8217; do not have such CRs. Therefore, a development activity such as refactoring for technical debt reduction or improving performance might get engineering buy in but will not get released into production until some CR happens to touch the same application.</p>
<p>It is common to see refactorings made which then sit in source control for literally months as they wait for an excuse to go live. Medium to low priority defects or useful CRs which lack very high prioritisation from marketing never get executed because the programme manager does not have a release identified for the change.</p>
<p>The application suite can appear inert to external parties as it takes a considerable period for changes to make it through the full release cycle. This erodes confidence. If I was a product owner and saw that a team was taking six months to execute my minor change I am not going to be inclined to believe that the same team can turn around my big important changes quickly. I am going to be looking for other mechanisms to get my changes into production and earning money quickly. Once I find a route that works I am going to keep using it.</p>
<p>Why do people like the release vehicle?</p>
<ul>
<li>It is the way the whole software lifecycle as exposed to the rest of the organisation works. The QA team don&#8217;t test a component unless they have funding from marketing. Marketing won&#8217;t be paying for something that has no role in a prioritised proposition. The Operations team won&#8217;t support the deployment actives for our component if they don&#8217;t have the cash from the same marketing team.</li>
<li>It looks like it is easier to manage for PMs. Releases (because they are infrequent) are a big deal, involve lots of noise, planning, disruption to everyday working pattern.</li>
<li>It reduces the infrastructure costs. It costs resource to make a release unless every aspect including testing and operational deployment is fully automated (and even then there is potential cost, dealing with failures etc.). It costs resource to automate a manual build process. Engineers appreciate that fully automated build processes are a priority because in the end they reduce costs and increase agility. It is that age old problem of trying to convince not just the build team, but the build team&#8217;s manager and the build team&#8217;s manager&#8217;s manager that it is worth diverting resource in the short term to fix a problem in order to make a saving in the long term.</li>
</ul>
<p>** This is a symptom of our strategic failure to get agile adopted beyond the development group. Until we do so, we will continue to hit these sort of issues.</p>
<p>What we should do instead:</p>
<p>We should schedule frequent (bi-weekly, ideally more frequent) updates in production from the trunk of source control for every component. We should not need an excuse for a release. The release process should be as cheap as possible, i.e. automated build, regression test, deployment and smoke test. The code in the trunk is supposed to always be production ready and the automated tests should keep it that way.</p>
<p>If we achieve this we should:</p>
<ul>
<li>Reduce complexity in branch management (no merging changes made months ago).</li>
<li>Avoid a massive delay between development and deployment which is not cost effective and makes support very hard.</li>
<li>Increase our perceived agility and responsiveness.</li>
<li>Enable refactoring to improve non-functionals (stability, latency, dependency versions, capacity).</li>
<li>Prevent a release from being a &#8216;special occasion&#8217; which requires significant service management ceremony.</li>
</ul>
<p>If you release all the time everybody knows how to release. If you release twice a year every release involves re-education of the teams involved on deployment, load testing, merging etc.. etc. This increases the cost and risk that it fails.</p>
<p>Note: Having frequent, regular, low ceremony releases is greatly eased by having a fully automated build and deploy process but you can have one without the other. As stated above, having such a build process makes regular deployments to production cost effective but is an enabler rather than the justification for this change to working practice.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.valtech.co.uk/uncategorized/anti-pattern-the-release-vehicle/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Tale of two SCRUM stand ups</title>
		<link>http://blog.valtech.co.uk/agile/tale-of-two-scrum-stand-ups/</link>
		<comments>http://blog.valtech.co.uk/agile/tale-of-two-scrum-stand-ups/#comments</comments>
		<pubDate>Tue, 02 Feb 2010 12:38:00 +0000</pubDate>
		<dc:creator>Andrew Rendell</dc:creator>
				<category><![CDATA[Agile]]></category>
		<category><![CDATA[Agile Management]]></category>
		<category><![CDATA[SCRUM]]></category>
		<category><![CDATA[Stand-ups]]></category>

		<guid isPermaLink="false">http://www.rendell.org:80/pebble/software/2009/12/15/1260877320000.html</guid>
		<description><![CDATA[          I walked past two teams doing their daily SCRUM standup today. Both teams claim to be agile. I didn't join in (even as a chicken) but just observed for a minute or so.<br />
<br />
The first team was sitting down in a breakout area. Their body language spoke volumes. There was not one single participant maintaining eye contact with anybody else. Two people were playing on their phones. One developer had his head in his hands. Most had bored expressions. The team leader who is also the SCRUM master was the only person who spoke for the entire time I watched.<br />
<br />
The second team was stood in a space near their desks. They were gathered round a task board which appeared to be up to date and the focus of several of the individual's updates. One person spoke at a time. Almost everybody appeared to be paying attention to whomever was speaking. Most updates were short and concise. A couple rambled on.<br />
<br />
Other than both teams calling their meeting a SCRUM I could see no similarities.<br />
<br />
As our agile adoption has spread beyond the original teams I suppose it is inevitable that as the experience gets spread a little thinner that people will simply label their existing activities with agile sounding names. Often we have no clear remit in those teams to supply a mentor and to try offer advice would result in rebuttal as team leaders guard their territory. Does this matter? Is there a risk that these teams who are not practicing agile correctly will diminish and discredit agile in the eyes of our programme managers? This is sounding a bit like an excuse for an Agile Inquisition going round checking that no team is using Agile's name in vain. This cannot be a good thing either.
        ]]></description>
			<content:encoded><![CDATA[<div class="bottomcontainerBox" style="background-color:#F0F4F9;">
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fblog.valtech.co.uk%2Fagile%2Ftale-of-two-scrum-stand-ups%2F&amp;layout=button_count&amp;show_faces=false&amp;width=85&amp;action=like&amp;font=verdana&amp;colorscheme=light&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width=85px; height:21px;" allowTransparency="true"></iframe></div>
			<div style="float:left; width:80px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<g:plusone size="medium" href="http://blog.valtech.co.uk/agile/tale-of-two-scrum-stand-ups/"></g:plusone>
			</div>
			<div style="float:left; width:95px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<a href="http://twitter.com/share" class="twitter-share-button" data-url="http://blog.valtech.co.uk/agile/tale-of-two-scrum-stand-ups/"  data-text="Tale of two SCRUM stand ups" data-count="horizontal" data-via="valtech">Tweet</a>
			</div>			
			</div><div style="clear:both"></div><div style="padding-bottom:4px;"></div><p>I walked past two teams doing their daily SCRUM standup today. Both teams claim to be agile. I didn&#8217;t join in (even as a chicken) but just observed for a minute or so.</p>
<p>The first team was sitting down in a breakout area. Their body language spoke volumes. There was not one single participant maintaining eye contact with anybody else. Two people were playing on their phones. One developer had his head in his hands. Most had bored expressions. The team leader who is also the SCRUM master was the only person who spoke for the entire time I watched.</p>
<p>The second team was stood in a space near their desks. They were gathered round a task board which appeared to be up to date and the focus of several of the individual&#8217;s updates. One person spoke at a time. Almost everybody appeared to be paying attention to whomever was speaking. Most updates were short and concise. A couple rambled on.</p>
<p>Other than both teams calling their meeting a SCRUM I could see no similarities.</p>
<p>As our agile adoption has spread beyond the original teams I suppose it is inevitable that as the experience gets spread a little thinner that people will simply label their existing activities with agile sounding names. Often we have no clear remit in those teams to supply a mentor and to try offer advice would result in rebuttal as team leaders guard their territory. Does this matter? Is there a risk that these teams who are not practicing agile correctly will diminish and discredit agile in the eyes of our programme managers? This is sounding a bit like an excuse for an Agile Inquisition going round checking that no team is using Agile&#8217;s name in vain. This cannot be a good thing either.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.valtech.co.uk/agile/tale-of-two-scrum-stand-ups/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Value and cost in hardware and software</title>
		<link>http://blog.valtech.co.uk/agile-management/value-and-cost-in-hardware-and-software/</link>
		<comments>http://blog.valtech.co.uk/agile-management/value-and-cost-in-hardware-and-software/#comments</comments>
		<pubDate>Fri, 11 Sep 2009 15:10:00 +0000</pubDate>
		<dc:creator>Andrew Rendell</dc:creator>
				<category><![CDATA[Agile Management]]></category>

		<guid isPermaLink="false">http://www.rendell.org:80/pebble/software/2009/08/28/1251490800000.html</guid>
		<description><![CDATA[          <a href="http://agile2009.agilealliance.org/files/session_pdfs/Emergent%20Design%20and%20Evolutionary%20Architecture%20(Neal%20Ford).pdf">Neal Ford's presentation</a> on emerging architecture contained a reference to the controversial Intel practice in the 1990s regarding the 386-SX math co-pro. Intel were producing two variants of the 386 chip at the time:<br />
<ul>
    <li> The 386-DX which featured a math co-processor on board which allowed faster execution of floating point maths required in financial applications, graphics packages etc..</li>
    <li> The 386-SX which was cheaper but did not feature the math co-processor and therefore was less 'powerful'. It had enough to differentiate itself from the previous generation of 286 chips but was regarded as distinctly inferior to its more expensive sibling.</li>
</ul>
<br />
This all sounded fair enough until it became public that the 386-DX and 386-SX shared the same manufacturing process including the construction of the maths co-processor. Where the process differed was that at some point the math copro in the SX chip was destroyed via some mechanical process. Suddenly the perception of the SX went from a lower spec product to a broken product. In Neal Ford's presentation he described the whole process as Intel selling customers their trash, like the SX was a defective unit being offloaded to unsuspecting users as a working chip.<br />
<br />
At a very low technical level Neal's statement is true but not at a commercial or practical level. Intel engineers were given a change in requirements by their marketing department: Produce a chip that is going to enter the budget market to complement but not fully compete against the 386-DX. They looked at their system and determined the most efficient way to achieve this end was to 're-configure' existing 386-DX chips. This was likely much much cheaper than setting up a whole new production line and testing the brand new chip it produced. To do otherwise would be against the pragmatic engineering ideals that Agile is supposed to champion. If you flip the argument around and say: Should we redesign from scratch the entire process to achieve the same end result but at much higher cost just so that we claim that the chip contains no parts that it doesn't need. Maybe we find this so objectionable because a chip is a tangible entity and we are used to associating (rightly or wrongly) the cost of raw materials and manufacturing with the value of such items. Maybe we don't factor in the cost of design and marketing, which I suspect are massive for a complex, consumer electronic product like a cutting edge CPU.<br />
<br />
This pattern raised its head again, but with less fuss, a couple of years ago when HP shipped high end servers with multiple CPUs. Some of the CPUs were disabled upon delivery. If the customer's processing requirements increased over time (which they always do) then they could pay HP who could then remotely enable the additional processors without the customer incurring the cost of an engineer on site, downtime for installation etc. etc.. Again, this early step towards todays processing on demand cloud computing concept raised some eyebrows. Why should customer's pay for something that was going to cost the supplier nothing? Again, this is a preoccupation with the physical entity of the manufactured component. If the additional CPUs had been sitting idle in a HP server farm rather than at the customer's site and purchasing them involved work being sent across the network my suspicion is that nobody would have had any objections.<br />
<br />
We use a UML design tool at my current client site called Visual Paradigm. It has a number of editions, each with a different cost. It has a very flexible license purchase system which we have taken advantage of. We have a large number of standard level licenses because the features that this edition gives will support most of our users most of the time. Occasionally we need some of the features from a more expensive edition. Its not that only one or two individuals require these features, we all need them, just very occasionally. The Visual Paradigm license model supports this beautifully. We have a couple of higher edition licenses. On the rare occasion that users need the extra features they just start the program in the higher edition mode. As long as no other users connected to our license are using the higher edition at that time, there is no issue. The similarity with the examples above is that there is only one installation. We don't need to install a different program binary every time we switch edition. We love this as it makes life easy. I am sure Visual Paradigm like it as well as it simplifies their build and download process. <br />
<br />
Two me the two scenarios, software and hardware appear pretty much identical. Everybody appreciates that the cost of creating a copy of piece of software is so close to zero that it is not worth worrying about. Therefore we don't mind when a supplier gives us a product with bits disabled until we make a payment and get a magic key. It's harder to think of hardware in the same way, that the build cost doesn't matter. That there might be no difference in manufacturing costs for two products with very different customer prices. The cost of delivering the product, like delivering software, includes massive costs which have nothing to with creation of the physical artifact. &#160; <br />
<br />
Maybe this wasn't the point in the above presentation but I guess the thing that startled me was that my natural inclination was to immediately associate the value with the tangible item. In my head this is all getting mixed up with free (as in speech) software and the idea that it is unproductive and unethical to patent / own / charge for ideas.
        ]]></description>
			<content:encoded><![CDATA[<div class="bottomcontainerBox" style="background-color:#F0F4F9;">
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fblog.valtech.co.uk%2Fagile-management%2Fvalue-and-cost-in-hardware-and-software%2F&amp;layout=button_count&amp;show_faces=false&amp;width=85&amp;action=like&amp;font=verdana&amp;colorscheme=light&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width=85px; height:21px;" allowTransparency="true"></iframe></div>
			<div style="float:left; width:80px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<g:plusone size="medium" href="http://blog.valtech.co.uk/agile-management/value-and-cost-in-hardware-and-software/"></g:plusone>
			</div>
			<div style="float:left; width:95px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<a href="http://twitter.com/share" class="twitter-share-button" data-url="http://blog.valtech.co.uk/agile-management/value-and-cost-in-hardware-and-software/"  data-text="Value and cost in hardware and software" data-count="horizontal" data-via="valtech">Tweet</a>
			</div>			
			</div><div style="clear:both"></div><div style="padding-bottom:4px;"></div><p><a href="http://agile2009.agilealliance.org/files/session_pdfs/Emergent%20Design%20and%20Evolutionary%20Architecture%20(Neal%20Ford).pdf">Neal Ford&#8217;s presentation</a> on emerging architecture contained a reference to the controversial Intel practice in the 1990s regarding the 386-SX math co-pro. Intel were producing two variants of the 386 chip at the time:</p>
<ul>
<li> The 386-DX which featured a math co-processor on board which allowed faster execution of floating point maths required in financial applications, graphics packages etc..</li>
<li> The 386-SX which was cheaper but did not feature the math co-processor and therefore was less &#8216;powerful&#8217;. It had enough to differentiate itself from the previous generation of 286 chips but was regarded as distinctly inferior to its more expensive sibling.</li>
</ul>
<p>This all sounded fair enough until it became public that the 386-DX and 386-SX shared the same manufacturing process including the construction of the maths co-processor. Where the process differed was that at some point the math copro in the SX chip was destroyed via some mechanical process. Suddenly the perception of the SX went from a lower spec product to a broken product. In Neal Ford&#8217;s presentation he described the whole process as Intel selling customers their trash, like the SX was a defective unit being offloaded to unsuspecting users as a working chip.</p>
<p>At a very low technical level Neal&#8217;s statement is true but not at a commercial or practical level. Intel engineers were given a change in requirements by their marketing department: Produce a chip that is going to enter the budget market to complement but not fully compete against the 386-DX. They looked at their system and determined the most efficient way to achieve this end was to &#8216;re-configure&#8217; existing 386-DX chips. This was likely much much cheaper than setting up a whole new production line and testing the brand new chip it produced. To do otherwise would be against the pragmatic engineering ideals that Agile is supposed to champion. If you flip the argument around and say: Should we redesign from scratch the entire process to achieve the same end result but at much higher cost just so that we claim that the chip contains no parts that it doesn&#8217;t need. Maybe we find this so objectionable because a chip is a tangible entity and we are used to associating (rightly or wrongly) the cost of raw materials and manufacturing with the value of such items. Maybe we don&#8217;t factor in the cost of design and marketing, which I suspect are massive for a complex, consumer electronic product like a cutting edge CPU.</p>
<p>This pattern raised its head again, but with less fuss, a couple of years ago when HP shipped high end servers with multiple CPUs. Some of the CPUs were disabled upon delivery. If the customer&#8217;s processing requirements increased over time (which they always do) then they could pay HP who could then remotely enable the additional processors without the customer incurring the cost of an engineer on site, downtime for installation etc. etc.. Again, this early step towards todays processing on demand cloud computing concept raised some eyebrows. Why should customer&#8217;s pay for something that was going to cost the supplier nothing? Again, this is a preoccupation with the physical entity of the manufactured component. If the additional CPUs had been sitting idle in a HP server farm rather than at the customer&#8217;s site and purchasing them involved work being sent across the network my suspicion is that nobody would have had any objections.</p>
<p>We use a UML design tool at my current client site called Visual Paradigm. It has a number of editions, each with a different cost. It has a very flexible license purchase system which we have taken advantage of. We have a large number of standard level licenses because the features that this edition gives will support most of our users most of the time. Occasionally we need some of the features from a more expensive edition. Its not that only one or two individuals require these features, we all need them, just very occasionally. The Visual Paradigm license model supports this beautifully. We have a couple of higher edition licenses. On the rare occasion that users need the extra features they just start the program in the higher edition mode. As long as no other users connected to our license are using the higher edition at that time, there is no issue. The similarity with the examples above is that there is only one installation. We don&#8217;t need to install a different program binary every time we switch edition. We love this as it makes life easy. I am sure Visual Paradigm like it as well as it simplifies their build and download process.</p>
<p>Two me the two scenarios, software and hardware appear pretty much identical. Everybody appreciates that the cost of creating a copy of piece of software is so close to zero that it is not worth worrying about. Therefore we don&#8217;t mind when a supplier gives us a product with bits disabled until we make a payment and get a magic key. It&#8217;s harder to think of hardware in the same way, that the build cost doesn&#8217;t matter. That there might be no difference in manufacturing costs for two products with very different customer prices. The cost of delivering the product, like delivering software, includes massive costs which have nothing to with creation of the physical artifact.</p>
<p>Maybe this wasn&#8217;t the point in the above presentation but I guess the thing that startled me was that my natural inclination was to immediately associate the value with the tangible item. In my head this is all getting mixed up with free (as in speech) software and the idea that it is unproductive and unethical to patent / own / charge for ideas.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.valtech.co.uk/agile-management/value-and-cost-in-hardware-and-software/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Agile 2009</title>
		<link>http://blog.valtech.co.uk/agile/agile-2009/</link>
		<comments>http://blog.valtech.co.uk/agile/agile-2009/#comments</comments>
		<pubDate>Fri, 04 Sep 2009 16:57:00 +0000</pubDate>
		<dc:creator>Andrew Rendell</dc:creator>
				<category><![CDATA[Agile]]></category>
		<category><![CDATA[Agile2009]]></category>

		<guid isPermaLink="false">http://www.rendell.org:80/pebble/software/2009/08/28/1251478620000.html</guid>
		<description><![CDATA[          I have spent the week at the <a href="http://agile2009.agilealliance.org/">Agile2009</a> conference in Chicago. This annual conference, now in its eighth year, is the premier international gathering for agilsts. It caters for a whole spectrum of experience from new comers to the discipline to the gurus who are leading the way. <br />
<br />
I attended some very thought provoking sessions as well as presenting <a href="http://agile2009.agilealliance.org/files/session_pdfs/tower-agile2009-draft3.pdf">my own experience report</a> on techniques for technical architecture in an agile context. My colleague from Valtech US, Howard Deiner, battled hardware and network issues to present a well received <a href="http://agile2009.agilealliance.org/node/161">demonstration of Continuous Integration</a>. Both sessions got reasonable attendances in the face of stiff competition from competing presentations being held in parallel. Both received very positive feedback from attendees (mine scored 80% for command of topic and 78% overall). I got lots of positive feedback for my session in conversations with conference attendees throughout the week. This was very much appreciated.<br />
<br />
My presentation is backed up by an IEEE Report which was published in the conference proceedings. The report's premise is that incumbent waterfall software development processes force technical architects into a position of isolation and ineffectiveness (the ivory tower). The challenge I (any many many other TAs) have faced is how to deliver the guarantees of technical correctness and consistency that clients (especially those moving from waterfall to agile) demand when some of the most widely used conventional techniques for architecture have been discredited. I am thinking primarily of the emphasis placed on up front detailed design and architectural review. <br />
<br />
The report details architectural problems during scale up of a previously successful agile project. The report then describes and evaluates a number of techniques employed on the project to deliver the technical architecture without ascent of the ivory tower. The conclusions include the justification that documentation is not an effective tool for technical governance and that the architect must target activities which bring them closer the the actual implementation. This mirrors Neal Ford's point in his <a href="http://agile2009.agilealliance.org/node/1146">Emerging Architecture</a> presentation that we need to accept that the real design <strong>is the code</strong>, not the summaries and abstractions of the code presented via the numerous tools (UML, narrative documents, whiteboard sessions) at our disposal. Other conclusions include the identification of automated tests as an architect's, not just a tester's, most effective tool for delivering a correct solution. The paper also identifies that soft skills around communication and people management, often the anathema of the conventional architect are critical to success. Finally the report concludes that utilizing the most cost effective techniques (rather than just the most technically powerful) were key. (That does not mean you cannot justify the use of expensive techniques, just that they may only be justifiable on the most important components in the system).<br />
<br />
Agile 2009 was a great balance of real world experiences (such as my session) and more philosophical, academic sessions. There also the chance to listen to some insightful keynotes and take part in some exciting expert sessions which challenged the way we work. It is always easier to learn in a community of professionals with real experience and this was definitely the case at this conference. I learned as much over dinner and in break out sessions as I did in the formal seminars.<br />
<br />
I am going to blog what I learned in some of sessions in the next couple of days, possibly earlier as I am stuck at Chicago O'Hare for eleven hours after a 'mechanical issue' with our plane!
        ]]></description>
			<content:encoded><![CDATA[<div class="bottomcontainerBox" style="background-color:#F0F4F9;">
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fblog.valtech.co.uk%2Fagile%2Fagile-2009%2F&amp;layout=button_count&amp;show_faces=false&amp;width=85&amp;action=like&amp;font=verdana&amp;colorscheme=light&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width=85px; height:21px;" allowTransparency="true"></iframe></div>
			<div style="float:left; width:80px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<g:plusone size="medium" href="http://blog.valtech.co.uk/agile/agile-2009/"></g:plusone>
			</div>
			<div style="float:left; width:95px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<a href="http://twitter.com/share" class="twitter-share-button" data-url="http://blog.valtech.co.uk/agile/agile-2009/"  data-text="Agile 2009" data-count="horizontal" data-via="valtech">Tweet</a>
			</div>			
			</div><div style="clear:both"></div><div style="padding-bottom:4px;"></div><p>I have spent the week at the <a href="http://agile2009.agilealliance.org/">Agile2009</a> conference in Chicago. This annual conference, now in its eighth year, is the premier international gathering for agilsts. It caters for a whole spectrum of experience from new comers to the discipline to the gurus who are leading the way.</p>
<p>I attended some very thought provoking sessions as well as presenting <a href="http://agile2009.agilealliance.org/files/session_pdfs/tower-agile2009-draft3.pdf">my own experience report</a> on techniques for technical architecture in an agile context. My colleague from Valtech US, Howard Deiner, battled hardware and network issues to present a well received <a href="http://agile2009.agilealliance.org/node/161">demonstration of Continuous Integration</a>. Both sessions got reasonable attendances in the face of stiff competition from competing presentations being held in parallel. Both received very positive feedback from attendees (mine scored 80% for command of topic and 78% overall). I got lots of positive feedback for my session in conversations with conference attendees throughout the week. This was very much appreciated.</p>
<p>My presentation is backed up by an IEEE Report which was published in the conference proceedings. The report&#8217;s premise is that incumbent waterfall software development processes force technical architects into a position of isolation and ineffectiveness (the ivory tower). The challenge I (any many many other TAs) have faced is how to deliver the guarantees of technical correctness and consistency that clients (especially those moving from waterfall to agile) demand when some of the most widely used conventional techniques for architecture have been discredited. I am thinking primarily of the emphasis placed on up front detailed design and architectural review.</p>
<p>The report details architectural problems during scale up of a previously successful agile project. The report then describes and evaluates a number of techniques employed on the project to deliver the technical architecture without ascent of the ivory tower. The conclusions include the justification that documentation is not an effective tool for technical governance and that the architect must target activities which bring them closer the the actual implementation. This mirrors Neal Ford&#8217;s point in his <a href="http://agile2009.agilealliance.org/node/1146">Emerging Architecture</a> presentation that we need to accept that the real design <strong>is the code</strong>, not the summaries and abstractions of the code presented via the numerous tools (UML, narrative documents, whiteboard sessions) at our disposal. Other conclusions include the identification of automated tests as an architect&#8217;s, not just a tester&#8217;s, most effective tool for delivering a correct solution. The paper also identifies that soft skills around communication and people management, often the anathema of the conventional architect are critical to success. Finally the report concludes that utilizing the most cost effective techniques (rather than just the most technically powerful) were key. (That does not mean you cannot justify the use of expensive techniques, just that they may only be justifiable on the most important components in the system).</p>
<p>Agile 2009 was a great balance of real world experiences (such as my session) and more philosophical, academic sessions. There also the chance to listen to some insightful keynotes and take part in some exciting expert sessions which challenged the way we work. It is always easier to learn in a community of professionals with real experience and this was definitely the case at this conference. I learned as much over dinner and in break out sessions as I did in the formal seminars.</p>
<p>I am going to blog what I learned in some of sessions in the next couple of days, possibly earlier as I am stuck at Chicago O&#8217;Hare for eleven hours after a &#8216;mechanical issue&#8217; with our plane!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.valtech.co.uk/agile/agile-2009/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Use of best of breed open source</title>
		<link>http://blog.valtech.co.uk/systems-thinking/use-of-best-of-breed-open-source/</link>
		<comments>http://blog.valtech.co.uk/systems-thinking/use-of-best-of-breed-open-source/#comments</comments>
		<pubDate>Mon, 17 Aug 2009 20:42:41 +0000</pubDate>
		<dc:creator>Andrew Rendell</dc:creator>
				<category><![CDATA[Systems Thinking]]></category>

		<guid isPermaLink="false">http://www.rendell.org:80/pebble/software/2009/08/17/1250541761919.html</guid>
		<description><![CDATA[
          Over the last two years of my current project I have noticed a recuring pattern. On several occasions we have identified an implementation pattern which commonly appears on many enterprise projects. That pattern is common enough that there is a well known (i.e. at least one person in the team has heard of it) open source solution which appears to be recognised by the community as being best of breed. In order to reduce risk and increase our velocity we use that open source component, possibly making changes to the design to more effectively incorporate the ready to run package. The theory (and one I fully buy into) being that be using the open source library we free up time to concentrate on the part of our solution which are truly unique and require bespoke software. <br />
<br />
The recurring pattern I see is that on at least four occasions the best of breed package has proven to be severely sub-optimal. What is worse is that most of the time these deficiencies occur when we move into high volume load test in a cluster. It seems only then that we discover some limitation. Typically this is caused by a particular specialism required for our application which then exercises some part of the library that is not as commonly utilised as others and therefore less stable. Some times the limitation is so bad that the library has to be refactored out before launch and other occasions the issue becomes a known restriction which is corrected at the next release. All of the significant refactorings have involved replacement of the large, generic, well known library with a much smaller, simpler, bespoke piece of code.<br />
<br />
I am undecided whether this is a positive pattern or not. On one hand using the standard component for a short period helped us focus on other pieces of code. On the other, the identification of issues consumed significant resource during a critical (final load test) period. The answer probably is that it is okay to use the standard component as long as we put it under production stresses as quickly as possible. We then need to very carefully take account of the effort being consumed and have an idea of the relative cost of an alternative solution. When the cost of the standard component begins to approach the cost of the bespoke then we must move swiftly to replace it. The cost should also factor in maintenance. We need to avoid the behaviour where we sit round looking at each other repeating &#34;This is highly regarded piece of software, it can't be wrong, it must be us.&#34; for prolonged periods (its okay to say this for a couple of hours, it could be true). I used to work for a well known RDBMS provider. I always felt that the core database engine was awesomely high quality and that anybody who claimed to have found a defect was probably guilty of some sloppy engineering. I knew however, from painful experience, that you did not have to stray far from the core into the myriad of supported options and ancillary products to enter a world of pure shite. The best of breed open source components are no different.<br />
<br />
Some of the problem components:<br />
<br />
ActiveMQ (2007) - We thought we needed an in memory JMS solution and AcitveMQ looked like an easy win. It turned out that at that release the in-memory queue had a leak which required a server restart every ten to fifteen days. It also added to the complexity of the solution. Was replaced by very few lines of code utilising the Java 5 concurrency package. I would still go back to it for another look, but only if I was really sure I needed JMS.<br />
<br />
Quartz (2007) - The bane of our operations team's life as it would not shutdown cleanly when under load and deployed as part of a Spring application. Replaced by the Timer class and some home grown JDBC.<br />
<br />
Quartz (2009) - Once bitten, twice shy? Not us! The shutdown issue was resolved and we needed a richer scheduling tool. Quartz looked like the ticket and worked well during development and passed the limited load testing we were able to do on workstations. When we moved up to the production sized hardware and were able to put realistic load through we discovered issues with the RAMJobStore that were not present with the JDBC store (which we didn't need). It just could not cope with very large (100 000+) numbers of jobs where new jobs were being added and old ones deleted constantly.
        ]]></description>
			<content:encoded><![CDATA[<div class="bottomcontainerBox" style="background-color:#F0F4F9;">
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fblog.valtech.co.uk%2Fsystems-thinking%2Fuse-of-best-of-breed-open-source%2F&amp;layout=button_count&amp;show_faces=false&amp;width=85&amp;action=like&amp;font=verdana&amp;colorscheme=light&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width=85px; height:21px;" allowTransparency="true"></iframe></div>
			<div style="float:left; width:80px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<g:plusone size="medium" href="http://blog.valtech.co.uk/systems-thinking/use-of-best-of-breed-open-source/"></g:plusone>
			</div>
			<div style="float:left; width:95px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<a href="http://twitter.com/share" class="twitter-share-button" data-url="http://blog.valtech.co.uk/systems-thinking/use-of-best-of-breed-open-source/"  data-text="Use of best of breed open source" data-count="horizontal" data-via="valtech">Tweet</a>
			</div>			
			</div><div style="clear:both"></div><div style="padding-bottom:4px;"></div><p>          Over the last two years of my current project I have noticed a recuring pattern. On several occasions we have identified an implementation pattern which commonly appears on many enterprise projects. That pattern is common enough that there is a well known (i.e. at least one person in the team has heard of it) open source solution which appears to be recognised by the community as being best of breed. In order to reduce risk and increase our velocity we use that open source component, possibly making changes to the design to more effectively incorporate the ready to run package. The theory (and one I fully buy into) being that be using the open source library we free up time to concentrate on the part of our solution which are truly unique and require bespoke software. </p>
<p>The recurring pattern I see is that on at least four occasions the best of breed package has proven to be severely sub-optimal. What is worse is that most of the time these deficiencies occur when we move into high volume load test in a cluster. It seems only then that we discover some limitation. Typically this is caused by a particular specialism required for our application which then exercises some part of the library that is not as commonly utilised as others and therefore less stable. Some times the limitation is so bad that the library has to be refactored out before launch and other occasions the issue becomes a known restriction which is corrected at the next release. All of the significant refactorings have involved replacement of the large, generic, well known library with a much smaller, simpler, bespoke piece of code.</p>
<p>I am undecided whether this is a positive pattern or not. On one hand using the standard component for a short period helped us focus on other pieces of code. On the other, the identification of issues consumed significant resource during a critical (final load test) period. The answer probably is that it is okay to use the standard component as long as we put it under production stresses as quickly as possible. We then need to very carefully take account of the effort being consumed and have an idea of the relative cost of an alternative solution. When the cost of the standard component begins to approach the cost of the bespoke then we must move swiftly to replace it. The cost should also factor in maintenance. We need to avoid the behaviour where we sit round looking at each other repeating &quot;This is highly regarded piece of software, it can&#8217;t be wrong, it must be us.&quot; for prolonged periods (its okay to say this for a couple of hours, it could be true). I used to work for a well known RDBMS provider. I always felt that the core database engine was awesomely high quality and that anybody who claimed to have found a defect was probably guilty of some sloppy engineering. I knew however, from painful experience, that you did not have to stray far from the core into the myriad of supported options and ancillary products to enter a world of pure shite. The best of breed open source components are no different.</p>
<p>Some of the problem components:</p>
<p>ActiveMQ (2007) &#8211; We thought we needed an in memory JMS solution and AcitveMQ looked like an easy win. It turned out that at that release the in-memory queue had a leak which required a server restart every ten to fifteen days. It also added to the complexity of the solution. Was replaced by very few lines of code utilising the Java 5 concurrency package. I would still go back to it for another look, but only if I was really sure I needed JMS.</p>
<p>Quartz (2007) &#8211; The bane of our operations team&#8217;s life as it would not shutdown cleanly when under load and deployed as part of a Spring application. Replaced by the Timer class and some home grown JDBC.</p>
<p>Quartz (2009) &#8211; Once bitten, twice shy? Not us! The shutdown issue was resolved and we needed a richer scheduling tool. Quartz looked like the ticket and worked well during development and passed the limited load testing we were able to do on workstations. When we moved up to the production sized hardware and were able to put realistic load through we discovered issues with the RAMJobStore that were not present with the JDBC store (which we didn&#8217;t need). It just could not cope with very large (100 000+) numbers of jobs where new jobs were being added and old ones deleted constantly.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.valtech.co.uk/systems-thinking/use-of-best-of-breed-open-source/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Professional Services Day</title>
		<link>http://blog.valtech.co.uk/valtech/professional-services-day/</link>
		<comments>http://blog.valtech.co.uk/valtech/professional-services-day/#comments</comments>
		<pubDate>Fri, 05 Jun 2009 20:05:00 +0000</pubDate>
		<dc:creator>Andrew Rendell</dc:creator>
				<category><![CDATA[Valtech]]></category>

		<guid isPermaLink="false">http://www.rendell.org:80/pebble/software/2009/06/05/1244232300000.html</guid>
		<description><![CDATA[
          We had an excellent professional services day today. Rather than the previous format of set talks and dry presentations the organiser used the Open Spaces pattern. He drew up a grid with time slots and rooms then invited the attendees to write a single topic suggestion on a card and out it in a slot. When everybody who wanted to put a card in then he invited a second and then a third round.<br />
The result was a suprisingly large number of different sessions. I was able to make it through the day without having to sit through anything dull or non-applicable. The large number of sessions meant that the groups were small and everybody got to interact. Good stuff!
        ]]></description>
			<content:encoded><![CDATA[<div class="bottomcontainerBox" style="background-color:#F0F4F9;">
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fblog.valtech.co.uk%2Fvaltech%2Fprofessional-services-day%2F&amp;layout=button_count&amp;show_faces=false&amp;width=85&amp;action=like&amp;font=verdana&amp;colorscheme=light&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width=85px; height:21px;" allowTransparency="true"></iframe></div>
			<div style="float:left; width:80px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<g:plusone size="medium" href="http://blog.valtech.co.uk/valtech/professional-services-day/"></g:plusone>
			</div>
			<div style="float:left; width:95px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<a href="http://twitter.com/share" class="twitter-share-button" data-url="http://blog.valtech.co.uk/valtech/professional-services-day/"  data-text="Professional Services Day" data-count="horizontal" data-via="valtech">Tweet</a>
			</div>			
			</div><div style="clear:both"></div><div style="padding-bottom:4px;"></div><p>          We had an excellent professional services day today. Rather than the previous format of set talks and dry presentations the organiser used the Open Spaces pattern. He drew up a grid with time slots and rooms then invited the attendees to write a single topic suggestion on a card and out it in a slot. When everybody who wanted to put a card in then he invited a second and then a third round.<br />
The result was a suprisingly large number of different sessions. I was able to make it through the day without having to sit through anything dull or non-applicable. The large number of sessions meant that the groups were small and everybody got to interact. Good stuff!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.valtech.co.uk/valtech/professional-services-day/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

