<?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>Gojko Adzic &#187; software craftsmanship</title>
	<atom:link href="http://gojko.net/tag/software-craftsmanship/feed/" rel="self" type="application/rss+xml" />
	<link>http://gojko.net</link>
	<description>Building software that matters</description>
	<lastBuildDate>Tue, 31 Jan 2012 09:07:39 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Links and Slides from the Specifications Workshops talk at the Software Craftsmanship conference</title>
		<link>http://gojko.net/2009/02/27/links-and-slides-from-the-specifications-workshops-talk-at-the-software-craftsmanship-conference/</link>
		<comments>http://gojko.net/2009/02/27/links-and-slides-from-the-specifications-workshops-talk-at-the-software-craftsmanship-conference/#comments</comments>
		<pubDate>Fri, 27 Feb 2009 14:12:55 +0000</pubDate>
		<dc:creator>gojko</dc:creator>
				<category><![CDATA[articles]]></category>
		<category><![CDATA[acceptance testing]]></category>
		<category><![CDATA[sc2009]]></category>
		<category><![CDATA[software craftsmanship]]></category>
		<category><![CDATA[specification workshop]]></category>

		<guid isPermaLink="false">http://gojko.net/?p=717</guid>
		<description><![CDATA[I had a really great time yesterday at the Software Craftsmanship conference. Jason &#8211; thanks a lot for organising it and I am really looking forward to attending the conference next year as well. I was a bit surprised with the interest in my talk on Specification Workshops, especially as...]]></description>
			<content:encoded><![CDATA[<p>I had a really great time yesterday at the <a href='http://parlezuml.com/softwarecraftsmanship/'>Software Craftsmanship</a> conference. Jason &#8211; thanks a lot for organising it and I am really looking forward to attending the conference next year as well. I was a bit surprised with the interest in my talk on <a href="http://www.acceptancetesting.info/key-ideas/specification-workshop/">Specification Workshops</a>, especially as it was on a bonus track, added late into the programme. Thanks a lot to everyone attending, especially all those people that decided to stay and stand through the whole thing or sit on the floor once we ran out of chairs. Here are the slides and links that I mentioned in the talk:</p>
<ul>
<li><a href="/resources/sc2009-specworkshops.pdf">Slides (pdf)</a></li>
<li><a href="http://www.foxnews.com/wires/2008Jun05/0,4670,B2Crash,00.html">B2 Bomber crash</a> (&#8220;all the systems were functioning normally&#8221;)</li>
<li><a href="http://www.xprogramming.com/xpmag/expCardConversationConfirmation.htm">Card, Conversation, Confirmation</a> article by Ron Jeffries</li>
<li><a href="http://www.infoq.com/presentations/Fowler-North-Crevasse-of-Doom">Crevasse of Doom</a> talk at QCon 07 (printing in java)</li>
<li><a href="http://www.amazon.co.uk/gp/product/0932633137?ie=UTF8&#038;tag=swingwiki-21&#038;linkCode=as2&#038;camp=1634&#038;creative=19450&#038;creativeASIN=0932633137">Exploring Requirements: Quality Before Design</a><img src="http://www.assoc-amazon.co.uk/e/ir?t=swingwiki-21&#038;l=as2&#038;o=2&#038;a=0932633137" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /> by Donald Gause and Gerald Weinberg</li>
<li><a href="http://www.amazon.co.uk/gp/product/0262611465?ie=UTF8&#038;tag=swingwiki-21&#038;linkCode=as2&#038;camp=1634&#038;creative=19450&#038;creativeASIN=0262611465">Sources of Power: How People Make Decisions</a><img src="http://www.assoc-amazon.co.uk/e/ir?t=swingwiki-21&#038;l=as2&#038;o=2&#038;a=0262611465" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /> by Gary Klein</li>
<li><a href="http://www.amazon.co.uk/gp/product/0955683610?ie=UTF8&#038;tag=swingwiki-21&#038;linkCode=as2&#038;camp=1634&#038;creative=19450&#038;creativeASIN=0955683610">Bridging the Communication Gap: Specification by Example and Agile Acceptance Testing</a><img src="http://www.assoc-amazon.co.uk/e/ir?t=swingwiki-21&#038;l=as2&#038;o=2&#038;a=0955683610" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /> &#8211; my book with Specification Workshops as one of the central themes (<a href="http://acceptancetesting.info/the-book/buy-pdf">also available as a PDF</a>)</li>
<li><a href="http://www.acceptancetesting.info">Acceptance Testing portal</a> with lots of additional resources and a video on the importance of realistic examples and acceptance testing</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://gojko.net/2009/02/27/links-and-slides-from-the-specifications-workshops-talk-at-the-software-craftsmanship-conference/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Thought-provoking TDD exercise at the Software Craftsmanship conference</title>
		<link>http://gojko.net/2009/02/27/thought-provoking-tdd-exercise-at-the-software-craftsmanship-conference/</link>
		<comments>http://gojko.net/2009/02/27/thought-provoking-tdd-exercise-at-the-software-craftsmanship-conference/#comments</comments>
		<pubDate>Fri, 27 Feb 2009 12:38:32 +0000</pubDate>
		<dc:creator>gojko</dc:creator>
				<category><![CDATA[articles]]></category>
		<category><![CDATA[sc2009]]></category>
		<category><![CDATA[software craftsmanship]]></category>
		<category><![CDATA[tdd]]></category>
		<category><![CDATA[unit testing]]></category>

		<guid isPermaLink="false">http://gojko.net/?p=705</guid>
		<description><![CDATA[Yesterday I attended Keith Braithwaite&#8216;s workshop titled ”TDD as if you meant it” at the Software Craftsmanship 2009 conference, and I found it truly thought provoking. At the start of the workshop I thought that the exercise is plain silly but I publicly take it back: Keith – you really...]]></description>
			<content:encoded><![CDATA[<p><img src='/images/sc-2009-stones.png' style='border:1px solid black; margin:5px 5px 5px 5px' align='left'/>Yesterday I attended <a href='http://peripateticaxiom.blogspot.com/'>Keith Braithwaite</a>&#8216;s workshop titled <a href='http://www.parlezuml.com/softwarecraftsmanship/sessions/tdd_as_if_you_meant_it.htm'>”TDD as if you meant it”</a> at the <a href='http://parlezuml.com/softwarecraftsmanship/'>Software Craftsmanship 2009</a> conference, and I found it truly thought provoking. At the start of the workshop I thought that the exercise is plain silly but I publicly take it back: Keith – you really taught me something yesterday and I thank you for that.<span id="more-705"></span></p>
<p>Attendees were split into pairs who were working on the task together, using TDD practices with very strict  rules:</p>
<ol>
<li>write exactly ONE failing test</li>
<li>make the test from (1) pass by first writing implementation code IN THE TEST</li>
<li> create a new implementation method/function by:
<ol>
<li> doing extract method on implementation code created as per (2), or </li>
<li>moving implementation code as per (2) into an existing implementation method </li>
</ol>
</li>
<li>only ever create new methods IN THE TEST CLASS</li>
<li>only ever create implementation classes to provide a destination for extracting a method created as per (4). </li>
<li>populate implementation classes by doing move method from a test class into them </li>
<li>refactor as required </li>
<li>go to (1) </li>
</ol>
<p>The exercise involved writing a piece of code to evaluate whether a stone in the Go game can be taken or not. The definition of whether a stone can be taken was given as it having only one &#8216;liberty&#8217;, with liberties defined as free horizontal or vertical places adjacent to the stone. For example, the white stone in the picture below has two liberties (diagonals don&#8217;t count) and it cannot be taken.</p>
<p><img src='/images/sc-2009-stones-2.png' style='border:1px solid black; margin:5px 5px 5px 5px' align='center'/></p>
<p>The  picture above was the first example we had to implement. The rules were designed to strictly let the domain code evolve from the test code in baby steps, which I though was the way I&#8217;m doing unit testing anyway, so it did not feel challenging at all. My first attempt started like this:</p>
<pre style='margin-bottom:10px'>
[Test]
public void StoneHasTwoLibertiesIfTwoCornersAreCovered()
{
	GoGrid grid=new GoGrid(3,3);
 	grid.Place(1,1,Piece.WHITE);
</pre>
<p>Keith came over and said “Wow! Where did that GoGrid come from?” The rules of the workshop were that we had to let domain code evolve from the test code, and I tried to explain that the class doesn&#8217;t yet exist and I&#8217;m using the test to drive it&#8217;s design, so in my mind I was following the rules of the game but Keith was having none of it, so we had to delete that and start over. As we weren&#8217;t allowed to use domain classes, even presumed domain classes, my next attempt was to store it in a char array and then possibly later move that out:</p>
<pre style='margin-bottom:10px'>
[Test]
public void StoneHasTwoLibertiesIfTwoCornersAreCovered()
{
	char grid[][]=new char[][]{
                     new char[]{' ', ' ', ' '},
                     new char[]{'B', 'W', ' '},
                     new char[]{' ', 'B', ' '},
	}
 	int liberties=0;
    	for (int x=0; x&lt;3; x++)
 	//
</pre>
<p>Keith came over again and complained against that. At this point, I was a bit lost. I guess that my pair partner was lost as well. Keith kept asking why we were writing this code, I was explaining that I was describing the example that he gave but again he was not accepting it. Then we came to the point of what exactly we were testing and I said “well the test name says it – if the stone has two corners covered, its liberty is 2”, and Keith asked why haven&#8217;t we specified that in the test rather than starting with a grid. So we changed the test to this:</p>
<pre style='margin-bottom:10px'>
[Test]
public void StoneHasTwoLibertiesIfTwoCornersAreCovered()
{
	int cornersCovered=2;
 	int liberties=4- cornersCovered;
	Assert.AreEqual(2,liberties)
}
</pre>
<p>Finally he seemed happy with this, but to me it looked plain silly. It was not any closer to the end goal and I was just testing subtraction. Encouraging us to stick with it for a while, Keith left to help others and we continued writing other examples. After a couple more similar cases implemented as tests, we were allowed to refactor and move the code to calculate liberties to a new method in the test class. Then we started implementing cases with groups of stones, and things sort of fell into place. </p>
<p>Operations on groups of stones would be a lot more complicated to handle with the grid directly. The exercise was pushing us towards a design that treated groups as a whole rather than individual pieces and not having the grid as a matrix of stones defined at all. Of course the same functionality can be implemented directly on a grid but it would mean much more code and it would be much more complex. </p>
<p>The exercise was very interesting, although I initially thought that it is silly and too simplistic. It showed me how much hidden assumptions can affect my work if I don&#8217;t really try to express them and of course I fell into the classic trap of restating the problem and solving the restated problem first. I was thinking about something that I&#8217;ll probably need in the future and jumping too much ahead instead of just focusing on the task that I really was supposed to solve. </p>
<p>My counter-argument is that in real projects, not in workshop labs, I would typically have a bigger chunk of requirements and domain explored and we would try out a few designs to see which one fits the problem space best before we started coding, so unit tests will be used to flesh out the APIs but the design ideas would probably be there in some form. Nevertheless, I think that it would be really interesting to try this technique out on a real project as well. According to Keith after the exercise, classes developed like this tend to have very little or no state, very little code and end up with methods with long parameter lists, coming much closer to the functional programming paradigm. The code ends up with lots of small classes.</p>
<p><b>Read about the follow-up on this exercise as well: <a href="http://gojko.net/2009/08/02/tdd-as-if-you-meant-it-revisited/">TDD as if you meant it: revisited</a></b></p>
]]></content:encoded>
			<wfw:commentRss>http://gojko.net/2009/02/27/thought-provoking-tdd-exercise-at-the-software-craftsmanship-conference/feed/</wfw:commentRss>
		<slash:comments>25</slash:comments>
		</item>
		<item>
		<title>Software craftsmanship conference programme is now finalised</title>
		<link>http://gojko.net/2009/01/13/software-craftsmanship-conference-programme-is-now-finalised/</link>
		<comments>http://gojko.net/2009/01/13/software-craftsmanship-conference-programme-is-now-finalised/#comments</comments>
		<pubDate>Tue, 13 Jan 2009 13:49:01 +0000</pubDate>
		<dc:creator>gojko</dc:creator>
				<category><![CDATA[news]]></category>
		<category><![CDATA[software craftsmanship]]></category>

		<guid isPermaLink="false">http://gojko.net/?p=607</guid>
		<description><![CDATA[The session programme for the upcoming Software Craftsmanship conference is now published. I had the pleasure of participating in the final programme selection meeting, and I&#8217;m really looking forward to the event on the 26th of February. There will be two parallel tracks with mostly practical workshops and lots of...]]></description>
			<content:encoded><![CDATA[<p><img src='http://gojko.net/images/sc2009.gif' style='border:1px solid black; margin:5px 5px 5px 5px' align='left'/>The session programme for the upcoming Software Craftsmanship conference is now published.  I had the pleasure of participating in the final programme selection meeting, and I&#8217;m really looking forward to the event on the 26th of February. There will be two parallel tracks with mostly practical workshops and lots of opportunities for socialising and discussions between sessions. Two of the slots will be filled with lightning talks on keyboard shortcuts and defining moments. For more information, see the <a href="http://parlezuml.com/softwarecraftsmanship/sessions/programme.htm">programme page</a></p>
]]></content:encoded>
			<wfw:commentRss>http://gojko.net/2009/01/13/software-craftsmanship-conference-programme-is-now-finalised/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Software craftsmanship: London Feb 2009</title>
		<link>http://gojko.net/2008/11/26/software-craftsmanship-london-feb-2009/</link>
		<comments>http://gojko.net/2008/11/26/software-craftsmanship-london-feb-2009/#comments</comments>
		<pubDate>Wed, 26 Nov 2008 20:34:21 +0000</pubDate>
		<dc:creator>gojko</dc:creator>
				<category><![CDATA[news]]></category>
		<category><![CDATA[agile]]></category>
		<category><![CDATA[software craftsmanship]]></category>

		<guid isPermaLink="false">http://gojko.net/?p=492</guid>
		<description><![CDATA[Jason Gorman announced the first Software Craftsmanship conference, which will take place in London on the 26th of February 2009. The conference is about the &#8220;hard skills&#8221; that programmers and teams require to deliver high quality working software. Judging by the first few session proposals it is going to be...]]></description>
			<content:encoded><![CDATA[<p><img src="/images/sc2009.gif" align='left' style='margin:5px 5px 5px 5px' /><a href="http://parlezuml.com/" target="_blank">Jason Gorman</a> announced the first Software Craftsmanship conference, which will take place in London on the 26th of February 2009. The conference is <i>about the &#8220;hard skills&#8221; that programmers and teams require to deliver high quality working software</i>. Judging by the first few session proposals it is going to be an event that people serious about software cannot afford to miss. For more information, see <a href="http://parlezuml.com/softwarecraftsmanship/">the conference web site</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://gojko.net/2008/11/26/software-craftsmanship-london-feb-2009/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

