<?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 for Helmut Rubasch</title>
	<atom:link href="http://www.rubasch.com/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.rubasch.com</link>
	<description>The Way to Software Engineering</description>
	<lastBuildDate>Sun, 22 Oct 2006 13:10:52 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
	<item>
		<title>Comment on JAOO &#8211; Day 1 by Tammo Freese</title>
		<link>http://www.rubasch.com/2006/10/01/jaoo-day-1/#comment-9</link>
		<dc:creator>Tammo Freese</dc:creator>
		<pubDate>Sun, 22 Oct 2006 13:10:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.rubasch.com/2006/10/01/jaoo-day-1/#comment-9</guid>
		<description>Hello Helmut, 

The extra replay() step in EasyMock is there by design, not by requirement.
It would be possible to do implement something like expect(mock).aMethod()
meaning the expect gives back an object which allows the definition of expected method calls for te mock. When I implemented EasyMock 2 last year, I opted against it for two reasons. First, it is harder to read, since the parentheses look misplaced. Second, it is not possible to chain responses, like in expect(mock.aMethod()).andReturn(&quot;avalue&quot;) - and this means that type checking for return values would not work. However, this decision may change in a future version of EasyMock. :)</description>
		<content:encoded><![CDATA[<p>Hello Helmut, </p>
<p>The extra replay() step in EasyMock is there by design, not by requirement.<br />
It would be possible to do implement something like expect(mock).aMethod()<br />
meaning the expect gives back an object which allows the definition of expected method calls for te mock. When I implemented EasyMock 2 last year, I opted against it for two reasons. First, it is harder to read, since the parentheses look misplaced. Second, it is not possible to chain responses, like in expect(mock.aMethod()).andReturn(&#8220;avalue&#8221;) &#8211; and this means that type checking for return values would not work. However, this decision may change in a future version of EasyMock. <img src='http://www.rubasch.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on JAOO &#8211; Day 1 by Helmut Rubasch</title>
		<link>http://www.rubasch.com/2006/10/01/jaoo-day-1/#comment-8</link>
		<dc:creator>Helmut Rubasch</dc:creator>
		<pubDate>Thu, 12 Oct 2006 19:31:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.rubasch.com/2006/10/01/jaoo-day-1/#comment-8</guid>
		<description>I am quite aware of the advantages of using pure language constructs (that the compiler can check and the IDE can autocomplete) in contrast to pure strings (that are of course not checked in any way during compile time) - in fact, this is one of the main reasons why we are using EasyMock in a project.
Still, some things are rather hard to get used to.
EasyMock&#039;s record mechanism is really clever: everything is done at language level, no meta-language (Strings) necessary. Unfortunately this implies, that you need this extra &lt;i&gt;replay&lt;/i&gt; step before you can really use the mock. I don&#039;t know how many times I forgot to &lt;i&gt;replay&lt;/i&gt; my mocks - still, you usually find out when trying to break your test, and it just won&#039;t break because the mock is still in recording mode (or does &lt;i&gt;mock.verify()&lt;/i&gt; even throw an exception if the mock has not been replayed?).
The ArgumentMatchers are also a very interesting way to accomplish their tasks (unfortunately hard to understand at first, too). Still jMock&#039;s Constraints are slightlier more compact to use (no additional static method necessary).
So each, EasyMock and jMock, has some things that it can do a little better or easier than the other. In a perfect world we could take the best from both camps and build some kind of JEasyMock (to be pronounced like &lt;i&gt;CheesyMock&lt;/i&gt;), but the two concepts are just too different for this to work. Even worse, the two base concepts of the two mock libs are in fact &lt;i&gt;the reason&lt;/i&gt; for the shortcomings they have: with EasyMock it just won&#039;t be possible to simply provide an ArgumentMatcher to the mock&#039;s method call (the compiler would complain), and with jMock you&#039;ll never have some more compile time verification. There is just no other way to do these things in their world.
After talking so much about the &quot;problems&quot; of those two mock libs: it&#039;s still great to have fabulous tools like these. I could not imagine testing without something like this.</description>
		<content:encoded><![CDATA[<p>I am quite aware of the advantages of using pure language constructs (that the compiler can check and the IDE can autocomplete) in contrast to pure strings (that are of course not checked in any way during compile time) &#8211; in fact, this is one of the main reasons why we are using EasyMock in a project.<br />
Still, some things are rather hard to get used to.<br />
EasyMock&#8217;s record mechanism is really clever: everything is done at language level, no meta-language (Strings) necessary. Unfortunately this implies, that you need this extra <i>replay</i> step before you can really use the mock. I don&#8217;t know how many times I forgot to <i>replay</i> my mocks &#8211; still, you usually find out when trying to break your test, and it just won&#8217;t break because the mock is still in recording mode (or does <i>mock.verify()</i> even throw an exception if the mock has not been replayed?).<br />
The ArgumentMatchers are also a very interesting way to accomplish their tasks (unfortunately hard to understand at first, too). Still jMock&#8217;s Constraints are slightlier more compact to use (no additional static method necessary).<br />
So each, EasyMock and jMock, has some things that it can do a little better or easier than the other. In a perfect world we could take the best from both camps and build some kind of JEasyMock (to be pronounced like <i>CheesyMock</i>), but the two concepts are just too different for this to work. Even worse, the two base concepts of the two mock libs are in fact <i>the reason</i> for the shortcomings they have: with EasyMock it just won&#8217;t be possible to simply provide an ArgumentMatcher to the mock&#8217;s method call (the compiler would complain), and with jMock you&#8217;ll never have some more compile time verification. There is just no other way to do these things in their world.<br />
After talking so much about the &#8220;problems&#8221; of those two mock libs: it&#8217;s still great to have fabulous tools like these. I could not imagine testing without something like this.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on JAOO &#8211; Day 1 by Tammo Freese</title>
		<link>http://www.rubasch.com/2006/10/01/jaoo-day-1/#comment-7</link>
		<dc:creator>Tammo Freese</dc:creator>
		<pubDate>Thu, 12 Oct 2006 10:03:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.rubasch.com/2006/10/01/jaoo-day-1/#comment-7</guid>
		<description>&quot;This of course poses a problem when you refactor your classes, but the key point is that your test will fail if you provide an invalid method name (jMock checks if a method with the provided name really exists). So you will find out if you did anything wrong.&quot;

As the author of EasyMock, I also think this is one of the main points, but for another reason: Your tests *pass* first, then you apply a *refactoring*, and then your tests *fail*. So automated refactoring does not work correctly when using jMock mock objects.

Using method calls to define expectations in EasyMock provides more benefits than refactoring safety: Both autocompletion and generation work. 

As an example for autocompletion, consider we have a String stored in the variable login, and an object of type User stored in the variable user. Now we like to check that User mock.someMethod(String) is called with the String stored in login, and we like our mock to return the object stored in the variable person.

jMock:
mock.expects(once()).method(&quot;someMethod&quot;).with( eq(login) ).will(returnValue(person));
EasyMock 2:
expect(mock.someMethod(login)).andReturn(person);

With jMock, autocompletion would not work on someMethod, and the autocompletion for login and person would be cluttered with other completions, as the type is not checked.

With EasyMock, autocompletion would work everywhere, and the autocompletion for login and person would not be cluttered with other completions, as the type is checked, i.e. the autocompletion at &#039;someMethod(&#039; would only show strings, and the completion at &#039;andReturn(&#039; would only show user objects.

As an example of code generation, let&#039;s say you specify a call to a method which does not exist yet on the mocked interface:

jMock: 
mock.expects(once()).method(&quot;notYetExistingMethod&quot;).with( eq(42) );
EasyMock: 
mock.notYetExistingMethod(42);

With jMock, you have to run your tests to see that the method is missing, and then to define it by hand in the interface. With EasyMock, modern IDEs generate the method automatically for you.</description>
		<content:encoded><![CDATA[<p>&#8220;This of course poses a problem when you refactor your classes, but the key point is that your test will fail if you provide an invalid method name (jMock checks if a method with the provided name really exists). So you will find out if you did anything wrong.&#8221;</p>
<p>As the author of EasyMock, I also think this is one of the main points, but for another reason: Your tests *pass* first, then you apply a *refactoring*, and then your tests *fail*. So automated refactoring does not work correctly when using jMock mock objects.</p>
<p>Using method calls to define expectations in EasyMock provides more benefits than refactoring safety: Both autocompletion and generation work. </p>
<p>As an example for autocompletion, consider we have a String stored in the variable login, and an object of type User stored in the variable user. Now we like to check that User mock.someMethod(String) is called with the String stored in login, and we like our mock to return the object stored in the variable person.</p>
<p>jMock:<br />
mock.expects(once()).method(&#8220;someMethod&#8221;).with( eq(login) ).will(returnValue(person));<br />
EasyMock 2:<br />
expect(mock.someMethod(login)).andReturn(person);</p>
<p>With jMock, autocompletion would not work on someMethod, and the autocompletion for login and person would be cluttered with other completions, as the type is not checked.</p>
<p>With EasyMock, autocompletion would work everywhere, and the autocompletion for login and person would not be cluttered with other completions, as the type is checked, i.e. the autocompletion at &#8216;someMethod(&#8216; would only show strings, and the completion at &#8216;andReturn(&#8216; would only show user objects.</p>
<p>As an example of code generation, let&#8217;s say you specify a call to a method which does not exist yet on the mocked interface:</p>
<p>jMock:<br />
mock.expects(once()).method(&#8220;notYetExistingMethod&#8221;).with( eq(42) );<br />
EasyMock:<br />
mock.notYetExistingMethod(42);</p>
<p>With jMock, you have to run your tests to see that the method is missing, and then to define it by hand in the interface. With EasyMock, modern IDEs generate the method automatically for you.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on JAOO &#8211; Day 2 by Helmut Rubasch</title>
		<link>http://www.rubasch.com/2006/10/03/jaoo-day-2/#comment-6</link>
		<dc:creator>Helmut Rubasch</dc:creator>
		<pubDate>Thu, 05 Oct 2006 15:59:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.rubasch.com/2006/10/03/jaoo-day-2/#comment-6</guid>
		<description>Hi Mario!

JAOO is still great, although the main part (the conference) is already over and &quot;only&quot; some tutorials are left (last one is tomorrow&#039;s tutorial on &quot;Crystal Clear&quot; by the Master himself).
Well, and let&#039;s put it this way: the Tuborg is better than I had remembered ;-)

see you soon back in Linz,
heli</description>
		<content:encoded><![CDATA[<p>Hi Mario!</p>
<p>JAOO is still great, although the main part (the conference) is already over and &#8220;only&#8221; some tutorials are left (last one is tomorrow&#8217;s tutorial on &#8220;Crystal Clear&#8221; by the Master himself).<br />
Well, and let&#8217;s put it this way: the Tuborg is better than I had remembered <img src='http://www.rubasch.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>see you soon back in Linz,<br />
heli</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on JAOO &#8211; Day 2 by Mario Hochreiter</title>
		<link>http://www.rubasch.com/2006/10/03/jaoo-day-2/#comment-5</link>
		<dc:creator>Mario Hochreiter</dc:creator>
		<pubDate>Wed, 04 Oct 2006 11:32:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.rubasch.com/2006/10/03/jaoo-day-2/#comment-5</guid>
		<description>Hi Helmut!

I hope you enjoy your stay at JAOO. We are all looking forward to hear a report from your visit soon (especially about the quality and taste of danish beer ;-)

Best Regards
Mario</description>
		<content:encoded><![CDATA[<p>Hi Helmut!</p>
<p>I hope you enjoy your stay at JAOO. We are all looking forward to hear a report from your visit soon (especially about the quality and taste of danish beer <img src='http://www.rubasch.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>Best Regards<br />
Mario</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on It ain&#8217;t easy to be simple by Helmut Rubasch</title>
		<link>http://www.rubasch.com/2006/07/31/it-aint-easy-to-be-simple/#comment-4</link>
		<dc:creator>Helmut Rubasch</dc:creator>
		<pubDate>Tue, 08 Aug 2006 20:34:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.rubasch.com/2006/07/31/it-aint-easy-to-be-simple/#comment-4</guid>
		<description>Very good point, Mario. &lt;i&gt;Simplicity&lt;/i&gt; has to start way before implementation, design or even architectural planning takes place.
It is already the phase of gathering and analysing requirements and planning the overall functionality of the system where a lot of emphasis should be put on making everything as &lt;i&gt;simple&lt;/i&gt; as possible.
You mentioned the problem that customers and developers live in two different worlds. The customer knows his domain and business and he knows which problem he wants solved (though he usually does not know &lt;i&gt;how&lt;/i&gt; to solve it). The developers know &lt;i&gt;their&lt;/i&gt; business, which in most cases has not much in common with their customer\&#039;s. This commonly called &lt;i&gt;impedance mismatch&lt;/i&gt; makes it difficult for these groups to communicate efficiently, which may be a reason why they usually &lt;i&gt;don\&#039;t&lt;/i&gt; communicate (another reason is of course that the customer cannot be expected to answer questions of hundreds of developers).
Even bridging this gap with someone like a &lt;i&gt;business analyst&lt;/i&gt; does not necessarily solve this problem. This person has to translate the problem from the customer\&#039;s domain so that the developers understand it. He also translates questions from the developers and asks them to the customer. Aside from the rare case that this person is an expert in both domains, information loss is imminent.
Enter &lt;i&gt;simplicity&lt;/i&gt;. If the problem domain is &lt;i&gt;simplified&lt;/i&gt; (or abstracted) as much as possible, the business analyst is much more likely to understand exactly what the customer wants. On the other hand it\&#039;s much easier to convey the real problem to the developers without all of this white noise around.
In a perfect world, the customers and developers might even use the same abstractions or metaphors for the same thing. 
Hey, in this perfect world they might even talk face to face with each other!</description>
		<content:encoded><![CDATA[<p>Very good point, Mario. <i>Simplicity</i> has to start way before implementation, design or even architectural planning takes place.<br />
It is already the phase of gathering and analysing requirements and planning the overall functionality of the system where a lot of emphasis should be put on making everything as <i>simple</i> as possible.<br />
You mentioned the problem that customers and developers live in two different worlds. The customer knows his domain and business and he knows which problem he wants solved (though he usually does not know <i>how</i> to solve it). The developers know <i>their</i> business, which in most cases has not much in common with their customer\&#8217;s. This commonly called <i>impedance mismatch</i> makes it difficult for these groups to communicate efficiently, which may be a reason why they usually <i>don\&#8217;t</i> communicate (another reason is of course that the customer cannot be expected to answer questions of hundreds of developers).<br />
Even bridging this gap with someone like a <i>business analyst</i> does not necessarily solve this problem. This person has to translate the problem from the customer\&#8217;s domain so that the developers understand it. He also translates questions from the developers and asks them to the customer. Aside from the rare case that this person is an expert in both domains, information loss is imminent.<br />
Enter <i>simplicity</i>. If the problem domain is <i>simplified</i> (or abstracted) as much as possible, the business analyst is much more likely to understand exactly what the customer wants. On the other hand it\&#8217;s much easier to convey the real problem to the developers without all of this white noise around.<br />
In a perfect world, the customers and developers might even use the same abstractions or metaphors for the same thing.<br />
Hey, in this perfect world they might even talk face to face with each other!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on It ain&#8217;t easy to be simple by Mario Hochreiter</title>
		<link>http://www.rubasch.com/2006/07/31/it-aint-easy-to-be-simple/#comment-3</link>
		<dc:creator>Mario Hochreiter</dc:creator>
		<pubDate>Sat, 05 Aug 2006 09:06:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.rubasch.com/2006/07/31/it-aint-easy-to-be-simple/#comment-3</guid>
		<description>Hi Heli!

I agree with you that Software Engineering should follow the KISS principle and that software architecture and classes should be describable with a few words. 
Albert Einstein also said that people who do not have proper and deep understanding about the topic they are talking tend to complicate things. The problem in software engineering is that the customer mostly do not understand the topic he is speaking about. Also the complexity of requirements and user expectations have increased over the last years. This leads to the problem that the probability of failures increases due to size and complexity. Take Microsoft&#039;s Vista for example, the orignial requirements for Vista were to ambitious that even a company like Microsoft could not realize. 

I think to avoid or reduce complexity for an overall system is only possible in an isolated environment or with an adequate amount of time. The only possiblity in my opinion to reduce complexity is to invest a lot of time to define and priortize the requirements with the customer. As we all know this causes expenses nobody wants to pay. In most commercial projects the policy maker are economic people with no proper understanding in the field of software engineering. Furthermore, the software engineer mostly has no knowledge in the domain of the customer. Add the challenge of rapid ongoing change in the environment of software engineering. To compete this challenges i think you need a very motivated and talented team that gets support from business processes.</description>
		<content:encoded><![CDATA[<p>Hi Heli!</p>
<p>I agree with you that Software Engineering should follow the KISS principle and that software architecture and classes should be describable with a few words.<br />
Albert Einstein also said that people who do not have proper and deep understanding about the topic they are talking tend to complicate things. The problem in software engineering is that the customer mostly do not understand the topic he is speaking about. Also the complexity of requirements and user expectations have increased over the last years. This leads to the problem that the probability of failures increases due to size and complexity. Take Microsoft&#8217;s Vista for example, the orignial requirements for Vista were to ambitious that even a company like Microsoft could not realize. </p>
<p>I think to avoid or reduce complexity for an overall system is only possible in an isolated environment or with an adequate amount of time. The only possiblity in my opinion to reduce complexity is to invest a lot of time to define and priortize the requirements with the customer. As we all know this causes expenses nobody wants to pay. In most commercial projects the policy maker are economic people with no proper understanding in the field of software engineering. Furthermore, the software engineer mostly has no knowledge in the domain of the customer. Add the challenge of rapid ongoing change in the environment of software engineering. To compete this challenges i think you need a very motivated and talented team that gets support from business processes.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

