<?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>David Draper on agile &#38; design &#187; technical</title>
	<atom:link href="http://www.agiledesign.co.uk/category/technical/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.agiledesign.co.uk</link>
	<description>Building business agility though software</description>
	<lastBuildDate>Wed, 21 Jul 2010 09:28:31 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=abc</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Technical Debt re-visited</title>
		<link>http://www.agiledesign.co.uk/technical/technical-debt-re-visited/</link>
		<comments>http://www.agiledesign.co.uk/technical/technical-debt-re-visited/#comments</comments>
		<pubDate>Fri, 04 Sep 2009 10:12:45 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
				<category><![CDATA[technical]]></category>

		<guid isPermaLink="false">http://www.agiledesign.co.uk/technical/technical-debt-re-visited/</guid>
		<description><![CDATA[There has been some renewed discussion recently on the subject of technical debt, this has been played out on twitter as well as a variety of blog posts including this one.
The technical debt metaphor is one I use often and I believe that there is some clarification required around this subject.
At it&#8217;s broadest, technical debt [...]]]></description>
			<content:encoded><![CDATA[<p>There has been some renewed discussion recently on the subject of technical debt, this has been played out on twitter as well as a variety of blog posts including <a href="http://startuplessonslearnt.blogspot.com/2009/07/embrace-technical-debt.html" target="_blank" title="Embrace technical debt">this</a> one.</p>
<p>The <strong>technical debt</strong> metaphor is one I use often and I believe that there is some clarification required around this subject.</p>
<p>At it&#8217;s broadest, technical debt is any trait of the current system that is considered sub optimal from a technical perspective. The debt aspect reflects the cost of ownership of that trait. For example and overly complex and untidy method is sub optimal, it incurs cost each time it needs to be re-visited and re-understood due to either a defect in the logic or a new requirement. This method obviously incurs more cost if it is re-visited more often.</p>
<p>Much of the debate recently has been focused on the times that it might be good to incur technical debt. The debt metaphor reminds us of borrowing money from the bank to get that new toy a little sooner. The question here is two fold, does technical borrowing exists and how can we view the rate of interest or total cost.</p>
<p>Before we can consider technical borrowing we need to split technical debt into two categories. First, the design or implementation decision that was sound the day it was made but now, with new information, is constraining our ability to progress. Second, the quick and dirty approach that we can see on the day of writing is gong to cost us very soon.</p>
<p style="text-align:right;"><a href="http://www.agiledesign.co.uk/wp-content/uploads/2009/09/time_vs_money.JPG" onclick="window.open('http://www.agiledesign.co.uk/wp-content/uploads/2009/09/time_vs_money.JPG','popup','width=523,height=281,scrollbars=no,resizable=yes,toolbar=no,directories=no,location=no,menubar=no,status=yes,left=0,top=0');return false"><img src="http://www.agiledesign.co.uk/wp-content/uploads/2009/09/time_vs_money-tm.jpg" height="100" width="186" border="1" hspace="4" vspace="4" alt="Time Vs Money" /></a></p>
<p>The first category of debt is a direct result of doing the simplest thing that could work  and resisting the temptation to predict the future. We develop simple software that is easily changed through effective use of tests, the code that is written is written well. We categorise these design traits as debt when new information presents its self and we identify a change that will enable the system to serve us better. We may decide to make the change or not based on the ongoing cost of maintaining an design that no longer reflects our understanding of the problem or technology.</p>
<p>The second category is often the result of a deadline looming. A common chorus of &#8220;lets hack this in now and we&#8217;ll fix it later&#8221; is coupled with the nagging concern that later never arrives. In my mind, this category of debt can give the first category a bad name. But, is this thinking sound? Surely there are times when the wrong technical solution is the right business decision. It is my belief that there are situations where a quick fix is the right decision, imagine a major flaw that brings down a trading system. However, there are too many instances where code bases become un-maintainable through a feeling of time pressure that leads developers to incur debt with little or no benefit. In fact, in most cases, untidy, poorly designed software incurs cost both short and long term. In the short term, defects delay the release of the software and in the long term software is difficult to maintain and rigid in the face of changing business need.</p>
<p>So we arrive at <strong>technical borrowing</strong>. The decision to borrow must be explicit. As a team, along with appropriate stake-holders consider the decision. For example,</p>
<blockquote><p>we have selected framework X for the next release, it does not offer the scaling flexibility we would like but we believe that our early entry to the market is a higher priority. We plan to move to framework Y in the next release window to achieve our target scaleability.</p></blockquote>
<p>There are less extreme examples of refactorings that should be done but won&#8217;t fit in this iteration. Again, be explicit. Discuss the need for refactoring with your Product Owner or Project Manager, consider the cost of the refactoring, the cost incurred by not doing so, the risk of refactoring. One approach to maintaining a healthy code base is to keep a backlog of refactoring and allocate time in each iteration.</p>
<p>However, beware the temptation to save time, get it done, do a quick fix or tidy it up later. In almost all cases code that is hurried, poorly designed, overly complex or untidy will incur far more cost both short and long term than the time saved today by not doing it right.</p>
<p>Finally, this can be most difficult in a legacy code base where technical debt abounds. I use a simple motto that has served me well with a few teams:</p>
<blockquote><p><strong>Do no harm!</strong></p></blockquote>
<p>Where you cannot fix it all be sure to agree, as a team, that you won&#8217;t make it worse. In fact agree to making one small aspect of everything you touch better for the next person.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.agiledesign.co.uk/technical/technical-debt-re-visited/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Software cratsmanship</title>
		<link>http://www.agiledesign.co.uk/technical/software-cratsmanship/</link>
		<comments>http://www.agiledesign.co.uk/technical/software-cratsmanship/#comments</comments>
		<pubDate>Mon, 23 Mar 2009 07:32:04 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
				<category><![CDATA[technical]]></category>
		<category><![CDATA[craftsmanship]]></category>

		<guid isPermaLink="false">http://www.agiledesign.co.uk/uncategorized/software-cratsmanship/</guid>
		<description><![CDATA[Last night the subject for debate at XTC was software craftsmanship. This is not a new subject but seems to be gathering momentum. In many ways I am a supporter, however, I do have certain reservations about the way it is being presented.
We have a draft of a manifesto for software craftsmanship that has been [...]]]></description>
			<content:encoded><![CDATA[<p>Last night the subject for debate at XTC was software craftsmanship. This is not a new subject but seems to be gathering momentum. In many ways I am a supporter, however, I do have certain reservations about the way it is being presented.</p>
<p>We have a draft of a <a href="http://manifesto.softwarecraftsmanship.org/">manifesto for software craftsmanship</a> that has been written to build upon the Agile Manifesto. Following this we have a host of proposed principles.</p>
<p>Personally I care about delivering quality software, I believe that software apprenticeships and effective mentoring would have a very positive impact increasing the skill of those involved in the industry. Finally, I believe that practice (i.e. doing a task followed by reflecting on the task purely for the purpose of learning) is largely ignored within our industry. If you care about what you build at work you should practice to develop your skill in your own time.</p>
<p>On the other hand I would prefer it if the concepts of craftsmanship and agile were kept separate. Being a craftsman is a personal choice independent from the process your team has selected. It is also a life choice since it is unlikely that you can be a craftsman 8 hours per day. By contrast agile teaches us about collaboration. I am sure that these two are compatible, even complementary but my preference would be to retain the separation.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.agiledesign.co.uk/technical/software-cratsmanship/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Craftsmanship</title>
		<link>http://www.agiledesign.co.uk/technical/craftsmanship/</link>
		<comments>http://www.agiledesign.co.uk/technical/craftsmanship/#comments</comments>
		<pubDate>Mon, 02 Mar 2009 21:12:26 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
				<category><![CDATA[technical]]></category>
		<category><![CDATA[craftsmanship]]></category>

		<guid isPermaLink="false">http://www.agiledesign.co.uk/?p=117</guid>
		<description><![CDATA[There seems to be an increasing amount of discussion about software craftsmanship but what is it?
Thanks to Robert C. Martin for this great presentation about what it means to be a professional craftsman.
I&#8217;m sending this to everyone I can think of so I should let you know. This is recommended viewing for anyone who considers [...]]]></description>
			<content:encoded><![CDATA[<p>There seems to be an increasing amount of discussion about software craftsmanship but what is it?</p>
<p>Thanks to Robert C. Martin for <a href="http://www.infoq.com/presentations/craftmanship-ethics">this</a> great presentation about what it means to be a professional craftsman.</p>
<p>I&#8217;m sending this to everyone I can think of so I should let you know. This is recommended viewing for anyone who considers them-self a professional developer, software engineer or dare I say it craftsman.</p>
<p>In the presentation you will hear &#8216;Uncle Bob&#8217; suggest that we have finally reached the point where we can discuss our profession. He goes on to talk of a variety of practices that have evolved to form the lynch pins of that profession. These include design principles, testing and my favourite, the following comment regarding defects:</p>
<blockquote><p>
Expecting QA to find bugs is unprofessional.
</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.agiledesign.co.uk/technical/craftsmanship/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ruby on Rails @ Agile North</title>
		<link>http://www.agiledesign.co.uk/technical/ruby-on-rails-agile-north/</link>
		<comments>http://www.agiledesign.co.uk/technical/ruby-on-rails-agile-north/#comments</comments>
		<pubDate>Wed, 27 Sep 2006 19:48:20 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
				<category><![CDATA[technical]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://www.agiledesign.co.uk/index.php/2006/09/27/ruby-on-rails-agile-north/</guid>
		<description><![CDATA[Last week was the Agile North Annual conference. I was invited to run an introduction to Ruby on Rails. On the request of the attendees I&#8217;ve attached here the presentation slides along with the application developed.
The session had no pre-requisits so began with an introduction to Ruby. Following a brief introduction I showed some of [...]]]></description>
			<content:encoded><![CDATA[<p>Last week was the <a target="_blank" title="Agile North" href="http://www.agilenorth.net">Agile North</a> Annual conference. I was invited to run an introduction to Ruby on Rails. On the request of the attendees I&#8217;ve attached here the presentation slides along with the application developed.</p>
<p><span id="more-32"></span>The session had no pre-requisits so began with an introduction to Ruby. Following a brief introduction I showed some of the driving principles behind Rails including coverage of the benefits &#038; implications of MVC.</p>
<p>In an attempt to demonstrate the productivity of rails I built a web based application for tracking hours spent on tasks. The app was developed over three iterations.</p>
<p>• Manage tasks<br />
• Add rendering of instalments (lumps of time spent on tasks)<br />
• Add management of instalments</p>
<p>The rails project and pdf of slides is attached below.</p>
<p><a href="http://www.agiledesign.co.uk/resources/Rails-demo2.pdf">Slides</a>  <a href="http://www.agiledesign.co.uk/resources/timeTracker.tgz">Project</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.agiledesign.co.uk/technical/ruby-on-rails-agile-north/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ruby on Rails demo</title>
		<link>http://www.agiledesign.co.uk/technical/ruby-on-rails-demo/</link>
		<comments>http://www.agiledesign.co.uk/technical/ruby-on-rails-demo/#comments</comments>
		<pubDate>Tue, 20 Jun 2006 21:10:48 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
				<category><![CDATA[technical]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://www.agiledesign.co.uk/wordpress/2006/06/20/ruby-on-rails-demo/</guid>
		<description><![CDATA[This week I had the pleasure of running a demo of Ruby on Rails for the agile north group. This was a well attended session that (much as I&#8217;d like to) I probably can&#8217;t claim all of the credit for. While I have not had a great deal of experience of Ruby on Rails I [...]]]></description>
			<content:encoded><![CDATA[<p>This week I had the pleasure of running a demo of Ruby on Rails for the <a title="agile north" href="http://www.agilenorth.net">agile north</a> group. This was a well attended session that (much as I&#8217;d like to) I probably can&#8217;t claim all of the credit for. While I have not had a great deal of experience of Ruby on Rails I agreed to run this session in part to force myself to spend a little time on it.</p>
<p>There seems to be a real buzz about Ruby at the moment. People from a wide variety of backgrounds are looking at Ruby and particularly Rails trying to establish what the fuss is all about and if the promised productivity can pay off in their environment.</p>
<p><span id="more-29"></span> I took my inspiration for the session from an <a title="Rolling with Ruby on Rails" target="_blank" href="http://www.onlamp.com/pub/a/onlamp/2005/01/20/rails.html?page=1">onlamp</a> article that describes the development of a cookbook web application.  I made a number of changes to bring the demo up to date, in particular the  adoption of migrations and some further emphasis on testing.</p>
<p>The mixed group that is always in attendance with agile north provides for an interesting mixture of view points. I was somewhat taken aback by the suggestion that migrations should be test driven. This was a significant point that had not yet occured to me. However, when relying on migrations to move databases from on version to the next we need a mechanism to improve our confidence. I would particularly like to see tests for migrating to older versions.<br />
I did alow a little too much emphasis to be put on the benifits of scaffolding, while it&#8217;s nice to get the rapid feedback that scaffolding provides I would have liked to spend a little more time developing &#8220;real&#8221; code (test first of course).</p>
<p>Below I have attached, as requested, a few slides and a zip of the Rails code that we produced during the session. In addition check out the agile north del.icio.us tag for other peoples views and other relevant links.</p>
<ul>
<li><a title="rails-demo.pdf" href="http://www.agiledesign.co.uk/resources/Rails-demo.pdf">Slides</a></li>
<li><a title="solution-cookbook.zip" href="http://www.agiledesign.co.uk/resources/solution-cookbook.zip">Project</a></li>
</ul>
<p>I&#8217;m sure that this is not the last post I&#8217;ll make about rails, I look forward to making the most of this highly productive environment on a number of projects that I have in mind.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.agiledesign.co.uk/technical/ruby-on-rails-demo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>TDD story</title>
		<link>http://www.agiledesign.co.uk/technical/tdd-story/</link>
		<comments>http://www.agiledesign.co.uk/technical/tdd-story/#comments</comments>
		<pubDate>Wed, 24 May 2006 08:25:15 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
				<category><![CDATA[technical]]></category>
		<category><![CDATA[TDD]]></category>

		<guid isPermaLink="false">http://www.agiledesign.co.uk/wordpress/2006/05/24/tdd-story/</guid>
		<description><![CDATA[I found the following set of articles on Object Mentors site. I quite enjoyed them so thought I&#8217;d spread them about a bit.
The articles follow the story of a developer who is being taught TDD. A good intro and the primes exercise is a nice one to try yourself.


Chapter1 
Chapter2 


Chapter3 
Chapter4 


Chapter5 
Chapter6 


Chapter7 [...]]]></description>
			<content:encoded><![CDATA[<p>I found the following set of articles on Object Mentors site. I quite enjoyed them so thought I&#8217;d spread them about a bit.</p>
<p>The articles follow the story of a developer who is being taught TDD. A good intro and the primes exercise is a nice one to try yourself.</p>
<table width="620" style="height: 140px">
<tr>
<td><a title="Craftsman - chapter1" target="_blank" href="http://www.objectmentor.com/resources/articles/craftsman%201">Chapter1 </a></td>
<td><a title="Craftsman - chapter2" target="_blank" href="http://www.objectmentor.com/resources/articles/craftsman%202">Chapter2 </a></td>
</tr>
<tr>
<td><a title="Craftsman - chapter3" target="_blank" href="http://www.objectmentor.com/resources/articles/craftsman%203">Chapter3 </a></td>
<td><a title="Craftsman - chapter4" target="_blank" href="http://www.objectmentor.com/resources/articles/craftsman%204">Chapter4 </a></td>
</tr>
<tr>
<td><a title="Craftsman - chapter5" target="_blank" href="http://www.objectmentor.com/resources/articles/craftsman%205">Chapter5 </a></td>
<td><a title="Craftsman - chapter6" target="_blank" href="http://www.objectmentor.com/resources/articles/craftsman%206">Chapter6 </a></td>
</tr>
<tr>
<td><a title="Craftsman - chapter7" target="_blank" href="http://www.objectmentor.com/resources/articles/craftsman%207">Chapter7 </a></td>
<td><a title="Craftsman - chapter8" target="_blank" href="http://www.objectmentor.com/resources/articles/craftsman%208">Chapter8 </a></td>
</tr>
<tr>
<td><a title="Craftsman - chapter9" target="_blank" href="http://www.objectmentor.com/resources/articles/craftsman%209">Chapter9 </a></td>
<td><a title="Craftsman - chapter10" target="_blank" href="http://www.objectmentor.com/resources/articles/craftsman%2010">Chapter10 </a></td>
</tr>
<tr>
<td><a title="Craftsman - chapter11" target="_blank" href="http://www.objectmentor.com/resources/articles/craftsman%2011">Chapter11 </a></td>
<td><a title="Craftsman - chapter12" target="_blank" href="http://www.objectmentor.com/resources/articles/craftsman%2012">Chapter12 </a></td>
</tr>
<tr>
<td><a title="Craftsman - chapter13" target="_blank" href="http://www.objectmentor.com/resources/articles/craftsman%2013">Chapter13 </a></td>
</tr>
</table>
]]></content:encoded>
			<wfw:commentRss>http://www.agiledesign.co.uk/technical/tdd-story/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>dojo, kata or randori?</title>
		<link>http://www.agiledesign.co.uk/technical/dojo-kata-or-randori/</link>
		<comments>http://www.agiledesign.co.uk/technical/dojo-kata-or-randori/#comments</comments>
		<pubDate>Sun, 16 Apr 2006 12:00:08 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
				<category><![CDATA[technical]]></category>

		<guid isPermaLink="false">http://www.agiledesign.co.uk/wordpress/2006/04/16/dojo-kata-or-randori/</guid>
		<description><![CDATA[What flavour of session shall we have today?
In the agile community we like to share ideas and learn from each others sessions. In addition we borrow ideas from other communities. These three names (dojo, kata &#038; randori) are borrowed from the martial arts world in an attempt to encourage programmers to practice.
The idea of practicing [...]]]></description>
			<content:encoded><![CDATA[<p>What flavour of session shall we have today?</p>
<p>In the agile community we like to share ideas and learn from each others sessions. In addition we borrow ideas from other communities. These three names (dojo, kata &#038; randori) are borrowed from the martial arts world in an attempt to encourage programmers to practice.</p>
<p>The idea of practicing coding it quite unusual in the traditional sense, not least if programming is considered to be a solitary activity. People tend to think of years of experience as being all important. These types of sessions are intended to develop a group learning dynamic where all members leave the session having learnt something.</p>
<p><span id="more-26"></span> The <strong>dojo</strong> is the place we go to practice, for examples see the dojos run by <a href="http://wiki.agilefinland.com/?CodingDojo">AgileFinland,</a> Laurent Bossavit&#8217;s monthly <a class="external" href="http://bossavit.com/dojo/">Coding Dojo in Paris</a>, and my own local <a href="http://technorati.com/tag/AgileNorth">AgileNorth</a> dojo in the UK.</p>
<p>Dojo sessions can be run in one of a number of ways.</p>
<ul>
<li>Choreographed session with leaders talking through decisions.</li>
<li>Interactive sessions, a pair start to solve a problem, every 5 to 10 minutes one member of the pair is exchanged. Sometimes known as <strong>randori.</strong></li>
</ul>
<p>I am not a big fan of choreographed sessions. While there is value in demonstration I prefer this as an introduction to the session rather that a session in itself. I have felt somewhat detached from the decisions being made in the past.</p>
<p>The agile north sessions that I have been involved in have been in the randori style. We used the dojo to allow people to try TDD. To enhance the involvement of the audience they were asked to supplement the role of the second member of the pair by suggesting tests. The rational behind which test to do next was (for me) the most important output from the session.</p>
<p>Dave Thomas has been instrumental in publicising the benefits of <a href="http://blogs.pragprog.com/cgi-bin/pragdave.cgi/Practices/Kata">coding katas</a>. A <strong>kata</strong> is a small task that can be used by an individual to practice his craft. Through repetition one can achieve new insights even with a well known problem. My personal favourite is implementing the model behind <a href="http://www.bitstorm.org/gameoflife/">Conway&#8217;s game of life</a>.</p>
<p>Of course a kata is a good candidate for use in either type of session. However, for me there is an important extra aspect that shouldn&#8217;t be forgotten. After a kata, be it group or individual time must be set aside for reflection. During this <a href="http://www.retrospectives.com/">retrospective</a> we must take time to think about</p>
<ul>
<li>What did we do well?</li>
<li>What did we learn?</li>
<li>What would we do differently next time?</li>
<li>What still puzzles us?</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.agiledesign.co.uk/technical/dojo-kata-or-randori/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Keping it simple vs. Big design up front.</title>
		<link>http://www.agiledesign.co.uk/technical/keping-it-simple-vs-big-design-up-front/</link>
		<comments>http://www.agiledesign.co.uk/technical/keping-it-simple-vs-big-design-up-front/#comments</comments>
		<pubDate>Wed, 12 Apr 2006 21:45:41 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
				<category><![CDATA[technical]]></category>
		<category><![CDATA[design]]></category>

		<guid isPermaLink="false">http://www.agiledesign.co.uk/wordpress/2006/04/12/keping-it-simple-vs-big-design-up-front/</guid>
		<description><![CDATA[I just read Jo&#8217;s comments about doing the simplest possible thing that could work here and they got me thinking.
I have spent a great deal of time teaching software design, designing for reuse and about the benefits of good architecture (be it layered or hexagonal). So I guess I&#8217;m one of those that occasionally does [...]]]></description>
			<content:encoded><![CDATA[<p>I just read <a href="http://spikethepoodle.com/">Jo&#8217;s</a> comments about doing the simplest possible thing that could work <a href="http://spikethepoodle.com/?p=27">here</a> and they got me thinking.</p>
<p>I have spent a great deal of time teaching software design, designing for reuse and about the benefits of good architecture (be it layered or hexagonal). So I guess I&#8217;m one of those that occasionally does a little more than the minimum.</p>
<p>However, at what point in the project does a clean layered architecture become the simplest that could work? And, having reached this point how long is it likely to take to refactor into a cohesive architecture?</p>
<p>There is definitely a point at which developers start trying to predict the future and add features on the off chance that they become useful one day and this must be discouraged. Like many guidelines lets be pragmatic in the application of  &#8220;do the simplest thing&#8221;.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.agiledesign.co.uk/technical/keping-it-simple-vs-big-design-up-front/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SPA 2006 &#8211; Working with legacy code</title>
		<link>http://www.agiledesign.co.uk/technical/spa-2006-working-with-legacy-code/</link>
		<comments>http://www.agiledesign.co.uk/technical/spa-2006-working-with-legacy-code/#comments</comments>
		<pubDate>Thu, 30 Mar 2006 16:08:43 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
				<category><![CDATA[technical]]></category>
		<category><![CDATA[design]]></category>

		<guid isPermaLink="false">http://www.agiledesign.co.uk/wordpress/2006/03/30/spa-2006-working-with-legacy-code/</guid>
		<description><![CDATA[This session was run by Michael Feathers (author of the book by the same name). To begin with Michael explained the term legacy; this refers to existing code without thorough test coverage. With this in mind discussion was aimed at C++, JAVA &#38; C# applications that require extension. The goal is to achieve some of [...]]]></description>
			<content:encoded><![CDATA[<p>This session was run by Michael Feathers (author of the book by the same name). To begin with Michael explained the term legacy; this refers to existing code without thorough test coverage. With this in mind discussion was aimed at C++, JAVA &amp; C# applications that require extension. The goal is to achieve some of the benefits and confidence delivered by Test Driven Development (TDD) when developing on a none &quot;green fields&quot; project. If an application exists and added functionality is requested, should we be adding tests? Michael reasoned that the client did not want just the new functionality but the old too. To achieve this, tests should be added to ensure that the new software has no unwanted side effects.</p>
<p><span id="more-21"></span></p>
<p>In order to test areas in isolation we must remove dependencies in the code base. Examples of unwelcome dependencies are; the use of singletons, internal instantiations and concrete dependencies.To expand on these:</p>
<ul>
<li>The singleton pattern is, in my opinion, overused. In fact I have heard it described as an anti-pattern. When test driving code singletons become even more problematic. If left in place, the singleton is a barrier to our goal of independence between tests. One member of the group suggested that &quot;singletons are OK so long as they have no state and no behaviour&quot;. However, as a dependency exists between the class under test and the singleton class we cannot test without the singleton.</li>
<li>The term &quot;internal instantiation&quot; refers to the creation of one class from another. This structure results in a direct dependency from one to the other. The impact again is the inability to test a class in isolation.</li>
<li>Concrete dependency describes the previous two cases and many more. Any direct dependency on a class (rather than interface) is cause for concern.</li>
</ul>
<p>The most direct approach to all of these is to extract an interface and parameterise methods or constructors with reference to that interface. However, some will argue that the code is not quite perfect.</p>
<p>Michael reminded us of a Voltaire quote: <em>&quot;Best is the enemy of good&quot;</em>. We need to make many small improving steps. Do not look for perfection in one step.</p>
<p>The following algorithm was suggested as a route to making a change</p>
<ol>
<li>Identify change point</li>
<li>Identify test points</li>
<li>Break dependencies</li>
<li>Write tests</li>
<li>Refactor or change.</li>
</ol>
<p>When writing tests we often wish to replace real behaviour with test behaviour. The example given was to stub out code that sends an e-mail. In this situation we wish to change the behaviour of a peace of code without touching it. The approach described by Michael was to identify <strong>seams</strong>. Examples of seams are:</p>
<ul>
<li>Pre-processor &#8211; for example, remove the use of the doIt method with <code>#define doIt doSomethingElse</code>.</li>
<li>Linker &#8211; this technique in C / C++ is called link time polymorphism. All we need to do is link in an alternative library implementing the same classes or functions. In JAVA we can consider the class loader as operating at this seam.</li>
<li>Polymorphism &#8211; in OO languages our most effective seam is polymorphism, this is the run time dispatching of calls due to inheritance.</li>
</ul>
<p>The next technique to be presented was, when trying to stub out utility classes introduce an instance delegator. This involves gradually turning a utility class into a real class. Finally Michael suggested an added benefit to reducing dependencies, to often teams have policy of going for a brew while waiting for a build. Reducing dependencies allows localised development with minimal compile time.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.agiledesign.co.uk/technical/spa-2006-working-with-legacy-code/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Has OO really  won the battle.</title>
		<link>http://www.agiledesign.co.uk/technical/has-oo-really-won-the-battle/</link>
		<comments>http://www.agiledesign.co.uk/technical/has-oo-really-won-the-battle/#comments</comments>
		<pubDate>Sat, 25 Mar 2006 08:24:21 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
				<category><![CDATA[technical]]></category>
		<category><![CDATA[design]]></category>

		<guid isPermaLink="false">http://www.agiledesign.co.uk/wordpress/2006/03/25/has-oo-really-won-the-battle/</guid>
		<description><![CDATA[OO languages seem to have won the battle but how many developers are really applying OO principles?]]></description>
			<content:encoded><![CDATA[<p>I spend much of my time teaching OO. While it seems that modern programming languages are all about object orientation, how many developers are really embracing OO design?</p>
<p>In his article on <a target="_blank" title="Martin Fowler: Getter eradication" href="http://martinfowler.com/bliki/GetterEradicator.html">getter eradication</a> Martin Fowler says:</p>
<p><em>The OO community may have &#8216;won&#8217; in the sense that modern languages are dominated by objects, but they are still yet to win in that OO programming is still not widely used.<br />
</em><br />
This really struck a chord with me and also related to a post of <a target="_blank" title="Back to OO basics" href="http://silkandspinach.net/blog/2006/03/back_to_basics.html">Kevin Rutherfords</a> on getting back to basics.<span id="more-15"></span></p>
<p>I can think of a few groups of people who fail to apply OO principles for differing reasons.</p>
<ol>
<li>The &#8220;functional programming works&#8221; crowd &#8211; I have worked with C programmers who are willing to accept bits of C++ syntax but believe firmly that OO does not work.</li>
<li>The &#8220;pure OO is for small talk&#8221; crowd &#8211; I remember being told in a coding dojo that, while a domain entity certainly had both state and behaviour, it would be inappropriate to represent it with a class as this was JAVA and not Smalltalk. I find it difficult to understand this approach.</li>
<li>The design according to technology crowd &#8211; there are technologies that can lead developers away from OO. Service oriented architecture seems at first glance to encourage design in terms of functions offered. I have, I hasten to add, no problem with SOA as a facade to a clean object model.</li>
</ol>
<p>Unfortunately when trying to advocate the proper application of OO there is a stumbling block. Few organisations have managed to achieve the promised reuse that OO was supposed to bring.</p>
<p>In response all I can say is that OO makes my life as a developer easier. I can concentrate on one thing. Once a class is tested I can largely forget about it. Finally the object community have provided me with a recipe book to achieve design level reuse.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.agiledesign.co.uk/technical/has-oo-really-won-the-battle/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
