<?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: Bending Java: More readable code with methods that do nothing?</title>
	<atom:link href="http://codemonkeyism.com/bending-java-more-readable-code-with-methods-that-do-nothing/feed/" rel="self" type="application/rss+xml" />
	<link>http://codemonkeyism.com/bending-java-more-readable-code-with-methods-that-do-nothing/</link>
	<description></description>
	<lastBuildDate>Fri, 30 Jul 2010 06:49:07 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: stephan</title>
		<link>http://codemonkeyism.com/bending-java-more-readable-code-with-methods-that-do-nothing/comment-page-1/#comment-277741</link>
		<dc:creator>stephan</dc:creator>
		<pubDate>Thu, 18 Mar 2010 16:58:01 +0000</pubDate>
		<guid isPermaLink="false">http://stephan.reposita.org/archives/2008/05/09/bending-java-more-readable-code-with-methods-that-do-nothing/#comment-277741</guid>
		<description>@Elwyn: I wrote something about - my take - on builders in Java here:

http://codemonkeyism.com/the-best-markup-builder-i-could-build-in-java/</description>
		<content:encoded><![CDATA[<p>@Elwyn: I wrote something about &#8211; my take &#8211; on builders in Java here:</p>
<p><a href="http://codemonkeyism.com/the-best-markup-builder-i-could-build-in-java/" rel="nofollow">http://codemonkeyism.com/the-best-markup-builder-i-could-build-in-java/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Elwyn Malethan</title>
		<link>http://codemonkeyism.com/bending-java-more-readable-code-with-methods-that-do-nothing/comment-page-1/#comment-277740</link>
		<dc:creator>Elwyn Malethan</dc:creator>
		<pubDate>Thu, 18 Mar 2010 16:55:58 +0000</pubDate>
		<guid isPermaLink="false">http://stephan.reposita.org/archives/2008/05/09/bending-java-more-readable-code-with-methods-that-do-nothing/#comment-277740</guid>
		<description>@Stephan

I had a go at this (love a challenge) and couldn&#039;t come up with a solution I would be happy with. My approach involved a (G)eneric builder that would allow the population of the properties in-line upon creation of a new object. However, this approach would use use reflection and proxies and therefore would suffer in terms of runtime performance.

I like the approach LambdaJ and JMock&#039;s DSL (2.x) take to the syntax of these sorts of problems. However, with Java, sometimes I guess you just have to accept verbosity (and imperfection in general) as being part of the deal.</description>
		<content:encoded><![CDATA[<p>@Stephan</p>
<p>I had a go at this (love a challenge) and couldn&#8217;t come up with a solution I would be happy with. My approach involved a (G)eneric builder that would allow the population of the properties in-line upon creation of a new object. However, this approach would use use reflection and proxies and therefore would suffer in terms of runtime performance.</p>
<p>I like the approach LambdaJ and JMock&#8217;s DSL (2.x) take to the syntax of these sorts of problems. However, with Java, sometimes I guess you just have to accept verbosity (and imperfection in general) as being part of the deal.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: stephan</title>
		<link>http://codemonkeyism.com/bending-java-more-readable-code-with-methods-that-do-nothing/comment-page-1/#comment-277409</link>
		<dc:creator>stephan</dc:creator>
		<pubDate>Wed, 17 Mar 2010 11:20:28 +0000</pubDate>
		<guid isPermaLink="false">http://stephan.reposita.org/archives/2008/05/09/bending-java-more-readable-code-with-methods-that-do-nothing/#comment-277409</guid>
		<description>@Elwyn: What would be your solution to this? (beside Parameter-Objects and refactoring of methods with more than one parameter) Would be interested.</description>
		<content:encoded><![CDATA[<p>@Elwyn: What would be your solution to this? (beside Parameter-Objects and refactoring of methods with more than one parameter) Would be interested.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Elwyn Malethan</title>
		<link>http://codemonkeyism.com/bending-java-more-readable-code-with-methods-that-do-nothing/comment-page-1/#comment-277395</link>
		<dc:creator>Elwyn Malethan</dc:creator>
		<pubDate>Wed, 17 Mar 2010 10:00:34 +0000</pubDate>
		<guid isPermaLink="false">http://stephan.reposita.org/archives/2008/05/09/bending-java-more-readable-code-with-methods-that-do-nothing/#comment-277395</guid>
		<description>@Andrea Francis &amp; Stephan

Neither comments nor the named, do-nothing methods seem a good solution to named parameters, in my opinion.

In effect, the result is the variables/arguments having annotations (with a small &#039;a&#039;) that add semantics that the compiler knows nothing about. You are essentially creating a custom language outside Java and therefore outside the scope of most IDEs.

Inevitably (over time) comments will become stale or separated from what they annotate and methods that simply return a given value will be misused (e.g. using address(&quot;Steve&quot;) for a name argument would be perfectly valid syntactically but completely misleading semantically)

I think any implementation of semantic candy should make use of Java&#039;s type safety in order be useful and maintainable.

Bend too far and things break.

E

P.S. Another great article Stephan, thanks.</description>
		<content:encoded><![CDATA[<p>@Andrea Francis &amp; Stephan</p>
<p>Neither comments nor the named, do-nothing methods seem a good solution to named parameters, in my opinion.</p>
<p>In effect, the result is the variables/arguments having annotations (with a small &#8216;a&#8217;) that add semantics that the compiler knows nothing about. You are essentially creating a custom language outside Java and therefore outside the scope of most IDEs.</p>
<p>Inevitably (over time) comments will become stale or separated from what they annotate and methods that simply return a given value will be misused (e.g. using address(&#8220;Steve&#8221;) for a name argument would be perfectly valid syntactically but completely misleading semantically)</p>
<p>I think any implementation of semantic candy should make use of Java&#8217;s type safety in order be useful and maintainable.</p>
<p>Bend too far and things break.</p>
<p>E</p>
<p>P.S. Another great article Stephan, thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: stephan</title>
		<link>http://codemonkeyism.com/bending-java-more-readable-code-with-methods-that-do-nothing/comment-page-1/#comment-277328</link>
		<dc:creator>stephan</dc:creator>
		<pubDate>Wed, 17 Mar 2010 05:44:25 +0000</pubDate>
		<guid isPermaLink="false">http://stephan.reposita.org/archives/2008/05/09/bending-java-more-readable-code-with-methods-that-do-nothing/#comment-277328</guid>
		<description>@Chris: Thanks for the video link, I&#039;ll take a look</description>
		<content:encoded><![CDATA[<p>@Chris: Thanks for the video link, I&#8217;ll take a look</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: stephan</title>
		<link>http://codemonkeyism.com/bending-java-more-readable-code-with-methods-that-do-nothing/comment-page-1/#comment-277327</link>
		<dc:creator>stephan</dc:creator>
		<pubDate>Wed, 17 Mar 2010 05:43:27 +0000</pubDate>
		<guid isPermaLink="false">http://stephan.reposita.org/archives/2008/05/09/bending-java-more-readable-code-with-methods-that-do-nothing/#comment-277327</guid>
		<description>@William: Good to know I&#039;m not alone</description>
		<content:encoded><![CDATA[<p>@William: Good to know I&#8217;m not alone</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris Vest</title>
		<link>http://codemonkeyism.com/bending-java-more-readable-code-with-methods-that-do-nothing/comment-page-1/#comment-277214</link>
		<dc:creator>Chris Vest</dc:creator>
		<pubDate>Tue, 16 Mar 2010 23:10:09 +0000</pubDate>
		<guid isPermaLink="false">http://stephan.reposita.org/archives/2008/05/09/bending-java-more-readable-code-with-methods-that-do-nothing/#comment-277214</guid>
		<description>I prefer your original approach, with the Name class, but I would not pass it through some method first - just new up a Name.

J.B. Rainsberger and Corey Haines talk about Primitive Obsession in this video: http://blog.thecodewhisperer.com/post/424488983/corey-haines-interviewed-me-at-the-golden-tulip

The thing about having a Name class is, that functionality that is specific only to Names now have a natural place to live. If Name just ends up wrapping a final reference to a String, then that is also fine because that is now publicly tagged with a type from the problem domain.

That&#039;s the short of it. Corey and Joe go into a lot more detail in the video.</description>
		<content:encoded><![CDATA[<p>I prefer your original approach, with the Name class, but I would not pass it through some method first &#8211; just new up a Name.</p>
<p>J.B. Rainsberger and Corey Haines talk about Primitive Obsession in this video: <a href="http://blog.thecodewhisperer.com/post/424488983/corey-haines-interviewed-me-at-the-golden-tulip" rel="nofollow">http://blog.thecodewhisperer.com/post/424488983/corey-haines-interviewed-me-at-the-golden-tulip</a></p>
<p>The thing about having a Name class is, that functionality that is specific only to Names now have a natural place to live. If Name just ends up wrapping a final reference to a String, then that is also fine because that is now publicly tagged with a type from the problem domain.</p>
<p>That&#8217;s the short of it. Corey and Joe go into a lot more detail in the video.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: William Louth</title>
		<link>http://codemonkeyism.com/bending-java-more-readable-code-with-methods-that-do-nothing/comment-page-1/#comment-277207</link>
		<dc:creator>William Louth</dc:creator>
		<pubDate>Tue, 16 Mar 2010 22:49:47 +0000</pubDate>
		<guid isPermaLink="false">http://stephan.reposita.org/archives/2008/05/09/bending-java-more-readable-code-with-methods-that-do-nothing/#comment-277207</guid>
		<description>JXInsight&#039;s OpenCore API uses a Name interface in both Probes and Metrics which wraps around a String but it also supports composite names (delimited by dot) which allows us to reduce String working memory because Names are effectively interned within both our metering and metric models. This has also allowed us to augment such strings with meta-data (labels).

William</description>
		<content:encoded><![CDATA[<p>JXInsight&#8217;s OpenCore API uses a Name interface in both Probes and Metrics which wraps around a String but it also supports composite names (delimited by dot) which allows us to reduce String working memory because Names are effectively interned within both our metering and metric models. This has also allowed us to augment such strings with meta-data (labels).</p>
<p>William</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dobes</title>
		<link>http://codemonkeyism.com/bending-java-more-readable-code-with-methods-that-do-nothing/comment-page-1/#comment-115512</link>
		<dc:creator>Dobes</dc:creator>
		<pubDate>Mon, 23 Jun 2008 08:02:01 +0000</pubDate>
		<guid isPermaLink="false">http://stephan.reposita.org/archives/2008/05/09/bending-java-more-readable-code-with-methods-that-do-nothing/#comment-115512</guid>
		<description>I like Nick&#039;s solution, I don&#039;t think that renaming is that big of a deal in practice, even if it looks bad in theory.

I couldn&#039;t help but wonder whether Java 5 annotations would work for this somehow.</description>
		<content:encoded><![CDATA[<p>I like Nick&#8217;s solution, I don&#8217;t think that renaming is that big of a deal in practice, even if it looks bad in theory.</p>
<p>I couldn&#8217;t help but wonder whether Java 5 annotations would work for this somehow.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: stephan</title>
		<link>http://codemonkeyism.com/bending-java-more-readable-code-with-methods-that-do-nothing/comment-page-1/#comment-87742</link>
		<dc:creator>stephan</dc:creator>
		<pubDate>Mon, 12 May 2008 05:49:44 +0000</pubDate>
		<guid isPermaLink="false">http://stephan.reposita.org/archives/2008/05/09/bending-java-more-readable-code-with-methods-that-do-nothing/#comment-87742</guid>
		<description>@Andrea: As written before, the comments don&#039;t work with refactorings (yes I know some IDEs do refactor comments but this is very error prone). Changing the methods when changing the types probably is a good idea, because changing one information without the other makes code unreadable over time.</description>
		<content:encoded><![CDATA[<p>@Andrea: As written before, the comments don&#8217;t work with refactorings (yes I know some IDEs do refactor comments but this is very error prone). Changing the methods when changing the types probably is a good idea, because changing one information without the other makes code unreadable over time.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrea Francia</title>
		<link>http://codemonkeyism.com/bending-java-more-readable-code-with-methods-that-do-nothing/comment-page-1/#comment-87617</link>
		<dc:creator>Andrea Francia</dc:creator>
		<pubDate>Sun, 11 May 2008 22:33:18 +0000</pubDate>
		<guid isPermaLink="false">http://stephan.reposita.org/archives/2008/05/09/bending-java-more-readable-code-with-methods-that-do-nothing/#comment-87617</guid>
		<description>I don&#039;t see the convenience of introducing methods (that should be maintained later) to achieve something that can be already achieved using the standard documentation tool of every language: comments.

Customer c =  new Customer( &quot;John&quot; /*firstname*/, 
                                           &quot;Smith&quot; /*lastname*/,
                                           87 /*age*/);

Introducing a method called firstname() or lastname() is so necessary?
When the type or the name of a property change you have to change also the method.

And what about the method name resolution? Using your method technique you have to import static all the methods do use it.

However I see a good thing of this idea. It can stimulate thinking about Java syntax and possible improvements to it.</description>
		<content:encoded><![CDATA[<p>I don&#8217;t see the convenience of introducing methods (that should be maintained later) to achieve something that can be already achieved using the standard documentation tool of every language: comments.</p>
<p>Customer c =  new Customer( &#8220;John&#8221; /*firstname*/,<br />
                                           &#8220;Smith&#8221; /*lastname*/,<br />
                                           87 /*age*/);</p>
<p>Introducing a method called firstname() or lastname() is so necessary?<br />
When the type or the name of a property change you have to change also the method.</p>
<p>And what about the method name resolution? Using your method technique you have to import static all the methods do use it.</p>
<p>However I see a good thing of this idea. It can stimulate thinking about Java syntax and possible improvements to it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: stephan</title>
		<link>http://codemonkeyism.com/bending-java-more-readable-code-with-methods-that-do-nothing/comment-page-1/#comment-87584</link>
		<dc:creator>stephan</dc:creator>
		<pubDate>Sun, 11 May 2008 18:21:12 +0000</pubDate>
		<guid isPermaLink="false">http://stephan.reposita.org/archives/2008/05/09/bending-java-more-readable-code-with-methods-that-do-nothing/#comment-87584</guid>
		<description>@Jan, raveman: Yes, see my post about fluent interface builders

@James: Yes, I like named parmeters

@Nick: Yes, this does work for small parameter lists, but breaks down for longer ones. It  also doesn&#039;t help with larger code bases where developers start to rename parameters. The difference between renaming &lt;code&gt;String name&lt;/code&gt; and &lt;code&gt;name()&lt;/code&gt; is that the first renaming is only local, the second is global and does therefor scale much better.

@Uri: Hmm, need to try that.

@Casper: Looks nice too.

I was using names parameters the first time during the 80 I guess with a programming language called E on the Amiga (or was it the 90s?). I like the idea since then, but Java regretfully doesn&#039;t have them.</description>
		<content:encoded><![CDATA[<p>@Jan, raveman: Yes, see my post about fluent interface builders</p>
<p>@James: Yes, I like named parmeters</p>
<p>@Nick: Yes, this does work for small parameter lists, but breaks down for longer ones. It  also doesn&#8217;t help with larger code bases where developers start to rename parameters. The difference between renaming <code>String name</code> and <code>name()</code> is that the first renaming is only local, the second is global and does therefor scale much better.</p>
<p>@Uri: Hmm, need to try that.</p>
<p>@Casper: Looks nice too.</p>
<p>I was using names parameters the first time during the 80 I guess with a programming language called E on the Amiga (or was it the 90s?). I like the idea since then, but Java regretfully doesn&#8217;t have them.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: James Hughes</title>
		<link>http://codemonkeyism.com/bending-java-more-readable-code-with-methods-that-do-nothing/comment-page-1/#comment-87477</link>
		<dc:creator>James Hughes</dc:creator>
		<pubDate>Sun, 11 May 2008 08:45:06 +0000</pubDate>
		<guid isPermaLink="false">http://stephan.reposita.org/archives/2008/05/09/bending-java-more-readable-code-with-methods-that-do-nothing/#comment-87477</guid>
		<description>Ammmm The naming convention is very similar to how Groovy would do - named arguments.

def cust = new Customer(name:&quot;James&quot;)</description>
		<content:encoded><![CDATA[<p>Ammmm The naming convention is very similar to how Groovy would do &#8211; named arguments.</p>
<p>def cust = new Customer(name:&#8221;James&#8221;)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Uri</title>
		<link>http://codemonkeyism.com/bending-java-more-readable-code-with-methods-that-do-nothing/comment-page-1/#comment-87446</link>
		<dc:creator>Uri</dc:creator>
		<pubDate>Sun, 11 May 2008 04:06:19 +0000</pubDate>
		<guid isPermaLink="false">http://stephan.reposita.org/archives/2008/05/09/bending-java-more-readable-code-with-methods-that-do-nothing/#comment-87446</guid>
		<description>I dig your intent but I don&#039;t really like the solutions (for all obvious reasons that were already mentioned). I think the problem lies in Java itself in the lack of named arguments for methods. how about having the following more generic solution (I&#039;m still not a big fan of it though...)

class Utils {
    $(&quot;name&quot;, name)
    public static  T $(String name, T value) {
       return value;
    }
}

then:

Customer c = new Customer($(&quot;name&quot;, &quot;Stephan&quot;));

I guess it&#039;s the closest you can get to: new Customer (name: &quot;Stephan&quot;);

cheers,
Uri</description>
		<content:encoded><![CDATA[<p>I dig your intent but I don&#8217;t really like the solutions (for all obvious reasons that were already mentioned). I think the problem lies in Java itself in the lack of named arguments for methods. how about having the following more generic solution (I&#8217;m still not a big fan of it though&#8230;)</p>
<p>class Utils {<br />
    $(&#8220;name&#8221;, name)<br />
    public static  T $(String name, T value) {<br />
       return value;<br />
    }<br />
}</p>
<p>then:</p>
<p>Customer c = new Customer($(&#8220;name&#8221;, &#8220;Stephan&#8221;));</p>
<p>I guess it&#8217;s the closest you can get to: new Customer (name: &#8220;Stephan&#8221;);</p>
<p>cheers,<br />
Uri</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nick Westgate</title>
		<link>http://codemonkeyism.com/bending-java-more-readable-code-with-methods-that-do-nothing/comment-page-1/#comment-87430</link>
		<dc:creator>Nick Westgate</dc:creator>
		<pubDate>Sun, 11 May 2008 01:26:59 +0000</pubDate>
		<guid isPermaLink="false">http://stephan.reposita.org/archives/2008/05/09/bending-java-more-readable-code-with-methods-that-do-nothing/#comment-87430</guid>
		<description>While it&#039;s always good to try new ways of improving readability, there are &quot;better&quot; (at least less controversial) existing solutions to the trivial example you provide - e.g. raveman&#039;s above.

Here&#039;s another traditional solution that doesn&#039;t need methods:

String name = &quot;Stephan&quot;;
Customer customer = new Customer(name);

Some parameters might be deserving of an object type, like the OrderId in your previous post on this topic, but you should carefully consider how methods will look _when they are actually used_.

For instance, the following is common, and makes the method signature less relevant since context is provided in other ways.

Customer customer = new Customer(htmlForm.name);

Cheers,
Nick.</description>
		<content:encoded><![CDATA[<p>While it&#8217;s always good to try new ways of improving readability, there are &#8220;better&#8221; (at least less controversial) existing solutions to the trivial example you provide &#8211; e.g. raveman&#8217;s above.</p>
<p>Here&#8217;s another traditional solution that doesn&#8217;t need methods:</p>
<p>String name = &#8220;Stephan&#8221;;<br />
Customer customer = new Customer(name);</p>
<p>Some parameters might be deserving of an object type, like the OrderId in your previous post on this topic, but you should carefully consider how methods will look _when they are actually used_.</p>
<p>For instance, the following is common, and makes the method signature less relevant since context is provided in other ways.</p>
<p>Customer customer = new Customer(htmlForm.name);</p>
<p>Cheers,<br />
Nick.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Casper Bang</title>
		<link>http://codemonkeyism.com/bending-java-more-readable-code-with-methods-that-do-nothing/comment-page-1/#comment-87425</link>
		<dc:creator>Casper Bang</dc:creator>
		<pubDate>Sun, 11 May 2008 01:03:56 +0000</pubDate>
		<guid isPermaLink="false">http://stephan.reposita.org/archives/2008/05/09/bending-java-more-readable-code-with-methods-that-do-nothing/#comment-87425</guid>
		<description>Points for originality but.... that&#039;s about it. How about we get object initializes, like in C#?

Customer customer = new Customer(){ name=&quot;Stephan&quot;, salary=65.000};

...then again, a little easier to do in C# than Java since it has native properties rather than mundane manual set/get mechanics.</description>
		<content:encoded><![CDATA[<p>Points for originality but&#8230;. that&#8217;s about it. How about we get object initializes, like in C#?</p>
<p>Customer customer = new Customer(){ name=&#8221;Stephan&#8221;, salary=65.000};</p>
<p>&#8230;then again, a little easier to do in C# than Java since it has native properties rather than mundane manual set/get mechanics.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jan</title>
		<link>http://codemonkeyism.com/bending-java-more-readable-code-with-methods-that-do-nothing/comment-page-1/#comment-87409</link>
		<dc:creator>jan</dc:creator>
		<pubDate>Sat, 10 May 2008 22:53:30 +0000</pubDate>
		<guid isPermaLink="false">http://stephan.reposita.org/archives/2008/05/09/bending-java-more-readable-code-with-methods-that-do-nothing/#comment-87409</guid>
		<description>Having classes like Name, PhoneNumber... can really become maintainability nightmare. But I also like to increase readability of the code. My favorite would be:

Customer customer = Customer.name(&quot;Stephan&quot;).phoneNumber(&quot;12345&quot;)

or

Customer customer = Customer.withName(&quot;Stephan&quot;).withPhoneNumber(&quot;12345&quot;)</description>
		<content:encoded><![CDATA[<p>Having classes like Name, PhoneNumber&#8230; can really become maintainability nightmare. But I also like to increase readability of the code. My favorite would be:</p>
<p>Customer customer = Customer.name(&#8220;Stephan&#8221;).phoneNumber(&#8220;12345&#8243;)</p>
<p>or</p>
<p>Customer customer = Customer.withName(&#8220;Stephan&#8221;).withPhoneNumber(&#8220;12345&#8243;)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: raveman</title>
		<link>http://codemonkeyism.com/bending-java-more-readable-code-with-methods-that-do-nothing/comment-page-1/#comment-87392</link>
		<dc:creator>raveman</dc:creator>
		<pubDate>Sat, 10 May 2008 21:00:37 +0000</pubDate>
		<guid isPermaLink="false">http://stephan.reposita.org/archives/2008/05/09/bending-java-more-readable-code-with-methods-that-do-nothing/#comment-87392</guid>
		<description>i dont like that idea, how about only non-arg contructors and builder pattern ?
Customer customer = new Customer().setName(&quot;Stephan&quot;);

i think it looks better</description>
		<content:encoded><![CDATA[<p>i dont like that idea, how about only non-arg contructors and builder pattern ?<br />
Customer customer = new Customer().setName(&#8220;Stephan&#8221;);</p>
<p>i think it looks better</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mwanji</title>
		<link>http://codemonkeyism.com/bending-java-more-readable-code-with-methods-that-do-nothing/comment-page-1/#comment-87351</link>
		<dc:creator>mwanji</dc:creator>
		<pubDate>Sat, 10 May 2008 15:03:07 +0000</pubDate>
		<guid isPermaLink="false">http://stephan.reposita.org/archives/2008/05/09/bending-java-more-readable-code-with-methods-that-do-nothing/#comment-87351</guid>
		<description>Isn&#039;t name() kind of just a way of getting around the absence of named parameters?

I can&#039;t imagine doing that for every class that calls constructors, but maybe as statically imported methods from a utility class? Like:

NamedParameterUtils.name()
NamedParameterUtils.country()
NamedParameterUtils.age()
...</description>
		<content:encoded><![CDATA[<p>Isn&#8217;t name() kind of just a way of getting around the absence of named parameters?</p>
<p>I can&#8217;t imagine doing that for every class that calls constructors, but maybe as statically imported methods from a utility class? Like:</p>
<p>NamedParameterUtils.name()<br />
NamedParameterUtils.country()<br />
NamedParameterUtils.age()<br />
&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Shams</title>
		<link>http://codemonkeyism.com/bending-java-more-readable-code-with-methods-that-do-nothing/comment-page-1/#comment-87286</link>
		<dc:creator>Shams</dc:creator>
		<pubDate>Sat, 10 May 2008 06:32:11 +0000</pubDate>
		<guid isPermaLink="false">http://stephan.reposita.org/archives/2008/05/09/bending-java-more-readable-code-with-methods-that-do-nothing/#comment-87286</guid>
		<description>nice idea, but depends whether you want to make the code verbose to improve readability.</description>
		<content:encoded><![CDATA[<p>nice idea, but depends whether you want to make the code verbose to improve readability.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ted stockwell</title>
		<link>http://codemonkeyism.com/bending-java-more-readable-code-with-methods-that-do-nothing/comment-page-1/#comment-87244</link>
		<dc:creator>ted stockwell</dc:creator>
		<pubDate>Fri, 09 May 2008 21:29:29 +0000</pubDate>
		<guid isPermaLink="false">http://stephan.reposita.org/archives/2008/05/09/bending-java-more-readable-code-with-methods-that-do-nothing/#comment-87244</guid>
		<description>Don&#039;t listen to the critics, I think your first approach was exactly right...

 new Customer(new FirstName(&quot;Stephan&quot;), new Name(&quot;Schmidt&quot;));  

Another benefit of this approach is that is &#039;semantic&#039;.
That is, it has the benefits of being able to precisely defining the semantics of each and every property, like in RDF.

I suppose that guy that thinks that modelling is doing more with less would be happiest with no model at all :-).

--------------------

BTW, I really like your posts on Java syntax, modeling, etc.  Keep them coming please...</description>
		<content:encoded><![CDATA[<p>Don&#8217;t listen to the critics, I think your first approach was exactly right&#8230;</p>
<p> new Customer(new FirstName(&#8220;Stephan&#8221;), new Name(&#8220;Schmidt&#8221;));  </p>
<p>Another benefit of this approach is that is &#8217;semantic&#8217;.<br />
That is, it has the benefits of being able to precisely defining the semantics of each and every property, like in RDF.</p>
<p>I suppose that guy that thinks that modelling is doing more with less would be happiest with no model at all :-).</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</p>
<p>BTW, I really like your posts on Java syntax, modeling, etc.  Keep them coming please&#8230;</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk (enhanced) (user agent is rejected)
Database Caching 4/31 queries in 0.037 seconds using disk

Served from: codemonkeyism.com @ 2010-07-30 12:33:07 -->