<?xml version='1.0' encoding='utf-8' ?>
<!--  If you are running a bot please visit this policy page outlining rules you must respect. http://www.livejournal.com/bots/  -->
<rss version='2.0' xmlns:lj='http://www.livejournal.org/rss/lj/1.0/' xmlns:media='http://search.yahoo.com/mrss/' xmlns:atom10='http://www.w3.org/2005/Atom'>
<channel>
  <title>sys.out(&quot;g33|&lt;&quot;);</title>
  <link>http://bpfurtado.livejournal.com/</link>
  <description>sys.out(&quot;g33|&lt;&quot;); - LiveJournal.com</description>
  <lastBuildDate>Mon, 23 Nov 2009 15:43:23 GMT</lastBuildDate>
  <generator>LiveJournal / LiveJournal.com</generator>
  <lj:journal>bpfurtado</lj:journal>
  <lj:journalid>6776190</lj:journalid>
  <lj:journaltype>personal</lj:journaltype>
  <atom10:link rel='hub' href='http://pubsubhubbub.appspot.com/' />
  <image>
    <url>http://l-userpic.livejournal.com/28541885/6776190</url>
    <title>sys.out(&quot;g33|&lt;&quot;);</title>
    <link>http://bpfurtado.livejournal.com/</link>
    <width>100</width>
    <height>75</height>
  </image>

<item>
  <guid isPermaLink='true'>http://bpfurtado.livejournal.com/63895.html</guid>
  <pubDate>Mon, 23 Nov 2009 15:43:23 GMT</pubDate>
  <title>Softpedia is distributing my Text-Adventures-Suite :-)</title>
  <link>http://bpfurtado.livejournal.com/63895.html</link>
  <description>My &lt;a href=&quot;http://code.google.com/p/text-adventures-suite/&quot;&gt;Text Adventures Suite&lt;/a&gt; is on Softpedia: &lt;a href=&quot;http://mac.softpedia.com/get/Games/Text-Adventures-Suite.shtml&quot;&gt;http://mac.softpedia.com/get/Games/Text-Adventures-Suite.shtml&lt;/a&gt; :-)&lt;br /&gt;&lt;br /&gt;&lt;img alt=&quot;TAS home screen&quot; src=&quot;http://bpfurtado.net/tas/screenshots/images/welcome.jpg&quot; /&gt;&lt;br /&gt;&lt;br /&gt;Check it out at Google Code:&amp;nbsp;&lt;a href=&quot;http://code.google.com/p/text-adventures-suite/&quot;&gt;&lt;span style=&quot;font-size: larger; &quot;&gt;http://code.google.com/p/text-adventures-suite/&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;u&gt;&lt;strong&gt;IMPORTANT NOTICE:&lt;/strong&gt;&lt;/u&gt; the source code for this project in nowhere near the best I&apos;ve written, hehehe, the context of it was very interesting and demands another post, nevertheless I had a lot of fun writing it (most of the time, hehe).&lt;br /&gt;&lt;br /&gt;And if you still have the time, check my other project: &lt;a href=&quot;http://code.google.com/p/ljcolligo/&quot;&gt;LJColligo&lt;/a&gt;, that makes backups of your &lt;a href=&quot;http://www.livejournal.com/&quot;&gt;LiveJournal&lt;/a&gt; blogs creating full static copies of it in HTML.&lt;br /&gt;&lt;br /&gt;&lt;em&gt;PS: &lt;/em&gt;&lt;a href=&quot;http://rafaelnaufal.com/blog/2009/10/27/jfilecontentmanager-included-in-the-softpedia-mac-os-software-database/&quot;&gt;&lt;em&gt;Rafael Naufal&lt;/em&gt;&lt;/a&gt;&lt;em&gt; had his project added on Softpedia some weeks ago also.&lt;/em&gt;&lt;br type=&quot;_moz&quot; /&gt;</description>
  <comments>http://bpfurtado.livejournal.com/63895.html</comments>
  <category>google</category>
  <category>ljcolligo</category>
  <category>softpedia</category>
  <category>text-adventures-suite</category>
  <category>code</category>
  <lj:security>public</lj:security>
  <lj:reply-count>0</lj:reply-count>
</item>
<item>
  <guid isPermaLink='true'>http://bpfurtado.livejournal.com/63689.html</guid>
  <pubDate>Thu, 19 Nov 2009 01:54:53 GMT</pubDate>
  <title>M$ Exchange is Waving good bye...</title>
  <link>http://bpfurtado.livejournal.com/63689.html</link>
  <description>&lt;p&gt;A friend of mine has recently called &lt;a href=&quot;https://wave.google.com&quot;&gt;Google Wave&lt;/a&gt; a simple chat app with no innovation whatsoever, well this are my first impressions about it (after reading and even using it! hehe):&lt;/p&gt;
&lt;pre style=&quot;font-family: Arial&quot;&gt;
A Google Wave is a centralized document (in opposition to the emails) that can be 
    &amp;#8226; edited simultaneously with several invitees, 
        &amp;#8226; using formatted text, images, videos, maps 
            &amp;#8226; (even small applications can be embedded).
    &amp;#8226; this content can have attached to it a conversation between the guests
        &amp;#8226; where each reply can be edited:
            &amp;#8226; using formatted text, images, videos, maps 
                &amp;#8226; (even small applications can be embedded);
                &amp;#8226; (and Google Gadgets have a safe home here too).
        &amp;#8226; using a standard reply or from the middle of the content;
        
    &amp;#8226; The Wave updates are shown live to all invitees, as they type.
    
    &amp;#8226; The History of all updates is save so late comers can be sent &quot;There and Back Again...&quot; to the future :-)
    
    &amp;#8226; You can attach files, save searches, organize your Waves with tags and folders;
    
    &amp;#8226; Wave content understands youtube links, google maps 
       and I hope more text formatting tools in the future :-) 
       (just a bit more...)
    
    &amp;#8226; The user interface is very clean, drag &amp;amp; drop friendly, you minimize and restore every box, etc.
    
    &amp;#8226; They have defined an open protocol so every one can create Wave Servers (Like private corporate ones) 
       so they can compete with corporate email servers with a much more sophisticated and rich communication medium.
    
    &amp;#8226; They also have this Robots concept, where a software component can be installed and receive all updates from an Wave 
       and act upon it (e.g. updating the Wave) like any other guest, in fact, in term of UI they are just another guest.
        &amp;#8226; There&apos;s the Robot &lt;a href=&quot;http://en.wikipedia.org/wiki/Rosetta_Stone&quot;&gt;Rosy&lt;/a&gt; (&lt;a href=&quot;http://www.youtube.com/watch?v=NOHwPgMXsNY&quot;&gt;a demo here&lt;/a&gt;) that can translate regular conversations and even based on their context! 
            &amp;#8226; Like in a conversation about Brazil&apos;s current president do not translate his name to &apos;Squid&apos;.  
    
That&apos;s why Google Wave (and the next private Wave servers) seems very promising to me.
        &lt;/pre&gt;
        &lt;img alt=&quot;Google Wave logo&quot; src=&quot;http://bpfurtado.net/lj_blog_images/Googlewave.png&quot;&gt;
        &lt;p&gt;I also recommend these very informative videos:&lt;/p&gt;
        &lt;ul&gt;
            &lt;li&gt;&lt;a href=&quot;http://www.youtube.com/watch?v=rDu2A3WzQpo&quot;&gt;What is Google Wave?&lt;/a&gt;;&lt;/li&gt;
            &lt;li&gt;&lt;a href=&quot;http://www.youtube.com/watch?v=xBzuuWZPaXc&quot;&gt;Google Wave: 15 features&lt;/a&gt;;&lt;/li&gt;
            &lt;li&gt;&lt;a href=&quot;http://www.youtube.com/watch?v=NOHwPgMXsNY&quot;&gt;Google Wave: Rosy&lt;/a&gt;&lt;/li&gt;
        &lt;/ul&gt;</description>
  <comments>http://bpfurtado.livejournal.com/63689.html</comments>
  <category>google</category>
  <category>wave</category>
  <category>mail</category>
  <lj:security>public</lj:security>
  <lj:reply-count>5</lj:reply-count>
</item>
<item>
  <guid isPermaLink='true'>http://bpfurtado.livejournal.com/63259.html</guid>
  <pubDate>Wed, 18 Nov 2009 00:00:39 GMT</pubDate>
  <title>Go [away] C{++}{0x}...?</title>
  <link>http://bpfurtado.livejournal.com/63259.html</link>
  <description>&lt;p&gt;
        Today I&apos;ve started a &lt;a href=&quot;http://wave.google.com/help/wave/about.html&quot;&gt;Wave&lt;/a&gt; with some of my friends to discuss the &lt;a href=&quot;http://google-opensource.blogspot.com/2009/11/hey-ho-lets-go.html&quot;&gt;recently revealed&lt;/a&gt; google programming language called &lt;a href=&quot;http://golang.org/&quot;&gt;Go&lt;/a&gt;.
        &lt;/p&gt;
        I&apos;ve started reading the &lt;a href=&quot;http://golang.org/doc/go_lang_faq.html&quot;&gt;Language Design FAQ&lt;/a&gt;, maybe not the best place be it got my attention first.
        The first highlights on this document I found most interesting:
        &lt;blockquote&gt;
            it generated C code as its output 
        &lt;/blockquote&gt;
        &lt;blockquote&gt;
            Go is an attempt to combine the ease of programming of an interpreted, dynamically typed language with &lt;spam style=&quot;background:yellow&quot;&gt;the efficiency and safety of a statically typed, compiled language&lt;/spam&gt;. It also aims to be modern, with support for networked and multicore computing. Finally, it is intended to be fast: it should take at most a few seconds to build a large executable on a single computer. To meet these goals required addressing a number of linguistic issues: &lt;spam style=&quot;background: yellow&quot;&gt;an expressive but lightweight type system; concurrency and garbage collection; rigid dependency specification; and so on. These cannot be addressed well by libraries or tools; &lt;strong&gt;a new language was called for&lt;/strong&gt;&lt;/spam&gt;. 
        &lt;/blockquote&gt;
        &lt;blockquote&gt;
            ... there is no type hierarchy: types just are, they don&apos;t have to announce their relationships ...
        &lt;/blockquote&gt;
        &lt;blockquote&gt;
            Why do garbage collection? Won&apos;t it be too expensive? ... The current implementation is a plain mark-and-sweep
        &lt;/blockquote&gt;
        They gotta invest a lot of effort on the item above :)
        &lt;blockquote&gt;
            Of course, implementing garbage collection in a concurrent environment is itself a challenge, &lt;spam style=&quot;background: yellow&quot;&gt;but meeting it once rather than in every program helps everyone&lt;/spam&gt;.
        &lt;/blockquote&gt;
        &lt;blockquote&gt;
            Go&apos;s built-in maps and slices, plus the ability to use the empty interface to construct containers (with &lt;spam style=&quot;background: yellow&quot;&gt;explicit unboxing&lt;/spam&gt;) 
        &lt;/blockquote&gt;
        &lt;blockquote&gt;
            Why is there no type inheritance? &lt;spam style=&quot;background: yellow&quot;&gt;there are no explicit relationships between types and interfaces, there is no type hierarchy to manage or discuss&lt;/spam&gt;.
        &lt;/blockquote&gt;
        These two still &apos;mystic&apos; languages for the most of us: {Erlang, Occam} share with Go the idea of some &lt;em&gt;builtin&lt;/em&gt; concurrency support:
        &lt;blockquote&gt;
            One of the most successful models for providing high-level linguistic support for concurrency comes from Hoare&apos;s Communicating Sequential Processes, or CSP. &lt;spam style=&quot;background: yellow&quot;&gt;Occam and Erlang are two well known languages that stem from CSP&lt;/spam&gt;. Go&apos;s concurrency primitives derive from a different part of the family tree whose main contribution is the powerful notion of &lt;spam style=&quot;background: yellow&quot;&gt;channels as first class objects&lt;/spam&gt;. 
        &lt;/blockquote&gt;
        Finally this well written &lt;a href=&quot;http://avdi.org/devblog/2009/11/13/why-go-matters/&quot;&gt;article [Why GO Matters]&lt;/a&gt; points out (along with &lt;a href=&quot;http://dserodio.tumblr.com/&quot;&gt;Serodio&lt;/a&gt; at our &lt;em&gt;Waveshere&lt;/em&gt;) that Go niche is of &lt;strong&gt;Systems programming&lt;/strong&gt;, in his words:
        &lt;blockquote&gt;
        What’s a systems programming language? It’s the kind of language you use when writing a new OS. Or a device driver. Or an I/O stack. Or a piece of networking middleware. Or a very fast web server.
        &lt;/blockquote&gt;
        &lt;p&gt;Are we facing the beginning of the end of the C++&lt;a href=&quot;http://en.wikipedia.org/wiki/C%2B%2B0x&quot;&gt;{0x}&lt;/a&gt; era? And did &lt;a href=&quot;http://www.digitalmars.com/d/&quot;&gt;Language D&lt;/a&gt; has lost momentum?&lt;/p&gt;
        &lt;img src=&quot;http://bpfurtado.net/lj_blog_images/Go Home Page.png&quot; alt=&quot;go logo&quot; /&gt;</description>
  <comments>http://bpfurtado.livejournal.com/63259.html</comments>
  <category>google</category>
  <category>wave</category>
  <category>programing_language</category>
  <category>go</category>
  <lj:security>public</lj:security>
  <lj:reply-count>0</lj:reply-count>
