<?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"
	>
<channel>
	<title>Comments on: Humane Interfaces</title>
	<atom:link href="http://pezra.barelyenough.org/blog/2005/12/humane-interfaces/feed/" rel="self" type="application/rss+xml" />
	<link>http://pezra.barelyenough.org/blog/2005/12/humane-interfaces/</link>
	<description></description>
	<pubDate>Thu, 07 Aug 2008 20:03:30 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5</generator>
		<item>
		<title>By: kuri</title>
		<link>http://pezra.barelyenough.org/blog/2005/12/humane-interfaces/#comment-48640</link>
		<dc:creator>kuri</dc:creator>
		<pubDate>Tue, 29 Apr 2008 09:46:06 +0000</pubDate>
		<guid isPermaLink="false">http://pezra.barelyenough.org/blog/?p=186#comment-48640</guid>
		<description>&lt;p&gt;if myarray.first.is_a ?(thingy)’ vs. ‘ myArray(0).Class.getName(), etc,etc; it is more natural to humans like a programming lang should be (after all, what’s the point?). Also you can state that conditional many ways if that is more natural to you, using one of the 78 available methods.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>if myarray.first.is_a ?(thingy)’ vs. ‘ myArray(0).Class.getName(), etc,etc; it is more natural to humans like a programming lang should be (after all, what’s the point?). Also you can state that conditional many ways if that is more natural to you, using one of the 78 available methods.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Global Nerdy &#187; Blog Archive &#187; Monkey Knife Fight! (or: Not Much Has Changed)</title>
		<link>http://pezra.barelyenough.org/blog/2005/12/humane-interfaces/#comment-31189</link>
		<dc:creator>Global Nerdy &#187; Blog Archive &#187; Monkey Knife Fight! (or: Not Much Has Changed)</dc:creator>
		<pubDate>Thu, 27 Sep 2007 17:13:17 +0000</pubDate>
		<guid isPermaLink="false">http://pezra.barelyenough.org/blog/?p=186#comment-31189</guid>
		<description>&lt;p&gt;[...] Peter Williams: &#8220;Each of those decisions [to keep an interface minimal and let developers write a little extra code] are reasonable in isolation but put together pretty soon you and your community are stuck with a lot more code to maintain than if that behavior had been included in the core library to start with.&#8221; [...]&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>[&#8230;] Peter Williams: &#8220;Each of those decisions [to keep an interface minimal and let developers write a little extra code] are reasonable in isolation but put together pretty soon you and your community are stuck with a lot more code to maintain than if that behavior had been included in the core library to start with.&#8221; [&#8230;]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tucows Services &#187; Tucows Developer Blog &#62; Blog Archive &#187; Monkey Knife Fight! (or: Not Much Has Changed)</title>
		<link>http://pezra.barelyenough.org/blog/2005/12/humane-interfaces/#comment-31185</link>
		<dc:creator>Tucows Services &#187; Tucows Developer Blog &#62; Blog Archive &#187; Monkey Knife Fight! (or: Not Much Has Changed)</dc:creator>
		<pubDate>Thu, 27 Sep 2007 17:07:33 +0000</pubDate>
		<guid isPermaLink="false">http://pezra.barelyenough.org/blog/?p=186#comment-31185</guid>
		<description>&lt;p&gt;[...] Peter Williams: &#8220;Each of those decisions [to keep an interface minimal and let developers write a little extra code] are reasonable in isolation but put together pretty soon you and your community are stuck with a lot more code to maintain than if that behavior had been included in the core library to start with.&#8221; [...]&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>[&#8230;] Peter Williams: &#8220;Each of those decisions [to keep an interface minimal and let developers write a little extra code] are reasonable in isolation but put together pretty soon you and your community are stuck with a lot more code to maintain than if that behavior had been included in the core library to start with.&#8221; [&#8230;]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tucows Services &#187; Tucows Developer Blog &#62; Blog Archive &#187; Monkey Knife Fight! (or: Not Much Has Changed)</title>
		<link>http://pezra.barelyenough.org/blog/2005/12/humane-interfaces/#comment-31186</link>
		<dc:creator>Tucows Services &#187; Tucows Developer Blog &#62; Blog Archive &#187; Monkey Knife Fight! (or: Not Much Has Changed)</dc:creator>
		<pubDate>Thu, 27 Sep 2007 17:07:33 +0000</pubDate>
		<guid isPermaLink="false">http://pezra.barelyenough.org/blog/?p=186#comment-31186</guid>
		<description>&lt;p&gt;[...] Peter Williams: &#8220;Each of those decisions [to keep an interface minimal and let developers write a little extra code] are reasonable in isolation but put together pretty soon you and your community are stuck with a lot more code to maintain than if that behavior had been included in the core library to start with.&#8221; [...]&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>[&#8230;] Peter Williams: &#8220;Each of those decisions [to keep an interface minimal and let developers write a little extra code] are reasonable in isolation but put together pretty soon you and your community are stuck with a lot more code to maintain than if that behavior had been included in the core library to start with.&#8221; [&#8230;]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: truth machine</title>
		<link>http://pezra.barelyenough.org/blog/2005/12/humane-interfaces/#comment-25252</link>
		<dc:creator>truth machine</dc:creator>
		<pubDate>Sun, 05 Aug 2007 02:16:38 +0000</pubDate>
		<guid isPermaLink="false">http://pezra.barelyenough.org/blog/?p=186#comment-25252</guid>
		<description>&lt;p&gt;The bottom line of this debate nearly 2 years ago /should/ have been a recognition that Java is badly designed and a vow to reject its design principles -- in the long run Sun did, as seen in its addition of numerous missing language features.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>The bottom line of this debate nearly 2 years ago /should/ have been a recognition that Java is badly designed and a vow to reject its design principles &#8212; in the long run Sun did, as seen in its addition of numerous missing language features.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Donald Marino</title>
		<link>http://pezra.barelyenough.org/blog/2005/12/humane-interfaces/#comment-507</link>
		<dc:creator>Donald Marino</dc:creator>
		<pubDate>Fri, 09 Dec 2005 04:54:39 +0000</pubDate>
		<guid isPermaLink="false">http://pezra.barelyenough.org/blog/?p=186#comment-507</guid>
		<description>&lt;p&gt;I would add that from a practical standpoint, the difference is that the large number of convenience interfaces suit Ruby very well, because they allow a programmer to use language that is natural to them. For me one of things that contributes to the fahrvergnugen of Ruby is using natural language in your code a lot. It may simply be more pleasant to say ' if myarray.first.is_a ?(thingy)' vs. ' myArray(0).Class.getName(), etc,etc; it is more natural to humans like a programming lang should be (after all, what's the point?). Also you can state that conditional many ways if that is more natural to you, using one of the 78 available methods. Is it really that difficult to scan an rdoc for a method that suits you? Besides, once you develop your Ruby style, you'll find those kinds of methods by feel in other classes before you know it. Not everything is about cleanliness. Sometimes you just want to write the code the way you want to write the code, without having to ovverride or implement a bunch of interface methods.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I would add that from a practical standpoint, the difference is that the large number of convenience interfaces suit Ruby very well, because they allow a programmer to use language that is natural to them. For me one of things that contributes to the fahrvergnugen of Ruby is using natural language in your code a lot. It may simply be more pleasant to say &#8216; if myarray.first.is_a ?(thingy)&#8217; vs. &#8216; myArray(0).Class.getName(), etc,etc; it is more natural to humans like a programming lang should be (after all, what&#8217;s the point?). Also you can state that conditional many ways if that is more natural to you, using one of the 78 available methods. Is it really that difficult to scan an rdoc for a method that suits you? Besides, once you develop your Ruby style, you&#8217;ll find those kinds of methods by feel in other classes before you know it. Not everything is about cleanliness. Sometimes you just want to write the code the way you want to write the code, without having to ovverride or implement a bunch of interface methods.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter Williams</title>
		<link>http://pezra.barelyenough.org/blog/2005/12/humane-interfaces/#comment-506</link>
		<dc:creator>Peter Williams</dc:creator>
		<pubDate>Thu, 08 Dec 2005 16:35:59 +0000</pubDate>
		<guid isPermaLink="false">http://pezra.barelyenough.org/blog/?p=186#comment-506</guid>
		<description>&lt;p&gt;Brian, I think you are correct.  However in Java this would be unacceptable because you often have class that want to act like a list, in addition to being some other type.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Brian, I think you are correct.  However in Java this would be unacceptable because you often have class that want to act like a list, in addition to being some other type.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brian Slesinsky</title>
		<link>http://pezra.barelyenough.org/blog/2005/12/humane-interfaces/#comment-505</link>
		<dc:creator>Brian Slesinsky</dc:creator>
		<pubDate>Thu, 08 Dec 2005 02:30:22 +0000</pubDate>
		<guid isPermaLink="false">http://pezra.barelyenough.org/blog/?p=186#comment-505</guid>
		<description>&lt;p&gt;I think the point here is that java.util.List probably should have been an abstract class, so that default implementations of convenience methods like first() and last() can be provided.  (Generally I think having a Java interface with more than a half-dozen methods is a sign that it should have been an abstract class.)&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I think the point here is that java.util.List probably should have been an abstract class, so that default implementations of convenience methods like first() and last() can be provided.  (Generally I think having a Java interface with more than a half-dozen methods is a sign that it should have been an abstract class.)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jacob Fugal</title>
		<link>http://pezra.barelyenough.org/blog/2005/12/humane-interfaces/#comment-504</link>
		<dc:creator>Jacob Fugal</dc:creator>
		<pubDate>Thu, 08 Dec 2005 00:34:50 +0000</pubDate>
		<guid isPermaLink="false">http://pezra.barelyenough.org/blog/?p=186#comment-504</guid>
		<description>&lt;p&gt;Devon:&lt;/p&gt;

