<?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: Java BDD</title>
	<atom:link href="http://blog.ianbicking.org/2007/11/27/java-bdd/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.ianbicking.org/2007/11/27/java-bdd/</link>
	<description></description>
	<pubDate>Fri, 12 Mar 2010 19:18:54 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Paddy3118</title>
		<link>http://blog.ianbicking.org/2007/11/27/java-bdd/comment-page-1/#comment-108859</link>
		<dc:creator>Paddy3118</dc:creator>
		<pubDate>Tue, 26 May 2009 03:47:02 +0000</pubDate>
		<guid isPermaLink="false">http://blog.ianbicking.org/2007/11/27/java-bdd/#comment-108859</guid>
		<description>I guess it may not be clear, but the doctest code is in Python not Ruby. In Python we too tend to to take a more restrained view on what should be alterable. Compare the Django framework in Python, rather than Rails.
On whether the amount to type is relevant then I think that the Javaa example given &lt;i&gt;is&lt;/i&gt; verbose, but note that I am not saying that the least number of characters to do the job is necessarily the best either - you need a balance between readability and terseness too.</description>
		<content:encoded><![CDATA[<p>I guess it may not be clear, but the doctest code is in Python not Ruby. In Python we too tend to to take a more restrained view on what should be alterable. Compare the Django framework in Python, rather than Rails.
On whether the amount to type is relevant then I think that the Javaa example given <i>is</i> verbose, but note that I am not saying that the least number of characters to do the job is necessarily the best either - you need a balance between readability and terseness too.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ian Bicking</title>
		<link>http://blog.ianbicking.org/2007/11/27/java-bdd/comment-page-1/#comment-108746</link>
		<dc:creator>Ian Bicking</dc:creator>
		<pubDate>Mon, 25 May 2009 17:02:30 +0000</pubDate>
		<guid isPermaLink="false">http://blog.ianbicking.org/2007/11/27/java-bdd/#comment-108746</guid>
		<description>Just because Java does something doesn't mean it is some sensible side-effect of static typing.  In this case there's nothing more lax about my suggestion compared to the original test.  I think Java people have become numb to boilerplate, and that boilerplate takes a lot more forms than just static typing.</description>
		<content:encoded><![CDATA[<p>Just because Java does something doesn&#8217;t mean it is some sensible side-effect of static typing.  In this case there&#8217;s nothing more lax about my suggestion compared to the original test.  I think Java people have become numb to boilerplate, and that boilerplate takes a lot more forms than just static typing.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nathan</title>
		<link>http://blog.ianbicking.org/2007/11/27/java-bdd/comment-page-1/#comment-108732</link>
		<dc:creator>Nathan</dc:creator>
		<pubDate>Mon, 25 May 2009 15:46:20 +0000</pubDate>
		<guid isPermaLink="false">http://blog.ianbicking.org/2007/11/27/java-bdd/#comment-108732</guid>
		<description>The degree of typing in order to achieve a goal is hardly the point. Ruby on Rails does a lot of work for you, but it's all magical and mystical, and when stuff breaks, it breaks HARD, and heaven help you in finding the bug with any ease. By contrast, us insane, lame-ass Java folks love being able to debug with relative ease. So, what say we just keep down the ridicule before we actually understand why some people prefer certain languages/environments, and be a little less "fanboy"-like.</description>
		<content:encoded><![CDATA[<p>The degree of typing in order to achieve a goal is hardly the point. Ruby on Rails does a lot of work for you, but it&#8217;s all magical and mystical, and when stuff breaks, it breaks HARD, and heaven help you in finding the bug with any ease. By contrast, us insane, lame-ass Java folks love being able to debug with relative ease. So, what say we just keep down the ridicule before we actually understand why some people prefer certain languages/environments, and be a little less &#8220;fanboy&#8221;-like.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kragen Sitaker</title>
		<link>http://blog.ianbicking.org/2007/11/27/java-bdd/comment-page-1/#comment-11422</link>
		<dc:creator>Kragen Sitaker</dc:creator>
		<pubDate>Sat, 26 Jan 2008 16:32:21 +0000</pubDate>
		<guid isPermaLink="false">http://blog.ianbicking.org/2007/11/27/java-bdd/#comment-11422</guid>
		<description>BDD is just new names for TDD.  doctest is a fine framework for doing BDD.  Maybe Instinct is too, but it kind of suffers from the method definition overhead; it's less painful in Smalltalk, where the design of SUnit (that it apes) comes from.  But that's Java's fault, not Instinct's.</description>
		<content:encoded><![CDATA[<p>BDD is just new names for TDD.  doctest is a fine framework for doing BDD.  Maybe Instinct is too, but it kind of suffers from the method definition overhead; it&#8217;s less painful in Smalltalk, where the design of SUnit (that it apes) comes from.  But that&#8217;s Java&#8217;s fault, not Instinct&#8217;s.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Laurent Szyster</title>
		<link>http://blog.ianbicking.org/2007/11/27/java-bdd/comment-page-1/#comment-6835</link>
		<dc:creator>Laurent Szyster</dc:creator>
		<pubDate>Thu, 27 Dec 2007 01:27:31 +0000</pubDate>
		<guid isPermaLink="false">http://blog.ianbicking.org/2007/11/27/java-bdd/#comment-6835</guid>
		<description>"Someone needs to port the concept to Java too."

Here's a bit more than a starting point:

http://svn.berlios.de/svnroot/repos/less4j/trunk/src/org/less4j/protocols/Doctest.java

For sample output see:

http://laurentszyster.be/less4j/doc/#org.less4j.protocols.IRTD2.digested

The implementation is simple: I hijacked javadoc and used the best known REPL for Java: Rhino.

Enjoy ...</description>
		<content:encoded><![CDATA[<p>&#8220;Someone needs to port the concept to Java too.&#8221;</p>

<p>Here&#8217;s a bit more than a starting point:</p>

<p><a href="http://svn.berlios.de/svnroot/repos/less4j/trunk/src/org/less4j/protocols/Doctest.java" rel="nofollow">http://svn.berlios.de/svnroot/repos/less4j/trunk/src/org/less4j/protocols/Doctest.java</a></p>

<p>For sample output see:</p>

<p><a href="http://laurentszyster.be/less4j/doc/#org.less4j.protocols.IRTD2.digested" rel="nofollow">http://laurentszyster.be/less4j/doc/#org.less4j.protocols.IRTD2.digested</a></p>

<p>The implementation is simple: I hijacked javadoc and used the best known REPL for Java: Rhino.</p>

<p>Enjoy &#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Margaret M. Gille</title>
		<link>http://blog.ianbicking.org/2007/11/27/java-bdd/comment-page-1/#comment-6830</link>
		<dc:creator>Margaret M. Gille</dc:creator>
		<pubDate>Wed, 26 Dec 2007 21:43:12 +0000</pubDate>
		<guid isPermaLink="false">http://blog.ianbicking.org/2007/11/27/java-bdd/#comment-6830</guid>
		<description>Ian, Are you a decent of Frederick Bicking?  I am working on my family tree and am looking for relatives from this line.  

Frederick Bicking
From Wikipedia, the free encyclopedia
Jump to: navigation, search
Frederick Bicking was born in Winterburg, a municipality in the district of Bad Kreuznach in Rhineland-Palatinate, in western Germany and came probably first to Philadelphia and then to East Brandywine Township, Chester County, Pennsylvania, before the revolution.

In Pennsylvania he owned and operated a paper mill, establishing the Bicking paper dynasty that would last well into the 19th century. The Continental Congress allocated funds to purchase Bicking's paper for currency production. He is mentioned in several of the minutes of the Continental Congress and in the George Washington Papers.

Frederick Bicking married Mary Catherine Unverzagt of Otwiller, Germany on 26 May 1752 at St. Michael's &#38; Zion Lutheran Church in Germantown, Pennsylvania. Mary Catherine Unverzagt, daughter of Johannes Unverzagt, was also a German Palatine.

Of Frederick Bicking's five sons, three were paper makers in Pennsylvania.

John Bicking had a paper mill near present day Fisherville.

Retrieved from "http://en.wikipedia.org/wiki/Frederick_Bicking"</description>
		<content:encoded><![CDATA[<p>Ian, Are you a decent of Frederick Bicking?  I am working on my family tree and am looking for relatives from this line.  </p>

<p>Frederick Bicking
From Wikipedia, the free encyclopedia
Jump to: navigation, search
Frederick Bicking was born in Winterburg, a municipality in the district of Bad Kreuznach in Rhineland-Palatinate, in western Germany and came probably first to Philadelphia and then to East Brandywine Township, Chester County, Pennsylvania, before the revolution.</p>

<p>In Pennsylvania he owned and operated a paper mill, establishing the Bicking paper dynasty that would last well into the 19th century. The Continental Congress allocated funds to purchase Bicking&#8217;s paper for currency production. He is mentioned in several of the minutes of the Continental Congress and in the George Washington Papers.</p>

<p>Frederick Bicking married Mary Catherine Unverzagt of Otwiller, Germany on 26 May 1752 at St. Michael&#8217;s &amp; Zion Lutheran Church in Germantown, Pennsylvania. Mary Catherine Unverzagt, daughter of Johannes Unverzagt, was also a German Palatine.</p>

<p>Of Frederick Bicking&#8217;s five sons, three were paper makers in Pennsylvania.</p>

<p>John Bicking had a paper mill near present day Fisherville.</p>

<p>Retrieved from &#8220;http://en.wikipedia.org/wiki/Frederick_Bicking&#8221;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: George Paci</title>
		<link>http://blog.ianbicking.org/2007/11/27/java-bdd/comment-page-1/#comment-6685</link>
		<dc:creator>George Paci</dc:creator>
		<pubDate>Mon, 24 Dec 2007 04:46:37 +0000</pubDate>
		<guid isPermaLink="false">http://blog.ianbicking.org/2007/11/27/java-bdd/#comment-6685</guid>
		<description>I hate to say it, Ian, but this post is kind of cranky.

You picked an example spec with the greatest possible overhead-to-meaningful-code ratio: 9 lines of setup (much of which, like the import statements, is forced by Java), and only 3 lines of an actual spec (one of which is just an annotation saying that it is, in fact, a spec, so maybe that's overhead, too).

What the framework gives you, like xUnit, is the ability to do some setup in the setUp() method, then share it among some other spec methods (test methods, in xUnit).  It's pretty rare that there's only one spec method.

And only the code is shared: the actual instance (or whatever other context you set up) is different for each spec method, which helps keep one problem from kicking up a cloud of spurious follow-on problems to hide itself.  I'm not sure how you'd go about that in doctest without writing the equivalent of a setUp() method and calling it repeatedly.

The motivations for BDD are to get people to do TDD *right*.  That means ditching anachronistic test-related names that date from back when we thought this stuff was unit testing.  It's not: it's design, and we should use words related to design instead.  (If there's one thing XP people agree on, it's that names actually matter.)

Finally, I think you see a conflict between doctest and BDD.  I don't: doctest is a tool, BDD is an approach, and you could clearly use doctest to help you do BDD.  (Of course, you could, instead, use it as after-the-fact unit tests, functional tests, executable documentation, and possibly a dessert/floor wax.)</description>
		<content:encoded><![CDATA[<p>I hate to say it, Ian, but this post is kind of cranky.</p>

<p>You picked an example spec with the greatest possible overhead-to-meaningful-code ratio: 9 lines of setup (much of which, like the import statements, is forced by Java), and only 3 lines of an actual spec (one of which is just an annotation saying that it is, in fact, a spec, so maybe that&#8217;s overhead, too).</p>

<p>What the framework gives you, like xUnit, is the ability to do some setup in the setUp() method, then share it among some other spec methods (test methods, in xUnit).  It&#8217;s pretty rare that there&#8217;s only one spec method.</p>

<p>And only the code is shared: the actual instance (or whatever other context you set up) is different for each spec method, which helps keep one problem from kicking up a cloud of spurious follow-on problems to hide itself.  I&#8217;m not sure how you&#8217;d go about that in doctest without writing the equivalent of a setUp() method and calling it repeatedly.</p>

<p>The motivations for BDD are to get people to do TDD <em>right</em>.  That means ditching anachronistic test-related names that date from back when we thought this stuff was unit testing.  It&#8217;s not: it&#8217;s design, and we should use words related to design instead.  (If there&#8217;s one thing XP people agree on, it&#8217;s that names actually matter.)</p>

<p>Finally, I think you see a conflict between doctest and BDD.  I don&#8217;t: doctest is a tool, BDD is an approach, and you could clearly use doctest to help you do BDD.  (Of course, you could, instead, use it as after-the-fact unit tests, functional tests, executable documentation, and possibly a dessert/floor wax.)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tom Adams</title>
		<link>http://blog.ianbicking.org/2007/11/27/java-bdd/comment-page-1/#comment-5060</link>
		<dc:creator>Tom Adams</dc:creator>
		<pubDate>Fri, 30 Nov 2007 00:39:05 +0000</pubDate>
		<guid isPermaLink="false">http://blog.ianbicking.org/2007/11/27/java-bdd/#comment-5060</guid>
		<description>Hi Ian, Paddy3118,

So the question is, does making the mental translation between what you **see** and what you interpret it as affect your ability to understand the **intent** of what is being expressed? I agree with you, I can do the translation in my head quickly also (for the tools I'm used to working with), however I find a natural DSL type syntax to be easier to write (good tool support) and more readable than the equivalent. So I get a better process and a better result.

Having a non-specialist as a target audience makes sense for top level "is this done" and "does it do what I want" type of tests (acceptance/functional/story tests). I don't think anyone is trying to dumb things down to a point where **anyone** can read and reason about code. We should strive to make it as simple and clear as possible, but clearly there will always be complexity and a barrier to entry. What we are trying to do is use the same **language** as what a non-specialist would use, so that they can at least get an idea of what we're up to (is it what I asked for, etc.) as well as helping us to not have to translate between how we think of things and how they think of things, this is a recipe for disaster. If your code and your "tests" all use the same language as that of the domain, things become a lot simpler, leaving you to worry about other things.</description>
		<content:encoded><![CDATA[<p>Hi Ian, Paddy3118,</p>

<p>So the question is, does making the mental translation between what you <strong>see</strong> and what you interpret it as affect your ability to understand the <strong>intent</strong> of what is being expressed? I agree with you, I can do the translation in my head quickly also (for the tools I&#8217;m used to working with), however I find a natural DSL type syntax to be easier to write (good tool support) and more readable than the equivalent. So I get a better process and a better result.</p>

<p>Having a non-specialist as a target audience makes sense for top level &#8220;is this done&#8221; and &#8220;does it do what I want&#8221; type of tests (acceptance/functional/story tests). I don&#8217;t think anyone is trying to dumb things down to a point where <strong>anyone</strong> can read and reason about code. We should strive to make it as simple and clear as possible, but clearly there will always be complexity and a barrier to entry. What we are trying to do is use the same <strong>language</strong> as what a non-specialist would use, so that they can at least get an idea of what we&#8217;re up to (is it what I asked for, etc.) as well as helping us to not have to translate between how we think of things and how they think of things, this is a recipe for disaster. If your code and your &#8220;tests&#8221; all use the same language as that of the domain, things become a lot simpler, leaving you to worry about other things.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paddy3118</title>
		<link>http://blog.ianbicking.org/2007/11/27/java-bdd/comment-page-1/#comment-4964</link>
		<dc:creator>Paddy3118</dc:creator>
		<pubDate>Thu, 29 Nov 2007 06:20:46 +0000</pubDate>
		<guid isPermaLink="false">http://blog.ianbicking.org/2007/11/27/java-bdd/#comment-4964</guid>
		<description>Hi Tom, Ian.
I am not so sure that having the needs of a non-specialist business manager as a primary goal is a good thing. Having a concise way to define tests; concise meaning clear, comprehensive, *and* short; from the domain specialists point of view; might be more productive. 

I guess as an example I will switch to the design and verification of digital chips which is the field I am in. We have always had a written design spec that both the verification team and the design team interpret. lately we are using assertion languages such as [PSL](http://www.doulos.com/knowhow/psl/) to accurately and unambiguously define what the spec. says.

The spec may say: "Signal apply_power occurs after the breaks are released". 

Which in PSL becomes: `` assert always {rose(apply_power)} &#124;-&gt; { ! brake_applied }; ``

Which re-interpreted in English becomes something like: "Ensure that whenever the signal apply\_power rises, the signal brake\_applied is not high at that same time"

You can formally check the PSL against the design. You can simulate the design and ensure it does not contradict the assertion. Domain specialists can accurately reason about the specs interpretation using PSL. ( And pedants can flag the spelling mistakes :-) 

Management has to either learn PSL, get someone they trust who can explain PSL to them, monitor the process of creating and using PSL, or probably do all of the above to be a good manager. The domain specialist works together with management  so the process of PSL creation and monitoring ends up as accurate reports and graphs of progress *but* PSL and other assertion languages are optimised for the domain . It needs to be writeable and maintainable by the domain specialists.  

To get back to programming, I think we should be going down a similar route; what is maintainable, precise, and readable for the programmer creating tests will create better software, and, I think, prove easier for the manager in the long run.</description>
		<content:encoded><![CDATA[<p>Hi Tom, Ian.
I am not so sure that having the needs of a non-specialist business manager as a primary goal is a good thing. Having a concise way to define tests; concise meaning clear, comprehensive, <em>and</em> short; from the domain specialists point of view; might be more productive. </p>

<p>I guess as an example I will switch to the design and verification of digital chips which is the field I am in. We have always had a written design spec that both the verification team and the design team interpret. lately we are using assertion languages such as <a href="http://www.doulos.com/knowhow/psl/">PSL</a> to accurately and unambiguously define what the spec. says.</p>

<p>The spec may say: &#8220;Signal apply_power occurs after the breaks are released&#8221;. </p>

<p>Which in PSL becomes: <code>assert always {rose(apply_power)} |-&gt; { ! brake_applied };</code></p>

<p>Which re-interpreted in English becomes something like: &#8220;Ensure that whenever the signal apply&#95;power rises, the signal brake&#95;applied is not high at that same time&#8221;</p>

<p>You can formally check the PSL against the design. You can simulate the design and ensure it does not contradict the assertion. Domain specialists can accurately reason about the specs interpretation using PSL. ( And pedants can flag the spelling mistakes :-) </p>

<p>Management has to either learn PSL, get someone they trust who can explain PSL to them, monitor the process of creating and using PSL, or probably do all of the above to be a good manager. The domain specialist works together with management  so the process of PSL creation and monitoring ends up as accurate reports and graphs of progress <em>but</em> PSL and other assertion languages are optimised for the domain . It needs to be writeable and maintainable by the domain specialists.  </p>

<p>To get back to programming, I think we should be going down a similar route; what is maintainable, precise, and readable for the programmer creating tests will create better software, and, I think, prove easier for the manager in the long run.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ian Bicking</title>
		<link>http://blog.ianbicking.org/2007/11/27/java-bdd/comment-page-1/#comment-4927</link>
		<dc:creator>Ian Bicking</dc:creator>
		<pubDate>Wed, 28 Nov 2007 23:43:58 +0000</pubDate>
		<guid isPermaLink="false">http://blog.ianbicking.org/2007/11/27/java-bdd/#comment-4927</guid>
		<description>Perhaps some of the difference in opinion is due to the fact that, to a Python programmer, a console session feels very natural.  That doctest has existed for a while also means there's lots of examples of it, adding to the familiarity.  It's very difficult, for instance, to read `len(stack)` out loud (I find).  Or even worse, `if obj.get(key, default) == value:` -- how do you read that?  "if obj [uck, I can't even pronounce 'obj'] get key comma default equals value" ?  I don't know how to *say* it, but I can read it very naturally.  It's something I (and everyone here) learned to do.  And that's what makes us programmers ;)  In the same way, doctest reads very naturally to me, even though I can't read it out loud.  All these things require some learning before they really sink in.</description>
		<content:encoded><![CDATA[<p>Perhaps some of the difference in opinion is due to the fact that, to a Python programmer, a console session feels very natural.  That doctest has existed for a while also means there&#8217;s lots of examples of it, adding to the familiarity.  It&#8217;s very difficult, for instance, to read <code>len(stack)</code> out loud (I find).  Or even worse, <code>if obj.get(key, default) == value:</code> &#8212; how do you read that?  &#8220;if obj [uck, I can't even pronounce 'obj'] get key comma default equals value&#8221; ?  I don&#8217;t know how to <em>say</em> it, but I can read it very naturally.  It&#8217;s something I (and everyone here) learned to do.  And that&#8217;s what makes us programmers ;)  In the same way, doctest reads very naturally to me, even though I can&#8217;t read it out loud.  All these things require some learning before they really sink in.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.701 seconds -->