</item>
<item>
  <guid isPermaLink='true'>http://bpfurtado.livejournal.com/63111.html</guid>
  <pubDate>Tue, 17 Nov 2009 02:58:15 GMT</pubDate>
  <title>Google Docs understand styles in HTML!</title>
  <link>http://bpfurtado.livejournal.com/63111.html</link>
  <description>&lt;p&gt;I&apos;ve uploaded the HTML &lt;a href=&quot;http://www.lua.org/manual/5.1/manual.html&quot;&gt;Lua Reference Manual&lt;/a&gt; into Google Docs and it used styles for several tags like the h1, h2, h3, etc title ones! Awesome! :)
&lt;/p&gt;
        &lt;p&gt;
        Story: Today I helped on technical  aspect of an interview at my job; At a certain point this guy brought to the conversation the Lua programming language. I decided to take a peek and maybe print at the last version of the Lua manual which I never saw again in the last years. The manual is available in a single HTML which is far from being the best printable format, so I decided to convert it to ODF first. I&apos;ve always being a fan of the sophisticated JS Applications that &lt;a href=&quot;http://docs.google.com&quot;&gt;Google Docs&lt;/a&gt; family is, since the beginning when their word processing didn&apos;t have a wrap text feature ;-) So after copy &amp;amp; pasting not working well on &lt;a href=&quot;http://en.wikipedia.org/wiki/OpenOffice.org_Writer&quot;&gt;OpenOffice Writer&lt;/a&gt; I gave a shot at Google Docs upload feature, to my surprise the resulting document even being not perfect was created using styles for certain HTML tags, something tremendously helpful for medium to big texts! 
        &lt;/p&gt;</description>
  <comments>http://bpfurtado.livejournal.com/63111.html</comments>
  <category>google</category>
  <category>docs</category>
  <category>lua</category>
  <lj:security>public</lj:security>
  <lj:reply-count>1</lj:reply-count>
</item>
<item>
  <guid isPermaLink='true'>http://bpfurtado.livejournal.com/62823.html</guid>
  <pubDate>Tue, 17 Nov 2009 01:47:42 GMT</pubDate>
  <title>Twitter: &quot;ordo ad chaos&quot;</title>
  <link>http://bpfurtado.livejournal.com/62823.html</link>
  <description>&lt;p&gt;
            I&apos;m finally using twitter lists (and also finally back to my blog) in order to find some order from the chaos originated from so many different tweets of people I follow :-)
        &lt;/p&gt;
        &lt;p&gt;
            &lt;a href=&quot;http://twitter.com/bpfurtado&quot;&gt;My Twitter&lt;/a&gt; lists:
        &lt;/p&gt;
        &lt;ul&gt;
            &lt;li&gt;&lt;a href=&quot;http://twitter.com/bpfurtado/style&quot;&gt;@bpfurtado/style&lt;/a&gt;&lt;/li&gt;
            &lt;li&gt;&lt;a href=&quot;http://twitter.com/bpfurtado/software&quot;&gt;@bpfurtado/software&lt;/li&gt;
            &lt;li&gt;&lt;a href=&quot;http://twitter.com/bpfurtado/humor&quot;&gt;@bpfurtado/humor&lt;/a&gt;&lt;/li&gt;
            &lt;li&gt;&lt;a href=&quot;http://twitter.com/bpfurtado/util&quot;&gt;@bpfurtado/util&lt;/a&gt;&lt;/li&gt;
            &lt;li&gt;&lt;a href=&quot;http://twitter.com/bpfurtado/gurus&quot;&gt;@bpfurtado/gurus&lt;/a&gt;&lt;/li&gt;
            &lt;li&gt;&lt;a href=&quot;http://twitter.com/bpfurtado/friends&quot;&gt;@bpfurtado/friends&lt;/a&gt;&lt;/li&gt;
        &lt;/ul&gt;
        &lt;img src=&quot;http://bpfurtado.net/lj_blog_images/twitter_logo_header.png&quot; alt=&quot;twitter logo&quot; /&gt;&lt;/a&gt;</description>
  <comments>http://bpfurtado.livejournal.com/62823.html</comments>
  <category>twitter</category>
  <lj:security>public</lj:security>
  <lj:reply-count>0</lj:reply-count>
</item>
<item>
  <guid isPermaLink='true'>http://bpfurtado.livejournal.com/62694.html</guid>
  <pubDate>Wed, 03 Jun 2009 01:09:44 GMT</pubDate>
  <title>The reverse of Object Construction</title>
  <link>http://bpfurtado.livejournal.com/62694.html</link>
  <description>&lt;a href=&quot;http://en.wikipedia.org/wiki/Martin_Odersky&quot;&gt;Martin Odersky&lt;/a&gt;, the creator of &lt;a href=&quot;http://www.scala-lang.org/&quot;&gt;Scala&lt;/a&gt;, on &lt;a href=&quot;http://www.youtube.com/watch?v=01rXrI6xelE&quot;&gt;this Google Tech Talk&lt;/a&gt;&amp;nbsp;(@13:54 min) says:&lt;blockquote&gt;Pattern matching is the reverse of Object construction, that all it is... &lt;/blockquote&gt; &lt;p&gt;I must say, the &lt;a href=&quot;http://en.wikipedia.org/wiki/Functional_programming&quot;&gt;Functional Programming&lt;/a&gt; side of Scala is a whole new world to me, and the &lt;a href=&quot;http://en.wikipedia.org/wiki/Pattern_matching&quot;&gt;pattern matching&lt;/a&gt; mechanism a big a part of it, and I have the intention to deep dive all this.&lt;/p&gt;</description>
  <comments>http://bpfurtado.livejournal.com/62694.html</comments>
  <category>google</category>
  <category>scala</category>
  <category>patternmatching</category>
  <category>martinodersky</category>
  <category>techtalk</category>
  <category>functionalprogramming</category>
  <lj:security>public</lj:security>
  <lj:reply-count>1</lj:reply-count>
</item>
<item>
  <guid isPermaLink='true'>http://bpfurtado.livejournal.com/62336.html</guid>
  <pubDate>Wed, 27 May 2009 21:01:12 GMT</pubDate>
  <title>Lifting Scala Actors</title>
  <link>http://bpfurtado.livejournal.com/62336.html</link>
  <description>&lt;a href=&quot;http://groups.google.com/groups/profile?enc_user=IP51ih0AAADYhGZtm1gJhg_b06rYvp1l3_WZ66oSLPwD-msQL8j68w&quot;&gt;David Pollak&lt;/a&gt; wrote a very detailed description of &lt;a href=&quot;http://www.scala-lang.org/&quot;&gt;Scala&lt;/a&gt; SDK &lt;a href=&quot;http://www.scala-lang.org/node/242&quot;&gt;Actors&lt;/a&gt; on the &lt;a href=&quot;http://liftweb.net/&quot;&gt;Lift&lt;/a&gt; &lt;a href=&quot;http://groups.google.com/group/liftweb?pli=1&quot;&gt;discussion list&lt;/a&gt;, some &lt;a href=&quot;http://groups.google.com/group/liftweb/browse_thread/thread/f789cc5cb304ea52&quot;&gt;serious flaws are pointed out&lt;/a&gt; as a justification of why Lift has it&apos;s own Actor library:   &lt;blockquote&gt;     &lt;ul&gt;         &lt;li&gt;Lift creates/destroys an Actor for each Comet request. This rapid creation/destruction of Actors caused memory back-ups, and the existing Actor code seems to be oriented to long running Actors rather than Actors with Object-length lifespans.&lt;/li&gt;         &lt;li&gt;The FJ libraries used for Actor scheduling have problems on multi-core machines and are also a source of memory retention issues.&lt;/li&gt;         &lt;li&gt;Replacing the FJ libraries with a scheduler based on java.util.concurrent exposes race/deadlock conditions related to the fact that some parts of the Actor processing (e.g., testing mailbox items against partial functions while the Actor itself is synchronized)&lt;/li&gt;         &lt;li&gt;The Actors require external threads to function and it&apos;s not possible to create external threads in the Google App Engine (making Actor-based functionality including CometActors non-functioning in GAE apps)&lt;/li&gt;         &lt;li&gt;Actors are fragile when exceptions are thrown&lt;/li&gt;         &lt;li&gt;Actors have running and not running states (as compared with objects which can always respond to message sends). In practice, managing the running and not running states is as hard as managing memory in C.&lt;/li&gt;         &lt;li&gt;There are hidden actors associated with each thread which display the above fragility and state management issues&lt;/li&gt;         &lt;li&gt;And as a practical matter, I&apos;ve got a couple of applications that are going into production over the next few weeks and cannot wait for the various fixes to make it into Scala 2.8 and the hacks and work-arounds that I&apos;ve done to the 2.7.4 Actor libraries became too complex for my comfort.&lt;/li&gt;     &lt;/ul&gt; &lt;/blockquote&gt; Interesting to notice the authors worries about overcoming some limitations to run Lift on Google App Engine, what would certainly boost it&apos;s main adoption in a near future :)</description>
  <comments>http://bpfurtado.livejournal.com/62336.html</comments>
  <category>scala</category>
  <category>lift</category>
  <category>framework</category>
  <category>web</category>
  <lj:security>public</lj:security>
  <lj:reply-count>0</lj:reply-count>
</item>
<item>
  <guid isPermaLink='true'>http://bpfurtado.livejournal.com/62061.html</guid>
  <pubDate>Mon, 25 May 2009 03:32:05 GMT</pubDate>
  <title>&quot;Human Interface&quot; operations - Start where you want to end</title>
  <link>http://bpfurtado.livejournal.com/62061.html</link>
  <description>&lt;a href=&quot;http://bpfurtado.livejournal.com/17782.html&quot;&gt;Back on 2005 I wrote&lt;/a&gt; about an practical use of what Fowler describes as &lt;a href=&quot;http://martinfowler.com/bliki/HumaneInterface.html&quot;&gt;&quot;Human Interface&quot; operations&lt;/a&gt;.

&lt;p&gt;
Yesterday I was unit testing some code of my work and I started with a top down approach regarding the way I wanted to write the testing code.&lt;/p&gt;

&lt;p&gt;
Basically I wanted to have a collection of &lt;a href=&quot;http://en.wikipedia.org/wiki/Command_pattern&quot;&gt;Command&lt;/a&gt; objects that would change my input instances (to &lt;a href=&quot;http://www.fico.com/en/Products/DMTools/Pages/FICO-Blaze-Advisor-System.aspx&quot;&gt;a Rule Engine&lt;/a&gt;) so I could mix and match easily different updates to trigger different rules, at each unit test (lines 9-10).&lt;/p&gt;

