<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
	
	>
<channel>
	<title>
	Comments on: The OCP kata	</title>
	<atom:link href="http://matteo.vaccari.name/blog/archives/293/feed" rel="self" type="application/rss+xml" />
	<link>http://matteo.vaccari.name/blog/archives/293</link>
	<description>Extreme enthusiasm</description>
	<lastBuildDate>
	Mon, 25 Feb 2019 15:18:16 +0000	</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.1.1</generator>
			<item>
				<title>
				By: Johan Martinsson				</title>
				<link>http://matteo.vaccari.name/blog/archives/293/comment-page-1#comment-275477</link>
		<dc:creator><![CDATA[Johan Martinsson]]></dc:creator>
		<pubDate>Tue, 28 Jun 2016 10:07:16 +0000</pubDate>
		<guid isPermaLink="false">http://matteo.vaccari.name/blog/?p=293#comment-275477</guid>
					<description><![CDATA[Your answer is clear. I&#039;ll try more times for my own benefit. I also project using this dojos in training teams, and I&#039;m much more hesitant. I do see there&#039;s probably and muscle training that is a bit different and perhaps more acute. The possible downsides to me as a training tool are

- Few people allow themselves to write shitty code first, and it is such an efficient design tool. This is for instance a major difficulty in learning TDD - allowing yourself to just make the test pass, and quickly
- I want them to have a tool that is readily available immediately (well mostly) and the ability to refactor &quot;after&quot; towards OCP is easier to learn. 

Maybe which approach is best depends on the person doing it, so &quot;refactor before&quot; could be an optional constraint. The base constraint being to refactor before next test.]]></description>
		<content:encoded><![CDATA[<p>Your answer is clear. I&#8217;ll try more times for my own benefit. I also project using this dojos in training teams, and I&#8217;m much more hesitant. I do see there&#8217;s probably and muscle training that is a bit different and perhaps more acute. The possible downsides to me as a training tool are</p>
<p>&#8211; Few people allow themselves to write shitty code first, and it is such an efficient design tool. This is for instance a major difficulty in learning TDD &#8211; allowing yourself to just make the test pass, and quickly<br />
&#8211; I want them to have a tool that is readily available immediately (well mostly) and the ability to refactor &#8220;after&#8221; towards OCP is easier to learn. </p>
<p>Maybe which approach is best depends on the person doing it, so &#8220;refactor before&#8221; could be an optional constraint. The base constraint being to refactor before next test.</p>
]]></content:encoded>
						</item>
						<item>
				<title>
				By: matteo				</title>
				<link>http://matteo.vaccari.name/blog/archives/293/comment-page-1#comment-275463</link>
		<dc:creator><![CDATA[matteo]]></dc:creator>
		<pubDate>Tue, 28 Jun 2016 08:45:45 +0000</pubDate>
		<guid isPermaLink="false">http://matteo.vaccari.name/blog/?p=293#comment-275463</guid>
					<description><![CDATA[The &quot;refactor before&quot; rule of the OCP Dojo is a trick, to force the learner to think about why a certain extension of behaviour is not possible with the current code.  This dojo is all about pushing the abstraction pedal as far as possible.  Someone said that the only way to know when something is &quot;too much&quot;, is to do it too much!

So yes, in Real Work sometimes you complicate the code a bit, and then refactor.  Some other times, when you find that implementing something is difficult, you first make it easier by refactoring (which might be difficult to do), and then you do it.

In a dojo context, however, if the goal is to practice creating abstractions, the rule about creating it before use is meant to force a behaviour.  If you intend to create it after, you run the risk of rushing to making the next test pass, and forget to introduce the abstraction at all.  So I think it can be OK to be flexible about introducing the abstraction after you need it, as long as you have a watchful moderator that will remind the learners to implement the abstractions!

Is that any clearer?  I mean, the exercise is meant to help people who aren&#039;t used to creating abstractions.  If your audience has the opposite problem, then you might do better with another exercise, like e.g., the TDD As If You Meant It by Keith Braithwaite]]></description>
		<content:encoded><![CDATA[<p>The &#8220;refactor before&#8221; rule of the OCP Dojo is a trick, to force the learner to think about why a certain extension of behaviour is not possible with the current code.  This dojo is all about pushing the abstraction pedal as far as possible.  Someone said that the only way to know when something is &#8220;too much&#8221;, is to do it too much!</p>
<p>So yes, in Real Work sometimes you complicate the code a bit, and then refactor.  Some other times, when you find that implementing something is difficult, you first make it easier by refactoring (which might be difficult to do), and then you do it.</p>
<p>In a dojo context, however, if the goal is to practice creating abstractions, the rule about creating it before use is meant to force a behaviour.  If you intend to create it after, you run the risk of rushing to making the next test pass, and forget to introduce the abstraction at all.  So I think it can be OK to be flexible about introducing the abstraction after you need it, as long as you have a watchful moderator that will remind the learners to implement the abstractions!</p>
<p>Is that any clearer?  I mean, the exercise is meant to help people who aren&#8217;t used to creating abstractions.  If your audience has the opposite problem, then you might do better with another exercise, like e.g., the TDD As If You Meant It by Keith Braithwaite</p>
]]></content:encoded>
						</item>
						<item>
				<title>
				By: Johan Martinsson				</title>
				<link>http://matteo.vaccari.name/blog/archives/293/comment-page-1#comment-275411</link>
		<dc:creator><![CDATA[Johan Martinsson]]></dc:creator>
		<pubDate>Mon, 27 Jun 2016 21:26:06 +0000</pubDate>
		<guid isPermaLink="false">http://matteo.vaccari.name/blog/?p=293#comment-275411</guid>
					<description><![CDATA[Follow to the conversation on twitter https://twitter.com/xpmatteo/status/747305326618148864

Say I have implemented the normal accumulating bowling score and I write a test for strike.
It seems that making the test pass with a conditional like this is contrary to the rules. 

        if (rolls[0] === 10) {
            score = sumOf3Rolls(rolls)
        } else {
            score = sumOf2Rolls(rolls)
        }

However if I refactor right after the result is (probably) the same. And to me there are several advantages to this &quot;refactor after&quot; approach.

The advantages of &quot;refactor after&quot; are to me
- compliant to Make it work then Make it good
- easier (ok that&#039;s a bad argument for a kata)
- builds a habit of looking at manifest mess before refactoring -&#062; likely to lead to simpler design

So my question is what will people gain from doing it in the &quot;refactor before&quot; way? I tried it for quite a bit, didn&#039;t get much from it but I suspect I might be missing something here.]]></description>
		<content:encoded><![CDATA[<p>Follow to the conversation on twitter <a href="https://twitter.com/xpmatteo/status/747305326618148864" rel="nofollow">https://twitter.com/xpmatteo/status/747305326618148864</a></p>
<p>Say I have implemented the normal accumulating bowling score and I write a test for strike.<br />
It seems that making the test pass with a conditional like this is contrary to the rules. </p>
<p>        if (rolls[0] === 10) {<br />
            score = sumOf3Rolls(rolls)<br />
        } else {<br />
            score = sumOf2Rolls(rolls)<br />
        }</p>
<p>However if I refactor right after the result is (probably) the same. And to me there are several advantages to this &#8220;refactor after&#8221; approach.</p>
<p>The advantages of &#8220;refactor after&#8221; are to me<br />
&#8211; compliant to Make it work then Make it good<br />
&#8211; easier (ok that&#8217;s a bad argument for a kata)<br />
&#8211; builds a habit of looking at manifest mess before refactoring -&gt; likely to lead to simpler design</p>
<p>So my question is what will people gain from doing it in the &#8220;refactor before&#8221; way? I tried it for quite a bit, didn&#8217;t get much from it but I suspect I might be missing something here.</p>
]]></content:encoded>
						</item>
						<item>
				<title>
				By: Code kata 6: The classic bowling game scorer, open and closed &#124; Red Gate Software Development				</title>
				<link>http://matteo.vaccari.name/blog/archives/293/comment-page-1#comment-96733</link>
		<dc:creator><![CDATA[Code kata 6: The classic bowling game scorer, open and closed &#124; Red Gate Software Development]]></dc:creator>
		<pubDate>Thu, 24 Apr 2014 11:00:10 +0000</pubDate>
		<guid isPermaLink="false">http://matteo.vaccari.name/blog/?p=293#comment-96733</guid>
					<description><![CDATA[[...] the open to extension and closed to modification, we’re going to follow the workflow described at http://matteo.vaccari.name/blog/archives/293. This is how it [...]]]></description>
		<content:encoded><![CDATA[<p>[&#8230;] the open to extension and closed to modification, we’re going to follow the workflow described at <a href="http://matteo.vaccari.name/blog/archives/293" rel="nofollow">http://matteo.vaccari.name/blog/archives/293</a>. This is how it [&#8230;]</p>
]]></content:encoded>
						</item>
						<item>
				<title>
				By: Just playing with Open Closed principle &#124; Roberto Mereghetti				</title>
				<link>http://matteo.vaccari.name/blog/archives/293/comment-page-1#comment-96725</link>
		<dc:creator><![CDATA[Just playing with Open Closed principle &#124; Roberto Mereghetti]]></dc:creator>
		<pubDate>Sun, 16 Mar 2014 18:34:20 +0000</pubDate>
		<guid isPermaLink="false">http://matteo.vaccari.name/blog/?p=293#comment-96725</guid>
					<description><![CDATA[[...] Just playing with Open Closed principle Share this:TwitterFacebookMi piace:Mi piace Caricamento... [...]]]></description>
		<content:encoded><![CDATA[<p>[&#8230;] Just playing with Open Closed principle Share this:TwitterFacebookMi piace:Mi piace Caricamento&#8230; [&#8230;]</p>
]]></content:encoded>
						</item>
						<item>
				<title>
				By: Mini XP Day 2011 &#171; Legacy Code Public Enemy				</title>
				<link>http://matteo.vaccari.name/blog/archives/293/comment-page-1#comment-93872</link>
		<dc:creator><![CDATA[Mini XP Day 2011 &#171; Legacy Code Public Enemy]]></dc:creator>
		<pubDate>Tue, 22 Mar 2011 10:27:06 +0000</pubDate>
		<guid isPermaLink="false">http://matteo.vaccari.name/blog/?p=293#comment-93872</guid>
					<description><![CDATA[[...] In December me and Matteo Vaccari have presented the The Open-Closed Principle Dojo based on his OCP Kata. [...]]]></description>
		<content:encoded><![CDATA[<p>[&#8230;] In December me and Matteo Vaccari have presented the The Open-Closed Principle Dojo based on his OCP Kata. [&#8230;]</p>
]]></content:encoded>
						</item>
						<item>
				<title>
				By: Franco Lombardo &#187; Blog Archive &#187; Italian Agile Day 2010				</title>
				<link>http://matteo.vaccari.name/blog/archives/293/comment-page-1#comment-93632</link>
		<dc:creator><![CDATA[Franco Lombardo &#187; Blog Archive &#187; Italian Agile Day 2010]]></dc:creator>
		<pubDate>Tue, 23 Nov 2010 16:30:09 +0000</pubDate>
		<guid isPermaLink="false">http://matteo.vaccari.name/blog/?p=293#comment-93632</guid>
					<description><![CDATA[[...] dell&#039;XP User Group di Bergamo abbiamo provato a rifare il Kata &#034;Sasso-forbici-carta&#034; seguendo le regole &#034;Aperto-chiuso&#034; suggerite da Matteo Vaccari. Il pubblico non era certo numeroso...ehm...ehm...vabbe&#039;, se vi interessa qui sono le slides e [...]]]></description>
		<content:encoded><![CDATA[<p>[&#8230;] dell&#39;XP User Group di Bergamo abbiamo provato a rifare il Kata &quot;Sasso-forbici-carta&quot; seguendo le regole &quot;Aperto-chiuso&quot; suggerite da Matteo Vaccari. Il pubblico non era certo numeroso&#8230;ehm&#8230;ehm&#8230;vabbe&#39;, se vi interessa qui sono le slides e [&#8230;]</p>
]]></content:encoded>
						</item>
						<item>
				<title>
				By: Extreme Enthusiasm » Blog Archive » The OCP kata &#171; ZenAndSoftwareDevelopment				</title>
				<link>http://matteo.vaccari.name/blog/archives/293/comment-page-1#comment-93601</link>
		<dc:creator><![CDATA[Extreme Enthusiasm » Blog Archive » The OCP kata &#171; ZenAndSoftwareDevelopment]]></dc:creator>
		<pubDate>Wed, 10 Nov 2010 12:41:25 +0000</pubDate>
		<guid isPermaLink="false">http://matteo.vaccari.name/blog/?p=293#comment-93601</guid>
					<description><![CDATA[[...] Extreme Enthusiasm » Blog Archive » The OCP kata.      Pagine [...]]]></description>
		<content:encoded><![CDATA[<p>[&#8230;] Extreme Enthusiasm » Blog Archive » The OCP kata.      Pagine [&#8230;]</p>
]]></content:encoded>
						</item>
						<item>
				<title>
				By: Extreme Enthusiasm &#187; Blog Archive &#187; November is busy :-)				</title>
				<link>http://matteo.vaccari.name/blog/archives/293/comment-page-1#comment-93584</link>
		<dc:creator><![CDATA[Extreme Enthusiasm &#187; Blog Archive &#187; November is busy :-)]]></dc:creator>
		<pubDate>Sat, 06 Nov 2010 22:34:32 +0000</pubDate>
		<guid isPermaLink="false">http://matteo.vaccari.name/blog/?p=293#comment-93584</guid>
					<description><![CDATA[[...] Days Benelux, November 25. Together with Antonio Carpentieri I will present a workshop on the Open-Closed Principle Dojo. It&#8217;s a way to learn an important principle of object-oriented [...]]]></description>
		<content:encoded><![CDATA[<p>[&#8230;] Days Benelux, November 25. Together with Antonio Carpentieri I will present a workshop on the Open-Closed Principle Dojo. It&#8217;s a way to learn an important principle of object-oriented [&#8230;]</p>
]]></content:encoded>
						</item>
						<item>
				<title>
				By: Extreme Enthusiasm &#187; Blog Archive &#187; On discussions				</title>
				<link>http://matteo.vaccari.name/blog/archives/293/comment-page-1#comment-93497</link>
		<dc:creator><![CDATA[Extreme Enthusiasm &#187; Blog Archive &#187; On discussions]]></dc:creator>
		<pubDate>Thu, 07 Oct 2010 07:49:36 +0000</pubDate>
		<guid isPermaLink="false">http://matteo.vaccari.name/blog/?p=293#comment-93497</guid>
					<description><![CDATA[[...] I have not become convinced that iterative development, small steps, refactoring are to be avoided. I&#8217;m not advocating doing some big upfront design to make sure we can hit the release code without iterating, without incrementing functionality bit by bit, without refactoring. I still think that iterative and incremental design is the only reliable way to produce good software. But we must remember that refactoring per se is waste. Francesco Cirillo is fond of saying that emergent design is not &#8220;doing some messy work now, then I will refactor&#8221;. It&#8217;s more efficient to write incremental code that can be extended without refactoring; it&#8217;s more efficient to exploit the Open-Closed Principle! [...]]]></description>
		<content:encoded><![CDATA[<p>[&#8230;] I have not become convinced that iterative development, small steps, refactoring are to be avoided. I&#8217;m not advocating doing some big upfront design to make sure we can hit the release code without iterating, without incrementing functionality bit by bit, without refactoring. I still think that iterative and incremental design is the only reliable way to produce good software. But we must remember that refactoring per se is waste. Francesco Cirillo is fond of saying that emergent design is not &#8220;doing some messy work now, then I will refactor&#8221;. It&#8217;s more efficient to write incremental code that can be extended without refactoring; it&#8217;s more efficient to exploit the Open-Closed Principle! [&#8230;]</p>
]]></content:encoded>
						</item>
			</channel>
</rss>
