<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>

<channel>
	<title>Digital Dim Sum</title>
	<atom:link href="http://www.digitaldimsum.co.uk/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.digitaldimsum.co.uk</link>
	<description>Bite sized info snacks for the digital generation</description>
	<pubDate>Thu, 12 Jun 2008 05:49:59 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
	<language>en</language>
			<item>
		<title>Design can change the world</title>
		<link>http://www.digitaldimsum.co.uk/2008/06/12/design-can-change-the-world/</link>
		<comments>http://www.digitaldimsum.co.uk/2008/06/12/design-can-change-the-world/#comments</comments>
		<pubDate>Thu, 12 Jun 2008 01:49:44 +0000</pubDate>
		<dc:creator>jonny</dc:creator>
		
		<category><![CDATA[computing]]></category>

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

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

		<guid isPermaLink="false">http://www.digitaldimsum.co.uk/?p=42</guid>
		<description><![CDATA[<p>My new favorite t-shirt says &#8220;design can change the world&#8221;. I got it from a <a href="http://www.projecthdesign.com/">cool little not-for-profit</a> whose cunning designs have a disproportionate impact in solving problems in developing countries.</p>
<p>Their <a href="http://projecthdesign.com/2008/02/17/h-is-for-hippo/">current flagship project</a>, the <a href="http://www.hipporoller.org/">hippo roller</a>, though not much more than a tough plastic barrel and pulling handle, is beginning to have an immense impact on the role of women in developing societies.</p>
<p><!--more--></p>
<p><a title="Hippo Roller Water Carriers" href="http://projecthdesign.com/2008/02/17/h-is-for-hippo/"><img class="alignleft" style="margin: 4px; float: left;" src="http://projecthdesign.com/wp-content/uploads/2008/04/hippos_thumb.jpg" alt="Hippo Roller" width="208" height="98" /></a>In many small villages a large proportion of a woman&#8217;s day is spent fetching water. This design allows a single person to transport a much larger amount of water much more quickly with much less effort (I might be able to push a car, but I could never carry one on my head). The beauty of this invention isn&#8217;t just in the immediate benefit of more water, but in the benefits that flow downstream (all puns intended) of freeing women and children up from this back-breaking work and giving them time to focus on education and self-improvement. This then has a massive cumulative beneficial impact on the rest of the village. All this just from applying a very old solution (the wheel) to a very old problem. Social change through re-inventing the wheel.</p>
<p><a href="http://www.darfurstoves.org/darfur-stove/"><img class="alignright" style="margin: 4px; float: right;" src="http://www.darfurstoves.org/images/small_darfur_stove.jpg" alt="Darfur Stove" width="98" height="122" /></a>In a similar vein <a href="http://www.ewb-usa.org/">Engineers Without Borders</a> have been applying advanced design to alleviate a growing problem in Dafur refugee camps. The problem is that collecting firewood is becoming an increasingly dangerous activity. The area immediately surrounding the camps has been denuded of tinder so the women have to go further and further to gather the wood required to feed their families. This has the double-whammy impact of both increasing malnutrition as less meals are cooked and increasing the chances of being mugged or raped by the marauding gangs in the outlying areas.</p>
<p>The solution <a title="LBNL" href="http://darfurstoves.lbl.gov/">the clever kids from Berkeley</a> designed to meet this problem is beautifully simple - make <a href="http://www.darfurstoves.org/">a more efficient stove</a>. The more efficient the stove, the less fuel you need to cook the same amount of food. The less fuel you need, the less time needs to be spent scavenging. The less wood that is removed from around the camps, the less the resources get depleted. The less the resources get depleted, the more people the area can sustain. That&#8217;s what I call a virtuous circle.</p>
<p><a href="http://www.inveneo.org/?q=prodsvcs"><img class="alignleft" style="margin: 4px; float: left;" src="http://www.inveneo.org/img/screenshot-3.jpg" alt="Inveneo Linux" width="150" height="112" /></a>Another not-for-profit I&#8217;ve been lucky enough to be involved with, <a href="http://www.inveneo.com/">Inveneo</a>, have a more high-tech solution, but a similar understanding of how to trigger these positive feedback loops by introducing efficiency gains early on in the process. Even though you may pay more for the hardware, <a href="http://www.inveneo.org/?q=poweradvantage">if you draw down less power the downstream benefits are magnified to dwarf the initial outlay</a>. By improving the power consumption of their hardware and software <a href="http://www.inveneo.com/">Inveneo</a> manage to make computing infrastructure affordable enough for poor societies to sustain the ongoing costs themselves.</p>
<p>What ties these all together is maximizing the efficiency of resource utilization - getting more results from less input. But what makes it even better is that the beneficial results seem to be exponential. The savings fan out as the compounding effects of the initial efficiencies multiply.</p>
<p>The eureka moment for me was realizing that changing the world needn&#8217;t involve a lot of hard work - it&#8217;s all about leveraging small efficiencies. Archimedes knew this when he said &#8220;give me a fulcrum on which to rest and I will move the world.&#8221; By increasing efficiency at an early stage in a process the benefits compound along the way, giving us the lever required to shift the direction of our resource depleting way of life.</p>
]]></description>
		<wfw:commentRss>http://www.digitaldimsum.co.uk/2008/06/12/design-can-change-the-world/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Robot rights? My foot!</title>
		<link>http://www.digitaldimsum.co.uk/2008/05/21/robot-rights-my-foot/</link>
		<comments>http://www.digitaldimsum.co.uk/2008/05/21/robot-rights-my-foot/#comments</comments>
		<pubDate>Wed, 21 May 2008 01:21:54 +0000</pubDate>
		<dc:creator>jonny</dc:creator>
		
		<category><![CDATA[philosophy]]></category>

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

		<guid isPermaLink="false">http://www.digitaldimsum.co.uk/?p=41</guid>
		<description><![CDATA[<p>San Francisco is a wonderful place - I ended up having an interesting discussion last night with a self-styled &#8220;geek-at-large&#8221; about robots, ethics and unix while hanging out at <a href="http://www.inveneo.org">a not-for-profit who are improving the world one wi-fi network at a time</a>.</p>
<p>The robot maker&#8217;s argument was that robots don&#8217;t have to be super intelligent to carry out some pretty useful, robotic, tasks. He was suggesting that there&#8217;s a blind-alley in robotic research premised on being able to map and track everything in your environment in order to move and interact effectively. His argument was that instead you just needed to be able to identify a goal to move towards and be able to avoid collisions. That is a much simpler goal than understanding your whole environment.</p>
<p><!--more--><!--more-->This leads to a different attitude to creating robots: have multiple robots, each good at doing one thing and then find a way to co-ordinate them. This is very much the Unix way as opposed to the Windows way.</p>
<p>From a feasibility and an affordability point of view this simplistic approach is much more achievable than the all singing all dancing uber computer often depicted in futuristic films. But his favored (and more philosophical) argument for this simplistic approach was that it would verge on the unethical to build a quasi-sentient being and then just ask it to fold your laundry every day. This is the <a href="http://en.wikipedia.org/wiki/Marvin_the_Paranoid_Android">Marvin-esque</a> argument that the more human-like you make a robot the more you have to start affording it human-like rights.</p>
<p>Despite being interesting this line of argument instinctively felt wrong to most of us. Someone suggested the comparison with dogs, but it soon became clear that we feel animals have some level of rights too, whereas you don&#8217;t expect your computer or phone to complain when you keep asking it to check your email every few minutes. While there is clearly a <strong>quantitative</strong> difference between the rights of a human and a dog, there seems to be a <strong>qualitative</strong> difference between those of an animal and the rights we&#8217;d afford to a robot (however intelligent).</p>
<p>So I interjected and asked the simple question: <em></em></p>
<blockquote><p><em>Does my hand have rights?</em></p></blockquote>
<p>I ask my hand and my feet to do things all day (just like my computer) and I don&#8217;t expect them to complain or tell me they&#8217;re busy. This seemed to clarify the distinction for me that I&#8217;d been struggling to find.</p>
<p>The difference in my mind is that humans and other animals have their own goals that they are responsible for selecting (within some nature and nurture constrained boundaries). Robots (and hands and feet) on the other hand (<span title="All Puns Intended">API</span>) are mere tools and don&#8217;t have separate goals or aspirations. This lack of goals and aspirations is the key differentiating factor that makes me feel comfortable not giving a robot freedom of speech / assembly / religion etc. I retain the absolute right to reformat my computer&#8217;s hard drive or swap it&#8217;s RAM without feeling any pangs of guilt.</p>
]]></description>
		<wfw:commentRss>http://www.digitaldimsum.co.uk/2008/05/21/robot-rights-my-foot/feed/</wfw:commentRss>
		</item>
		<item>
		<title>The first bite is with the eye</title>
		<link>http://www.digitaldimsum.co.uk/2008/05/09/the-first-bite-is-with-the-eye/</link>
		<comments>http://www.digitaldimsum.co.uk/2008/05/09/the-first-bite-is-with-the-eye/#comments</comments>
		<pubDate>Fri, 09 May 2008 02:40:30 +0000</pubDate>
		<dc:creator>jonny</dc:creator>
		
		<category><![CDATA[UI]]></category>

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

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

		<guid isPermaLink="false">http://www.digitaldimsum.co.uk/?p=29</guid>
		<description><![CDATA[<p>I think I first heard the phrase &#8220;<em>the first bite is with the eye</em>&#8221; from a TV chef, but it applies equally to the software creation process as it does to cookery.</p>
<p>A user&#8217;s interaction with a piece of software or web site is as much emotional as it is functional. Compare the soft, warm, fuzzy feeling you get when first interacting with a product from <a href="http://www.37signals.com/">37 Signals</a>, say, to the <a href="http://noteshater.blogspot.com/">stomach churning reaction you get when booting up Lotus Notes</a>, for example.</p>
<p>This immediate emotional response will pervade the whole of a user&#8217;s long-term impression of a product, imbuing their relationship with whatever feeling was conjured up in those preliminary interactions. They say that in most job interviews the interviewer makes up their mind within the first 5 minutes. The same is equally true for software.</p>
<p><!--more--></p>
<p>That&#8217;s the reason that I&#8217;m often accused of prematurely optimizing the UI. I&#8217;ve been round the block enough times to have been bitten by the following type of interaction:</p>
<p>Me: &#8220;This is just a wire-frame, we&#8217;re only trying to prove out the functional flows of the application. Don&#8217;t worry about the layout or the look and feel - that will be dealt with later.&#8221;</p>
<p>Client: &#8220;Ooh, I don&#8217;t like that font &#8230; and I think that&#8217;s our old logo. Maybe we should give it a drop-shadow or something. I&#8217;m disappointed, I expected more from you guys &#8230;&#8221;</p>
<p>After a host of similar experiences I now make sure that I give whatever product I&#8217;m working on an appropriate level of design and polish for the current stage, while still trying to evoke positive emotional responses. In my mind it&#8217;s always worth spending an hour or two tweaking a CSS file to tighten the layout, soften the lines and add a little sparkle - a little :hover goes a long way. Then even if the application isn&#8217;t functionally complete at least it looks professional and imbues the client with a sense of confidence and pleasure. This will put them into a much more positive state of mind, which can only be a good thing for the next stages of the project.</p>
<p>Call me shallow if you want, but when I arrive at a (studiously) un-styled site, like <a href="http://martinfowler.com/">our guru Martin Fowler&#8217;s</a>, I have a negative knee-jerk reaction making me resist reading the wise words he&#8217;s actually written. When, however, I land on a site <a href="http://www.digitaldimsum.co.uk/">where they care about the first bite</a> I feel compelled to carry on reading all day.</p>
<p>If someone in a meeting has a bit of chopped herb stuck in their teeth it&#8217;s really hard to focus on what they&#8217;re saying - you get distracted and have a negative emotional response. In the same way drizzling some coulis and sprinkling a bit of chopped herb onto a plate before serving can provoke a positive emotional response which fools the diner into enjoying their food more.</p>
]]></description>
		<wfw:commentRss>http://www.digitaldimsum.co.uk/2008/05/09/the-first-bite-is-with-the-eye/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Build Transformation across an Organization</title>
		<link>http://www.digitaldimsum.co.uk/2008/04/17/build-transformation-across-an-organization/</link>
		<comments>http://www.digitaldimsum.co.uk/2008/04/17/build-transformation-across-an-organization/#comments</comments>
		<pubDate>Thu, 17 Apr 2008 06:55:07 +0000</pubDate>
		<dc:creator>jonny</dc:creator>
		
		<category><![CDATA[build]]></category>

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

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

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

		<guid isPermaLink="false">http://www.digitaldimsum.co.uk/?p=34</guid>
		<description><![CDATA[<p>My most recent project was helping a major online retailer  to mature their build process as part of a wider effort to improve their IT effectiveness through the injection of development best practices.</p>
<p>When we came onboard manual intervention was needed for any of their builds or deployments to work and so it was rare for more than a couple of builds or deployments to be completed successfully in a day. Now we often have up to 1,000 builds running every day - what’s more the majority of them now pass!</p>
<p>This article looks at a few of the techniques we’ve had to put in place to enable this transformation and what we’ve learnt along the way.</p>
<p><!--more--></p>
<h3>Dividing up builds - separation of responsibilities</h3>
<p>Initially we had two versions of the build - one that would run on commit and a second that would only run at night. The two versions did pretty much the same things, except the nightly builds would deploy to a shared testing environment. Deployments only happened at night to avoid disruption to the multiple teams working in this shared environment (another smell to be dealt with later). The on-commit build did compilation, unit testing and packaging - the nightly build did the same and then handled environment preparation and deployment.<br />
There were a few problems with this:</p>
<ul>
<li>The on-commit builds ran slowly because they were doing a lot of work</li>
<li>The nightly builds were very brittle since responsibility for different parts of the build (compilation, packaging, deployment etc) was split among multiple teams - a failure at any step would mean QA didn&#8217;t have a new build to test that day</li>
<li>It wasn&#8217;t <a title="Don't Repeat Yourself" href="http://en.wikipedia.org/wiki/Don't_repeat_yourself">DRY</a></li>
</ul>
<p>Our solution was to divide the monolithic build up into several smaller steps and tie the steps together into a &#8220;build pipeline&#8221;, with each step triggered by a successfully completed &#8220;upstream&#8221; build. Our pipeline was divided into quick, assemble, package, deployment and regression builds. “Downstream” builds would pick up the artifacts prepared at the previous step in the build.</p>
<p>This lead to various beneﬁts:</p>
<ul>
<li>Each build ran more quickly</li>
<li>We didn&#8217;t repeat steps</li>
<li>It was easier to divide up responsibilities for keeping the different builds green:
<ul>
<li>Developers :: <em>quick</em> build (compilation + unit tests)</li>
<li>Build team :: <em>assemble</em> build (jar, war, ear creation etc)</li>
<li>Deployment team :: <em>package + deployment</em> (preparing RPMs / configuration / deploying)</li>
<li>QA team :: <em>regression suites</em></li>
</ul>
</li>
<li>Because we used the &#8220;last known good&#8221; upstream artifact, deployments weren&#8217;t blocked by a last minute problem upstream in the pipeline.</li>
<li>We were now in a position to split the builds up over more boxes to achieve greater throughput through parallelism</li>
</ul>
<p>This concept of dividing the responsibilities (at least for ﬁrst and second line build support) had a major impact on improving success rates and response times to failures through an increased sense of ownership of the process.</p>
<h3>Tying the builds together - HTTP publishing</h3>
<p>In an ideal world the input for a downstream build should be the output from an upstream build - the appearance of a new artifact from one build would trigger the next build down the chain. In our situation that wasn’t quite possible (the server topology and optimal dividing lines between builds, from a speed point of view, didn’t favor communicating via artifacts) so we took a different approach.</p>
<p>Our solution was for builds to communicate with each other via small properties ﬁles, published locally and accessed over HTTP. On successful completion each build publishes a properties ﬁle (to the local Cruise web-server) containing the build number and SVN revision of the build. We built a custom Cruise publisher to handle this. We also built a custom Cruise HTTP modiﬁcation-set to watch for upstream builds and an HTTP label-incrementer to keep all the build numbers in the pipeline in sync. The same build number is used through each of the steps of the build, making it easier to check whether changes have ﬂowed through to the QA environment – more on this later.</p>
<h3>Watching the river flow - visualizing the build pipeline</h3>
<p>Once we had divided up the builds and added further applications, we ended up with close to 100 builds that needed to be managed and monitored. Since they were spread across multiple boxes to increase throughput this wasn&#8217;t as easy as just watching one large cruise page. So we built a centralized page for aggregating together the build results.<br />
<img class="alignnone size-full wp-image-35" title="Dashboard" src="http://www.digitaldimsum.co.uk/wp-content/uploads/2008/04/dashboard.gif" alt="" width="433" height="191" /></p>
<p>The dashboard page was comprised of a few separate components:</p>
<ul>
<li>Current build status grid</li>
<li>Graph of passing v failing builds over time</li>
<li>Graph of build times per type / step in the pipeline</li>
<li>Quick list of which builds are currently broken</li>
<li>Some basic code metrics</li>
</ul>
<p>We also provided similar drill-down pages, filtered just to show data on a single application or step in the pipeline. These then link through to the actual Cruise pages for log files, failure reasons and test results.</p>
<h3>Current build status grid</h3>
<p>The current build status grid  was probably the greatest breakthrough. The basic idea was to show the  current status of all our builds in a simply structured manner. Over  a few iterations we evolved a grid structure (a bit like battleships!).  The columns in the grid represented steps in the build pipeline and  the rows the different applications we were building. The columns were  repeated for each active branch. Cells were then green if the build  was good, red if it was bad and yellow if the last build was good, but  was more than 24 hours old (stale). Mouseovers give more details about  the selected build, such as when it ran and what its build number was.</p>
<p><img class="alignnone size-full wp-image-37" title="status-grid" src="http://www.digitaldimsum.co.uk/wp-content/uploads/2008/04/status-grid.gif" alt="" width="434" height="308" /></p>
<p>From this view informative  patterns were clearly distinguishable with a cursory glance. It became  obvious if problems were localized or spread across a specific application  or step in the pipeline.</p>
<p>Initially we emailed a snapshot  of the grid first thing in the morning and at the end of the day to  management and the teams. This had the wonderful effect of halting all  the annoying questions and sparking the interesting ones. Instead of  people asking whether a build was successful or what build number was  last deployed to QA we got questions like:</p>
<ul>
<li>Why are all the    assembly builds broken?</li>
<li>Why is all of application X broken?</li>
<li>Why hasn’t application Y built for 2 days?</li>
<li>Why is there a build on the prod support branch?</li>
<li>Wow – everything’s green – shall we go to the pub?</li>
</ul>
<p>This definitely shone the spotlight  in a few uncomfortable places, but the visible improvements this lead  to made it worthwhile. It became an invaluable tool for educating people  about how the pipeline works. Once people understood and were reliant  on the data we replaced the emails with a dynamic, self-service, application  hosting the data.</p>
<h3>Graphing build metrics over time</h3>
<p>We also had great success with  some of our time-based visualizations. Simply graphing the times of  each step in the build pipeline over the last month quickly highlighted  problems as they developed. In one case we realized that all the packaging  builds were getting geometrically slower and slower – a quick bit  of research showed that each build was adding new artifacts to SVN and  the ensuing checkouts were suffering. We fixed this problematic practice  and had a massive positive impact on the total throughput of the pipeline.</p>
<p>The historic view of successful  vs. failing builds over time was also a particularly useful tool while  we were focusing on improving the stability of our deployments to QA  / UAT. This gave us a simple report on how we were doing – 50% success  last week, 75% this week – woo hoo!</p>
<h3>Sparklines</h3>
<p>We found a simple yet effective  way of communicating a large amount of information about how a build  has been performing by using “sparklines”.</p>
<p><img class="alignnone size-full wp-image-36" title="sparklines" src="http://www.digitaldimsum.co.uk/wp-content/uploads/2008/04/sparklines.gif" alt="" width="434" height="242" /></p>
<p>For a given build these graphs  communicate the number, duration and success of a large quantity of  builds. You can quickly get an idea of how things are trending. Again  mouseovers provide more details, context and drill down.</p>
<h3>Under the hood</h3>
<p>Initially the grid was generated  and emailed by a scheduled round-robin script hitting all the build  servers. But this was slow, required us to configure all the build server  addresses in one place, wasn’t fault tolerant and stored no build  history. So we moved the build telemetry dashboard to a simple Rails  webapp employing CSS wizardry for the visualizations. The data was populated  via a basic RESTful API. Each build has a custom HTTP publisher (again  we built this) that fired off a simple set of information about the  build in a POST request:</p>
<ul>
<li>Project name</li>
<li>Build label</li>
<li>Date / time</li>
<li>Build duration</li>
<li>Build successful</li>
<li>Hostname of the Cruise server</li>
</ul>
<h3>Build naming conventions</h3>
<p>The one extra key to making  this all work was standardizing the format of the Cruise project name  so we could parse out the application, branch and pipeline step without  adding any extra complicated meta-data. We chose “&lt;branch&gt;-&lt;application&gt;-&lt;step&gt;”  as our format, e.g. “trunk-bigapp-quick” or “3.20-littleapp-assemble”.</p>
<h3>Where’s my build?</h3>
<p>Using our custom label incrementer  meant that each build in the pipeline for a given SVN revision would  have the same build number (e.g. “trunk-bigapp-quick.123”, “trunk-bigapp-assemble.123”,  “trunk-bigapp-deploy.123”). This made it much easier for developers  and QA to work out what builds and features had made it through to the  QA environments. We built on this by providing a customized version  of the currents status grid to answer exactly that question – where’s  my build?</p>
<p><img class="alignnone size-full wp-image-38" title="wheres my build?" src="http://www.digitaldimsum.co.uk/wp-content/uploads/2008/04/wheres-my-build.gif" alt="" width="434" height="157" /></p>
<p>The grid displays the latest  build number at each step – clearly showing how far changes have progressed  and also highlighting how a broken step breaks the pipe. This has become  a vital self-service tool for the dev, QA and deployment teams, and  has saved the build team from a lot of very dull questions.</p>
<p>A growing awareness of the  importance of the pipeline has allowed us to devote efforts towards  optimizing the total throughput. All the good lean principles definitely  apply at this point – looking at optimizing the whole system and working  out where we’re queuing or waiting too much nearly always deliver  the best results.</p>
<h3>And the rest  …</h3>
<p>These tools freed us up to  use the build team as a beach-head for spreading general coding, development  and automation best practices throughout the organization. Some of these  included:</p>
<ul>
<li>Untangling spaghetti dependencies with Ivy</li>
<li>Spawning multiple virtual machines for regression testing</li>
<li>Automating Cruise configuration and version updates</li>
<li>A whole host of black-belt Ant Fu</li>
<li>Correlating multiple code metrics to drive code quality improvements</li>
</ul>
<p>But those are stories for another  occasion …</p>
<p>[This article was originally written for an internal ThoughtWorks innovation newsletter - I've made some minor edits for this blog]</p>
]]></description>
		<wfw:commentRss>http://www.digitaldimsum.co.uk/2008/04/17/build-transformation-across-an-organization/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Programming considered harmful</title>
		<link>http://www.digitaldimsum.co.uk/2008/02/10/programming-considered-harmful/</link>
		<comments>http://www.digitaldimsum.co.uk/2008/02/10/programming-considered-harmful/#comments</comments>
		<pubDate>Sun, 10 Feb 2008 22:50:57 +0000</pubDate>
		<dc:creator>jonny</dc:creator>
		
		<category><![CDATA[coding]]></category>

		<guid isPermaLink="false">http://www.digitaldimsum.co.uk/2008/02/10/programming-considered-harmful/</guid>
		<description><![CDATA[<p>Discussions have been flying around the <a href="http://www.thoughtworks.com" title="ThoughtWorks">ThoughtWorks</a> communication channels on balancing the risk of dynamic languages against the pain of static languages. This got me thinking about the similarities between what makes teams work well and what makes for good code and object interactions.</p>
<p><!--more-->The mailing lists at <a href="http://www.thoughtworks.com" title="ThoughtWorks">ThoughtWorks</a> have been running hot since Jay Fields <a href="http://blog.jayfields.com/2008/02/static-typing-considered-harmful.html" title="Jay Fields: Static typing considered harmful">stoked the flames of the dynamic versus static language schism</a>. His basic point is summarized in the opening line:</p>
<blockquote><p><em>&#8220;Given a good test suite the return on investment simply does not justify the use of static typing&#8221;</em></p></blockquote>
<p>Basically he&#8217;s saying that statically typed languages have benefits, but there is an associated cost - anyone who&#8217;s seen object definitions disappear off the screen with <a href="http://weblogs.java.net/blog/arnold/archive/2005/06/generics_consid_1.html" title="Generics considered harmful">Java 5 generics</a> will understand this. The benefits definitely exist - modern IDEs (auto-complete, refactoring, etc), compiler optimizations, basic verification and clarity in communicating integration requirements - but there is also a cost incurred in terms of complexity and inflexibility. <a href="http://memeagora.blogspot.com/" title="Neal Ford">Neal Ford</a> has started calling this the &#8220;static type tax&#8221;. Jay&#8217;s solution is, rather than relying on static typing for partial protection, rely on tests for full protection.</p>
<h3>Work to rule</h3>
<p>This pain or tax associated with static types reminds me of the parody of union rules gone bad - &#8220;I can&#8217;t plug that in, I&#8217;m a carpenter, you need an electrician&#8221;. These rules start out having important uses (protecting workers against abuse and ensuring quality results), but can end up just causing pain and making the jobs they&#8217;re trying  to protect less secure by making the industry less responsive. There is an obvious correlation with the trade-offs between dynamic and statically typed languages: it&#8217;s nice to know from an integration and tooling perspective <em>exactly what type of object</em> a method requires; it&#8217;s also nice just to be able to give that same method  <em>any object that can respond to the messages</em> it will be sent.</p>
<p>In strong and statically typed languages, like Java, the method signature is a shorthand explicitly stating what type of object is required for the method to work. In a dynamic or weakly typed language, like Ruby or JavaScript, you have more flexibility about what you can pass into the method, but less visibility into whether it will work or not - you have to check (visually or through tests) that the object you pass in can respond sensibly to the instructions it&#8217;s given.</p>
<p>One of the pains of the statically typed method signature  is that various different requirements tend to get bundled up together. A method may well require a parameter to be of type (implement interface) X, where interface X defines 10 methods, even though the method will only call one of those declared methods. Ideally you would define a new interface for each combination of methods you want to call so you can keep the contract as simple to fulfill as possible, but this in itself would be a burden as the amount of interfaces would explode.</p>
<h3>Risk assessments</h3>
<p>The arrival of complexity and restriction in the name of preventing accidents (passing an object that can&#8217;t react to the messages sent to it) reminds me of how school trips have become harder and harder to organize because of the <a href="http://www.telegraph.co.uk/news/main.jhtml?xml=/news/2008/02/05/ncamping105.xml" title="Risk assessments on school trips">ever more stringent &#8220;risk assessments&#8221; required</a>:</p>
<blockquote><p><em>&#8220;Endless lengthy risk assessments and fears of being blamed if anything goes wrong have put teachers off taking children away on trips and led to youngsters being cooped in classrooms instead.&#8221;</em></p></blockquote>
<p>I remember loving some fairly wild school or youth club trips as a kid. Rock scrambling was one of my favorites, which involved climbing, jumping, swimming, hopping and whooping round sections of coastline like the beautiful <a href="http://news.bbc.co.uk/2/shared/spl/hi/pop_ups/05/sci_nat_britain0s_3d_geology/html/4.stm" title="Lulworth Cove">Lulworth Cove</a>. Sure there were risks involved, but learning to handle yourself in those risky situations lead to really important lessons and personal growth. Risk breeds responsibility.</p>
<p>I have similar feelings about using dynamic languages - with great power comes great responsibility. Programming itself is inherently risky (when was your last zero-defect release?) so programmers have to make decisions about how to act responsibly. One way is to impose risk assessment forms on every method call through static typing; another option is to force objects to <a href="http://docs.codehaus.org/display/PICO/Good+Citizen" title="Good citizens">act responsibly and be good citizens</a>. This is the route that interests me more. Testing definitely plays an important role in acting responsibly, but it&#8217;s not the end of the story.</p>
<h3>Team collaboration : object collaboration</h3>
<p>Coming back to the analogy of objects as workers on a job, rather than using strict role definitions in an attempt to control quality, I would much prefer to use the example of self-organizing Agile teams. On an Agile development team there is an expectation that people can work in a cross-functional manner with common ownership of the code-base. This means that team members should be interchangeable and comfortable in a variety of areas - just like in dynamic languages there is no type checking before picking up tasks (&#8221;sorry I only do JavaScript / Java / SQL&#8221;). This leads to highly flexible and productive teams, but there are a few techniques needed to make it work. Some of these techniques are conceptually transferable to working responsibly with dynamic languages:</p>
<ul>
<li>communication</li>
<li>simplicity</li>
<li>responsibility</li>
</ul>
<p>Explicit and clear communication is the biggest of these - the others can be derived from this principle. The importance of communication in teams is fairly obvious, but it can also be important at the code level in areas like explicit tests, clearly named methods and transparent intentionality.</p>
<p>Simplicity aids communication and also lowers risk. The simpler the routine is, the easier it is to understand, the easier it is to see what is required of collaborating objects and the less likely it is that bugs will creep in.</p>
<p>Responsibility underpins this all. In teams it means talk to people if you&#8217;re not sure, or tell people if you&#8217;re going to do something strange; in objects it means testing your interactions, handling errors appropriately and checking compatibility where necessary.</p>
]]></description>
		<wfw:commentRss>http://www.digitaldimsum.co.uk/2008/02/10/programming-considered-harmful/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Can virtualization save the real world?</title>
		<link>http://www.digitaldimsum.co.uk/2008/02/02/can-virtualization-save-the-real-world/</link>
		<comments>http://www.digitaldimsum.co.uk/2008/02/02/can-virtualization-save-the-real-world/#comments</comments>
		<pubDate>Sat, 02 Feb 2008 21:38:15 +0000</pubDate>
		<dc:creator>jonny</dc:creator>
		
		<category><![CDATA[computing]]></category>

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

		<category><![CDATA[environment IT]]></category>

		<guid isPermaLink="false">http://www.digitaldimsum.co.uk/2008/02/02/can-virtualization-save-the-real-world/</guid>
		<description><![CDATA[<p>With Google measuring the efficiency of their code in the amount of <a href="http://itknowledgeexchange.techtarget.com/overheard/overheard-googles-larry-page-is-modern-day-andrew-carnegie/" title="largest utility bill in the planet">gigawatts</a> required to serve it to millions of people, optimizing applications can actually have a <a href="http://www.climatesaverscomputing.org/" title="climate savers - smart computing">positive impact on the world</a>.</p>
<p>Logicalis have put together some advice on <a href="http://www.uk.logicalis.com/efficient_it/10areas.asp" title="Ten Areas for Efficient IT">how to reduce the impact of IT on the environment</a>. The suggestions range from reducing hardware requirements through virtualization and other consolidation techniques to old favorites like double-sided printing, video-conferencing,  electronic forms and turning off your desktop at night.</p>
<p><!--more-->One idea I hadn&#8217;t really thought of was the impact of data archiving strategies (or <a href="http://www.uk.logicalis.com/efficient_it/area3.asp" title="ILM">Information Life-Cycle Management</a> as they grandly title it) on energy usage. Data needs hard drives need power. Choosing what to compress, archive and delete can have a major impact.</p>
<p>If you don&#8217;t think that powering down your PC at night can make a difference <a href="http://www.globalactionplan.org.uk/news_detail.aspx?nid=e06182e3-8e00-4ec5-be39-516c7030b652" title="An Inefficient Truth">Global Action Plan&#8217;s recent report</a> might open your eyes as it shows that the environmental impact of IT is <a href="http://www.globalactionplan.org.uk/news_detail.aspx?nid=62992fb1-c745-4738-bf96-f4acfd08088a" title="Inefficient ICT Sector's Carbon Emissions set to Surpass Aviation Industry">almost identical to that of the much-maligned aviation industry</a>.</p>
<p><a href="http://www.digitaldimsum.co.uk/wp-content/uploads/2008/02/paying-for-power.png" title="Do ICT departments pay for the energy consumed by ICT equipment?"><img src="http://www.digitaldimsum.co.uk/wp-content/uploads/2008/02/paying-for-power.thumbnail.png" alt="Do ICT departments pay for the energy consumed by ICT equipment?" align="right" border="0" hspace="8" vspace="8" /></a>Ultimately, as with so many environmental issues, the best solution is to make sure that the people who make the decisions are the same as (or at least aligned with) the people who are impacted. I&#8217;m not saying sys admins should go and live in the <a href="http://www.commondreams.org/headlines07/0202-09.htm" title="Global warming peril to Bangladesh">semi-submerged Bangladeshi delta</a>. My advice is much simpler - make sure IT departments are responsible for their electricity bills. The most striking statistic in the <a href="http://www.theitsanctuary.com/assets/0000/0370/Inefficient_Truth_Executive_Summary_Dec_2007.pdf">&#8220;An Inefficient Truth&#8221; report (PDF 1.3MB)</a> was that not only do 68% of IT departments not pay for the energy their systems consume, <strong>56% of them don&#8217;t even see the bills</strong>.</p>
<p>Making environmentally sound decisions isn&#8217;t about warm fuzzy feelings - it&#8217;s about hard-nosed, joined-up, economic thinking.</p>
]]></description>
		<wfw:commentRss>http://www.digitaldimsum.co.uk/2008/02/02/can-virtualization-save-the-real-world/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Ant Fu</title>
		<link>http://www.digitaldimsum.co.uk/2007/10/19/ant-fu/</link>
		<comments>http://www.digitaldimsum.co.uk/2007/10/19/ant-fu/#comments</comments>
		<pubDate>Fri, 19 Oct 2007 15:03:06 +0000</pubDate>
		<dc:creator>jonny</dc:creator>
		
		<category><![CDATA[build]]></category>

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

		<guid isPermaLink="false">http://www.digitaldimsum.co.uk/2007/10/19/ant-fu/</guid>
		<description><![CDATA[<p>We&#8217;ve had some discussions recently about best practices when creating <a href="http://ant.apache.org/" target="_blank">Ant</a> scripts, so I thought I&#8217;d write up a few of my favourites.</p>
<h3>Managing Ant target dependencies</h3>
<p>&#8220;depends&#8221; are great, until your build file gets bigger than a couple of screenfuls. You can end up with a crazy spaghetti monster of dependencies very quickly. On a few builds I&#8217;ve worked on we&#8217;ve had a basic rule:</p>
<blockquote dir="ltr" style="margin-right: 0px"><p><em>Targets can either have depends or a body, but not both.</em></p></blockquote>
<p dir="ltr"><!--more-->So you end up having two types of targets:</p>
<ul dir="ltr">
<li>&#8220;<strong>functional targets</strong>&#8221; that actually do the work, carrying   out small individual tasks</li>
<li>&#8220;<strong>flow targets</strong>&#8221; that tie the functional targets   together</li>
</ul>
<blockquote><p>&lt;target name=&#8221;the.lot&#8221; depends=&#8221;compile,test,jar,report&#8221; /&gt;<br />
&lt;target name=&#8221;compile&#8221;&gt;<br />
&#8230;<br />
&lt;/target&gt;<br />
&lt;target name=&#8221;test&#8221;&gt;<br />
&#8230;<br />
&lt;/target&gt;</p></blockquote>
<h3>Public vs Private targets</h3>
<p>I&#8217;ve built build files using the <a href="http://www.martyandrews.net/blog/2004/07/maintainability_in_ant_build_s.html" target="_blank">public and private target idea</a> (affix a &#8220;-&#8221; to private targets so they can&#8217;t be called externally).</p>
<p>It can work in some situations and makes it reasonably clear what&#8217;s going on. It can also work in conjunction with the &#8220;functional and flow&#8221; targets described above. (Functional targets are private; flow targets are public).</p>
<p>My main issue with this approach is that as a build engineer you often want to call internal / private targets to run just a small step in the build (particularly while developing new features) - you can&#8217;t  do this if the targets are private. so you end up creating a second, public, target that calls the private target &#8230; and you end up doubling the size of your build files.</p>
<p>I prefer just to have the main entry point targets (your flow targets) at the top of the build file so it&#8217;s obvious to anyone who opens the build file what they can use.</p>
<p>You can also differentiate your public (API) targets by only allowing them to have description attributes. These will be the only targets listed when your run &#8220;ant -p&#8221;.</p>
<h3>Macrodefs with closures</h3>
<p><a href="http://ant.apache.org/manual/CoreTasks/macrodef.html">Macrodefs</a> are great and should be used to reduce duplication wherever possible.</p>
<p>An extra-powerful feature of macrodefs, which I only came to understand recently, is the ability to pass arbitrary ant elements into macrodefs - think closures / ruby blocks.</p>
<p>We now have expressive parts of our build scripts looking a bit like the following:</p>
<blockquote dir="ltr" style="margin-right: 0px"><p><font face="Default Monospace,Courier New,Courier,monospace">&lt;for-each-module&gt;<br />
&lt;compile module=&#8221;@{module}&#8221; /&gt;<br />
&lt;/for-each-module&gt;</font></p>
<p><font face="Default Monospace,Courier New,Courier,monospace">&lt;for-each-module&gt;<br />
&lt;test module=&#8221;@{module}&#8221;   /&gt;<br />
&lt;/for-each-module&gt;</font></p>
<p><font face="Default Monospace,Courier New,Courier,monospace">&lt;macrodef   name=&#8221;for-each-module&#8221;&gt;<br />
<strong><font color="#ff0000">&lt;element   name=&#8221;action&#8221;   /&gt;<br />
</font></strong>&lt;sequential&gt;<br />
&#8230;. do some   stuff &#8230;<br />
<strong><font color="#ff0000">&lt;action   /&gt;</font></strong><br />
&#8230;. do some more stuff   &#8230;<br />
&lt;/sequential&gt;<br />
&lt;/macrodef&gt;</font></p></blockquote>
<p>I&#8217;d be interested to hear if anyone has other suggestions for keeping Ant from spiraling out of control.</p>
]]></description>
		<wfw:commentRss>http://www.digitaldimsum.co.uk/2007/10/19/ant-fu/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Blocks of Code</title>
		<link>http://www.digitaldimsum.co.uk/2007/05/16/blocks-of-code/</link>
		<comments>http://www.digitaldimsum.co.uk/2007/05/16/blocks-of-code/#comments</comments>
		<pubDate>Wed, 16 May 2007 20:11:07 +0000</pubDate>
		<dc:creator>jonny</dc:creator>
		
		<category><![CDATA[coding]]></category>

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

		<guid isPermaLink="false">http://www.digitaldimsum.co.uk/2007/05/16/blocks-of-code/</guid>
		<description><![CDATA[<p>Coding really is become child&#8217;s play. This <a href="http://news.bbc.co.uk/2/hi/technology/6647011.stm" title="Free tool offers 'easy' coding" target="_blank">recent BBC news article</a> points to some of the ways kids are being introduced to programming.</p>
<p>The good people at MIT have put together <a href="http://scratch.mit.edu/" title="Scratch @ MIT" target="_blank">scratch</a>  a visual tool allowing kids to do drag-n-drop coding. The <a href="http://llk.media.mit.edu/projects/scratch/help/" title="Scratch help screens" target="_blank">help screens</a> give a good idea of how it works. Basically differently shaped blocks are put together (lego style) to form programs: a loop looks like a capital C and holds all the nested statements; booleans are pointy ended and only fit in pointy slots - likewise numbers are round and only fit in round slots &#8230; a nice simple introduction to strongly-typed languages. It actually fits pretty closely with how I visualise blocks of code, so it looks like a great way to introduce children to the coding mind-set. The welcoming colourful blocks are non-threatening and simple to understand.</p>
<p><!--more-->If that all seems too point-n-clicky then there are also <a href="http://hacketyhack.net/" title="HacketyHack" target="_blank">efforts to get kids using Ruby</a>. It&#8217;s a simple hosted and sandboxed service giving children the chance to write real programs - like a blog in just 6 lines.</p>
<p>This block caught my attention:</p>
<blockquote><p><strong>WHITHER ART THOU, BASIC??</strong></p>
<p>In the 1980s, a language called BASIC swept the countryside.  It was a language <strong>beginners          could use</strong> to make their computer speak, play music.  You could easily draw a big smiley face          or a panda or whatever you like!</p></blockquote>
<p>I&#8217;m interested in their choice of Ruby as the simple &#8220;gateway&#8221; language (the first one&#8217;s free, tell your mates), since there have been various discussions about whether Ruby is too complex or powerful for many inexperienced QA and dev teams to be *trusted* with.</p>
<p>It&#8217;ll be interesting to see how these kinds of tools are adopted. Either way I think some people at my current client could use a more pointy-clicky programming language &#8230;</p>
]]></description>
		<wfw:commentRss>http://www.digitaldimsum.co.uk/2007/05/16/blocks-of-code/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Java is dead - long live the JVM</title>
		<link>http://www.digitaldimsum.co.uk/2007/05/09/java-is-dead-long-live-the-jvm/</link>
		<comments>http://www.digitaldimsum.co.uk/2007/05/09/java-is-dead-long-live-the-jvm/#comments</comments>
		<pubDate>Wed, 09 May 2007 18:29:32 +0000</pubDate>
		<dc:creator>jonny</dc:creator>
		
		<category><![CDATA[coding]]></category>

		<guid isPermaLink="false">http://www.digitaldimsum.co.uk/2007/05/09/java-is-dead-long-live-the-jvm/</guid>
		<description><![CDATA[<p>I had an interesting meal last night with the <a href="http://www.thoughtworks.com" title="ThoughtWorks" target="_blank">ThoughtWorks</a> delegation to JavaOne. They were in town in support of the <a href="http://studios.thoughtworks.com/2007/5/7/mingle-to-run-on-jruby" title="Mingle to run on JRuby" target="_blank">news</a> that <a href="http://studios.thoughtworks.com/mingle-project-intelligence" title="Mingle" target="_blank">Mingle</a> is going to be launched on <a href="http://jruby.codehaus.org/" title="JRuby" target="_blank">JRuby</a>.</p>
<p>I&#8217;ve seen some demos of <a href="http://studios.thoughtworks.com/mingle-project-intelligence" title="Mingle" target="_blank">Mingle</a> and it looks great, but of equal interest to me is the choice to release it on <a href="http://jruby.codehaus.org/" title="JRuby" target="_blank">JRuby</a>. This seems to be another step along the road of Java moving down the stack. Java was selected as the delivery platform because corporate IT understands how to deploy, integrate, support and optimize it; Ruby was chosen as the development language because of the productivity and expressiveness of the language.</p>
<p><!--more--></p>
<p>I don&#8217;t want to knock Java - it&#8217;s provided my bread and beer for 10 years, but there are many strong arguments for using more concise and expressive languages to encode business logic.</p>
<p>So it looks as though Java is moving more into the space of an OS rather than a language for building business logic. Our illustrious founder, <a href="http://www.thoughtworks.com/singham+roy.html" title="Roy Singham" target="_blank">Roy</a>, suggested that Java&#8217;s legacy will be the JVM - years have been spent optimizing it and making it run on many platforms. I would add to that the ecosystem of libraries integrating with a panoply of databases, messaging formats and middleware.</p>
<p><a href="http://jruby.codehaus.org/" title="JRuby" target="_blank">JRuby</a> allows Ruby to leverage this whole ecosystem. Operations teams are completely comfortable managing Java installations - they don&#8217;t tend to care too much what&#8217;s in your WAR or EAR as long as they can monitor and configure the JVM, datasources, queues and other resources.</p>
<p>One question that springs to mind is whether this is just a temporary stage while the Ruby deployment stack matures or whether it will be a lasting situation. It would seem odd to need all the extra infrastructure, but the current situation is that even though many apps are deployed on highly expensive Java containers (think IBM and BEA) most of them will still sit behind Apache. They do this because Apache is more trusted to manage security, redirection, static content delivery and various other web fundamentals.</p>
<p>So maybe the new stack will be:</p>
<ul>
<li><strong>Apache </strong>handling the HTTP piece</li>
<li>A <strong>Java container</strong> handling the Integration piece (with or without a captial E in front)</li>
<li><strong>Ruby </strong>(or other languages leveraging <a href="http://jcp.org/en/jsr/detail?id=223" title="JSR 223: Scripting for the JavaTM Platform" target="_blank">JSR 223</a>) to handle business logic</li>
</ul>
<p>It will be interesting to see where this goes, but I can&#8217;t help feeling there&#8217;s one too many pairs of hands in that stack.</p>
]]></description>
		<wfw:commentRss>http://www.digitaldimsum.co.uk/2007/05/09/java-is-dead-long-live-the-jvm/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Show don&#8217;t tell: Consulting with GraphViz</title>
		<link>http://www.digitaldimsum.co.uk/2007/05/06/show-dont-tell-consulting-with-graphviz/</link>
		<comments>http://www.digitaldimsum.co.uk/2007/05/06/show-dont-tell-consulting-with-graphviz/#comments</comments>
		<pubDate>Sun, 06 May 2007 18:12:18 +0000</pubDate>
		<dc:creator>jonny</dc:creator>
		
		<category><![CDATA[build]]></category>

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

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

		<guid isPermaLink="false">http://www.digitaldimsum.co.uk/2007/05/06/show-dont-tell-visual-consulting-with-graphviz/</guid>
		<description><![CDATA[<p>I&#8217;ve often found that it&#8217;s much more effective to <em>show </em>clients what their problems are, rather than just <em>telling </em>them. Recently I&#8217;ve ended up using <a href="http://www.graphviz.org/" title="GraphViz" target="_blank">GraphViz </a>as a great tool for high-lighting complexity that needs to be addressed.</p>
<p>At the client I&#8217;m currently working for the complexity of the build scripts was getting out of hand. I wanted to goad the customer into prioritising some simplification work. So I turned to GraphViz to depict how complex the build was. The build we&#8217;re using is a large, centralised, Ant script that builds about 10 different applications. It manages everything through the process of compile, test, package and deploy.</p>
<p>I found the <a href="http://ant2dot.sourceforge.net/" title="ant2dot.xsl" target="_blank">handy ant2dot.xsl tool</a> that uses XSL  to transform an Ant build file into a DOT format graph representing the flow and dependencies between the various build targets.</p>
<p><!--more--></p>
<h3>Before</h3>
<p>The picture that emerged was pretty shocking:</p>
<p style="text-align: center"><img src="http://www.digitaldimsum.co.uk/wp-content/uploads/2007/05/build-scripts-before.png" alt="Before: build script target dependencies" /></p>
<p>Even printed out on the largest paper the client&#8217;s printer could handle you still couldn&#8217;t even read the target names. Images of the <a href="http://www.venganza.org/" title="Flying Spaghetti Monster" target="_blank">Flying Spaghetti Monster</a> kept jumping into my mind. But the tactic worked and when I showed the client the picture in our Iteration Planning Meeting they were quick to prioritise some work to simplify the build process.</p>
<h3>After</h3>
<p>After a month or so of gradual re-structuring and simplification I repeated the visualisation exercise to see how we were doing. The results were pretty striking:</p>
<p style="text-align: center"><img src="http://www.digitaldimsum.co.uk/wp-content/uploads/2007/05/build-scripts-after.png" alt="After: build script target dependencies" /></p>
<p>Needless to say the pictures told more than a thousand words could: the client was happy, we had a neater picture to help developers understand how the build scripts worked AND the builds were simpler.</p>
]]></description>
		<wfw:commentRss>http://www.digitaldimsum.co.uk/2007/05/06/show-dont-tell-consulting-with-graphviz/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