&lt;p&gt;
I also wanted to make several requests to the Rule engine, before validate the results, since a lot of rules are just fired after other ones being fired on previous invocations (lines 12-13).
&lt;/p&gt;

&lt;p&gt;
But what I wanted the most was to easily express the way I would get results from different iterations (using ranges); and summarize elements and apply operations on the resulting sets of data (lines 15-17). &lt;/p&gt;

&lt;div style=&quot;background: rgb(204, 204, 204); font-family:Courier new; font-size: small&quot;&gt;&lt;span class=&quot;syntax0&quot;&gt;&lt;span class=&quot;gutter&quot;&gt; 01:&lt;/span&gt;&lt;span class=&quot;syntax8&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;syntax10&quot;&gt;class&lt;/span&gt; TerminalModelTest &lt;span class=&quot;syntax8&quot;&gt;extends&lt;/span&gt; CommandTests&lt;br /&gt;
&lt;span class=&quot;gutter&quot;&gt; 02:&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;gutter&quot;&gt; 03:&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;syntax11&quot;&gt;@&lt;/span&gt;&lt;span class=&quot;syntax11&quot;&gt;Test&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;gutter&quot;&gt; 04:&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;syntax8&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;syntax10&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;syntax6&quot;&gt;execute&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;)&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;gutterH&quot;&gt; 05:&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;syntax18&quot;&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;gutter&quot;&gt; 06:&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Transaction t &lt;span class=&quot;syntax18&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;syntax8&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;syntax6&quot;&gt;Transaction&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;
&lt;span class=&quot;gutter&quot;&gt; 07:&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;t.&lt;span class=&quot;syntax6&quot;&gt;setAuthorizationDate&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;syntax8&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;syntax6&quot;&gt;Date&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;
&lt;span class=&quot;gutter&quot;&gt; 08:&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;gutter&quot;&gt; 09:&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;TransactionUpdateCommand mcc &lt;span class=&quot;syntax18&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;syntax8&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;syntax6&quot;&gt;SetMccRamdomCommand&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;syntax5&quot;&gt;5001&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;
&lt;span class=&quot;gutterH&quot;&gt;10:&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;TransactionUpdateCommand codePosPDV &lt;span class=&quot;syntax18&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;syntax8&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;syntax6&quot;&gt;SetTerminalCodePosPDV&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;syntax13&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;syntax13&quot;&gt;xxxxxx12&lt;/span&gt;&lt;span class=&quot;syntax13&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;
&lt;span class=&quot;gutter&quot;&gt;11:&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;
&lt;span class=&quot;gutter&quot;&gt;12:&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;RuleServiceInvoker commands &lt;span class=&quot;syntax18&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;syntax8&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;syntax6&quot;&gt;RuleServiceInvoker&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;
&lt;span class=&quot;gutter&quot;&gt;13:&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;CommandsResultSet results &lt;span class=&quot;syntax18&quot;&gt;=&lt;/span&gt; commands.&lt;span class=&quot;syntax6&quot;&gt;run&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;(&lt;/span&gt;t, &lt;span class=&quot;syntax5&quot;&gt;10&lt;/span&gt;, mcc, codePosPDV&lt;span class=&quot;syntax18&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;
&lt;span class=&quot;gutter&quot;&gt;14:&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;gutterH&quot;&gt;15:&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;syntax6&quot;&gt;assertTrue&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;(&lt;/span&gt;results.&lt;span class=&quot;syntax6&quot;&gt;iteration&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;syntax5&quot;&gt;0&lt;/span&gt;, &lt;span class=&quot;syntax5&quot;&gt;4&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;)&lt;/span&gt;.&lt;span class=&quot;syntax6&quot;&gt;intProfileVar&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;syntax5&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;)&lt;/span&gt;.&lt;span class=&quot;syntax6&quot;&gt;incrementedEachTime&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;syntax5&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;
&lt;span class=&quot;gutter&quot;&gt;16:&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;syntax6&quot;&gt;assertEquals&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;syntax5&quot;&gt;0&lt;/span&gt;, results.&lt;span class=&quot;syntax6&quot;&gt;iteration&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;syntax5&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;)&lt;/span&gt;.&lt;span class=&quot;syntax6&quot;&gt;intProfileVar&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;syntax5&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;
&lt;span class=&quot;gutter&quot;&gt;17:&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;syntax6&quot;&gt;assertTrue&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;(&lt;/span&gt;results.&lt;span class=&quot;syntax6&quot;&gt;iteration&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;syntax5&quot;&gt;6&lt;/span&gt;, &lt;span class=&quot;syntax5&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;)&lt;/span&gt;.&lt;span class=&quot;syntax6&quot;&gt;intProfileVar&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;syntax5&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;)&lt;/span&gt;.&lt;span class=&quot;syntax6&quot;&gt;incrementedEachTime&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;syntax5&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;
&lt;span class=&quot;gutterH&quot;&gt;18:&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;syntax18&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;gutter&quot;&gt;19:&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;

