<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments for WarpedJavaGuy</title>
	<atom:link href="http://warpedjavaguy.wordpress.com/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://warpedjavaguy.wordpress.com</link>
	<description>Observations of everyday Java phenomena</description>
	<lastBuildDate>Thu, 19 Nov 2009 18:35:52 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>Comment on Is it Java? by Georemc</title>
		<link>http://warpedjavaguy.wordpress.com/2007/02/26/is-it-java/#comment-375</link>
		<dc:creator>Georemc</dc:creator>
		<pubDate>Thu, 19 Nov 2009 18:35:52 +0000</pubDate>
		<guid isPermaLink="false">http://warpedjavaguy.wordpress.com/2007/02/26/is-it-java/#comment-375</guid>
		<description>What about Java source code compiled to a native binary? Was that Java? I like your thinking, that it&#039;s the platform not the language that matters here. Just throwing a spanner in the works a bit!</description>
		<content:encoded><![CDATA[<p>What about Java source code compiled to a native binary? Was that Java? I like your thinking, that it&#8217;s the platform not the language that matters here. Just throwing a spanner in the works a bit!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Java Jacket Tribute by Steve Brecht</title>
		<link>http://warpedjavaguy.wordpress.com/2007/07/18/java-jacket-tribute/#comment-347</link>
		<dc:creator>Steve Brecht</dc:creator>
		<pubDate>Tue, 13 Jan 2009 18:04:18 +0000</pubDate>
		<guid isPermaLink="false">http://warpedjavaguy.wordpress.com/2007/07/18/java-jacket-tribute/#comment-347</guid>
		<description>Even rarer is the one I have here as it is the prototype for the Java jacket.  In the late 90&#039;s I had a client that did up promo/swag products for large corporations and he had the Sun contract at the time. He was the one who had the Java jackets designed and manufactured originally.  When I saw them I had to have one but none of the ones he had in stock fit me at the time.  He did however still have the early prototype jacket which fit like a glove.  The differences (if I recall correctly) were that the leather was done in a matte finish calf skin and the lining is quilted Thinsulate.  I don&#039;t know how many were produced like this one but I know they were all &quot;prototypes&quot;  It was decided the calf skin wouldn&#039;t wear as well and thus it was changed to the glossy leather.  

Sadly at the time I did wear this jacket a lot so it has several years of use on it but the embroidery is still perfect though it could all use a good cleaning.  Still hangs in my closet. I stopped wearing it back around 2002.</description>
		<content:encoded><![CDATA[<p>Even rarer is the one I have here as it is the prototype for the Java jacket.  In the late 90&#8217;s I had a client that did up promo/swag products for large corporations and he had the Sun contract at the time. He was the one who had the Java jackets designed and manufactured originally.  When I saw them I had to have one but none of the ones he had in stock fit me at the time.  He did however still have the early prototype jacket which fit like a glove.  The differences (if I recall correctly) were that the leather was done in a matte finish calf skin and the lining is quilted Thinsulate.  I don&#8217;t know how many were produced like this one but I know they were all &#8220;prototypes&#8221;  It was decided the calf skin wouldn&#8217;t wear as well and thus it was changed to the glossy leather.  </p>
<p>Sadly at the time I did wear this jacket a lot so it has several years of use on it but the embroidery is still perfect though it could all use a good cleaning.  Still hangs in my closet. I stopped wearing it back around 2002.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Natural Born Programmers by Thomas</title>
		<link>http://warpedjavaguy.wordpress.com/2007/06/20/natural-born-programmers/#comment-346</link>
		<dc:creator>Thomas</dc:creator>
		<pubDate>Wed, 15 Oct 2008 12:10:49 +0000</pubDate>
		<guid isPermaLink="false">http://warpedjavaguy.wordpress.com/2007/06/20/natural-born-programmers/#comment-346</guid>
		<description>I don&#039;t think humans divide a number by 10 and then check whether the remainder is 1,2,3,4,5,6,7,8,9, or 0. I think humans look at the &quot;string&quot;, take the last &quot;character&quot; and compare that with the known odd or even digits.

To be fair, the program should also start with a string. Then the idea of comparing the last character with &quot;1&quot;, &quot;2&quot;, &quot;3&quot;, ... instead of converting the string to a number and doing % 2 makes a lot more sense.

So in this case smart people and good programmers converge.</description>
		<content:encoded><![CDATA[<p>I don&#8217;t think humans divide a number by 10 and then check whether the remainder is 1,2,3,4,5,6,7,8,9, or 0. I think humans look at the &#8220;string&#8221;, take the last &#8220;character&#8221; and compare that with the known odd or even digits.</p>
<p>To be fair, the program should also start with a string. Then the idea of comparing the last character with &#8220;1&#8243;, &#8220;2&#8243;, &#8220;3&#8243;, &#8230; instead of converting the string to a number and doing % 2 makes a lot more sense.</p>
<p>So in this case smart people and good programmers converge.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Closure Syntax Wars by Mario</title>
		<link>http://warpedjavaguy.wordpress.com/2008/02/28/closure-syntax-wars/#comment-344</link>
		<dc:creator>Mario</dc:creator>
		<pubDate>Tue, 30 Sep 2008 18:38:56 +0000</pubDate>
		<guid isPermaLink="false">http://warpedjavaguy.wordpress.com/?p=31#comment-344</guid>
		<description>I really like the Java Method Pointer syntax. It&#039;s perfect in my mind and way better than &quot;fat arrow&quot; notation.</description>
		<content:encoded><![CDATA[<p>I really like the Java Method Pointer syntax. It&#8217;s perfect in my mind and way better than &#8220;fat arrow&#8221; notation.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Implicitly Formatted Exceptions by WarpedJavaGuy</title>
		<link>http://warpedjavaguy.wordpress.com/2008/09/16/implicitly-formatted-exceptions/#comment-343</link>
		<dc:creator>WarpedJavaGuy</dc:creator>
		<pubDate>Sat, 20 Sep 2008 00:09:51 +0000</pubDate>
		<guid isPermaLink="false">http://warpedjavaguy.wordpress.com/?p=110#comment-343</guid>
		<description>Yes, String.format is another option.  Although very C/C++ish, it does appear to provide more options than MessageFormat.</description>
		<content:encoded><![CDATA[<p>Yes, String.format is another option.  Although very C/C++ish, it does appear to provide more options than MessageFormat.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Implicitly Formatted Exceptions by Laird Nelson</title>
		<link>http://warpedjavaguy.wordpress.com/2008/09/16/implicitly-formatted-exceptions/#comment-342</link>
		<dc:creator>Laird Nelson</dc:creator>
		<pubDate>Thu, 18 Sep 2008 19:06:50 +0000</pubDate>
		<guid isPermaLink="false">http://warpedjavaguy.wordpress.com/?p=110#comment-342</guid>
		<description>Try String.format().</description>
		<content:encoded><![CDATA[<p>Try String.format().</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Natural Born Programmers by thereality</title>
		<link>http://warpedjavaguy.wordpress.com/2007/06/20/natural-born-programmers/#comment-341</link>
		<dc:creator>thereality</dc:creator>
		<pubDate>Thu, 11 Sep 2008 09:32:12 +0000</pubDate>
		<guid isPermaLink="false">http://warpedjavaguy.wordpress.com/2007/06/20/natural-born-programmers/#comment-341</guid>
		<description>Not all programmers are smart. Many are just computer geeks who take programming course in college. And then they get hired just because of their certificates.

It&#039;s obvious that most smart kids woud rather become engineers, doctors, architects, scientists and such. Only a few love programming.

So who are these programmers? Most of them are just computer geeks who get paid to program because no one else can. A good programmer can do more than just write code.</description>
		<content:encoded><![CDATA[<p>Not all programmers are smart. Many are just computer geeks who take programming course in college. And then they get hired just because of their certificates.</p>
<p>It&#8217;s obvious that most smart kids woud rather become engineers, doctors, architects, scientists and such. Only a few love programming.</p>
<p>So who are these programmers? Most of them are just computer geeks who get paid to program because no one else can. A good programmer can do more than just write code.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Polymorphism by Closure Injection? by WarpedJavaGuy</title>
		<link>http://warpedjavaguy.wordpress.com/2008/09/04/polymorphism-by-closure-injection/#comment-340</link>
		<dc:creator>WarpedJavaGuy</dc:creator>
		<pubDate>Wed, 10 Sep 2008 10:47:57 +0000</pubDate>
		<guid isPermaLink="false">http://warpedjavaguy.wordpress.com/?p=33#comment-340</guid>
		<description>Hamlet,

You make an interesting point about the strategy pattern being used to create functional programming abstractions.  Would you say that discrete units of abstraction like SAM interfaces actually encourage a more functional style of programming as opposed to abstract classes which may not be as discrete?  If so, and if this is the preferred, better, and more standard approach, would having closures in Java be a natural step forwards for the language?

There are those who want closures and those who don&#039;t, but most of us I think agree that interfaces are good.  In terms of SAM interfaces, there is not much difference between them and closures.  Both define a single unit of abstraction.  But interfaces are considered object oriented whereas closures are not.  Surely closures would make for a more pleasant programming experience when used in this way.</description>
		<content:encoded><![CDATA[<p>Hamlet,</p>
<p>You make an interesting point about the strategy pattern being used to create functional programming abstractions.  Would you say that discrete units of abstraction like SAM interfaces actually encourage a more functional style of programming as opposed to abstract classes which may not be as discrete?  If so, and if this is the preferred, better, and more standard approach, would having closures in Java be a natural step forwards for the language?</p>
<p>There are those who want closures and those who don&#8217;t, but most of us I think agree that interfaces are good.  In terms of SAM interfaces, there is not much difference between them and closures.  Both define a single unit of abstraction.  But interfaces are considered object oriented whereas closures are not.  Surely closures would make for a more pleasant programming experience when used in this way.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Polymorphism by Closure Injection? by WarpedJavaGuy</title>
		<link>http://warpedjavaguy.wordpress.com/2008/09/04/polymorphism-by-closure-injection/#comment-339</link>
		<dc:creator>WarpedJavaGuy</dc:creator>
		<pubDate>Mon, 08 Sep 2008 10:59:40 +0000</pubDate>
		<guid isPermaLink="false">http://warpedjavaguy.wordpress.com/?p=33#comment-339</guid>
		<description>Howard,

In response to 1:
I actually use the predicate on Legs as well as Routes.  Therefore the use of generics here is justified.  Sample snippet: 
&lt;code&gt;
new Predicate&lt;Leg&gt;(
 &#160;{Leg leg =&gt; leg.startsAt(origin)});
&lt;/code&gt;

In response to 2:
My code does not perform a search on a list of existing routes, but rather on a dynamic iteration of routes that are generated on the fly.  The predicate is used to yield eligible routes in real time as they are generated.  Having said that, the pattern you describe can still be applied here.</description>
		<content:encoded><![CDATA[<p>Howard,</p>
<p>In response to 1:<br />
I actually use the predicate on Legs as well as Routes.  Therefore the use of generics here is justified.  Sample snippet:<br />
<code><br />
new Predicate&lt;Leg&gt;(<br />
 &nbsp;{Leg leg =&gt; leg.startsAt(origin)});<br />
</code></p>
<p>In response to 2:<br />
My code does not perform a search on a list of existing routes, but rather on a dynamic iteration of routes that are generated on the fly.  The predicate is used to yield eligible routes in real time as they are generated.  Having said that, the pattern you describe can still be applied here.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Polymorphism by Closure Injection? by Howard Lovatt</title>
		<link>http://warpedjavaguy.wordpress.com/2008/09/04/polymorphism-by-closure-injection/#comment-338</link>
		<dc:creator>Howard Lovatt</dc:creator>
		<pubDate>Mon, 08 Sep 2008 01:14:50 +0000</pubDate>
		<guid isPermaLink="false">http://warpedjavaguy.wordpress.com/?p=33#comment-338</guid>
		<description>I agree with Hamlet D&#039;Arcy - it is the sort of thing I do with the Strategy pattern often.

I would also say that if I wrote the code I would possibly do it differently, I say possibly because I haven&#039;t seen the whole example (which is fair enough this is a blog after all). Two things look out of place in the fragment presented are:

1. The use of generics - there is only Route shown, so why not code to Route directly or extend generic interfaces to encode Route - see below

2. eligible and yield have a lot of overlap in their functionality - in normal optimisation and searching algorithms (operations research) you would typically have:

interface Penalty { double cost( T t ); }

/** Route Penalty is the time taken for a given Route */
interface RoutePenalty extends Penalty {}


interface Constraint { boolean isOK( T t ); }

/** Route Constraint is if a given Route is feasible and if it is within user constraints like maximum number of stops */
interface RouteConstraint extends Constraint {}

The search algorithm is usually generic and accepts a Penalty (the cost of the solution, e.g. time of Route) and a List of Constraints (all of which have to be satisfied if the route is OK), so I would be tempted to code the example using the standard searching conventions. The call to optimise would typically be:

/** List of Routes sorted by their penalty */
interface SortedRoutes extends SortedList {}

final Optimiser optimiser = new Optimiser();
optimiser.setPenalty( routePenalty );
optimiser.setConstraints( routeConstraints );
optimiser.setMethod( OptimiserType.GENETIC );
final SortedRoutes possibleRoutes = optimiser.optimise( routes );

The reason for introducing RoutePenalty, RouteConstraint, SortedRoutes, etc. is that they give you somewhere to comment what the penalty, constraints, method of sorting, etc. is for a Route, they also reads a little better in the code.

The above is pseudo code - but hopefully gives an idea of how standard searching algorithms are used.</description>
		<content:encoded><![CDATA[<p>I agree with Hamlet D&#8217;Arcy &#8211; it is the sort of thing I do with the Strategy pattern often.</p>
<p>I would also say that if I wrote the code I would possibly do it differently, I say possibly because I haven&#8217;t seen the whole example (which is fair enough this is a blog after all). Two things look out of place in the fragment presented are:</p>
<p>1. The use of generics &#8211; there is only Route shown, so why not code to Route directly or extend generic interfaces to encode Route &#8211; see below</p>
<p>2. eligible and yield have a lot of overlap in their functionality &#8211; in normal optimisation and searching algorithms (operations research) you would typically have:</p>
<p>interface Penalty { double cost( T t ); }</p>
<p>/** Route Penalty is the time taken for a given Route */<br />
interface RoutePenalty extends Penalty {}</p>
<p>interface Constraint { boolean isOK( T t ); }</p>
<p>/** Route Constraint is if a given Route is feasible and if it is within user constraints like maximum number of stops */<br />
interface RouteConstraint extends Constraint {}</p>
<p>The search algorithm is usually generic and accepts a Penalty (the cost of the solution, e.g. time of Route) and a List of Constraints (all of which have to be satisfied if the route is OK), so I would be tempted to code the example using the standard searching conventions. The call to optimise would typically be:</p>
<p>/** List of Routes sorted by their penalty */<br />
interface SortedRoutes extends SortedList {}</p>
<p>final Optimiser optimiser = new Optimiser();<br />
optimiser.setPenalty( routePenalty );<br />
optimiser.setConstraints( routeConstraints );<br />
optimiser.setMethod( OptimiserType.GENETIC );<br />
final SortedRoutes possibleRoutes = optimiser.optimise( routes );</p>
<p>The reason for introducing RoutePenalty, RouteConstraint, SortedRoutes, etc. is that they give you somewhere to comment what the penalty, constraints, method of sorting, etc. is for a Route, they also reads a little better in the code.</p>
<p>The above is pseudo code &#8211; but hopefully gives an idea of how standard searching algorithms are used.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