&lt;p&gt;"While it’s really nice to have a good api, an interface is supposed to be a set of operations that make it easy to code something that replacably works with other implementers of that interface. If you have a giant interface (say 78 methods for a list/array instead of 23) you make is substantially less likely that people are going to bother to use that interface when coding a new class because it’s 3 or 4 times the code to implement the much larger interface."&lt;/p&gt;

&lt;p&gt;I think you're confusing an INTERFACE (capitals = abstract concept) with an interface (lowercase = Java keyword). Martin Fowler and Peter are referring to the former. The INTERFACE of the class MyArray is the set of methods that are exposed to the User. The NiftyArray interface is the collection of method signatures that the class MyArray must provide in order to "implement" NiftyArray. They are related: the INTERFACE of MyArray must necessarily be a superset of the NiftyArray interface. But they are not the same.&lt;/p&gt;

&lt;p&gt;Now, let's take interfaces out of the equation all together (Ruby doesn't have them, nor does it need them). Left only with INTERFACEs we have only the methods provided. Fowler's article get's at the point that this set of methods shouldn't necessarily be minimal. Providing that extra method which encapsulates a common 3 line use of the other functions within the INTERFACE -- that's GOOD, because now that's 3 lines of code maintained in one place, rather than three lines repeated throughout many projects.&lt;/p&gt;