&lt;p&gt;
To better understand the assertions above one must know that some arrays of integers, double, Dates are sent back and forth to the Rule Engine, inside the engine the end user sees those array slots as proper named structured data, but at this level, where we poor developers reside they are just arrays, and the class that holds them all is the one called &apos;Profile&apos;, so now I can say that I wanted in the line 17:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Extract the results from the iterations (or requests) 6 to 10;&lt;/li&gt;
&lt;li&gt;From those iterations work only with the integer array of values, specifically the ones on the position 3;&lt;/li&gt;
&lt;li&gt;Check if the difference between each one of those are of 1;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
All those methods in place I could start with their implementation, and bellow is the result (with the omission of some unrelated code ;):    &lt;/p&gt;
Here is the code to run the commands upon the input instances and an special mention to the inner private class &apos;LocalReturn&apos; just because java does not have tuples or return statements with multiple values (of course one can always return an array, but it&apos;s not that beautiful).
&lt;div style=&quot;background: rgb(204, 204, 204); font-family:Courier new; font-size: small&quot;&gt;&lt;br /&gt;
&lt;span class=&quot;syntax0&quot;&gt;&lt;span class=&quot;syntax8&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;syntax10&quot;&gt;class&lt;/span&gt; RuleServiceInvoker&lt;br /&gt;
&lt;span class=&quot;syntax18&quot;&gt;{&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;CommandsResultSet &lt;span class=&quot;syntax6&quot;&gt;run&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;(&lt;/span&gt;Transaction t, &lt;span class=&quot;syntax10&quot;&gt;int&lt;/span&gt; times, Command... commands&lt;span class=&quot;syntax18&quot;&gt;)&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;syntax18&quot;&gt;{&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;CommandsResultSet results &lt;span class=&quot;syntax18&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;syntax8&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;syntax6&quot;&gt;CommandsResultSet&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;syntax8&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;syntax18&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;syntax10&quot;&gt;int&lt;/span&gt; i &lt;span class=&quot;syntax18&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;syntax5&quot;&gt;0&lt;/span&gt;; i &lt;span class=&quot;syntax18&quot;&gt;&amp;lt;&lt;/span&gt; times; i&lt;span class=&quot;syntax18&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;syntax18&quot;&gt;{&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;...&lt;br /&gt;
&lt;spam style=&quot;background: #ffff91;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;syntax8&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;syntax18&quot;&gt;(&lt;/span&gt;TransactionUpdateCommand command : commands&lt;span class=&quot;syntax18&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;syntax18&quot;&gt;{&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;command.&lt;span class=&quot;syntax6&quot;&gt;execute&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;(&lt;/span&gt;t&lt;span class=&quot;syntax18&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;syntax18&quot;&gt;}&lt;/span&gt;&lt;/spam&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;input.&lt;span class=&quot;syntax6&quot;&gt;setTransaction&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;(&lt;/span&gt;t&lt;span class=&quot;syntax18&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;LocalReturn ruleServiceReturn &lt;span class=&quot;syntax18&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;syntax6&quot;&gt;invokeAndKeep[OmittedName2]Variables&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;(&lt;/span&gt;input&lt;span class=&quot;syntax18&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;results.&lt;span class=&quot;syntax6&quot;&gt;add&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;(&lt;/span&gt;ruleServiceReturn.output&lt;span class=&quot;syntax18&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;...&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;syntax18&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;syntax8&quot;&gt;return&lt;/span&gt; results;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;syntax18&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;...&lt;br /&gt;
&lt;spam style=&quot;background: #ffff91;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;syntax8&quot;&gt;private&lt;/span&gt; &lt;span class=&quot;syntax10&quot;&gt;class&lt;/span&gt; LocalReturn &lt;span class=&quot;syntax18&quot;&gt;{&lt;/span&gt;&lt;/spam&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[OmittedName1]Input input;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[OmittedName1]Output output;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;syntax8&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;syntax6&quot;&gt;LocalReturn&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;(&lt;/span&gt;[OmittedName1]Input input, [OmittedName1]Output output&lt;span class=&quot;syntax18&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;syntax18&quot;&gt;{&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;syntax14&quot;&gt;this&lt;/span&gt;.input &lt;span class=&quot;syntax18&quot;&gt;=&lt;/span&gt; input;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;syntax14&quot;&gt;this&lt;/span&gt;.output &lt;span class=&quot;syntax18&quot;&gt;=&lt;/span&gt; output;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;syntax18&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;syntax18&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;syntax18&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;
&lt;p&gt;
Bellow the 3 container classes, so I could work exactly with the data I needed for each assertion:&lt;/p&gt;
&lt;pre style=&quot;background: rgb(204, 204, 204);&quot;&gt;
&lt;span class=&quot;syntax8&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;syntax10&quot;&gt;class&lt;/span&gt; CommandsResultSet
&lt;span class=&quot;syntax18&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;syntax8&quot;&gt;private&lt;/span&gt; List&lt;span class=&quot;syntax18&quot;&gt;&amp;lt;&lt;/span&gt;ComandsOutputIteration&lt;span class=&quot;syntax18&quot;&gt;&amp;gt;&lt;/span&gt; iterations &lt;span class=&quot;syntax18&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;syntax8&quot;&gt;new&lt;/span&gt; LinkedList&lt;span class=&quot;syntax18&quot;&gt;&amp;lt;&lt;/span&gt;ComandsOutputIteration&lt;span class=&quot;syntax18&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;)&lt;/span&gt;;

    &lt;spam style=&quot;background: #ffff91;&quot;&gt;&lt;span class=&quot;syntax8&quot;&gt;public&lt;/span&gt; ComandsOutputIterationSet &lt;span class=&quot;syntax6&quot;&gt;iteration&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;syntax10&quot;&gt;int&lt;/span&gt; start, &lt;span class=&quot;syntax10&quot;&gt;int&lt;/span&gt; end&lt;span class=&quot;syntax18&quot;&gt;)&lt;/span&gt;&lt;/spam&gt;
    &lt;span class=&quot;syntax18&quot;&gt;{&lt;/span&gt;
        ComandsOutputIterationSet set &lt;span class=&quot;syntax18&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;syntax8&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;syntax6&quot;&gt;ComandsOutputIterationSet&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;)&lt;/span&gt;;
        &lt;span class=&quot;syntax8&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;syntax18&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;syntax10&quot;&gt;int&lt;/span&gt; i &lt;span class=&quot;syntax18&quot;&gt;=&lt;/span&gt; start; i &lt;span class=&quot;syntax18&quot;&gt;&amp;lt;&lt;/span&gt; end; i&lt;span class=&quot;syntax18&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;syntax18&quot;&gt;{&lt;/span&gt;
            set.&lt;span class=&quot;syntax6&quot;&gt;add&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;(&lt;/span&gt;iterations.&lt;span class=&quot;syntax6&quot;&gt;get&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;(&lt;/span&gt;i&lt;span class=&quot;syntax18&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;)&lt;/span&gt;;
        &lt;span class=&quot;syntax18&quot;&gt;}&lt;/span&gt;
        &lt;span class=&quot;syntax8&quot;&gt;return&lt;/span&gt; set;
    &lt;span class=&quot;syntax18&quot;&gt;}&lt;/span&gt;

    &lt;span class=&quot;syntax8&quot;&gt;public&lt;/span&gt; ComandsOutputIteration &lt;span class=&quot;syntax6&quot;&gt;iteration&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;syntax10&quot;&gt;int&lt;/span&gt; idx&lt;span class=&quot;syntax18&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;syntax18&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;syntax8&quot;&gt;return&lt;/span&gt; iterations.&lt;span class=&quot;syntax6&quot;&gt;get&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;(&lt;/span&gt;idx&lt;span class=&quot;syntax18&quot;&gt;)&lt;/span&gt;;
    &lt;span class=&quot;syntax18&quot;&gt;}&lt;/span&gt;

    &lt;span class=&quot;syntax8&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;syntax10&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;syntax6&quot;&gt;add&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;(&lt;/span&gt;[OmittedName1]Output output&lt;span class=&quot;syntax18&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;syntax18&quot;&gt;{&lt;/span&gt;
        iterations.&lt;span class=&quot;syntax6&quot;&gt;add&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;syntax8&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;syntax6&quot;&gt;ComandsOutputIteration&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;(&lt;/span&gt;output&lt;span class=&quot;syntax18&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;)&lt;/span&gt;;
    &lt;span class=&quot;syntax18&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;syntax18&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;syntax8&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;syntax10&quot;&gt;class&lt;/span&gt; ComandsOutputIterationSet
&lt;span class=&quot;syntax18&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;syntax8&quot;&gt;private&lt;/span&gt; List&lt;span class=&quot;syntax18&quot;&gt;&amp;lt;&lt;/span&gt;ComandsOutputIteration&lt;span class=&quot;syntax18&quot;&gt;&amp;gt;&lt;/span&gt; iterations &lt;span class=&quot;syntax18&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;syntax8&quot;&gt;new&lt;/span&gt; LinkedList&lt;span class=&quot;syntax18&quot;&gt;&amp;lt;&lt;/span&gt;ComandsOutputIteration&lt;span class=&quot;syntax18&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;)&lt;/span&gt;;

    &lt;spam style=&quot;background: #ffff91;&quot;&gt;&lt;span class=&quot;syntax8&quot;&gt;public&lt;/span&gt; IntProfileVarSet &lt;span class=&quot;syntax6&quot;&gt;intProfileVar&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;syntax10&quot;&gt;int&lt;/span&gt; idx&lt;span class=&quot;syntax18&quot;&gt;)&lt;/span&gt;&lt;/spam&gt;
    &lt;span class=&quot;syntax18&quot;&gt;{&lt;/span&gt;
        IntProfileVarSet set &lt;span class=&quot;syntax18&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;syntax8&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;syntax6&quot;&gt;IntProfileVarSet&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;)&lt;/span&gt;;
        &lt;span class=&quot;syntax8&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;syntax18&quot;&gt;(&lt;/span&gt;ComandsOutputIteration it : iterations&lt;span class=&quot;syntax18&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;syntax18&quot;&gt;{&lt;/span&gt;
            set.&lt;span class=&quot;syntax6&quot;&gt;add&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;(&lt;/span&gt;it.&lt;span class=&quot;syntax6&quot;&gt;intProfileVar&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;(&lt;/span&gt;idx&lt;span class=&quot;syntax18&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;)&lt;/span&gt;;
        &lt;span class=&quot;syntax18&quot;&gt;}&lt;/span&gt;
        &lt;span class=&quot;syntax8&quot;&gt;return&lt;/span&gt; set;
    &lt;span class=&quot;syntax18&quot;&gt;}&lt;/span&gt;

    &lt;span class=&quot;syntax8&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;syntax10&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;syntax6&quot;&gt;add&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;(&lt;/span&gt;ComandsOutputIteration iteration&lt;span class=&quot;syntax18&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;syntax18&quot;&gt;{&lt;/span&gt; iterations.&lt;span class=&quot;syntax6&quot;&gt;add&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;(&lt;/span&gt;iteration&lt;span class=&quot;syntax18&quot;&gt;)&lt;/span&gt;; &lt;span class=&quot;syntax18&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;syntax18&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;syntax8&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;syntax10&quot;&gt;class&lt;/span&gt; ComandsOutputIteration  
&lt;span class=&quot;syntax18&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;syntax8&quot;&gt;private&lt;/span&gt; [OmittedName1]Output output;

    &lt;span class=&quot;syntax8&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;syntax6&quot;&gt;ComandsOutputIteration&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;(&lt;/span&gt;[OmittedName1]Output output&lt;span class=&quot;syntax18&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;syntax18&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;syntax14&quot;&gt;this&lt;/span&gt;.output &lt;span class=&quot;syntax18&quot;&gt;=&lt;/span&gt; output;
    &lt;span class=&quot;syntax18&quot;&gt;}&lt;/span&gt;

    &lt;spam style=&quot;background: #ffff91;&quot;&gt;&lt;span class=&quot;syntax8&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;syntax10&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;syntax6&quot;&gt;intProfileVar&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;syntax10&quot;&gt;int&lt;/span&gt; idx&lt;span class=&quot;syntax18&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;syntax18&quot;&gt;{&lt;/span&gt;&lt;/spam&gt;
        &lt;span class=&quot;syntax8&quot;&gt;return&lt;/span&gt; output.&lt;span class=&quot;syntax6&quot;&gt;get[OmittedName2]ProfileVariables&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;)&lt;/span&gt;.&lt;span class=&quot;syntax6&quot;&gt;getIntegerValues&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;)&lt;/span&gt;[idx];
    &lt;span class=&quot;syntax18&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;syntax18&quot;&gt;}&lt;/span&gt;
&lt;/pre&gt;

Here an interesting spot where I could use a bit of recursion, at the &apos;diff&apos; method:

&lt;pre style=&quot;background: rgb(204, 204, 204);&quot;&gt;
&lt;span class=&quot;syntax8&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;syntax10&quot;&gt;class&lt;/span&gt; IntProfileVarSet
&lt;span class=&quot;syntax18&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;syntax8&quot;&gt;private&lt;/span&gt; List&lt;span class=&quot;syntax18&quot;&gt;&amp;lt;&lt;/span&gt;Integer&lt;span class=&quot;syntax18&quot;&gt;&amp;gt;&lt;/span&gt; ints &lt;span class=&quot;syntax18&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;syntax8&quot;&gt;new&lt;/span&gt; LinkedList&lt;span class=&quot;syntax18&quot;&gt;&amp;lt;&lt;/span&gt;Integer&lt;span class=&quot;syntax18&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;)&lt;/span&gt;;

    &lt;span class=&quot;syntax8&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;syntax10&quot;&gt;boolean&lt;/span&gt; &lt;span class=&quot;syntax6&quot;&gt;incrementedEachTime&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;syntax10&quot;&gt;int&lt;/span&gt; diff&lt;span class=&quot;syntax18&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;syntax18&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;syntax8&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;syntax18&quot;&gt;(&lt;/span&gt;ints.&lt;span class=&quot;syntax6&quot;&gt;size&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;syntax18&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;syntax5&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;syntax18&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;syntax8&quot;&gt;throw&lt;/span&gt; &lt;span class=&quot;syntax8&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;syntax6&quot;&gt;RuntimeException&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;syntax13&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;syntax13&quot;&gt;Less&lt;/span&gt;&lt;span class=&quot;syntax13&quot;&gt; &lt;/span&gt;&lt;span class=&quot;syntax13&quot;&gt;than&lt;/span&gt;&lt;span class=&quot;syntax13&quot;&gt; &lt;/span&gt;&lt;span class=&quot;syntax13&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;syntax13&quot;&gt; &lt;/span&gt;&lt;span class=&quot;syntax13&quot;&gt;elements!&lt;/span&gt;&lt;span class=&quot;syntax13&quot;&gt; &lt;/span&gt;&lt;span class=&quot;syntax13&quot;&gt;No&lt;/span&gt;&lt;span class=&quot;syntax13&quot;&gt; &lt;/span&gt;&lt;span class=&quot;syntax13&quot;&gt;increment&lt;/span&gt;&lt;span class=&quot;syntax13&quot;&gt; &lt;/span&gt;&lt;span class=&quot;syntax13&quot;&gt;can&lt;/span&gt;&lt;span class=&quot;syntax13&quot;&gt; &lt;/span&gt;&lt;span class=&quot;syntax13&quot;&gt;be&lt;/span&gt;&lt;span class=&quot;syntax13&quot;&gt; &lt;/span&gt;&lt;span class=&quot;syntax13&quot;&gt;verified!&lt;/span&gt;&lt;span class=&quot;syntax13&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;)&lt;/span&gt;;
        &lt;span class=&quot;syntax18&quot;&gt;}&lt;/span&gt;
        &lt;spam style=&quot;background: #ffff91;&quot;&gt;&lt;span class=&quot;syntax8&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;syntax6&quot;&gt;diff&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;syntax5&quot;&gt;0&lt;/span&gt;, &lt;span class=&quot;syntax5&quot;&gt;1&lt;/span&gt;, diff&lt;span class=&quot;syntax18&quot;&gt;)&lt;/span&gt;;&lt;/spam&gt;
    &lt;span class=&quot;syntax18&quot;&gt;}&lt;/span&gt;

    &lt;spam style=&quot;background: #ffff91;&quot;&gt;&lt;span class=&quot;syntax8&quot;&gt;private&lt;/span&gt; &lt;span class=&quot;syntax10&quot;&gt;boolean&lt;/span&gt; &lt;span class=&quot;syntax6&quot;&gt;diff&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;syntax10&quot;&gt;int&lt;/span&gt; current, &lt;span class=&quot;syntax10&quot;&gt;int&lt;/span&gt; next, &lt;span class=&quot;syntax10&quot;&gt;int&lt;/span&gt; diff&lt;span class=&quot;syntax18&quot;&gt;)&lt;/span&gt;&lt;/spam&gt; &lt;span class=&quot;syntax18&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;syntax8&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;syntax18&quot;&gt;(&lt;/span&gt;ints.&lt;span class=&quot;syntax6&quot;&gt;get&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;(&lt;/span&gt;next&lt;span class=&quot;syntax18&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;syntax18&quot;&gt;-&lt;/span&gt; ints.&lt;span class=&quot;syntax6&quot;&gt;get&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;(&lt;/span&gt;current&lt;span class=&quot;syntax18&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;syntax18&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;=&lt;/span&gt; diff&lt;span class=&quot;syntax18&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;syntax18&quot;&gt;{&lt;/span&gt;
            &lt;spam style=&quot;background: #ffff91;&quot;&gt;&lt;span class=&quot;syntax8&quot;&gt;return&lt;/span&gt; next &lt;span class=&quot;syntax18&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;syntax5&quot;&gt;1&lt;/span&gt; &lt;span class=&quot;syntax18&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;=&lt;/span&gt; ints.&lt;span class=&quot;syntax6&quot;&gt;size&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;)&lt;/span&gt; ? &lt;span class=&quot;syntax14&quot;&gt;true&lt;/span&gt; : &lt;span class=&quot;syntax6&quot;&gt;diff&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;(&lt;/span&gt;next, next &lt;span class=&quot;syntax18&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;syntax5&quot;&gt;1&lt;/span&gt;, diff&lt;span class=&quot;syntax18&quot;&gt;)&lt;/span&gt;;&lt;/spam&gt;
        &lt;span class=&quot;syntax18&quot;&gt;}&lt;/span&gt;
        &lt;span class=&quot;syntax8&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;syntax14&quot;&gt;false&lt;/span&gt;;
    &lt;span class=&quot;syntax18&quot;&gt;}&lt;/span&gt;

    &lt;span class=&quot;syntax8&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;syntax10&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;syntax6&quot;&gt;add&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;syntax10&quot;&gt;int&lt;/span&gt; intProfileVar&lt;span class=&quot;syntax18&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;syntax18&quot;&gt;{&lt;/span&gt; ints.&lt;span class=&quot;syntax6&quot;&gt;add&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;(&lt;/span&gt;intProfileVar&lt;span class=&quot;syntax18&quot;&gt;)&lt;/span&gt;; &lt;span class=&quot;syntax18&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;syntax18&quot;&gt;}&lt;/span&gt;
&lt;/pre&gt;

&lt;p&gt;
This top down approach to design certain operation is most pleasant since you already start exactly where you want to get in the end :-)&lt;/p&gt;
&lt;p&gt;
&lt;em&gt;*The [OmittedNameX]s where placed to protect the Business of this client.&lt;/em&gt;&lt;/p&gt;</description>
  <comments>http://bpfurtado.livejournal.com/62061.html</comments>
  <category>humaninterfaces</category>
  <category>design</category>
  <category>java</category>
  <category>fowler</category>
  <category>object oriented</category>
  <category>recursion</category>
  <lj:security>public</lj:security>
  <lj:reply-count>0</lj:reply-count>
</item>
<item>
  <guid isPermaLink='true'>http://bpfurtado.livejournal.com/61877.html</guid>
  <pubDate>Sat, 23 May 2009 19:55:41 GMT</pubDate>
  <title>Business Requirements: Simpler can be enough</title>
  <link>http://bpfurtado.livejournal.com/61877.html</link>
  <description>&lt;p&gt;Sometimes the client can be happy with a simpler functionality than the one he asked for.&lt;/p&gt;         &lt;p&gt;If this simpler functionality will make your life easier, like avoiding the break of a good abstraction already in place, it&apos;s worth to show alternatives to your system users, after all, they very often don&apos;t know for sure exactly what they are asking for.&lt;/p&gt;         &lt;p&gt;That&apos;s what the presentation bellow describes very well, with a real life example :-)&lt;/p&gt;         &lt;lj-embed id=&quot;7&quot; /&gt;</description>
  <comments>http://bpfurtado.livejournal.com/61877.html</comments>
  <category>requirements_engineering</category>
  <category>video</category>
  <category>akitaonrails</category>
  <category>presentation</category>
  <lj:security>public</lj:security>
  <lj:reply-count>0</lj:reply-count>
</item>
<item>
  <guid isPermaLink='true'>http://bpfurtado.livejournal.com/61612.html</guid>
  <pubDate>Fri, 22 May 2009 00:53:56 GMT</pubDate>
  <title>Java.has(&quot;closures&quot;); //yet, too verbose</title>
  <link>http://bpfurtado.livejournal.com/61612.html</link>
  <description>&lt;p&gt;