&lt;p&gt;If you're defining an interface that is expected to have several implementations, you probably do want it to be minimal while still being convenient. However, if you're writing a definitive class, such as a class in a core library, splurge. Expand that INTERFACE and make life easier on your users.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Devon:</p>
<p>&#8220;While it’s really nice to have a good api, an interface is supposed to be a set of operations that make it easy to code something that replacably works with other implementers of that interface. If you have a giant interface (say 78 methods for a list/array instead of 23) you make is substantially less likely that people are going to bother to use that interface when coding a new class because it’s 3 or 4 times the code to implement the much larger interface.&#8221;</p>
<p>I think you&#8217;re confusing an INTERFACE (capitals = abstract concept) with an interface (lowercase = Java keyword). Martin Fowler and Peter are referring to the former. The INTERFACE of the class MyArray is the set of methods that are exposed to the User. The NiftyArray interface is the collection of method signatures that the class MyArray must provide in order to &#8220;implement&#8221; NiftyArray. They are related: the INTERFACE of MyArray must necessarily be a superset of the NiftyArray interface. But they are not the same.</p>
<p>Now, let&#8217;s take interfaces out of the equation all together (Ruby doesn&#8217;t have them, nor does it need them). Left only with INTERFACEs we have only the methods provided. Fowler&#8217;s article get&#8217;s at the point that this set of methods shouldn&#8217;t necessarily be minimal. Providing that extra method which encapsulates a common 3 line use of the other functions within the INTERFACE &#8212; that&#8217;s GOOD, because now that&#8217;s 3 lines of code maintained in one place, rather than three lines repeated throughout many projects.</p>
<p>If you&#8217;re defining an interface that is expected to have several implementations, you probably do want it to be minimal while still being convenient. However, if you&#8217;re writing a definitive class, such as a class in a core library, splurge. Expand that INTERFACE and make life easier on your users.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter Williams</title>
		<link>http://pezra.barelyenough.org/blog/2005/12/humane-interfaces/#comment-503</link>
		<dc:creator>Peter Williams</dc:creator>
		<pubDate>Wed, 07 Dec 2005 21:04:50 +0000</pubDate>
		<guid isPermaLink="false">http://pezra.barelyenough.org/blog/?p=186#comment-503</guid>
		<description>&lt;p&gt;Replacabilty sets off my "you’re NOT gonna need it!" alarm.  When is the last time you swapped implementations of an interface?  I am not sure I have ever done it, at least not late enough in a project for it to matter.&lt;/p&gt;

&lt;p&gt;But you do make a point that Java interfaces make this problem a lot more complicated than it needs to be.  In my experience the vast majority of behaviors on a humane interface are mostly just mixing a series other, more primitive, behaviors together.  If Java interfaces were more like abstract classes you could define a couple of abstract primitive methods and provide default implementations of the other 70 or so useful behaviors in terms of those few primitive behaviors.  This gets you the best of both worlds.&lt;/p&gt;

&lt;p&gt;An extended "humane" interface would the feasible but I think that it suffers from all the issues you see with humane interfaces in general.  Personally, I find that using a language that does not penalize providing humane interfaces quite so much a better choice. :)&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Replacabilty sets off my &#8220;you’re NOT gonna need it!&#8221; alarm.  When is the last time you swapped implementations of an interface?  I am not sure I have ever done it, at least not late enough in a project for it to matter.</p>
<p>But you do make a point that Java interfaces make this problem a lot more complicated than it needs to be.  In my experience the vast majority of behaviors on a humane interface are mostly just mixing a series other, more primitive, behaviors together.  If Java interfaces were more like abstract classes you could define a couple of abstract primitive methods and provide default implementations of the other 70 or so useful behaviors in terms of those few primitive behaviors.  This gets you the best of both worlds.</p>
<p>An extended &#8220;humane&#8221; interface would the feasible but I think that it suffers from all the issues you see with humane interfaces in general.  Personally, I find that using a language that does not penalize providing humane interfaces quite so much a better choice. :)</p>
]]></content:encoded>
	</item>
</channel>
</rss>