The code bellow shows how Java annonynous inner classes are just static typed closures, with all verbosity but also all behaviour needed :-)
&lt;/p&gt;
&lt;div style=&quot;background: #cccccc; font-family: Courier new; font-size: small&quot;&gt;
&lt;span class=&quot;syntax0&quot;&gt;&lt;span class=&quot;gutter&quot;&gt;   1:&lt;/span&gt;&lt;span class=&quot;syntax9&quot;&gt;import&lt;/span&gt; java.util.LinkedList;&lt;br /&gt;
&lt;span class=&quot;gutter&quot;&gt;   2:&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;gutter&quot;&gt;   3:&lt;/span&gt;&lt;span class=&quot;syntax8&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;syntax10&quot;&gt;class&lt;/span&gt; VerboseClosures &lt;span class=&quot;syntax18&quot;&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;gutter&quot;&gt;   4:&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;syntax8&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;syntax8&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;syntax10&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;syntax6&quot;&gt;main&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;(&lt;/span&gt;String[] args&lt;span class=&quot;syntax18&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;syntax18&quot;&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;gutterH&quot;&gt;   5:&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;MyList langs &lt;span class=&quot;syntax18&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;syntax8&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;syntax6&quot;&gt;MyList&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;
&lt;span class=&quot;gutter&quot;&gt;   6:&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;langs.&lt;span class=&quot;syntax6&quot;&gt;add&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;syntax13&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;syntax13&quot;&gt;Java&lt;/span&gt;&lt;span class=&quot;syntax13&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;
&lt;span class=&quot;gutter&quot;&gt;   7:&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;langs.&lt;span class=&quot;syntax6&quot;&gt;add&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;syntax13&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;syntax13&quot;&gt;Scala&lt;/span&gt;&lt;span class=&quot;syntax13&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;
&lt;span class=&quot;gutter&quot;&gt;   8:&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;langs.&lt;span class=&quot;syntax6&quot;&gt;add&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;syntax13&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;syntax13&quot;&gt;Ruby&lt;/span&gt;&lt;span class=&quot;syntax13&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;
&lt;span class=&quot;gutter&quot;&gt;   9:&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;gutterH&quot;&gt;  10:&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;syntax8&quot;&gt;final&lt;/span&gt; String msg &lt;span class=&quot;syntax18&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;syntax13&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;syntax13&quot;&gt;Got&lt;/span&gt;&lt;span class=&quot;syntax13&quot;&gt; &lt;/span&gt;&lt;span class=&quot;syntax13&quot;&gt;ya&lt;/span&gt;&lt;span class=&quot;syntax13&quot;&gt;&amp;quot;&lt;/span&gt;;&lt;br /&gt;
&lt;span class=&quot;gutter&quot;&gt;  11:&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;langs.&lt;span class=&quot;syntax6&quot;&gt;each&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;syntax8&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;syntax6&quot;&gt;HandleAll&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;syntax18&quot;&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;gutter&quot;&gt;  12:&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;syntax8&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;syntax10&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;syntax6&quot;&gt;handle&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;(&lt;/span&gt;String s&lt;span class=&quot;syntax18&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;syntax18&quot;&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;gutter&quot;&gt;  13:&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;System.out.&lt;span class=&quot;syntax6&quot;&gt;println&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;(&lt;/span&gt;msg &lt;span class=&quot;syntax18&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;syntax13&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;syntax13&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;syntax13&quot;&gt; &lt;/span&gt;&lt;span class=&quot;syntax13&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;syntax13&quot;&gt;&amp;quot;&lt;/span&gt; &lt;span class=&quot;syntax18&quot;&gt;+&lt;/span&gt; s &lt;span class=&quot;syntax18&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;syntax13&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;syntax13&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;syntax13&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;
&lt;span class=&quot;gutter&quot;&gt;  14:&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;syntax18&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;gutterH&quot;&gt;  15:&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;syntax18&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;
&lt;span class=&quot;gutter&quot;&gt;  16:&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;syntax18&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;gutter&quot;&gt;  17:&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;gutter&quot;&gt;  18:&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;gutter&quot;&gt;  19:&lt;/span&gt;&lt;span class=&quot;syntax10&quot;&gt;class&lt;/span&gt; MyList &lt;span class=&quot;syntax8&quot;&gt;extends&lt;/span&gt; LinkedList&lt;span class=&quot;syntax18&quot;&gt;&amp;lt;&lt;/span&gt;String&lt;span class=&quot;syntax18&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;syntax18&quot;&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;gutterH&quot;&gt;  20:&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;syntax10&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;syntax6&quot;&gt;each&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;(&lt;/span&gt;HandleAll handler&lt;span class=&quot;syntax18&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;syntax18&quot;&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;gutter&quot;&gt;  21:&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;syntax8&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;syntax18&quot;&gt;(&lt;/span&gt;String s : &lt;span class=&quot;syntax14&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;syntax18&quot;&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;gutter&quot;&gt;  22:&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;handler.&lt;span class=&quot;syntax6&quot;&gt;handle&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;(&lt;/span&gt;s&lt;span class=&quot;syntax18&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;
&lt;span class=&quot;gutter&quot;&gt;  23:&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;syntax18&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;gutter&quot;&gt;  24:&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;syntax18&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;gutterH&quot;&gt;  25:&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;gutter&quot;&gt;  26:&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;gutter&quot;&gt;  27:&lt;/span&gt;&lt;span class=&quot;syntax10&quot;&gt;interface&lt;/span&gt; HandleAll &lt;span class=&quot;syntax18&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;syntax10&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;syntax6&quot;&gt;handle&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;(&lt;/span&gt;String s&lt;span class=&quot;syntax18&quot;&gt;)&lt;/span&gt;; &lt;span class=&quot;syntax18&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;
&lt;p&gt;
Back on 2004, Fowler said &lt;a href=&quot;http://martinfowler.com/bliki/Closure.html&quot;&gt;about closures&lt;/a&gt;:
&lt;/p&gt;
&lt;blockquote&gt;
So the first crucial point about closures is that they are a block of code plus the bindings to the environment they came from. This is the formal thing that sets closures apart from function pointers and similar techniques.(Java&apos;s anonymous inner classes can access locals - but only if they are final.)
&lt;/blockquote&gt;
&lt;p&gt;
As we can see on lines 10 and 13 our method being sent to the each operation is capable of accessing a local variable (marked as final though). Of course, closures should be much more easy to manually write, that&apos;s half of their strengh. 
&lt;/p&gt;
&lt;p&gt;
This is again, just to exemplify the concept, even so, anonymous inner classes are extremely handy in the absence of &quot;normal&quot; closures backed up by good syntax sugar.
&lt;/p&gt;
&lt;p&gt;
&lt;em&gt;(*) Extending LinkedList is not encourage, but this is just to make the example simpler&lt;/em&gt;
&lt;p&gt;
&lt;em&gt;(**) In favour of Java I can say that free IDEs like Eclipse can generate all this verbose code with a few keystrokes (and programmers are more than used to that with their editors, hehe). Hence, leaving us the the best of both worlds, closures but still all the good side of static typing, like safe automated refactorings. And the chances you to be using already a IDE for Java development are rocket high...
&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;
&lt;em&gt;(***) Closures are much more pleasant with proper syntax sugar, there&apos;s no way do deni it.
&lt;/em&gt;&lt;/p&gt;
&lt;/p&gt;</description>
  <comments>http://bpfurtado.livejournal.com/61612.html</comments>
  <category>closures</category>
  <category>java</category>
  <category>fowler</category>
  <lj:security>public</lj:security>
  <lj:reply-count>10</lj:reply-count>
</item>
<item>
  <guid isPermaLink='true'>http://bpfurtado.livejournal.com/61319.html</guid>
  <pubDate>Thu, 21 May 2009 23:53:30 GMT</pubDate>
  <title>Java.has(&quot;duck typing&quot;); //yet, too verbose</title>
  <link>http://bpfurtado.livejournal.com/61319.html</link>
  <description>&lt;p&gt;I&apos;m sure I&apos;m not the first to blog this but let&apos;s go: This simple example shows how we can have the &lt;a href=&quot;http://en.wikipedia.org/wiki/Duck_typing&quot;&gt;Duck Typing&lt;/a&gt; effect using &lt;a href=&quot;http://java.sun.com/javase/6/docs/technotes/guides/reflection/index.html&quot;&gt;reflection&lt;/a&gt; on the Java platform:&lt;/p&gt; &lt;div style=&quot;background: #cccccc; font-family: Courier new; font-size: small&quot;&gt;&lt;span class=&quot;syntax0&quot;&gt;&lt;span class=&quot;gutter&quot;&gt;   1:&lt;/span&gt;&lt;span class=&quot;syntax9&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;syntax8&quot;&gt;static&lt;/span&gt; java.lang.System.out;&lt;br /&gt; &lt;span class=&quot;gutter&quot;&gt;   2:&lt;/span&gt;&lt;br /&gt; &lt;span class=&quot;gutter&quot;&gt;   3:&lt;/span&gt;&lt;span class=&quot;syntax8&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;syntax10&quot;&gt;class&lt;/span&gt; VerboseButStillDuckTyping&lt;br /&gt; &lt;span class=&quot;gutter&quot;&gt;   4:&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;{&lt;/span&gt;&lt;br /&gt; &lt;span class=&quot;gutterH&quot;&gt;   5:&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;syntax8&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;syntax8&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;syntax10&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;syntax6&quot;&gt;main&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;(&lt;/span&gt;String[] args&lt;span class=&quot;syntax18&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;syntax8&quot;&gt;throws&lt;/span&gt; Exception&lt;br /&gt; &lt;span class=&quot;gutter&quot;&gt;   6:&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;syntax18&quot;&gt;{&lt;/span&gt;&lt;br /&gt; &lt;span class=&quot;gutter&quot;&gt;   7:&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;syntax6&quot;&gt;quack&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;syntax8&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;syntax6&quot;&gt;WoodDuck&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;)&lt;/span&gt;;&lt;br /&gt; &lt;span class=&quot;gutter&quot;&gt;   8:&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;syntax6&quot;&gt;quack&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;syntax8&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;syntax6&quot;&gt;Object&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;)&lt;/span&gt;;&lt;br /&gt; &lt;span class=&quot;gutter&quot;&gt;   9:&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;syntax18&quot;&gt;}&lt;/span&gt;&lt;br /&gt; &lt;span class=&quot;gutterH&quot;&gt;  10:&lt;/span&gt;&lt;br /&gt; &lt;span class=&quot;gutter&quot;&gt;  11:&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;syntax8&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;syntax10&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;syntax6&quot;&gt;quack&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;(&lt;/span&gt;Object obj&lt;span class=&quot;syntax18&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;syntax8&quot;&gt;throws&lt;/span&gt; Exception&lt;br /&gt; &lt;span class=&quot;gutter&quot;&gt;  12:&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;syntax18&quot;&gt;{&lt;/span&gt;&lt;br /&gt; &lt;span class=&quot;gutter&quot;&gt;  13:&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Duck.&lt;span class=&quot;syntax10&quot;&gt;class&lt;/span&gt;.&lt;span class=&quot;syntax6&quot;&gt;getMethod&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;syntax13&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;syntax13&quot;&gt;quack&lt;/span&gt;&lt;span class=&quot;syntax13&quot;&gt;&amp;quot;&lt;/span&gt;, &lt;span class=&quot;syntax14&quot;&gt;null&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;)&lt;/span&gt;.&lt;span class=&quot;syntax6&quot;&gt;invoke&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;(&lt;/span&gt;obj, &lt;span class=&quot;syntax14&quot;&gt;null&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;)&lt;/span&gt;;&lt;br /&gt; &lt;span class=&quot;gutter&quot;&gt;  14:&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;syntax18&quot;&gt;}&lt;/span&gt;&lt;br /&gt; &lt;span class=&quot;gutterH&quot;&gt;  15:&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;}&lt;/span&gt;&lt;br /&gt; &lt;span class=&quot;gutter&quot;&gt;  16:&lt;/span&gt;&lt;br /&gt; &lt;span class=&quot;gutter&quot;&gt;  17:&lt;/span&gt;&lt;span class=&quot;syntax10&quot;&gt;interface&lt;/span&gt; Duck &lt;span class=&quot;syntax18&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;syntax10&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;syntax6&quot;&gt;quack&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;)&lt;/span&gt;; &lt;span class=&quot;syntax18&quot;&gt;}&lt;/span&gt;&lt;br /&gt; &lt;span class=&quot;gutter&quot;&gt;  18:&lt;/span&gt;&lt;br /&gt; &lt;span class=&quot;gutter&quot;&gt;  19:&lt;/span&gt;&lt;span class=&quot;syntax10&quot;&gt;class&lt;/span&gt; WoodDuck &lt;span class=&quot;syntax8&quot;&gt;implements&lt;/span&gt; Duck&lt;br /&gt; &lt;span class=&quot;gutterH&quot;&gt;  20:&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;{&lt;/span&gt;&lt;br /&gt; &lt;span class=&quot;gutter&quot;&gt;  21:&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;syntax8&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;syntax10&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;syntax6&quot;&gt;quack&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;syntax18&quot;&gt;{&lt;/span&gt; out.&lt;span class=&quot;syntax6&quot;&gt;println&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;syntax13&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;syntax13&quot;&gt;Quaaack!&lt;/span&gt;&lt;span class=&quot;syntax13&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;)&lt;/span&gt;; &lt;span class=&quot;syntax18&quot;&gt;}&lt;/span&gt;&lt;br /&gt; &lt;span class=&quot;gutter&quot;&gt;  22:&lt;/span&gt;&lt;span class=&quot;syntax18&quot;&gt;} &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;Above we are invoking the quack method on two references, one that has the needed implementation and the other which does not have. As expected the second invocation raises an runtime error, as with any dynamic language :-)&lt;/p&gt; &lt;p&gt;Of course this is just a proof of the concept and not what should be a regular practice on development with the Java language. This is just to remember that people very often does not proper recognize the dynamic features of the Java runtime environment.&lt;/p&gt;</description>
  <comments>http://bpfurtado.livejournal.com/61319.html</comments>
  <category>java</category>
  <category>samplecode</category>
  <category>ducktyping</category>
  <category>dynamiclanguages</category>
  <lj:security>public</lj:security>
  <lj:reply-count>2</lj:reply-count>
</item>
<item>
  <guid isPermaLink='true'>http://bpfurtado.livejournal.com/60972.html</guid>
  <pubDate>Thu, 21 May 2009 13:12:20 GMT</pubDate>
  <title>Scala creator: static typing is important &apos;in the big&apos;</title>
  <link>http://bpfurtado.livejournal.com/60972.html</link>
  <description>Martin Odersky says on &lt;a href=&quot;http://www.artima.com/scalazine/articles/scalas_type_systemP.html&quot;&gt;this interview&lt;/a&gt; that types can be really annoying for small scripts but for the other case, big systems (real production systems) the refactoring that it allows and the reliability of your code are a fair (or small) price to pay: &lt;blockquote&gt;They are probably less important when programming in the small. Types can be in a spectrum from incredibly useful to extremely annoying. Typically the annoying parts are type definitions that are redundant, which require you to do a lot of (finger) typing. The useful parts are, of course, &lt;spam style=&quot;background:yellow&quot;&gt;when types save you from errors, when types give you useful program documentation, when types act as a safety net for safe refactoring&lt;/spam&gt;.&lt;/blockquote&gt; I could not agree more, if I&apos;m doing a 50~100 lines script I&apos;m probably not using a full IDE and the Java anonymous inner class full syntax will not be generated by my jEdit (or any other text editor), so a friendly  idiom for closures are really a differential.  &lt;p&gt;At the same time I&apos;ll not need to maintain this script for months or years, or might never read it again, hence the possibility of powerful automated refactoring (that for instance IntelliJ of Eclipse provide) are not a need, like they are and we already take them for granted on regular systems that we deploy to hundreds/thousands of users.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Automated refactorings are the open gates to the easy and encouraged evolution of software code, and statically declared types are their very foundation.&lt;/strong&gt;&lt;/p&gt;</description>
  <comments>http://bpfurtado.livejournal.com/60972.html</comments>
  <category>java</category>
  <category>scala</category>
  <category>refactoring</category>
  <category>interview</category>
  <lj:security>public</lj:security>
  <lj:reply-count>1</lj:reply-count>
</item>
<item>
  <guid isPermaLink='true'>http://bpfurtado.livejournal.com/60802.html</guid>
  <pubDate>Wed, 20 May 2009 21:16:21 GMT</pubDate>
  <title>The Simplicity Pattern</title>
  <link>http://bpfurtado.livejournal.com/60802.html</link>
  <description>&lt;p&gt;&lt;strong&gt;&lt;em&gt;{title updated}&lt;/em&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;I was talking to &lt;a href=&quot;http://log4dev.com/&quot;&gt;Miguel&lt;/a&gt; about the advantages and disadvantages of the CGI way of making web apps, and had in mind the yearly years of it and how alternative solutions like Java Servets proposed a much more sophisticated way to handle the emerging web application needs. Then I stumble upon a &lt;a href=&quot;http://twitter.com/voidspace&quot;&gt;@voidspace&lt;/a&gt;&apos;s blog entry: &lt;a href=&quot;http://www.voidspace.org.uk/python/weblog/arch_d7_2006_10_07.shtml#e489&quot;&gt;Is CGI dead?&lt;/a&gt; and the argument of simplicity (as I remember Miguel rightfully pointed this also) was put on the table and I don&apos;t disagree at all with it. And interesting is to notice that even Java Servlets simplicity (although not as simple as the CGI protocol is) made it the very foundation of several other famous frameworks, which in the end do a lot of the dirty work that software developers used to have.&lt;/p&gt;&lt;p&gt;It&apos;s always the tradeoff: with a very simple (but elegant) solution you easy it&apos;s adoption, and on its solid base several other layers of software can be built, providing each one more features to the components that will lay on top.&lt;/p&gt;&lt;br /&gt;</description>
  <comments>http://bpfurtado.livejournal.com/60802.html</comments>
  <category>java</category>
  <category>devel</category>
  <category>cgi</category>
  <category>servlets</category>
  <category>web</category>
  <lj:security>public</lj:security>
  <lj:reply-count>0</lj:reply-count>
</item>
<item>
  <guid isPermaLink='true'>http://bpfurtado.livejournal.com/60622.html</guid>
  <pubDate>Fri, 08 May 2009 19:35:25 GMT</pubDate>
  <title>Java makes lambdas popular by not having them</title>
  <link>http://bpfurtado.livejournal.com/60622.html</link>
  <description>The funniest version of the &lt;a href=&quot;http://james-iry.blogspot.com/2009/05/brief-incomplete-and-mostly-wrong.html&quot;&gt;History of Programming Languages&lt;/a&gt;, just one small piece bellow:&lt;blockquote&gt;1970 - Guy Steele and Gerald Sussman create Scheme. Their work leads to a series of &amp;quot;Lambda the Ultimate&amp;quot; papers culminating in &amp;quot;Lambda the Ultimate Kitchen Utensil.&amp;quot; This paper becomes the basis for a long running, but ultimately unsuccessful run of late night infomercials. &lt;strong&gt;Lambdas are relegated to relative obscurity until Java makes them popular by not having them&lt;/strong&gt;. &lt;/blockquote&gt;  And the best: &lt;blockquote&gt; 1987 - Larry Wall falls asleep and hits Larry Wall&apos;s forehead on the keyboard. Upon waking Larry Wall decides that the string of characters on Larry Wall&apos;s monitor isn&apos;t random but an example program in a programming language that God wants His prophet, Larry Wall, to design. Perl is born.&lt;/blockquote&gt; &lt;p&gt;:D&lt;/p&gt;</description>
  <comments>http://bpfurtado.livejournal.com/60622.html</comments>
  <category>history</category>
  <category>closures</category>
  <category>java</category>
  <category>lambda</category>
  <category>fun</category>
  <lj:security>public</lj:security>
  <lj:reply-count>0</lj:reply-count>
</item>
<item>
  <guid isPermaLink='true'>http://bpfurtado.livejournal.com/60230.html</guid>
  <pubDate>Sun, 03 May 2009 15:55:34 GMT</pubDate>
  <title>Fink: A &quot;Cygwin&quot; for Mac?</title>
  <link>http://bpfurtado.livejournal.com/60230.html</link>
  <description>The port of Unix tools cygwin provides for Windows user is simply awesome, a real need for developers who use Windows nowadays. Fink seems to address the same needs for Mac OS X users: &lt;blockquote&gt;&lt;a href=&quot;http://www.finkproject.org/index.php?phpLang=en&quot;&gt; The Fink project&lt;/a&gt; wants to bring the full world of Unix Open Source software to Darwin and Mac OS X. We modify Unix software so that it compiles and runs on Mac OS X (&amp;quot;port&amp;quot; it) and make it available for download as a coherent distribution. Fink uses Debian tools like dpkg and apt-get to provide powerful binary package management. You can choose whether you want to download precompiled binary packages or build everything from source. Read more... &lt;/blockquote&gt;&lt;img alt=&quot;Fink Logo&quot; src=&quot;http://www.finkproject.org/img/mlogo.png&quot; /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br type=&quot;_moz&quot; /&gt;</description>
  <comments>http://bpfurtado.livejournal.com/60230.html</comments>
  <category>osx</category>
  <category>fink</category>
  <category>cygwin</category>
  <lj:security>public</lj:security>
  <lj:reply-count>0</lj:reply-count>
</item>
<item>
  <guid isPermaLink='true'>http://bpfurtado.livejournal.com/60157.html</guid>
  <pubDate>Wed, 29 Apr 2009 12:19:30 GMT</pubDate>
  <title>Clipping: Shakespeare on kernel commits</title>
  <link>http://bpfurtado.livejournal.com/60157.html</link>
  <description>I saw &lt;a href=&quot;http://laforge.gnumonks.org/weblog/2009/04/28/#20090428-hemminger_shakespeare&quot;&gt;this post&lt;/a&gt; from &lt;a href=&quot;http://laforge.gnumonks.org/weblog/&quot;&gt;Harald Welte&lt;/a&gt; on Google Reader shared by &lt;a href=&quot;http://log4dev.com/&quot;&gt;Raphael&lt;/a&gt;.&lt;br /&gt;It&apos;s like Shakespeare writting a kernel commit message, very funny :-)&lt;pre style=&quot;border: thin dashed; padding: 1em 1em 1em 2em&quot;&gt;
In days of old in 2.6.29, netfilter did locketh using a 
lock of the reader kind when doing its table business, and do
a writer when with pen in hand like a overworked accountant
did replace the tables. This sucketh and caused the single
lock to fly back and forth like a poor errant boy.

But then netfilter was blessed with RCU and the performance
was divine, but alas there were those that suffered for
trying to replace their many rules one at a time.

So now RCU must be vanquished from the scene, and better
chastity belts be placed upon this valuable asset most dear.
The locks that were but one are now replaced by one per suitor.

The repair was made after much discussion involving
Eric the wise, and Linus the foul. With flowers springing
up amid the thorns some peace has finally prevailed and
all is soothed. This patch and purple prose was penned by
in honor of &amp;quot;Talk like Shakespeare&amp;quot; day.

Signed-off-by: Stephen Hemminger &lt;/pre&gt;</description>
  <comments>http://bpfurtado.livejournal.com/60157.html</comments>
  <category>blog</category>
  <category>linux</category>
  <category>kernel</category>
  <category>fun</category>
  <lj:security>public</lj:security>
  <lj:reply-count>0</lj:reply-count>
</item>
<item>
  <guid isPermaLink='true'>http://bpfurtado.livejournal.com/59790.html</guid>
  <pubDate>Tue, 28 Apr 2009 13:59:23 GMT</pubDate>
  <title>Mercurial got BigTable&apos;ed</title>
  <link>http://bpfurtado.livejournal.com/59790.html</link>
  <description>Apparently &lt;a href=&quot;http://google-code-updates.blogspot.com/2009/04/mercurial-support-for-project-hosting.html&quot;&gt;Google has it&apos;s own implementation of Mercurial&lt;/a&gt;, and it uses the famous &lt;a href=&quot;http://labs.google.com/papers/bigtable.html&quot;&gt;BigTable&lt;/a&gt; persistence mechanism. This only reinforces the fact the &lt;a href=&quot;http://maps.google.com/maps?hl=en&amp;amp;ie=UTF8&amp;amp;cid=0,0,11972054812773967638&amp;amp;fb=1&amp;amp;split=1&amp;amp;gl=us&amp;amp;dq=Mountain+View,+google&amp;amp;daddr=1600+Amphitheatre+Parkway,+Mountain+View,+CA+94043&amp;amp;geocode=6762608055434308812,37.421972,-122.084143&amp;amp;ei=1gj3SerrLouSMs-v9LQP&amp;amp;z=16&quot;&gt;Mountain View&lt;/a&gt; company has a strong &lt;em&gt;pythonic&lt;/em&gt; culture ;-)&lt;br /&gt;&lt;br /&gt;But they certainly did not choose &lt;a href=&quot;http://hgbook.red-bean.com/read/&quot;&gt;Mercurial&lt;/a&gt; because of its python roots only, they published an interesting&amp;nbsp;&lt;a href=&quot;http://code.google.com/p/support/wiki/DVCSAnalysis&quot;&gt;Analysis of Git and Mercurial&lt;/a&gt;.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;The implementation is avaiable for those who request on the &lt;a href=&quot;http://code.google.com/&quot;&gt;Google Code&lt;/a&gt; project hosting service.&lt;br /&gt;&lt;br /&gt;I&apos;m personally waiting for a great IDE&amp;nbsp;suport for these DVCSs, until that I&apos;ll probably focus on other tools/APIs/frameworks and keep using Subversion.&lt;br /&gt;&lt;br type=&quot;_moz&quot; /&gt;</description>
  <comments>http://bpfurtado.livejournal.com/59790.html</comments>
  <category>google</category>
  <category>bigtable</category>
  <category>git</category>
  <category>mercurial</category>
  <category>google-code</category>
  <lj:security>public</lj:security>
  <lj:reply-count>4</lj:reply-count>
</item>
<item>
  <guid isPermaLink='true'>http://bpfurtado.livejournal.com/59563.html</guid>
  <pubDate>Tue, 28 Apr 2009 12:41:58 GMT</pubDate>
  <title>Sun for Sale: Why Oracle makes more sense</title>
  <link>http://bpfurtado.livejournal.com/59563.html</link>
  <description>&lt;p&gt;IBM sells Hardware, an Operating System (AIX), a Database (DB2), JEE Application Server (Websphere family), a Java IDE (Based on Eclipse) a their own Java SE implementation (&lt;a href=&quot;http://en.wikipedia.org/wiki/IBM_J9&quot;&gt;J9&lt;/a&gt;).&lt;/p&gt;     &lt;p&gt;Sun &lt;em&gt;idem&lt;/em&gt;: Solaris (SO), MySQL (DB), Glassfish (JEE Stack), Netbeans (Java IDE &amp;amp; Application Platform) and the &lt;a href=&quot;http://en.wikipedia.org/wiki/HotSpot&quot;&gt;Hotspot&lt;/a&gt;.&lt;/p&gt;     &lt;p&gt;Oracle on the other side (AFAIK) doesn&apos;t sell Hardware, nor a Operating System, has Java IDE that was very late in terms of modern IDE features and also did not have a implementation of the Java SE.&lt;/p&gt;     &lt;p&gt;That said, I think the market has more to earn with Oracle buying Sun than IBM, so we don&apos;t simply loose a whole family of great products into what could be a bizarre corporate merge of them.&lt;/p&gt;&lt;p&gt;I just hope I&apos;m right.&lt;/p&gt;</description>
  <comments>http://bpfurtado.livejournal.com/59563.html</comments>
  <category>oracle</category>
  <category>sun</category>
  <category>acquisition</category>
  <category>ibm</category>
  <lj:security>public</lj:security>
  <lj:reply-count>6</lj:reply-count>
</item>
<item>
  <guid isPermaLink='true'>http://bpfurtado.livejournal.com/59292.html</guid>
  <pubDate>Tue, 28 Apr 2009 12:05:34 GMT</pubDate>
  <title>market.add(new IBM.Mistake());</title>
  <link>http://bpfurtado.livejournal.com/59292.html</link>
  <description>Some highlights on: &lt;a href=&quot;http://news.zdnet.com/2100-9595_22-290845.html&quot;&gt;Sun-Oracle FAQ: Did IBM make a big mistake?&lt;/a&gt;:         &lt;blockquote&gt;             &amp;quot;[The acquisition] isolates IBM straight away because IBM didn&apos;t buy Sun. &lt;strong&gt;Two weeks ago IBM could have dominated nearly two-thirds of the Unix market and this week they&apos;ll be lucky to dominate a third of it&lt;/strong&gt;. IBM missed the boat here. I think Solaris is a real threat here for IBM,&amp;quot; Gartner&apos;s Dawson said.         &lt;/blockquote&gt;         &lt;blockquote&gt;             Research firm Technology Business Research (TBR) said in a note: &amp;quot;&lt;strong&gt;Oracle may spin off or sell off some parts of Sun&amp;rsquo;s hardware and software business following the acquisition. Likely purchasers of Sun&apos;s hardware business include Fujitsu, EMC, Dell and HP.&lt;/strong&gt;&amp;quot;         &lt;/blockquote&gt;         &lt;blockquote&gt;             Ovum&apos;s Mitchell said: &amp;quot;&lt;strong&gt;The market&apos;s really condensing into four large players at the moment - IBM, HP, Microsoft and Oracle&lt;/strong&gt;, after this acquisition, are really the largest around. It&apos;s moving [Oracle] into that category.&amp;quot;         &lt;/blockquote&gt;&lt;p&gt;I have sent this by email to some friends last week and got very interesting replies,&amp;nbsp;I guess I&amp;nbsp;should have posted it here from the start&amp;nbsp;:-)&lt;/p&gt;</description>
  <comments>http://bpfurtado.livejournal.com/59292.html</comments>
  <category>news</category>
  <category>oracle</category>
  <category>sun</category>
  <category>acquisition</category>
  <category>ibm</category>
  <lj:security>public</lj:security>
  <lj:reply-count>0</lj:reply-count>
</item>
<item>
  <guid isPermaLink='true'>http://bpfurtado.livejournal.com/59028.html</guid>
  <pubDate>Sun, 22 Mar 2009 19:16:35 GMT</pubDate>
  <title>Framework/API Main Goal: Reuse</title>
  <link>http://bpfurtado.livejournal.com/59028.html</link>
  <description>The main goals of the &lt;a href=&quot;http://www.opensymphony.com/webwork/&quot;&gt;WebWork Framework&lt;/a&gt; depicted on the &lt;a href=&quot;http://en.wikipedia.org/wiki/WebWork&quot;&gt;Wikipedia&apos;s article&lt;/a&gt;: &lt;blockquote&gt;     &lt;ol&gt;         &lt;li&gt;Web Designer never has to touch Java code;&lt;/li&gt;         &lt;li&gt;Create multiple &amp;quot;Web Skins&amp;quot; for a application;&lt;/li&gt;         &lt;li&gt;Change Look and Feel;&lt;/li&gt;         &lt;li&gt;Change Layout on a given Web Page;&lt;/li&gt;         &lt;li&gt;Change Flow among Web Pages;&lt;/li&gt;         &lt;li&gt;Move *existing* data elements from one page to another;&lt;/li&gt;         &lt;li&gt;Integrate with various backend infrastructures;&lt;/li&gt;         &lt;li&gt;Reuse components;&lt;/li&gt;         &lt;li&gt;Perform internationalization (i18n) of a web application;&lt;/li&gt;         &lt;li&gt;Keep the API small and to the point;&lt;/li&gt;         &lt;li&gt;Ability to learn WebWork fast, by making all the fancier features optional;&lt;/li&gt;         &lt;li&gt;Allow the developer to choose how to implement as much as possible, while providing default implementations that work well in most cases [1];&lt;/li&gt;     &lt;/ol&gt;&lt;/blockquote&gt; &lt;p&gt;I&apos;m not sure if the order on the list above reflects the priority but if so I would strongly use the items from 8 until 12 as the first top one priorities:&lt;/p&gt; &lt;ol&gt;     &lt;li&gt;&lt;strong&gt;Reuse components&lt;/strong&gt;;&lt;/li&gt;     &lt;li&gt;&lt;strong&gt;Keep the API small and to the point&lt;/strong&gt;;&lt;/li&gt;     &lt;li&gt;&lt;strong&gt;Ability to learn &lt;em&gt;&amp;lt;YOUR FRAMEWORK/API NAME HERE&amp;gt;&lt;/em&gt; fast&lt;/strong&gt;, by making all the fancier features optional;&lt;/li&gt;     &lt;li&gt;&lt;strong&gt;Allow the developer to choose how to implement as much as possible&lt;/strong&gt;, while providing default implementations that work well in most cases [1];&lt;/li&gt;     &lt;li&gt;Perform internationalization (i18n) of a web application;&lt;/li&gt; &lt;/ol&gt; &lt;p&gt;An the last item is for certain one of the main strengths of the &lt;a href=&quot;http://www.springsource.org/&quot;&gt;Springframework&lt;/a&gt;, as well as the terrific usage of Object Oriented advantages as &lt;a href=&quot;http://en.wikipedia.org/wiki/Polymorphism_in_object-oriented_programming&quot;&gt;Polymorphism&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;&lt;em&gt;I stumble upon this WebWork article because a tool I&apos;m using for the past months makes some use of it :)&lt;/em&gt;&lt;/p&gt;</description>
  <comments>http://bpfurtado.livejournal.com/59028.html</comments>
  <category>design</category>
  <category>api</category>
  <category>framework</category>
  <category>webwork</category>
  <lj:security>public</lj:security>
  <lj:reply-count>0</lj:reply-count>
</item>
<item>
  <guid isPermaLink='true'>http://bpfurtado.livejournal.com/58840.html</guid>
  <pubDate>Mon, 02 Mar 2009 19:21:19 GMT</pubDate>
  <title>{Ballmer: Linux &amp;gt; Apple} and {Safari 4}!</title>
  <link>http://bpfurtado.livejournal.com/58840.html</link>
  <description>My 2 cents of clipping today ;-)&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;http://www.osnews.com/story/21035/Ballmer_Linux_Bigger_Competitor_than_Apple&quot;&gt;Ballmer: Linux Bigger Competitor than Apple&lt;/a&gt;;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;http://www.osnews.com/story/21030/Safari_4_Beta_Apple_Leap-Frog_Google&quot;&gt;Apple released the first beta release of Safari 4&lt;/a&gt;.&lt;/li&gt;&lt;/ul&gt;So people don&apos;t think I have abandoned this beloved blog of mine :D&lt;br type=&quot;_moz&quot; /&gt;Both links are on my not so active &lt;a href=&quot;http://twitter.com/bpfurtado&quot;&gt;twitter&lt;/a&gt; too ;)&lt;br type=&quot;_moz&quot; /&gt;</description>
  <comments>http://bpfurtado.livejournal.com/58840.html</comments>
  <category>apple</category>
  <category>safari</category>
  <category>microsoft</category>
  <category>linux</category>
  <category>browser</category>
  <lj:security>public</lj:security>
  <lj:reply-count>0</lj:reply-count>
</item>
<item>
  <guid isPermaLink='true'>http://bpfurtado.livejournal.com/58396.html</guid>
  <pubDate>Fri, 14 Nov 2008 13:41:27 GMT</pubDate>
  <title>JVM.scale(Ruby.app)</title>
  <link>http://bpfurtado.livejournal.com/58396.html</link>
  <description>Could the Java Platform be the a major helper in order to help Ruby apps to scale more easily? &lt;blockquote&gt; &lt;a href=&quot;http://java.sun.com/developer/technicalArticles/Interviews/jvmsummitnutter/index.html&quot;&gt;Ruby and JRuby still generate a lot of enthusiasm&lt;/a&gt;. More and more Ruby programmers are looking at JRuby as their Ruby projects mature &amp;mdash; when they move into heavier loads, larger systems, more cores, more processors. Most significantly, as Ruby development branches out into larger enterprises where deployment on Java servers is important, JRuby is seen as the solution. &lt;/blockquote&gt; &lt;blockquote&gt; A less obvious advantage to &lt;strong&gt;JRuby is that it may already be a better Ruby implementation&lt;/strong&gt;. Certainly that&apos;s where it&apos;s headed &amp;mdash; faster, better use of memory, better use of resources. Many Ruby programmers are starting to see these advantages. &lt;/blockquote&gt; &lt;blockquote&gt; So, people are beginning to understand that whether it&apos;s based on Java or the standard implementation, &lt;strong&gt;JRuby is better at handling resources, better at taking advantage of multi-core processors&lt;/strong&gt;, and so on. This is the impetus for people to try JRuby, and to stay with it once they&apos;ve tried it. &lt;/blockquote&gt;It&apos;s really sad that most people simply ignore the fact that the Java Virtual Machine supports multiple language for so many years now. &lt;br /&gt;&lt;br /&gt;The Java VM is multi language since its conception, as its runs above the called Java &lt;em&gt;bytecodes &lt;/em&gt;which is the needed layer of indirection between it&apos;s languages and the VM, with the compilers the actors needed to fill in the gap.&lt;br /&gt;&lt;br /&gt;Many years before now we could play with so many languages that compiled to the JVM. I&amp;nbsp;hope JRuby and JPython communities keep up with their great work a take advantage of such mature and sophisticated JVMs we have&amp;nbsp;(available for free) nowadays!&lt;br /&gt;&lt;p&gt;&lt;/p&gt;</description>
  <comments>http://bpfurtado.livejournal.com/58396.html</comments>
  <category>java</category>
  <category>jruby</category>
  <category>ruby</category>
  <category>java.sun.com</category>
  <category>interview</category>
  <lj:security>public</lj:security>
  <lj:reply-count>0</lj:reply-count>
</item>
<item>
  <guid isPermaLink='true'>http://bpfurtado.livejournal.com/58142.html</guid>
  <pubDate>Tue, 04 Nov 2008 12:45:45 GMT</pubDate>
  <title>Over-Documentation over Communication</title>
  <link>http://bpfurtado.livejournal.com/58142.html</link>
  <description>&lt;p&gt;On the last days I decided to put on my radar more readings about software development methodologies, more specifically &lt;a href=&quot;http://en.wikipedia.org/wiki/SCRUM&quot;&gt;Scrum&lt;/a&gt;, as my friend &lt;a href=&quot;http://dserodio.tumblr.com&quot;&gt;Serodio&lt;/a&gt; told about a course he&apos;s planning to attend.&lt;/p&gt;         &lt;p&gt;Looking for a good comparison between RUP and Scrum I quickly found this small blog entry with the experience &lt;a href=&quot;http://bloggingabout.net/blogs/dennis/&quot;&gt;Dennis var der Stelt&lt;/a&gt;.&lt;/p&gt;         &lt;p&gt;&lt;a href=&quot;http://bloggingabout.net/blogs/dennis/archive/2005/04/20/agile-vs-rup.aspx&quot;&gt;The post&lt;/a&gt; is pretty old (from our industry point of view at least ;) but nevertheless interesting:&lt;/p&gt;         &lt;blockquote&gt;             I have the feeling Agile development can better understand and react to what the customers needs, not what he thinks he wants. That comes to show in &lt;a href=&quot;http://bloggingabout.net/blogs/dennis/file/projectswing.jpg&quot;&gt;this funny picture of a swing&lt;/a&gt;.&lt;br /&gt;              It&apos;s funny to see how everyone within a project has (or can have) a different view on the swing. I think it&apos;s hard to get the same swing in every picture.&lt;br /&gt;              ...              &lt;br /&gt;             To get the same picture in how a customer explains it and what a customer really needed, &lt;em&gt;you need good iterations and a lot of communication&lt;/em&gt;. &lt;strong&gt;For some reason, I have the feeling communication in RUP is more through documents where as in Agile it&apos;s face to face communication between the customer and the entire team. And I think that&apos;s an important difference.&lt;/strong&gt;         &lt;/blockquote&gt;&lt;br /&gt;</description>
  <comments>http://bpfurtado.livejournal.com/58142.html</comments>
  <category>requirements_engineering</category>
  <category>scrum</category>
  <category>methodology</category>
  <category>rup</category>
  <lj:security>public</lj:security>
  <lj:reply-count>3</lj:reply-count>
</item>
<item>
  <guid isPermaLink='true'>http://bpfurtado.livejournal.com/57887.html</guid>
  <pubDate>Thu, 23 Oct 2008 00:48:09 GMT</pubDate>
  <title>svn co apache-wicket; mvn install; works!</title>
  <link>http://bpfurtado.livejournal.com/57887.html</link>
  <description>Reading the first chapter of the &amp;quot;&lt;a href=&quot;http://www.sonatype.com/community/definitive_guide.html&quot;&gt;Maven: The Definitive Guide&lt;/a&gt;&amp;quot; book I took the challenge:  &lt;blockquote&gt; When you see that a project like &lt;a href=&quot;http://wicket.apache.org/&quot;&gt;Apache Wicket&lt;/a&gt; uses Maven, you can assume that you&apos;ll be able to check it out from source and build it with mvn install without much hassle. &lt;/blockquote&gt;So I&amp;nbsp;did downloaded the &lt;a href=&quot;http://wicket.apache.org/building-from-svn.html&quot;&gt;source code of Wicket&lt;/a&gt; and &lt;em&gt;mavened&lt;/em&gt; it:&amp;nbsp;&lt;code&gt;mvn install&lt;/code&gt;;&lt;pre&gt;
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] ------------------------------------------------------------------------
[INFO] Wicket Parent ......................................... SUCCESS [1:07.896s]
[INFO] Wicket ................................................ SUCCESS [2:44.671s]
[INFO] Wicket Date/Time ...................................... SUCCESS [15.380s]
[INFO] Wicket Extensions ..................................... SUCCESS [12.289s]
[INFO] Wicket IoC common code ................................ SUCCESS [9.690s]
[INFO] Wicket Spring Integration ............................. SUCCESS [16.648s]
[INFO] Wicket Velocity ....................................... SUCCESS [3.336s]
[INFO] Wicket Auth Roles ..................................... SUCCESS [4.665s]
[INFO] Wicket Guice Integration .............................. SUCCESS [8.259s]
[INFO] Wicket JMX ............................................ SUCCESS [2.217s]
[INFO] Wicket Objects Sizeof Agent ........................... SUCCESS [1.063s]
[INFO] Wicket Examples ....................................... SUCCESS [1:39.868s]
[INFO] Wicket Quickstart Archetype ........................... SUCCESS [37.774s]
[INFO] Wicket Thread Test .................................... SUCCESS [10.396s]
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 7 minutes 39 seconds
[INFO] Finished at: Wed Oct 22 22:35:52 BRST 2008
[INFO] Final Memory: 29M/63M
[INFO] ------------------------------------------------------------------------
&lt;/pre&gt; &lt;p&gt;It simply worked :)&lt;/p&gt;</description>
  <comments>http://bpfurtado.livejournal.com/57887.html</comments>
  <category>maven</category>
  <category>wicket</category>
  <lj:security>public</lj:security>
  <lj:reply-count>1</lj:reply-count>
</item>
<item>
  <guid isPermaLink='true'>http://bpfurtado.livejournal.com/57684.html</guid>
  <pubDate>Wed, 22 Oct 2008 23:27:26 GMT</pubDate>
  <title>A good explanation of Tail Recursion</title>
  <link>http://bpfurtado.livejournal.com/57684.html</link>
  <description>&lt;a href=&quot;http://blogs.msdn.com/chrsmith/default.aspx&quot;&gt;Chris Smith&lt;/a&gt; has a very straight forward &lt;a href=&quot;http://blogs.msdn.com/chrsmith/archive/2008/08/07/understanding-tail-recursion.aspx&quot;&gt;explanation of tail recursion&lt;/a&gt;:&lt;blockquote&gt;&lt;strong&gt;Tail Recursion is a specialized type of recursion where there is a guarantee that nothing is left to execute in the function after a recursive call.&lt;/strong&gt; In other words, the function returns the result of a recursive call.  &lt;br /&gt;&lt;br /&gt;If there is no additional instructions to execute, then there is no need to store the instruction pointer on the stack, since the only thing left to do once the recursive call exits is restore the stack. So rather than needlessly modifying the stack, &lt;strong&gt;tail calls use a GOTO statement for the recursion&lt;/strong&gt;. And once the recursion eventually succeeds the function will return to the original instruction pointer location.  &lt;/blockquote&gt;&lt;p&gt;He also uses &lt;a href=&quot;http://research.microsoft.com/fsharp/fsharp.aspx&quot;&gt;F#&lt;/a&gt; to write the sample code: &lt;q&gt;A succinct, type-inferred, expressive, efficient functional and object-oriented language for the .NET platform&lt;/q&gt;.&lt;/p&gt;</description>
  <comments>http://bpfurtado.livejournal.com/57684.html</comments>
  <category>blog</category>
  <category>.net</category>
  <category>tail</category>
  <category>recursion</category>
  <category>f#</category>
  <lj:security>public</lj:security>
  <lj:reply-count>0</lj:reply-count>
</item>
</channel>
</rss>
