<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xml:base="http://daviddossot.sys-con.com"  xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
 <title>Latest News from David Dossot</title>
 <link>http://daviddossot.sys-con.com/</link>
 <description>Latest News from David Dossot</description>
 <language>en</language>
 <copyright>Copyright 2009 Ulitzer.com</copyright>
 <generator>Ulitzer.com</generator>
 <lastBuildDate>Wed, 02 Dec 2009 12:54:57 EST</lastBuildDate>
 <docs>http://backend.userland.com/rss</docs>
 <ttl>360</ttl>
<item>
 <title>Zulu Zabbix</title>
 <link>http://daviddossot.sys-con.com/node/1187135</link>
 <description>&lt;span style=&quot;font-style: italic;&quot;&gt;I am posting this mainly for the sake of reference and, maybe, helping others with the same problem.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;If, like us, you&#039;re running the &lt;a href=&quot;http://www.zabbix.com/&quot;&gt;Zabbix&lt;/a&gt; monitoring platform in &lt;a href=&quot;http://en.wikipedia.org/wiki/Coordinated_Universal_Time&quot;&gt;Zulu time&lt;/a&gt; (aka UTC), you should have noticed a time glitch when displaying historical graphs.&lt;br /&gt;&lt;br /&gt;The cause of this problem is simple: the fancy controls in the browser-based user interface are rendered using JavaScript, hence based on the time of the machine used to browse the graphs.&lt;br /&gt;&lt;br /&gt;Though we are strict in running all our servers in Zulu time, we haven&#039;t crossed the chasm and decided to run all our workstations and the rest of our life in UTC. So here is the simple fix you can apply to &lt;span style=&quot;font-weight: bold;&quot;&gt;js/sbinit.js&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;textarea name=&quot;code&quot; class=&quot;javascript&quot;&gt;sbinit.js&lt;br /&gt;&lt;br /&gt;function datetoarray(unixtime){&lt;br /&gt;&lt;br /&gt;        var date = new Date();&lt;br /&gt;        date.setTime(unixtime*1000 + date.getTimezoneOffset() * 60000);&lt;br /&gt;&lt;br /&gt;...&lt;/textarea&gt;&lt;br /&gt;&lt;br /&gt;The idea is to simply add the local browser time offset to the Unix time. With this fix in place, you will enjoy good looking graphs and correct navigation in them.&lt;br /&gt;&lt;br /&gt;Time is really the stumbling block of software engineering...&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img width=&#039;1&#039; height=&#039;1&#039; src=&#039;https://blogger.googleusercontent.com/tracker/13243193-5699951042183400988?l=blog.dossot.net&#039;/&gt;&lt;/div&gt;&lt;p&gt;&lt;a href=&quot;http://daviddossot.sys-con.com/node/1187135&quot; target=&quot;_blank&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <pubDate>Sun, 15 Nov 2009 14:56:00 EST</pubDate>
 <guid isPermaLink="true">http://daviddossot.sys-con.com/node/1187135</guid>
 <comments>http://daviddossot.sys-con.com/node/1187135#feedback</comments>
</item>
<item>
 <title>Meeedia Playeeer</title>
 <link>http://daviddossot.sys-con.com/node/1183335</link>
 <description>I&#039;ve been caressing the idea to buy a Wi-Fi enabled media player in order to tap into the gigabytes of (legal) music that sits in my NAS. I&#039;ve considered investing into a &lt;a href=&quot;http://www.logitechsqueezebox.com/&quot;&gt;Logitech Squeezebox&lt;/a&gt;, or a similar product, but I wasn&#039;t sure such a device would be able to play directly from an NFS share, without any music server running somewhere.&lt;br /&gt;&lt;br /&gt;Just when I started to consider building a player out of a &lt;a href=&quot;http://www.marvell.com/products/embedded_processors/developer/kirkwood/sheevaplug.jsp&quot;&gt;SheevaPlug&lt;/a&gt;, I remembered of the ultimate source of cheap hardware, ready to be repurposed: eBay. $125 and a few days later I had a like-new black &lt;a href=&quot;http://en.wikipedia.org/wiki/ASUS_Eee_PC&quot;&gt;Asus &lt;span class=&quot;il&quot;&gt;Eee&lt;/span&gt; &lt;span class=&quot;il&quot;&gt;PC&lt;/span&gt; 2G Surf&lt;/a&gt; waiting to be turned into a music player.&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://ecx.images-amazon.com/images/I/41KtCeuJNSL.jpg&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 300px; height: 300px;&quot; src=&quot;http://ecx.images-amazon.com/images/I/41KtCeuJNSL.jpg&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;The unit came with Ubuntu Eee Hardy Heron on it and only 50MB of free space left on its 2GB solid state drive. After a merciless review of all the installed applications, I ended up with 200 MB of free space, ready to host a music player.&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://bp1.blogger.com/_sNJ6915d4oc/SE5xAdcQ86I/AAAAAAAADAw/7PlnqVBZgiU/s200/ubuntu+eee.jpg&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 135px; height: 135px;&quot; src=&quot;http://bp1.blogger.com/_sNJ6915d4oc/SE5xAdcQ86I/AAAAAAAADAw/7PlnqVBZgiU/s200/ubuntu+eee.jpg&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;Finding the right music player was no small feat.&lt;br /&gt;&lt;br /&gt;I really enjoy &lt;a href=&quot;http://audacious-media-player.org/&quot;&gt;Audacious&lt;/a&gt; on my work laptop because it&#039;s plain simple and is able to play music directly from an NFS mount without any glitch. But it lacks an integrated library manager, which is a must for any software powering a machine dedicated to playing music.&lt;br /&gt;&lt;br /&gt;So I went on trying all the players with integrated music library manager I could find in the Heron standard software repository  (I won&#039;t quote names because most of these applications have now better versions available). All of them were suffering from multiple woes rooted in their bad handling of network fluctuations. The most common issue was a too short not-configurable music buffer, leading to broken music replay. The worst issue was with a library manager that was not only taking ages to scan my 16+GB of music but also, on the first network glitch, would start to delete songs, one by one, from the partial library it had created (&lt;span style=&quot;font-style: italic;&quot;&gt;talk about defensive programming gone bad&lt;/span&gt;).&lt;br /&gt;&lt;br /&gt;So I ended up installing &lt;a href=&quot;http://amarok.kde.org/&quot;&gt;Amarok&lt;/a&gt;. The reason why I didn&#039;t immediately install it, knowing it has been my favorite player for all the time I was on Kubuntu (until the KDE 4 debacle), is its sheer size. It&#039;s a 120 MB install and on an almost full drive it didn&#039;t feel like a good idea to try it first.&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://digitizor.com/wp-content/uploads/2009/09/amarok-logo.jpg&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 132px; height: 132px;&quot; src=&quot;http://digitizor.com/wp-content/uploads/2009/09/amarok-logo.jpg&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;This turned out to be the perfect match! Not only Amarok plays music from my NFS mount without a glitch, but its music library is totally unaffected by disturbance in the Wi-Fi signal.&lt;br /&gt;&lt;br /&gt;All in all, my Eee Music Player is doing great. It only takes a few seconds to be resurrected after being suspended and music starts playing soon after.&lt;br /&gt;&lt;br /&gt;Do you think repurposing full fledged computers into single application hosts is a crazy idea? Is it something you&#039;ve considered or done already?&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img width=&#039;1&#039; height=&#039;1&#039; src=&#039;https://blogger.googleusercontent.com/tracker/13243193-6039800931844670022?l=blog.dossot.net&#039;/&gt;&lt;/div&gt;&lt;p&gt;&lt;a href=&quot;http://daviddossot.sys-con.com/node/1183335&quot; target=&quot;_blank&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <pubDate>Wed, 11 Nov 2009 14:51:00 EST</pubDate>
 <guid isPermaLink="true">http://daviddossot.sys-con.com/node/1183335</guid>
 <comments>http://daviddossot.sys-con.com/node/1183335#feedback</comments>
</item>
<item>
 <title>Software Manifestos: A Matter Of Trust?</title>
 <link>http://daviddossot.sys-con.com/node/1167188</link>
 <description>As software manifestos have started to proliferate these past months, I have started to wonder what could be the root cause for their creation. Why would thought leaders gather, assert a small set of values and shrink-wrap them as a manifesto, calling for others to sign it? My feeling is that these manifestos are the expression of a pushback on a particular aspect of software development that went insane.&lt;br /&gt;&lt;br /&gt;Here is a little game: match the manifestos with the software insanities they push back on:&lt;br /&gt;&lt;br /&gt;&lt;table style=&quot;text-align: left; margin-left: auto; margin-right: auto;&quot; class=&quot;&quot; id=&quot;mg6z&quot; width=&quot;60%&quot; border=&quot;1&quot; bordercolor=&quot;#000000&quot; cellpadding=&quot;3&quot; cellspacing=&quot;0&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot; width=&quot;33.333333333333336%&quot;&gt;Big methodology and design up-front&lt;/td&gt;&lt;td style=&quot;text-align: center;&quot; bgcolor=&quot;#cccccc&quot;&gt;&lt;br /&gt;&lt;/td&gt;&lt;td style=&quot;text-align: center;&quot; width=&quot;33.333333333333336%&quot;&gt;&lt;a href=&quot;http://manifesto.softwarecraftsmanship.org/main&quot;&gt;Software craftsmanship manifesto&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot; width=&quot;33.333333333333336%&quot;&gt;Army of flying monkeys testing&lt;br /&gt;&lt;/td&gt;&lt;td style=&quot;text-align: center;&quot; bgcolor=&quot;#cccccc&quot;&gt;&lt;br /&gt;&lt;/td&gt;&lt;td style=&quot;text-align: center;&quot; width=&quot;33.333333333333336%&quot;&gt;&lt;a href=&quot;http://agilemanifesto.org/&quot;&gt;Agile manifesto&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot; width=&quot;33.333333333333336%&quot;&gt;Snake-oil vendors and ivory tower architecture&lt;/td&gt;&lt;td style=&quot;text-align: center;&quot; bgcolor=&quot;#cccccc&quot;&gt;&lt;br /&gt;&lt;/td&gt;&lt;td style=&quot;text-align: center;&quot; width=&quot;33.333333333333336%&quot;&gt;&lt;a title=&quot;QA manifesto&quot; href=&quot;http://www.gilb.com/Real+QA+Manifesto&quot; id=&quot;l7nf&quot;&gt;QA manifesto&lt;/a&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot; width=&quot;33.333333333333336%&quot;&gt;Reckless programmers and incompetent coders&lt;/td&gt;&lt;td style=&quot;text-align: center;&quot; bgcolor=&quot;#cccccc&quot;&gt;&lt;br /&gt;&lt;/td&gt;&lt;td style=&quot;text-align: center;&quot; width=&quot;33.333333333333336%&quot;&gt;&lt;a href=&quot;http://soa-manifesto.org/&quot;&gt;SOA manifesto&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;(One manifesto I see missing here is the &quot;recruiter manifesto&quot;, which should push back on inane keyword-driven head hunting schemes solely able to put the wrong people at the wrong spots)&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;If we dig deeper, we become tempted to ask why is our industry suffering from such insanities? What does make software different? Could it be because of complexity?&lt;br /&gt;&lt;br /&gt;&lt;i&gt;&lt;/i&gt;&lt;blockquote&gt;&lt;i&gt;Complexity. Software entities are more complex for their size than perhaps any other human construct because no two parts are alike (at least above the statement level). If they are, we make the two similar parts into a subroutine--open or closed. In this respect, software systems differ profoundly from computers, buildings, or automobiles, where repeated elements abound.&lt;br /&gt;&lt;/i&gt;&lt;div style=&quot;text-align: right;&quot;&gt;Frederick P. Brooks, Jr., &lt;a title=&quot;No Silver Bullet&quot; href=&quot;http://www.virtualschool.edu/mon/SoftwareEngineering/BrooksNoSilverBullet.html&quot; id=&quot;rbcx&quot;&gt;No Silver Bullet&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;  &lt;/blockquote&gt;&lt;br /&gt;The natural reaction to complexity is to try to escape it at all cost, even if it means wilfully practising self-deception. Hence silver bullets, hence snake oil vendors, hence all these methodologies, governance committees and ivory towers that are there to nurse the insecurity of higher levels of management by giving them the impression software creation is under control and, finally, &lt;i&gt;out of the hands of programmers&lt;/i&gt;.&lt;br /&gt;&lt;br /&gt;Of course, it doesn&#039;t work that way: years and millions of dollars later, reality comes knocking at the door, manifestos are getting written and everyone is sent back to the same fundamental question they&#039;ve been trying so hard to avoid: &lt;i&gt;how to build trust in software developers&lt;/i&gt;?&lt;br /&gt;&lt;br /&gt;And that&#039;s of course a question for us, software developers. How can we build such a trust in us when so many forces are pushing towards the opposite?&lt;br /&gt;&lt;br /&gt;Granted that software development is unpredictably complex and that this complexity reveals itself when the devil shows up (those pesky &lt;i&gt;details&lt;/i&gt;), it is clear that &lt;i&gt;the overall battle of trust is fought during each decision, when tackling each detail and writing each line of code&lt;/i&gt;.&lt;br /&gt;&lt;br /&gt;I think we could learn a few lessons from the world of aviation, where trust in pilots has been built progressively and methodically. When you fly an airplane, you have plenty of decisions to make and losing any of these battles can end up very badly for everyone. So why are pilots trusted? Aren&#039;t they fully superseded by ATC anyway? Answer is no: even if ATC has authority, the PIC (Pilot In Command) has the last word because he is the one out there dealing with the ultimate reality of flight. Despite its authority, ATC doesn&#039;t micro manage the pilot: the pilot is &lt;i&gt;in-command&lt;/i&gt;.&lt;br /&gt;&lt;br /&gt;To have the privilege to be a PIC, you have to remain current and regularly prove that you can be trusted for your judgement based on your skills, experience and training.&lt;br /&gt;&lt;br /&gt;If the acronyms didn&#039;t sound so bad, I would dare suggesting programmers should become DICs, ie &lt;i&gt;Developers In Command&lt;/i&gt;. Though working under different forms of authority, DICs would be fully trusted for taking the final decisions in the daily battle of writing code. In this world, it wouldn&#039;t be an heresy to say that developers could build large and complex software systems from the ground up, without the need for snake oil, committees or big design.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;When trust will be manifested, we won&#039;t need manifestos anymore.&lt;/span&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img width=&#039;1&#039; height=&#039;1&#039; src=&#039;https://blogger.googleusercontent.com/tracker/13243193-3253412839385315537?l=blog.dossot.net&#039;/&gt;&lt;/div&gt;&lt;p&gt;&lt;a href=&quot;http://daviddossot.sys-con.com/node/1167188&quot; target=&quot;_blank&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <pubDate>Sat, 31 Oct 2009 15:11:00 EDT</pubDate>
 <guid isPermaLink="true">http://daviddossot.sys-con.com/node/1167188</guid>
 <comments>http://daviddossot.sys-con.com/node/1167188#feedback</comments>
</item>
<item>
 <title>Looking for my seams</title>
 <link>http://daviddossot.sys-con.com/node/1096266</link>
 <description>Like any test infected programmer switching to a new development platform, I have spent my first days working with Erlang looking for my seams. Here, I am talking about seams as defined by Michael Feathers in &lt;a title=&quot;Working Effectively with Legacy Code&quot; href=&quot;http://www.amazon.com/Working-Effectively-Legacy-Michael-Feathers/dp/0131177052&quot; id=&quot;hpv_&quot;&gt;Working Effectively with Legacy Code&lt;/a&gt;: &quot;A seam is a place where you can alter behavior in your program without editing in that place.&quot; As such, seams are key enablers for unit testing as they allow you to redirect calls leading out of your &lt;a title=&quot;SUT&quot; href=&quot;http://en.wikipedia.org/wiki/System_Under_Test&quot; id=&quot;cfbv&quot;&gt;SUT&lt;/a&gt; to mocks or stubs or any kind of test double you tend to favor.&lt;br /&gt;&lt;br /&gt;In object oriented programming, this is a given thanks to polymorphism and dependency injection. But in Erlang, where SUTs are MUTs (modules under test) and the common idiom for invoking a method is &lt;i style=&quot;font-family: courier new;&quot;&gt;module:function(parameters)&lt;/i&gt;, things are a little less obvious. Indeed, hard-wired function calls from one module to another don&#039;t leave much room for any kind of substitution. Without the capacity to fully test my modules in independence, I quickly started to feel uneasy. After a few days, it felt like free-falling without a parachute.&lt;br /&gt;&lt;br /&gt;Then I started to seriously investigate my options...&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Macros&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Macros allow you to define blocks of instructions that the pre-compiler will substitute for you at the different places you refer them. When used in conjunction with flow control statements, macros can be used to switch one code fragment with another one by passing a parameter to the compiler. This seems to fit the bill as you can use conditional macros to alter behavior without editing the places where the macro is used.&lt;br /&gt;&lt;br /&gt;This said, I have quickly ruled out the use of macros as a valid seam. Imagine having to do this for all the function calls leading out of the MUT:&lt;br /&gt;&lt;textarea name=&quot;code&quot; class=&quot;ruby&quot;&gt;&lt;br /&gt;-ifdef(unittest).&lt;br /&gt;-define(CALL_FOO(X), foo_test:function(X)).&lt;br /&gt;-else.&lt;br /&gt;-define(CALL_FOO(X), foo:function(X)).&lt;br /&gt;-endif.&lt;br /&gt;&lt;/textarea&gt;&lt;br /&gt;Moreover, if a mistake exists in the non-unit test wiring part of the conditional macro, I would have had to wait for integration tests or actual deployment to get feedback on the issue.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Funs&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Though the common idiom is to early bind the module and function you want to call, Erlang is fully capable of late binding and dynamic invocation, as this very crude example illustrate:&lt;br /&gt;&lt;textarea name=&quot;code&quot; class=&quot;ruby&quot;&gt;&lt;br /&gt;1&gt; Square = fun(X) -&gt; X * X end.&lt;br /&gt;#Fun&lt;erl_eval.6.13229925&gt;&lt;br /&gt;2&gt; Square(3).      &lt;br /&gt;9&lt;br /&gt;&lt;/textarea&gt;&lt;br /&gt;This opens interesting possibilities for MUTs that expose &lt;a title=&quot;higher order functions&quot; href=&quot;http://en.wikipedia.org/wiki/Higher-order_function&quot; id=&quot;bf77&quot;&gt;higher order functions&lt;/a&gt;. If the function that must be tested accepts one or several functions, passing a mock implementation is just a matter of providing an anonymous function of the same &lt;a title=&quot;arity&quot; href=&quot;http://en.wikipedia.org/wiki/Arity&quot; id=&quot;tqcq&quot;&gt;arity&lt;/a&gt;. This mock would perform nothing besides storing the received parameters in a shared storage, like the &lt;a title=&quot;process dictionary&quot; href=&quot;http://erlang.org/course/advanced.html#dict&quot; id=&quot;b211&quot;&gt;process dictionary&lt;/a&gt;, for later inspection.&lt;br /&gt;&lt;br /&gt;Unfortunately, not all functions receive their dependencies as parameters but instead perform direct calls to other functions in other modules. It could be a plausible and drastic design decision to forbid all direct inter-module calls in favor of passing dependencies as anonymous functions via additional arguments. Some have suggested to use a &lt;a title=&quot;record&quot; href=&quot;http://20bits.com/articles/erlang-an-introduction-to-records/&quot; id=&quot;ywsl&quot;&gt;record&lt;/a&gt; to pass around all your application dependencies as a single extra argument added to all functions.&lt;br /&gt;&lt;br /&gt;Interesting but the idea of polluting all functions with additional arguments is less than palatable. In fact, it would great if these extra arguments could be defined module-wise and implicitly added to each of its functions... Rejoice! Parameterized modules have been introduced to perform exactly this delicious syntactic sugar trick!&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Parameterized modules&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;I have discovered &lt;a title=&quot;Parameterized module&quot; href=&quot;http://www.erlang.se/workshop/2003/paper/p29-carlsson.pdf&quot; id=&quot;g4gd&quot;&gt;parameterized modules&lt;/a&gt; while writing controllers for &lt;a title=&quot;Mochiweb&quot; href=&quot;http://code.google.com/p/mochiweb/&quot; id=&quot;lgop&quot;&gt;Mochiweb&lt;/a&gt;. In this pretty cool HTTP server, the request reference that your processing function receives points to a parameterized module, allowing this kind of neat syntax:&lt;br /&gt;&lt;textarea name=&quot;code&quot; class=&quot;ruby&quot;&gt;&lt;br /&gt;Method = Request.get(method).&lt;br /&gt;&lt;/textarea&gt;&lt;br /&gt;Though this may feel object oriented, don&#039;t get fooled: behind the scene, there is no instance of anything. The &lt;i&gt;Request&lt;/i&gt; reference contains all the hidden parameters that the &lt;i&gt;get&lt;/i&gt; function needs besides the atom specifying what you want to get. Behind the scene, what really happens is more likely something like that:&lt;br /&gt;&lt;textarea name=&quot;code&quot; class=&quot;ruby&quot;&gt;&lt;br /&gt;Method = Request.get(method, Socket, Method, RawPath, Version, Headers).&lt;br /&gt;&lt;/textarea&gt;&lt;br /&gt;But because the &lt;a title=&quot;Mochiweb Request&quot; href=&quot;http://code.google.com/p/mochiweb/source/browse/trunk/src/mochiweb_request.erl&quot; id=&quot;s9o9&quot;&gt;Mochiweb Request&lt;/a&gt; is a parameterized module, all the extra parameters have been specified once, packed in the reference and stay hidden there for your utmost convenience!&lt;br /&gt;&lt;br /&gt;From there, it&#039;s easy to see how to write stubs for parameterized modules: just write another parameterized module that export functions with the same signature as the ones you use in the real module. Here is a very incomplete but fully working request stub for Mochiweb:&lt;br /&gt;&lt;textarea name=&quot;code&quot; class=&quot;ruby&quot;&gt;&lt;br /&gt;-module(mochiweb_request_stub, [Method, Path, Headers, Parameters]).&lt;br /&gt;&lt;br /&gt;-export([get/1, parse_post/0, respond/1, not_found/0]).&lt;br /&gt;&lt;br /&gt;-define(SAVE_RESPONSE, mochiweb_request_stub_response).&lt;br /&gt;&lt;br /&gt;get(method) -&gt; Method;&lt;br /&gt;get(path) -&gt; Path;&lt;br /&gt;get(headers) -&gt; Headers;&lt;br /&gt;get(response) -&gt; erlang:get(?SAVE_RESPONSE);&lt;br /&gt;get(path_tokens) -&gt; string:tokens(Path, &quot;/&quot;).&lt;br /&gt;&lt;br /&gt;parse_post() -&gt; Parameters.&lt;br /&gt;&lt;br /&gt;respond(Response) -&gt; put(?SAVE_RESPONSE, Response).&lt;br /&gt;&lt;br /&gt;not_found() -&gt; put(?SAVE_RESPONSE, not_found).&lt;br /&gt;&lt;/textarea&gt;&lt;br /&gt;Note how I use the process dictionary to store values that I will later retrieve for asserting everything went as expected. By using parameterized modules, I have been able to reach near 100% code coverage. Does this mean parameterized modules are the best thing since sliced bread?&lt;br /&gt;&lt;br /&gt;Well, so much for the free lunch as there are some drawbacks to consider:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;Experimental&lt;/b&gt; - Parameterized modules are still officially considered as an experimental feature of Erlang, hence subject to change. Unlike the Java world where everything is kept for ever just in case, Erlang doesn&#039;t patronize developers, so if this feature is one day bound to oblivion, it will be tossed out. And quickly.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Unchecked&lt;/b&gt; - Unlike with a direct module&#039;s function reference, compile-time checking is not available, leading to possible bad surprises at runtime. If the parameterized module reference your code uses does not expose the expected function, you&#039;re in for a nasty error. In fact, you can totally pass a reference to a Foo module while your function expects a totally unrelated Bar module. As a tentative mitigation, I have added a verification function in my modules so they ensure at start-up time they are correctly wired. This feels like framework-envy,so I&#039;m not fully satisfied with this approach.&lt;br /&gt; &lt;/li&gt;&lt;li&gt;&lt;b&gt;Confusing&lt;/b&gt; - Because the actual module is not directly referred to, reading such code becomes more complicated. You have to infer from the context (or some coding conventions, or even comments) what is the module that will actually be wired-in at runtime. Decreasing understandability is definitively not a good thing.&lt;br /&gt; &lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;Besides these downsides, I still believe that the complete MUT isolation and behavior swapping facilities offered by parameterized modules make them a very interesting tool for the test-minded Erlang developer.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Closing notes&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;MUTs have other kinds of dependencies that you will want to substitute at unit testing time. To name a few:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;Process dependencies&lt;/b&gt; - A MUT can contain functions that directly depend on other processes via their PIDs (process IDs). An interesting seam here is the &lt;a title=&quot;local registry of processes&quot; href=&quot;http://erlang.org/doc/man/erlang.html#register-2&quot; id=&quot;fa:t&quot;&gt;local registry of processes&lt;/a&gt; (and ports) that you can use to set-up test processes and register them under the same name as the ones used at runtime.&lt;br /&gt; &lt;/li&gt;&lt;li&gt;&lt;b&gt;Mnesia&lt;/b&gt; - Stubbing out calls from the controllers to the DAO is a good strategy but what about the DAO itself? Instead of stubbing out each Mnesia call, I have opted for running it in-memory at unit test time (à la &lt;a title=&quot;hsqlddb&quot; href=&quot;http://hsqldb.org/&quot; id=&quot;pr4h&quot;&gt;hsqlddb&lt;/a&gt;) and activating file persistence only at runtime. This is extremely fast so very well suited for the task.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;Finally, if you wonder what unit testing framework I am using, I have opted for &lt;a title=&quot;etap&quot; href=&quot;http://github.com/ngerakines/etap/tree/master&quot; id=&quot;r20o&quot;&gt;etap&lt;/a&gt;, which I find very simple and powerful enough for my needs. If you want something more structured and feature-rich, &lt;a title=&quot;EUnit&quot; href=&quot;http://svn.process-one.net/contribs/trunk/eunit/doc/index.html&quot; id=&quot;gb.s&quot;&gt;EUnit&lt;/a&gt; is the answer.&lt;br /&gt;&lt;br /&gt;Free fall is over: I have found my seams and landed seamlessly. Please share your own test infected adventures in Erlang.&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img width=&#039;1&#039; height=&#039;1&#039; src=&#039;https://blogger.googleusercontent.com/tracker/13243193-182733854342492955?l=ddossot.blogspot.com&#039;/&gt;&lt;/div&gt;&lt;p&gt;&lt;a href=&quot;http://daviddossot.sys-con.com/node/1096266&quot; target=&quot;_blank&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <pubDate>Mon, 07 Sep 2009 21:42:00 EDT</pubDate>
 <guid isPermaLink="true">http://daviddossot.sys-con.com/node/1096266</guid>
 <comments>http://daviddossot.sys-con.com/node/1096266#feedback</comments>
</item>
<item>
 <title>Why Software Craftsmanship?</title>
 <link>http://daviddossot.sys-con.com/node/1072809</link>
 <description>If you wonder why is the &lt;a href=&quot;http://en.wikipedia.org/wiki/Software_Craftsmanship&quot;&gt;Software Craftsmanship&lt;/a&gt; movement valuable, Calvin and Hobbes have the answer for you:&lt;br /&gt;&lt;br /&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://2.bp.blogspot.com/_wgiUOehXWyI/Socv2G3kjaI/AAAAAAAAAVw/mYN1I9W4E9w/s1600-h/why_craftsmanship.jpg&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 326px; height: 400px;&quot; src=&quot;http://2.bp.blogspot.com/_wgiUOehXWyI/Socv2G3kjaI/AAAAAAAAAVw/mYN1I9W4E9w/s400/why_craftsmanship.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5370313687265742242&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;© 1996 Bill Watterson&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img width=&#039;1&#039; height=&#039;1&#039; src=&#039;https://blogger.googleusercontent.com/tracker/13243193-5472016980139020519?l=ddossot.blogspot.com&#039;/&gt;&lt;/div&gt;&lt;p&gt;&lt;a href=&quot;http://daviddossot.sys-con.com/node/1072809&quot; target=&quot;_blank&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <pubDate>Sat, 15 Aug 2009 17:58:00 EDT</pubDate>
 <guid isPermaLink="true">http://daviddossot.sys-con.com/node/1072809</guid>
 <comments>http://daviddossot.sys-con.com/node/1072809#feedback</comments>
</item>
<item>
 <title>Zombie ESBs and the Integration Craftsman</title>
 <link>http://daviddossot.sys-con.com/node/1070002</link>
 <description>&lt;p&gt;During the past months, ToughtWorkers have been regularly pounding on ESBs in a manner that &lt;a href=&quot;http://martinfowler.com/bliki/RequestStreamMap.html&quot;&gt;&lt;span style=&quot;color:#0000ff;&quot;&gt;&lt;u&gt;Martin Fowler&lt;/u&gt;&lt;/span&gt;&lt;/a&gt; has neatly summarized like this:&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;&lt;blockquote&gt;&quot;Hang around my colleagues at ThoughtWorks and you soon get the impression that the only good Enterprise Service Bus (ESB) is a dead ESB. Jim Webber refers to them as Egregious Spaghetti Boxes. So it&#039;s not uncommon to hear tales of attempts to get them out of systems that don&#039;t need them.&quot;&lt;/blockquote&gt;&lt;p&gt;&lt;/p&gt; &lt;p&gt; &lt;/p&gt; &lt;p align=&quot;left&quot;&gt;The reasons for such a reaction to ESBs are multiple and, more often than not, very valid. I think they stem from two main issues: the proprietary nature of such platforms (see Ford&#039;s &quot;&lt;a href=&quot;http://memeagora.blogspot.com/2009/01/standards-based-vs-standardized-soa.html&quot;&gt;&lt;span style=&quot;color:#0000ff;&quot;&gt;&lt;u&gt;Standards Based versus Standardized&lt;/u&gt;&lt;/span&gt;&lt;/a&gt;&quot;) and the architectural quagmire an excess of &quot;enthusiasm&quot; towards them can entail (see Dörnenburg&#039;s &quot;&lt;a title=&quot;Making ESB pain visible&quot; href=&quot;http://erik.doernenburg.com/2009/07/making-esb-pain-visible/&quot; id=&quot;ey-v&quot;&gt;Making ESB pain visible&lt;/a&gt;&quot; and Webber&#039;s &quot;&lt;a title=&quot;Guerilla SOA&quot; href=&quot;http://www.infoq.com/presentations/webber-guerilla-soa&quot; id=&quot;s:8g&quot;&gt;Guerilla SOA&lt;/a&gt;&quot;).&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;The only problem I have with thought leaders pounding on ESBs is the negative aura it can create around developers involved in integration projects.&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;What? Why do I dare talking about integration while the subject is about ESBs? Well, both subjects have become intertwined because many so-called ESBs out there are simply re-purposed integration platforms. And by re-purposed I really mean &lt;i&gt;deployed as an ESB topology&lt;/i&gt; because ESB is first and foremost a topology and not a product (as Ross Mason pointed out in &quot;&lt;a href=&quot;http://blog.mulesource.org/2009/07/to-esb-or-not-to-esb&quot;&gt;To ESB or not to ESB&lt;/a&gt;&quot;).&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;So can developers working on integration projects be real craftsmen? &lt;b&gt;I think they can and I think they should&lt;/b&gt;.&lt;br /&gt;&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;This may sound a little naive but it&#039;s not. Consider the following:&lt;/p&gt;  &lt;ul&gt;&lt;li&gt;&lt;b&gt;Integration has patterns&lt;/b&gt;. Thanks the work of Gregor Hohpe and Bobby Woolf, developers have access to a vendor-independent semantics under the form of the &lt;a title=&quot;Enterprise Integration Patterns&quot; href=&quot;http://www.eaipatterns.com/eaipatterns.html&quot; id=&quot;ckz4&quot;&gt;Enterprise Integration Patterns&lt;/a&gt;. Being able to model and discuss integration without referring to a particular implementation is invaluable for craftsmen.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Integration has testing&lt;/b&gt;. It is oftentimes a challenge to test complex integration project and developers could be tempted to skip it altogether. Once again thanks to Gregor Hohpe, but with Wendy Istvanick this time, testing at all level of an integration project &lt;a title=&quot;has been proven possible and documented&quot; href=&quot;http://bit.ly/tdeai&quot; id=&quot;g3-7&quot;&gt;has been proven possible and documented&lt;/a&gt;.&lt;br /&gt;  &lt;/li&gt;&lt;li&gt;&lt;b&gt;Integration does not preclude SDLC practices&lt;/b&gt;: one point we tried to make in &lt;a title=&quot;Mule in Action&quot; href=&quot;http://muleinaction.com/&quot; id=&quot;hue-&quot;&gt;Mule in Action&lt;/a&gt;, is that even if your project consists in configuring an integration tool, you should not cease to be a craftsman and you should exercise good judgment and abide by your professional standards. You want to shoot for no less than reproducible builds and deployments in your integration projects.&lt;br /&gt;  &lt;/li&gt;&lt;/ul&gt;  &lt;p align=&quot;left&quot;&gt;So, whether ESBs are better dead or undead, &lt;b&gt;developers dealing with integration projects should strive to be software craftsmen above anything else&lt;/b&gt;.&lt;br /&gt;&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;PS. Isn&#039;t it ironic that Gregor is an ex-Thoughtworker?&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img width=&#039;1&#039; height=&#039;1&#039; src=&#039;https://blogger.googleusercontent.com/tracker/13243193-8448365047152562485?l=ddossot.blogspot.com&#039;/&gt;&lt;/div&gt;&lt;p&gt;&lt;a href=&quot;http://daviddossot.sys-con.com/node/1070002&quot; target=&quot;_blank&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <pubDate>Wed, 12 Aug 2009 14:49:00 EDT</pubDate>
 <guid isPermaLink="true">http://daviddossot.sys-con.com/node/1070002</guid>
 <comments>http://daviddossot.sys-con.com/node/1070002#feedback</comments>
</item>
<item>
 <title>Mule in Action: Now Treeware!</title>
 <link>http://daviddossot.sys-con.com/node/1040198</link>
 <description>&lt;div style=&quot;text-align: center;&quot;&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://3.bp.blogspot.com/_wgiUOehXWyI/SmIZOfQxBII/AAAAAAAAATI/4LIebkj3o0U/s1600-h/P1010799.JPG&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 240px;&quot; src=&quot;http://3.bp.blogspot.com/_wgiUOehXWyI/SmIZOfQxBII/AAAAAAAAATI/4LIebkj3o0U/s320/P1010799.JPG&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5359874243224994946&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;I feel a little like George McFly, now...&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;Trees had to die to get us there by here we are: &lt;a href=&quot;http://muleinaction.com&quot;&gt;Mule in Action&lt;/a&gt; is now treeware. And in case you missed it, the making of was &lt;a href=&quot;http://ddossot.blogspot.com/2008/12/mule-in-action-making-of.html&quot;&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Enjoy the reading!&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img width=&#039;1&#039; height=&#039;1&#039; src=&#039;https://blogger.googleusercontent.com/tracker/13243193-2732905219926635343?l=ddossot.blogspot.com&#039;/&gt;&lt;/div&gt;&lt;p&gt;&lt;a href=&quot;http://daviddossot.sys-con.com/node/1040198&quot; target=&quot;_blank&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <pubDate>Sat, 18 Jul 2009 14:47:00 EDT</pubDate>
 <guid isPermaLink="true">http://daviddossot.sys-con.com/node/1040198</guid>
 <comments>http://daviddossot.sys-con.com/node/1040198#feedback</comments>
</item>
<item>
 <title>Legacy Code Sonar Signature</title>
 <link>http://daviddossot.sys-con.com/node/1031723</link>
 <description>In &quot;&lt;a href=&quot;http://www.amazon.ca/Working-Effectively-Legacy-Michael-Feathers/dp/0131177052&quot;&gt;Working Effectively with Legacy Code&lt;/a&gt;&quot;, &lt;a href=&quot;http://www.objectmentor.com/omTeam/feathers_m.html&quot;&gt;Michael Feathers&lt;/a&gt; gives this definition:&lt;br /&gt;&lt;i&gt;&lt;/i&gt;&lt;blockquote&gt;To me, &lt;i&gt;legacy code&lt;/i&gt; is simply code without tests.&lt;/blockquote&gt;He also adds:&lt;br /&gt;&lt;blockquote&gt;I&#039;ve gotten some grief for this definition.&lt;/blockquote&gt;Indeed, defining legacy code is hard.&lt;br /&gt;&lt;br /&gt;After purging one of our project from code that we consider legacy (deprecated, EJB2...), we noticed this interesting trend in our &lt;a href=&quot;http://sonar.codehaus.org/&quot;&gt;Sonar&lt;/a&gt; dashboard:&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://4.bp.blogspot.com/_wgiUOehXWyI/SlOiUvq8Y6I/AAAAAAAAATA/AdRiDzcqxVQ/s1600-h/sonar.png&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 220px;&quot; src=&quot;http://4.bp.blogspot.com/_wgiUOehXWyI/SlOiUvq8Y6I/AAAAAAAAATA/AdRiDzcqxVQ/s400/sonar.png&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5355802859151319970&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;Notice how &lt;span style=&quot;font-style: italic;&quot;&gt;code coverage&lt;/span&gt; is way less affected than &lt;span style=&quot;font-style: italic;&quot;&gt;complexity&lt;/span&gt; and &lt;span style=&quot;font-style: italic;&quot;&gt;rules compliance&lt;/span&gt;. Our legacy code had test coverage, not the greatest ever, but it had some.&lt;br /&gt;&lt;br /&gt;Therefore, I am wondering if we could  then postulate that legacy code is &lt;span style=&quot;font-style: italic; font-weight: bold;&quot;&gt;code that has fallen short of software development standards&lt;/span&gt;?&lt;br /&gt;&lt;br /&gt;This is actually what is expressed by the above graph: ditching legacy code drastically improved compliance to standards expressed as acceptable complexity and compliance to coding rules. These standards evolve over time: as legacy code is left abandoned, it slowly drifts away and gets less and less compliant by just standing still.&lt;br /&gt;&lt;br /&gt;Have you noticed similar trends?&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img width=&#039;1&#039; height=&#039;1&#039; src=&#039;https://blogger.googleusercontent.com/tracker/13243193-2980557050761416214?l=ddossot.blogspot.com&#039;/&gt;&lt;/div&gt;&lt;p&gt;&lt;a href=&quot;http://daviddossot.sys-con.com/node/1031723&quot; target=&quot;_blank&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <pubDate>Tue, 07 Jul 2009 15:09:00 EDT</pubDate>
 <guid isPermaLink="true">http://daviddossot.sys-con.com/node/1031723</guid>
 <comments>http://daviddossot.sys-con.com/node/1031723#feedback</comments>
</item>
<item>
 <title>Demeter&#039;s Wrath and Angry Monkeys</title>
 <link>http://daviddossot.sys-con.com/node/1031722</link>
 <description>Transgressing the &lt;a href=&quot;http://encyclopedia.tfd.com/Law+of+Demeter&quot;&gt;Law of Demeter&lt;/a&gt; can not only attract the grain goddess&#039; wrath on you but can also turn classes into &lt;a href=&quot;http://rtpscrolls.blogspot.com/2006/11/angry-monkeys-and-cargo-cults.html&quot;&gt;angry monkeys&lt;/a&gt;. Let&#039;s see how.&lt;br /&gt;&lt;br /&gt;Consider this freshly created method and notice how it asks for more than it needs, setting the stage for the upcoming drama that involves a fuming Demeter in her heavenly spa:&lt;br /&gt;&lt;textarea name=&quot;code&quot; class=&quot;java&quot;&gt;&lt;br /&gt;int computeSchniblitz(User user) {&lt;br /&gt;  return schniblitzator.process(user.getCountryCode());&lt;br /&gt;}&lt;/textarea&gt;&lt;br /&gt;This method needs a country code to perform its unspeakable computation but asks for a User object. Why would anyone do that? Well, if User objects are common goods around the class that holds this method, it may look like a natural thing to do.&lt;br /&gt;&lt;br /&gt;Inevitably, methods in other classes will have the need for a schniblitz to be computed for them. They will use the above method and will, therefore, need to provide a User object for them. And they may well be cool with that.&lt;br /&gt;&lt;br /&gt;Now enter the angry monkeys. From dependency to dependency, the fact that a User object is needed to compute a schniblitz will get propagated. After a while, once the client call will be far enough from the original method, in another module or project, handled by a different team in another site, no-one will have the slightest clue why a User object is needed. But a barrage of classes will angrily ask for it.&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://yuml.me/diagram/scruffy;dir=td/class/%5BDemeter%27s%20Violator%7Bbg:orange%7D%5D%3C-%5BAngry%20Macaque%7Bbg:red%7D%5D,%20%5BDemeter%27s%20Violator%5D%3C-%5BAngry%20Baboon%7Bbg:red%7D%5D,%20%5BDemeter%27s%20Violator%5D%3C-%5BAngry%20Gorilla%7Bbg:red%7D%5D,%20%5BAngry%20Baboon%5D%3C-%5BInnocent%20Victim%5D.&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 509px; height: 456px;&quot; src=&quot;http://yuml.me/diagram/scruffy;dir=td/class/%5BDemeter%27s%20Violator%7Bbg:orange%7D%5D%3C-%5BAngry%20Macaque%7Bbg:red%7D%5D,%20%5BDemeter%27s%20Violator%5D%3C-%5BAngry%20Baboon%7Bbg:red%7D%5D,%20%5BDemeter%27s%20Violator%5D%3C-%5BAngry%20Gorilla%7Bbg:red%7D%5D,%20%5BAngry%20Baboon%5D%3C-%5BInnocent%20Victim%5D.&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;So when an innocent victim comes around, it will be badly beaten if it doesn&#039;t present a valid User object in exchange for a nicely computed schniblitz.&lt;br /&gt;&lt;br /&gt;But, for this victim, this may well be a big deal. Perhaps, it does not have a full User object handy, so it will need several database calls to completely build it so it can pass it and get its schniblitz. Or perhaps, it deals with NewUser objects, which are the next great things on its side of the world, forcing it to create complex and error-prone object converters in order to turn a NewUser into a User and... get the darn schniblitz!&lt;br /&gt;&lt;br /&gt;The kicker is that the innocent victim had a contextually-valid country code. So should the original method had reduced its needs and simply had asked for what it needed, the angry monkeys would have had no &quot;Thou Shalt Provide A User&quot; mantra to sing and life would have been beautiful.&lt;br /&gt;&lt;br /&gt;If you find that this whole story sounds too made-up to be true, take a closer look at your code. I bet that, if your code base has a few gray hairs and a bunch of modules, you&#039;re more than likely to have a few angry monkeys here and there.&lt;br /&gt;&lt;br /&gt;Eek. Eek.&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img width=&#039;1&#039; height=&#039;1&#039; src=&#039;https://blogger.googleusercontent.com/tracker/13243193-133263096349453525?l=ddossot.blogspot.com&#039;/&gt;&lt;/div&gt;&lt;p&gt;&lt;a href=&quot;http://daviddossot.sys-con.com/node/1031722&quot; target=&quot;_blank&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <pubDate>Tue, 30 Jun 2009 01:08:00 EDT</pubDate>
 <guid isPermaLink="true">http://daviddossot.sys-con.com/node/1031722</guid>
 <comments>http://daviddossot.sys-con.com/node/1031722#feedback</comments>
</item>
<item>
 <title>Mule + Groovy = REST</title>
 <link>http://daviddossot.sys-con.com/node/1031721</link>
 <description>Groovy&#039;s MarkupBuilder makes outputting REST microformats a bliss.&lt;br /&gt;&lt;br /&gt;Read more about this in my guest blog entry &quot;&lt;a href=&quot;http://blog.mulesource.org/2009/06/having-some-rest-with-mules-power-tools/&quot;&gt;Having Some REST with Mule’s Power Tools&lt;/a&gt;&quot; that MuleSource has just published on &quot;&lt;a href=&quot;http://blog.mulesource.org/&quot;&gt;From the Mule’s mouth&lt;/a&gt;&quot;.&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img width=&#039;1&#039; height=&#039;1&#039; src=&#039;https://blogger.googleusercontent.com/tracker/13243193-3820543389998293581?l=ddossot.blogspot.com&#039;/&gt;&lt;/div&gt;&lt;p&gt;&lt;a href=&quot;http://daviddossot.sys-con.com/node/1031721&quot; target=&quot;_blank&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <pubDate>Tue, 09 Jun 2009 15:07:00 EDT</pubDate>
 <guid isPermaLink="true">http://daviddossot.sys-con.com/node/1031721</guid>
 <comments>http://daviddossot.sys-con.com/node/1031721#feedback</comments>
</item>
<item>
 <title>Strict Unit Tests for Public Data Contracts</title>
 <link>http://daviddossot.sys-con.com/node/1031720</link>
 <description>Suppose we have the following code:&lt;br /&gt;&lt;textarea name=&quot;code&quot; class=&quot;java&quot;&gt;public class Thinger {&lt;br /&gt;  private static final RESULT = &quot;Joy&quot;;&lt;br /&gt;&lt;br /&gt;  public String doThing() {&lt;br /&gt;    return RESULT;&lt;br /&gt;  }&lt;br /&gt;}&lt;/textarea&gt;&lt;br /&gt;When testing such a code, it is tempting to modify the visibility of &lt;span style=&quot;font-family: courier new;&quot;&gt;RESULT&lt;/span&gt; to &lt;span style=&quot;font-style: italic;&quot;&gt;package protected&lt;/span&gt; in order to write tests that share the constant value:&lt;br /&gt;&lt;textarea name=&quot;code&quot; class=&quot;java&quot;&gt;&lt;br /&gt;@Test&lt;br /&gt;public void doThingWorks() {&lt;br /&gt;  assertEquals(Thinger.RESULT, thinger.doThing());&lt;br /&gt;}&lt;/textarea&gt;&lt;br /&gt;After all, reuse is good, right?&lt;br /&gt;&lt;br /&gt;Well, in this case, I think that reusing this constant is not a good idea if your API is a public one (or if this code gets exposed as a service, which is practically the same thing).&lt;br /&gt;&lt;br /&gt;In fact, I advocate to write the test like this:&lt;br /&gt;&lt;textarea name=&quot;code&quot; class=&quot;java&quot;&gt;&lt;br /&gt;@Test&lt;br /&gt;public void doThingWorks() {&lt;br /&gt;  assertEquals(&quot;Joy&quot;, thinger.doThing());&lt;br /&gt;}&lt;/textarea&gt;&lt;br /&gt;But why the duplication?&lt;br /&gt;&lt;br /&gt;The catch with public APIs is that they create long lasting expectations in an uncontrolled number of users and systems. Consequently, stability should be their essential characteristic. Through interfaces, it is easy to provide an illusion of stability: as long as the API is backwards-compatible binary-wise (or operation-wise for services), it can change at will and life is peachy.&lt;br /&gt;&lt;br /&gt;So what is so risky with the static field above?&lt;br /&gt;&lt;br /&gt;Well, the fact of the matter is that the value returned by the &lt;span style=&quot;font-family:courier new;&quot;&gt;doThing()&lt;/span&gt; method is also part of the contract. Indeed, beyond the object-oriented concept of interface, data is also part of the overall contract with a particular class (or service). So data should exhibit the same stability as the interface itself.&lt;br /&gt;&lt;br /&gt;When sharing a constant in the unit test, it is possible to modify the data contract without noticing. Suppose I change the value of &lt;span style=&quot;font-family:courier new;&quot;&gt;RESULT&lt;/span&gt; from &lt;span style=&quot;font-family:courier new;&quot;&gt;&quot;Joy&quot;&lt;/span&gt; to &lt;span style=&quot;font-family:courier new;&quot;&gt;&quot;Happy&quot;&lt;/span&gt;. The first test will give me a green light, while the second will be red. And it is the latter that I am looking for: &lt;span style=&quot;font-weight: bold;&quot;&gt;I want my unit tests to tell me that I have broken the data contract of my class&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;Not its users...&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img width=&#039;1&#039; height=&#039;1&#039; src=&#039;https://blogger.googleusercontent.com/tracker/13243193-9055956093415346934?l=ddossot.blogspot.com&#039;/&gt;&lt;/div&gt;&lt;p&gt;&lt;a href=&quot;http://daviddossot.sys-con.com/node/1031720&quot; target=&quot;_blank&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <pubDate>Tue, 26 May 2009 01:07:00 EDT</pubDate>
 <guid isPermaLink="true">http://daviddossot.sys-con.com/node/1031720</guid>
 <comments>http://daviddossot.sys-con.com/node/1031720#feedback</comments>
</item>
<item>
 <title>Mule and the Home Service Bus</title>
 <link>http://daviddossot.sys-con.com/node/1031719</link>
 <description>While following the discussions on &lt;a href=&quot;http://www.oasis-open.org/resources/white-papers/blue/&quot;&gt;Oasis Blue&lt;/a&gt;&#039;s &lt;a href=&quot;http://lists.oasis-open.org/archives/smartgrid-interest/200903/msg00001.html&quot;&gt;SmartGrid Interest List&lt;/a&gt;, I noticed that smart device makers quickly reacted to the draft charter for the proposed OASIS Energy Market Information Exchange (eMIX) Technical Committee by stating that their capacity to implement full-fledged SOAP clients was limited. Looking at the bare-metal specifications of protocols like Zigbee, it is easy to understand that SOAP would be another board game.&lt;br /&gt;&lt;br /&gt;Of course, when I heard about this need for protocol adaptation, my favorite quadruped quickly came to mind (I know, when you have a hammer...). So I came up speculating about this:&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://1.bp.blogspot.com/_wgiUOehXWyI/SgkBh4YOPmI/AAAAAAAAASY/sEKmf3hX2qQ/s1600-h/mule-sheeva-plug.png&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 218px; height: 320px;&quot; src=&quot;http://1.bp.blogspot.com/_wgiUOehXWyI/SgkBh4YOPmI/AAAAAAAAASY/sEKmf3hX2qQ/s320/mule-sheeva-plug.png&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5334796915178356322&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;Yes, that is &lt;a href=&quot;http://mulesource.org&quot;&gt;Mule ESB&lt;/a&gt; running on a &lt;a href=&quot;http://www.marvell.com/products/embedded_processors/developer/kirkwood/sheevaplug.jsp&quot;&gt;Sheeva Plug&lt;/a&gt;. In fact, I should say &lt;span style=&quot;font-weight: bold;&quot;&gt;Mule HSB&lt;/span&gt;, as in this case the platform would serve as a Home Service Bus.&lt;br /&gt;&lt;br /&gt;What could be the role of such an HSB?&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Protocol adaptation&lt;/span&gt; comes first to mind&lt;span style=&quot;font-weight: bold;&quot;&gt;.&lt;/span&gt; Allowing all your home devices to interact together internally but also with the outside world with &quot;higher order protocols&quot;, like SOAP or anything more RESTful. What would happen if your smart meter starts talking with your dryer?&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Orchestration&lt;/span&gt; would be another benefit. Here I am not thinking in term of the classic and already solved home automation problem. Imagine orchestrating your home devices in order to satisfy some predefined power consumption patterns. What would happen if a BPEL engine was running your house?&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Home rules application&lt;/span&gt; would be the ultimate benefit. By plugging a rules engine to Mule, one could define advanced scenarios when a house would automatically negotiate energy purchases and sales based on inference rules and facts (like: do you have an plug-in hybrid sleeping in your garage). What would happen if your house was smart enough to make money while you sleep?&lt;br /&gt;&lt;br /&gt;I agree, this is a lot of speculation. But I reckon that &lt;span style=&quot;font-weight: bold;&quot;&gt;a capable Home Service Bus will one day become a must in our habitations&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;PS. Google just told me that &lt;/span&gt;&lt;a style=&quot;font-style: italic;&quot; href=&quot;http://willy.boerland.com/myblog/drupal_as_a_home_service_bus_beyond_home_automation&quot;&gt;Bert Boerland coined the Home Service Bus term&lt;/a&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;. We must be up to something ;-)&lt;/span&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img width=&#039;1&#039; height=&#039;1&#039; src=&#039;https://blogger.googleusercontent.com/tracker/13243193-2038209176918156577?l=ddossot.blogspot.com&#039;/&gt;&lt;/div&gt;&lt;p&gt;&lt;a href=&quot;http://daviddossot.sys-con.com/node/1031719&quot; target=&quot;_blank&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <pubDate>Tue, 12 May 2009 00:48:00 EDT</pubDate>
 <guid isPermaLink="true">http://daviddossot.sys-con.com/node/1031719</guid>
 <comments>http://daviddossot.sys-con.com/node/1031719#feedback</comments>
</item>
<item>
 <title>Organic Distributed Systems</title>
 <link>http://daviddossot.sys-con.com/node/1031718</link>
 <description>Migrating monolithic systems to distributed ones is probably one of the most exhilarating tasks in software development.&lt;br /&gt;&lt;br /&gt;Monolithic systems, even if they engage in interconnected relationships,  remain pretty much like silos (I like compare a network of monolithic systems to silos connected by monkey bridges). Reflecting on the work I have been doing in this domain for the past years, I came to realize how much an IT landscape of distributed systems ends up resembling a living organism.&lt;br /&gt;&lt;br /&gt;Indeed, some proprieties of the organic world emerge in a system that evolves towards distribution.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Distributed systems are more resilient.&lt;/span&gt; Local issues in living organisms tend to remain local instead of endangering the whole system. This is achieved via redundancy, heterogeneity and a limited coupling between each part of an organism. Interestingly, the same applies to distributed software systems: if properly decoupled (interface-wise and time-wise), a particular system can be in pain without taking down the whole operation.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Distributed systems are harder to diagnose.&lt;/span&gt; Rare or complex diseases are uneasy to diagnose and often require many analysis to be performed. Distributed systems present the same challenge, complicating forensics tasks when something went haywire. Using tracing mechanisms, like correlation IDs, can simplify such diagnostics, the same way DNA-tracing can help figuring out the spread of a particular gene (or virus!).&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Distributed systems can self-heal.&lt;/span&gt; Living organisms embark all sorts of self-healing mechanisms, from localized ones (cicatrization) to global ones (fever). Because each member of a distributed system focus on specific tasks and has reduced coupling to the rest, it has more freedom to perform recovery operations in isolation without needing the involvement of any other member. This said, it will still need an escalation mechanism in case the issue can not be treated locally.&lt;br /&gt;&lt;br /&gt;There are surely other qualities distributed systems exhibit that make them look like living things. Do you think of any?&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img width=&#039;1&#039; height=&#039;1&#039; src=&#039;https://blogger.googleusercontent.com/tracker/13243193-6714958754707411331?l=ddossot.blogspot.com&#039;/&gt;&lt;/div&gt;&lt;p&gt;&lt;a href=&quot;http://daviddossot.sys-con.com/node/1031718&quot; target=&quot;_blank&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <pubDate>Sun, 10 May 2009 10:43:00 EDT</pubDate>
 <guid isPermaLink="true">http://daviddossot.sys-con.com/node/1031718</guid>
 <comments>http://daviddossot.sys-con.com/node/1031718#feedback</comments>
</item>
<item>
 <title>Jitter Mule Functional Tests With Jitr</title>
 <link>http://daviddossot.sys-con.com/node/1031717</link>
 <description>&lt;a href=&quot;http://www.mulesource.org/display/MULE2USER/Embedding+Mule+in+a+Java+Application+or+Webapp&quot;&gt;Embedding Mule in a web application&lt;/a&gt; allows you to tap the Servlet layer of your favorite web container, which is a good thing as you are supposedly very familiar with its behavior and tuning.&lt;br /&gt;&lt;br /&gt;When it comes to writing functional tests for such an application, my strategy was to replace the &lt;a href=&quot;http://www.mulesource.org/display/MULE2USER/Servlet+Transport&quot;&gt;Servlet endpoints&lt;/a&gt; with &lt;a href=&quot;http://www.mulesource.org/display/MULE2USER/HTTP+Transport&quot;&gt;stock HTTP ones&lt;/a&gt;, a substitution that is trivial to perform thanks to the modularity of Mule configuration files: I simply loaded a slightly different set of files at functional test time than the actual file configured in my &lt;span style=&quot;font-family:courier new;&quot;&gt;web.xml&lt;/span&gt; file. Since I was writing the tests as subclasses of &lt;span style=&quot;font-family:courier new;&quot;&gt;org.mule.tck.FunctionalTestCase&lt;/span&gt;, all the goodness of Mule was readily available as protected methods or members.&lt;br /&gt;&lt;br /&gt;Still, I was not very satisfied with this approach because of the discrepancy between what my functional tests were exercising (the stock HTTP transport) and what I was actually using (the Servlet transport). This discrepancy bit me badly in the past weeks with a problem only showing up with the Servlet transport.&lt;br /&gt;&lt;br /&gt;Then came &lt;a style=&quot;font-weight: bold;&quot; href=&quot;http://jitr.org/&quot;&gt;Jitr&lt;/a&gt;, the latest creation of international software samurai Josh Devins:&lt;br /&gt;&lt;blockquote style=&quot;font-style: italic;&quot;&gt;Jitr (pronounced &quot;jitter&quot;) is a JUnit Integration Test Runner. It allows your web application integration tests to easily run against a lightweight web container in the same JVM as your tests.&lt;/blockquote&gt;It happens &lt;span style=&quot;font-weight: bold;&quot;&gt;Jitr&lt;/span&gt; is extremely well fitted for functionally testing a Mule instance embedded in a web application. Here is the structure of such a &lt;span style=&quot;font-weight: bold;&quot;&gt;Jitr&lt;/span&gt; powered test:&lt;br /&gt;&lt;br /&gt;&lt;textarea name=&quot;code&quot; class=&quot;java&quot;&gt;&lt;br /&gt;@RunWith(Jitr.class)&lt;br /&gt;public class ServicesFunctionalTest {&lt;br /&gt;    @BaseUri&lt;br /&gt;    private String baseUri;&lt;br /&gt;&lt;br /&gt;    private HttpClient httpClient;&lt;br /&gt;&lt;br /&gt;    private MuleContext muleContext;&lt;br /&gt;&lt;br /&gt;    @Before&lt;br /&gt;    public void initializeTest() throws MuleException {&lt;br /&gt;        httpClient = new HttpClient();&lt;br /&gt;        muleContext = MuleServer.getMuleContext();&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    @Test&lt;br /&gt;    public void pingService() throws Exception {&lt;br /&gt;        final HttpMethod method = new GetMethod(baseUri + &quot;ping&quot;);&lt;br /&gt;        httpClient.executeMethod(method);&lt;br /&gt;        assertEquals(&quot;PING: OK&quot;, method.getResponseBodyAsString());&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    ...&lt;br /&gt;}&lt;/textarea&gt;&lt;br /&gt;&lt;br /&gt;Thanks to the access to the &lt;span style=&quot;font-family:courier new;&quot;&gt;MuleContext&lt;/span&gt;, all the internals of the loaded Mule instance are available, which means that I am free to use my &lt;a href=&quot;http://ddossot.blogspot.com/2009/02/integration-testing-asynchronous.html&quot;&gt;asynchronous testing strategies&lt;/a&gt;. It&#039;s party time. really!&lt;br /&gt;&lt;br /&gt;Note that &lt;span style=&quot;font-weight: bold;&quot;&gt;Jitr&lt;/span&gt; tests are pure JUnit 4 tests, without any sub-classing needed.&lt;br /&gt;&lt;br /&gt;Because I am still loading a slightly different configuration at test time, as I am replacing file endpoints with VM ones for easier testing, I have to load a different &lt;span style=&quot;font-family:courier new;&quot;&gt;web.xml&lt;/span&gt; file. Nothing to worry, as &lt;span style=&quot;font-weight: bold;&quot;&gt;Jitr&lt;/span&gt; offers the possibility to load this file from an alternate location by means of configuration only. So here is the actual beginning of my test class:&lt;br /&gt;&lt;textarea name=&quot;code&quot; class=&quot;java&quot;&gt;&lt;br /&gt;@RunWith(Jitr.class)&lt;br /&gt;@JitrConfiguration(warPath = &quot;src/it/resources/webapp-it&quot;)&lt;br /&gt;public class ServicesFunctionalTest {&lt;br/&gt;...&lt;/textarea&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Jitr&lt;/span&gt; is a capable new tool that will complement the tool box of any developer having to run functional tests on web services.&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img width=&#039;1&#039; height=&#039;1&#039; src=&#039;https://blogger.googleusercontent.com/tracker/13243193-2497975256060205229?l=ddossot.blogspot.com&#039;/&gt;&lt;/div&gt;&lt;p&gt;&lt;a href=&quot;http://daviddossot.sys-con.com/node/1031717&quot; target=&quot;_blank&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <pubDate>Thu, 09 Apr 2009 19:27:00 EDT</pubDate>
 <guid isPermaLink="true">http://daviddossot.sys-con.com/node/1031717</guid>
 <comments>http://daviddossot.sys-con.com/node/1031717#feedback</comments>
</item>
<item>
 <title>Application Pwnership</title>
 <link>http://daviddossot.sys-con.com/node/1031716</link>
 <description>Who owns this application? What can possibly be complicated about such a simple and innocent question?&lt;br /&gt;&lt;br /&gt;Unfortunately, the answer to such a question is not that easy. Or at least, we have created software organizations that make it hard to answer.&lt;br /&gt;&lt;br /&gt;Though it makes sense to have a division of labor between different teams qualified on certain aspects of software applications, the main problem resides in the partial system views that such a division creates.&lt;br /&gt;&lt;br /&gt;Out of developers&#039; hands, an application is oftentimes perceived by QA, DBAs or Operation teams as a giant black box:&lt;br /&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://3.bp.blogspot.com/_wgiUOehXWyI/ScSCYIssEbI/AAAAAAAAAQI/1CfRf39ABNw/s1600-h/pwned.png&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 329px; height: 309px;&quot; src=&quot;http://3.bp.blogspot.com/_wgiUOehXWyI/ScSCYIssEbI/AAAAAAAAAQI/1CfRf39ABNw/s400/pwned.png&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5315516811367420338&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;span style=&quot;font-style: italic;font-size:85%;&quot; &gt;&lt;span style=&quot;color: rgb(102, 102, 102);&quot;&gt;(yes, it is a canonical black monolith of 1-4-9 proportions)&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;In fact, this giant black box has a few keyholes on it and, through these keyholes, they can barely peer into it. Consequently, the black box effect leads to QA teams seeing applications as sets of buttons to push, DBAs seeing them as data and table spaces and Operation teams dealing only with cryptic log files and alarms of all sorts.&lt;br /&gt;&lt;br /&gt;No-one knows what is inside this darn black box. And when somethings goes haywire, only the Magician of Oz is deemed able to do something:&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://1.bp.blogspot.com/_wgiUOehXWyI/ScSG23xrCVI/AAAAAAAAAQY/GVR-pgip_mQ/s1600-h/magic.png&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 185px; height: 192px;&quot; src=&quot;http://1.bp.blogspot.com/_wgiUOehXWyI/ScSG23xrCVI/AAAAAAAAAQY/GVR-pgip_mQ/s400/magic.png&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5315521737447377234&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;Now that everybody is &lt;span style=&quot;font-style: italic;&quot;&gt;so&lt;/span&gt; agile, this kind of concern may sound irrelevant. After all, developers are now generalizing specialists, so the barrier between them and other teams is now significantly lowered. Or is it?&lt;br /&gt;&lt;br /&gt;The reality remains for the most part a difficult hand-off of applications between teams. I have seen different tentatives to improve things (including detailed operational manuals), but at the end of the day most of these attempts amounted to shallow knowledge transfers.&lt;br /&gt;&lt;br /&gt;Ownership needs more.&lt;br /&gt;&lt;br /&gt;Do you have any success story where applications have been successfully pwned by different teams?&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img width=&#039;1&#039; height=&#039;1&#039; src=&#039;https://blogger.googleusercontent.com/tracker/13243193-3144039277312841102?l=ddossot.blogspot.com&#039;/&gt;&lt;/div&gt;&lt;p&gt;&lt;a href=&quot;http://daviddossot.sys-con.com/node/1031716&quot; target=&quot;_blank&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <pubDate>Sat, 21 Mar 2009 01:30:00 EDT</pubDate>
 <guid isPermaLink="true">http://daviddossot.sys-con.com/node/1031716</guid>
 <comments>http://daviddossot.sys-con.com/node/1031716#feedback</comments>
</item>
<item>
 <title>Hot reload and the SRP</title>
 <link>http://daviddossot.sys-con.com/node/1031715</link>
 <description>Not so long ago, I have been tasked with the development of an in-memory IP address geolocation library. Yep, that was pretty cool and challenging at the same time (well, the challenge made it cool, right?).&lt;br /&gt;&lt;br /&gt;In this short post, I want to share how the design of one component, the data driver, has evolved over time and how the &lt;a href=&quot;http://en.wikipedia.org/wiki/Single_responsibility_principle&quot;&gt;Single Responsibility Principle (SRP)&lt;/a&gt; inspired this refactoring. The data driver was the poor guy charged of loading millions of geolocation data entry with the smallest possible memory footprint on a JVM (it did his job quite well, as the sizes of the zipped raw data and its in-memory form were of the same magnitude).&lt;br /&gt;&lt;br /&gt;Like in any projects, everything started nice and simple. I have removed many moving parts and simplified the design to focus only on the discussion point, but what you see hereafter is pretty similar to where I started:&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://4.bp.blogspot.com/_wgiUOehXWyI/SbhfnenALTI/AAAAAAAAAOY/MS5nDLJKuBg/s1600-h/s-ref-1.png&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 122px; height: 190px;&quot; src=&quot;http://4.bp.blogspot.com/_wgiUOehXWyI/SbhfnenALTI/AAAAAAAAAOY/MS5nDLJKuBg/s400/s-ref-1.png&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5312100892319690034&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;Quickly enough though, the rosy picture turned to a slightly less appealing color (kinda sorta brownish).&lt;br /&gt;&lt;br /&gt;Loading all this data in memory takes time (around 15 seconds). It quickly became unacceptable to further slow down the usual crippled bootstrap of a JEE application server by holding the initialization thread longer than necessary. Consequently, the data driver had to delegate its actual initialization to another thread in order to free the main thread so it could perform its lengthy EJB bootstrapping business.&lt;br /&gt;&lt;br /&gt;On top of that, because IP address blocks get re-assigned regularly, a geolocation database must be refreshed frequently, else you end-up with clients that appear to be in Antarctica instead of Kansas (that would be tough on the penguins). So the data driver had to be capable of hot reloading its data at any point of time while still being responsive (i.e. by keeping to use the old data until the new ones were fully loaded).&lt;br /&gt;&lt;br /&gt;So here I went adding all these features and I ended up with that:&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://1.bp.blogspot.com/_wgiUOehXWyI/SbhfnW1pAQI/AAAAAAAAAOg/T_AJKAt5zg4/s1600-h/s-ref-2.png&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 230px; height: 242px;&quot; src=&quot;http://1.bp.blogspot.com/_wgiUOehXWyI/SbhfnW1pAQI/AAAAAAAAAOg/T_AJKAt5zg4/s400/s-ref-2.png&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5312100890233602306&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;In complete violation of the SRP, my original jolly little driver had become the Mother Of All Drivers, capable of doing everything and even more.&lt;br /&gt;&lt;br /&gt;At this point, my virtual &lt;a href=&quot;http://butunclebob.com/ArticleS.UncleBob.GreenWristBand&quot;&gt;green wristband&lt;/a&gt; started to burn my wrist pretty badly. I was hearing Uncle Bob&#039;s voice threatening me of disasters of cosmic proportions if I would not live up to my professional standards and refactor the code right away.&lt;br /&gt;&lt;br /&gt;So I came up with this refactoring:&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://2.bp.blogspot.com/_wgiUOehXWyI/SbinxMRj0cI/AAAAAAAAAPI/28a2sYRdo9U/s1600-h/s-ref-3.png&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 202px;&quot; src=&quot;http://2.bp.blogspot.com/_wgiUOehXWyI/SbinxMRj0cI/AAAAAAAAAPI/28a2sYRdo9U/s400/s-ref-3.png&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5312180224033804738&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;I gave the ReloadingDriver the single responsibility of hot reloading. It delegated the data access operation to the actual driver, to which it kept a private reference. Instead of dealing with state with flags, I refactored it according to the &lt;a href=&quot;http://en.wikipedia.org/wiki/State_pattern&quot;&gt;state pattern&lt;/a&gt; and used a &lt;a href=&quot;http://en.wikipedia.org/wiki/Null_object&quot;&gt;null object&lt;/a&gt; to represent the &quot;not ready&quot; state.&lt;br /&gt;&lt;br /&gt;To give you a better idea of how the state of the ReloadingDriver evolves, I have added a vertical time-line to the following diagram:&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://2.bp.blogspot.com/_wgiUOehXWyI/Sbii_I9juMI/AAAAAAAAAPA/HB5uvmYSXQY/s1600-h/s-ref-4.png&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 286px;&quot; src=&quot;http://2.bp.blogspot.com/_wgiUOehXWyI/Sbii_I9juMI/AAAAAAAAAPA/HB5uvmYSXQY/s400/s-ref-4.png&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5312174966104635586&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;Interestingly, the mechanism that performs the regular reload is the same the performs the initial load that transitions from &quot;not ready&quot; to &quot;Version1&quot;.&lt;br /&gt;&lt;br /&gt;As a closing note, nothing of this would have been possible without my best friends: the &lt;a href=&quot;http://java.sun.com/javase/6/docs/api/java/util/concurrent/Executor.html&quot;&gt;Executor&lt;/a&gt; and the &lt;a href=&quot;http://java.sun.com/javase/6/docs/api/java/util/concurrent/atomic/AtomicReference.html&quot;&gt;AtomicReference&lt;/a&gt;. I want to thank them here for their constant support in my concurrency software development endeavors.&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img width=&#039;1&#039; height=&#039;1&#039; src=&#039;https://blogger.googleusercontent.com/tracker/13243193-6052026997133879358?l=ddossot.blogspot.com&#039;/&gt;&lt;/div&gt;&lt;p&gt;&lt;a href=&quot;http://daviddossot.sys-con.com/node/1031715&quot; target=&quot;_blank&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <pubDate>Wed, 11 Mar 2009 21:01:00 EDT</pubDate>
 <guid isPermaLink="true">http://daviddossot.sys-con.com/node/1031715</guid>
 <comments>http://daviddossot.sys-con.com/node/1031715#feedback</comments>
</item>
<item>
 <title>SOA&#039;s Eulogy is Liberating</title>
 <link>http://daviddossot.sys-con.com/node/1031714</link>
 <description>One of the thoughts I gathered from last night&#039;s panel on the possible death of SOA, pertains to the natural consequence of the push back on the WS-DeathStar and the spike of interest in the REST architecture.&lt;br /&gt;&lt;br /&gt;So what is the consequence of dropping the dream of web-level distributed transactions and beyond-the-firewall data consistency?&lt;br /&gt;&lt;br /&gt;Except for Juval Löwy (who I guess was playing devil&#039;s advocate with a mischievous wit), the panelists were unanimous on the need to create systems that handle failures gracefully, can self-heal and achieve eventual consistency.&lt;br /&gt;&lt;br /&gt;David Platt said it very clearly: we need to design systems so they handle failures gracefully at each level of their architecture. Michele Leroux Bustamante added that this obviously does not remove the need for reliable storage (or messaging) at some point, but never beyond the firewall.&lt;br /&gt;&lt;br /&gt;They presented these concepts with a baffling unabashed attitude, which I immensely appreciated. &lt;span style=&quot;font-weight: bold;&quot;&gt;There is nothing more liberating than thought leaders debunking FUD.&lt;/span&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img width=&#039;1&#039; height=&#039;1&#039; src=&#039;https://blogger.googleusercontent.com/tracker/13243193-8621851255771049356?l=ddossot.blogspot.com&#039;/&gt;&lt;/div&gt;&lt;p&gt;&lt;a href=&quot;http://daviddossot.sys-con.com/node/1031714&quot; target=&quot;_blank&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <pubDate>Tue, 10 Mar 2009 15:54:00 EDT</pubDate>
 <guid isPermaLink="true">http://daviddossot.sys-con.com/node/1031714</guid>
 <comments>http://daviddossot.sys-con.com/node/1031714#feedback</comments>
</item>
<item>
 <title>Conversation with a Web Thread</title>
 <link>http://daviddossot.sys-con.com/node/1031713</link>
 <description>&lt;span style=&quot;color: rgb(0, 0, 102);&quot;&gt;DD: Hi Mr. Web Thread and thanks for joining us.&lt;/span&gt;&lt;br /&gt;WT: My pleasure. Do you mind if I stay in the pool?&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 102);&quot;&gt;DD: Hmm? Sure, why not. So, can you please tell us how is your life nowadays?&lt;/span&gt;&lt;br /&gt;WT: Life has been pretty good. I have become very popular recently and came to perform some massive gigs in highly trafficked web sites. I really like this pool.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 102);&quot;&gt;DD: Mmhh, okay. How do you think developers treat you, nowadays?&lt;/span&gt;&lt;br /&gt;WT: Well, I am glad you ask. I think things have improved a lot, thanks to the emergence of concepts like continuations and AJAX. Still, I sometimes get badly beaten by some reckless coders. This pool is awesome.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 102);&quot;&gt;DD: So, if you were to give a piece of advice to these programmers, what would it be?&lt;/span&gt;&lt;br /&gt;WT: I think that these developers only need to understand what is the ultimate goal of my life.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 102);&quot;&gt;DD: Which is?&lt;/span&gt;&lt;br /&gt;WT: Coming back to that pool!&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 102);&quot;&gt;DD: Pardon me?&lt;/span&gt;&lt;br /&gt;WT: You see, I get pulled of this pool very often and sometimes I am forced out of it for too long. In that case, I am like a fish out of water. And when I suffer like that, the whole application suffers.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 102);&quot;&gt;DD: So what you are saying is that developers should thrive to let you return to the pool as quick as possible?&lt;/span&gt;&lt;br /&gt;WT: Absolutely.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 102);&quot;&gt;DD: Whatever the cost may be?&lt;/span&gt;&lt;br /&gt;WT: Well, it depends of course, but if they can afford letting me return with slightly stale data, that is the thing to do.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 102);&quot;&gt;DD: Where would they get such a stale data from?&lt;/span&gt;&lt;br /&gt;WT: Oh, I realize I never introduced you to Mrs. Web Thread, née Cache. She usually takes care of this.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 102);&quot;&gt;DD: But ladies, sorry, caches are complex. They require eviction strategies, invalidation messages broadcasts, etc.&lt;/span&gt;&lt;br /&gt;WT: Or not. You can use a simple time-evicted opportunistic cache, provided it matches your business needs.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 102);&quot;&gt;DD: Ah, I see, something like a 5 minutes cache.&lt;/span&gt;&lt;br /&gt;WT: Or 5 seconds.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 102);&quot;&gt;DD: You got to be kidding me, what&#039;s a 5 seconds cache worth?&lt;/span&gt;&lt;br /&gt;WT: Do you have any idea of all the things I can do in 5 seconds? Do you realize that it is an agonizing eternity for me?&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 102);&quot;&gt;DD: Well, uh, I guess not. Let us lighten up the debate a little. Now that you are a rock star, thanks to your success in multi-million users web sites, do you get to sign a lot of autographs? Do people recognize you a lot?&lt;/span&gt;&lt;br /&gt;WT: Sure, I can hardly go anywhere without being spotted. But, believe it or not, it still happens that I get mixed up with my cousins.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 102);&quot;&gt;DD: Oh, you have cousins?&lt;/span&gt;&lt;br /&gt;WT: Yes, Worker Thread and Background Thread. Sometimes, I get confused with one of them and receive way too much work to do or work that simply does not concern me at all.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 102);&quot;&gt;DD: What do you do in that case?&lt;/span&gt;&lt;br /&gt;WT: As I said before: I become grumpy and the whole web tier suffers with me too. I kind of like to share my pain!&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 102);&quot;&gt;DD: OK, Mr. Web Thread, I think it is time we wrap up now. Thanks a lot for your time and sharing your experience with us.&lt;/span&gt;&lt;br /&gt;WT: You are welcome. Now back to the pool.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;Splash!&lt;/span&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img width=&#039;1&#039; height=&#039;1&#039; src=&#039;https://blogger.googleusercontent.com/tracker/13243193-4622436377091504115?l=ddossot.blogspot.com&#039;/&gt;&lt;/div&gt;&lt;p&gt;&lt;a href=&quot;http://daviddossot.sys-con.com/node/1031713&quot; target=&quot;_blank&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <pubDate>Fri, 27 Feb 2009 21:00:00 EST</pubDate>
 <guid isPermaLink="true">http://daviddossot.sys-con.com/node/1031713</guid>
 <comments>http://daviddossot.sys-con.com/node/1031713#feedback</comments>
</item>
<item>
 <title>Just Read: Statistics Hacks</title>
 <link>http://daviddossot.sys-con.com/node/1031712</link>
 <description>&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://www.shelfari.com/books/78434&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;http://ecx.images-amazon.com/images/I/511BfHtF-XL._SL240_.jpg&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;More than twenty years after my last statistics class, this book really tasted like a rejuvenating read. It is well structured, with an opening focused on theory followed by numerous applications in all sorts of domains (yes, including poker, though my preferred subject was the &lt;a href=&quot;http://en.wikipedia.org/wiki/Drake_equation&quot;&gt;Drake Equation&lt;/a&gt;). As such, the book will stand as a quick reference guide to which the reader will return every now and then.&lt;br /&gt;&lt;br /&gt;Recommended for aging minds in need of a refresher (like mine) or curious minds wanting to learn more about statistics and how relevant they are to their every day&#039;s life.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;As a side note, this is the first e-book I bought: I got it under EPUB format, which renders almost flawlessly on my Sony PSR-700 (texts, figures, schemas are good, very large tables are cut though). Kudos to O&#039;Reilly who do a truly great job with their &lt;/span&gt;&lt;a style=&quot;font-style: italic;&quot; href=&quot;http://oreilly.com/ebooks/&quot;&gt;e-books&lt;/a&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;, providing them in three formats&lt;/span&gt; &lt;span style=&quot;font-style: italic;&quot;&gt;and not limiting you in the number of times you download them (so I don&#039;t even bother backing-up my purchases).&lt;/span&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img width=&#039;1&#039; height=&#039;1&#039; src=&#039;https://blogger.googleusercontent.com/tracker/13243193-4764966458710765059?l=ddossot.blogspot.com&#039;/&gt;&lt;/div&gt;&lt;p&gt;&lt;a href=&quot;http://daviddossot.sys-con.com/node/1031712&quot; target=&quot;_blank&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <pubDate>Fri, 27 Feb 2009 20:32:00 EST</pubDate>
 <guid isPermaLink="true">http://daviddossot.sys-con.com/node/1031712</guid>
 <comments>http://daviddossot.sys-con.com/node/1031712#feedback</comments>
</item>
<item>
 <title>Standards vs. Upgrade pains</title>
 <link>http://daviddossot.sys-con.com/node/1031711</link>
 <description>In &lt;a href=&quot;http://memeagora.blogspot.com/2009/01/standards-based-vs-standardized-soa.html&quot;&gt;Standards Based vs. Standardized&lt;/a&gt; Neal Ford develops a very interesting rhetoric that is mainly focused on what he sees being &quot;&lt;span style=&quot;font-style: italic;&quot;&gt;wrong with SOA (Service Oriented Architecture) in the way that it&#039;s being sold by vendors&lt;/span&gt;&quot;, but really touches a vast subject that has many thought provoking ramifications.&lt;br /&gt;&lt;br /&gt;While considering the application upgrades I am involved in or that occur around me, it is clear that applications deployed on standardized platforms have easier upgrade paths. Or have they?&lt;br /&gt;&lt;br /&gt;Let me consider the whole spectrum of applications I am involved with and discuss the related upgrade pains, how standards play a role there and if they are worth the effort. I won&#039;t discuss the necessity of upgrading application platforms: I reckon everybody feels the same itch when they see an application running on a platform that is many releases behind its current revision.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Non-standardized&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Neal mentions ESBs as canonical non-standardized platforms, so I will start with them and consider my experience with following Mule versions. Many aspects of Mule are standards-based, from its protocol stacks to the zillions of libraries it is built upon (which I consider as being industry standards). Even its configuration mechanism piggybacks on Spring&#039;s schema driven configuration. What is not standardized are Mule&#039;s API and configuration syntax. Therefore they tend to evolve quickly, and sometimes drastically, as Mule expands and refines its feature base. Consequently, following Mule versions is not a small feat: it requires a pretty advanced knowledge of the platform to be performed right (and the assistance of extensive unit and integration tests, but everyone has this already, right?). Why would anyone willingly accept to jump through such hoops? Because it is worth it: being exposed to Mule&#039;s non-standard aspects is rewarded by a full access to its complete feature set and its full power.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Standardized&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;At the other end of the spectrum lies web applications that fully pack their dependencies and can be deployed on pretty much any container that understands their standardized configuration. A typical example is a Spring/Hibernate application deployed on JEE web container, like Tomcat or Jetty. It is to be noted that, even if this kind of applications can have very complex needs, their reliance on the JEE standard is actually quite small: a few entries in web.xml that hook some basic application entry points to the container and that is pretty much it. The rest is not standardized but fully resides in the realm of what the application controls (Spring and Hibernate configurations for example). Hence migrating between different versions or even different implementations of the JEE container is usually a no-brainer.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Somewhat standardized&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Finally, in the middle of the spectrum, we find the applications deployed on platforms where standards fall short of allowing them to easily follow releases. Consider a full fledged JEE application, say deployed on JBoss. In this case, two forces act against the standard. The first one is the limitation in scope of this standard: anything that has been left to the interpretation of the implementor will likely differ enough between major releases to cause troubles. The second force is the fact that the standard itself is a &lt;a href=&quot;http://se.ethz.ch/%7Emeyer/publications/OTHERS/scott_meyers/keyhole.pdf&quot;&gt;keyhole&lt;/a&gt; applied against the full range of features of the platform itself: these features are there, accessible, often compelling, and it requires a lot of willpower to refuse to use them directly (by shielding them behind a custom facade) or not at all (by using extra dependencies to get these needed features). These two forces combined usually lead to full-range JEE applications that do not evolve gracefully when their underlying standardized platform is upgraded.&lt;br /&gt;&lt;br /&gt;So, there is a clear trade off between having full access to a platform and being isolated from the disruptive aspects of its evolution over time. It is also true that standards with more teeth are probably needed (OSGi is an interesting one in this matter).&lt;br /&gt;&lt;br /&gt;But everybody knew this already.&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img width=&#039;1&#039; height=&#039;1&#039; src=&#039;https://blogger.googleusercontent.com/tracker/13243193-5931638583418341028?l=ddossot.blogspot.com&#039;/&gt;&lt;/div&gt;&lt;p&gt;&lt;a href=&quot;http://daviddossot.sys-con.com/node/1031711&quot; target=&quot;_blank&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <pubDate>Wed, 25 Feb 2009 21:12:00 EST</pubDate>
 <guid isPermaLink="true">http://daviddossot.sys-con.com/node/1031711</guid>
 <comments>http://daviddossot.sys-con.com/node/1031711#feedback</comments>
</item>
<item>
 <title>Two minutes on Ping.fm</title>
 <link>http://daviddossot.sys-con.com/node/1031710</link>
 <description>Always interested in sharing the futility of my own existence, I thought that I could use &lt;a href=&quot;http://ping.fm/&quot;&gt;Ping.fm&lt;/a&gt; to broadcast my boredom level (i.e. LinkedIn status) on different channels.&lt;br /&gt;&lt;br /&gt;All went fine until I hit the page for connecting my Ping.fm account to my LinkedIn one. See for yourself:&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://4.bp.blogspot.com/_wgiUOehXWyI/SaI-HVO6wzI/AAAAAAAAAMw/8oKAT2pmMHQ/s1600-h/pfm-li.png&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 179px;&quot; src=&quot;http://4.bp.blogspot.com/_wgiUOehXWyI/SaI-HVO6wzI/AAAAAAAAAMw/8oKAT2pmMHQ/s400/pfm-li.png&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5305871606675587890&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;Seriously, guys, you want the password of my LinkedIn account? Is this really the best we can do for integrating social networks? Are we waiting until the &lt;span style=&quot;font-weight: bold; color: rgb(255, 0, 0);&quot;&gt;Wrath of OWASP&lt;/span&gt; falls on us to fix this?&lt;br /&gt;&lt;br /&gt;Then I closed my Ping.fm account.&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img width=&#039;1&#039; height=&#039;1&#039; src=&#039;https://blogger.googleusercontent.com/tracker/13243193-519639821600944521?l=ddossot.blogspot.com&#039;/&gt;&lt;/div&gt;&lt;p&gt;&lt;a href=&quot;http://daviddossot.sys-con.com/node/1031710&quot; target=&quot;_blank&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <pubDate>Mon, 23 Feb 2009 00:51:00 EST</pubDate>
 <guid isPermaLink="true">http://daviddossot.sys-con.com/node/1031710</guid>
 <comments>http://daviddossot.sys-con.com/node/1031710#feedback</comments>
</item>
<item>
 <title>Integration Testing Asynchronous Services</title>
 <link>http://daviddossot.sys-con.com/node/1031709</link>
 <description>Whether you use &lt;a href=&quot;http://mulesource.org&quot;&gt;Mule&lt;/a&gt; or &lt;a href=&quot;http://www.springsource.org/spring-integration&quot;&gt;another integration framework&lt;/a&gt;, writing integration tests for asynchronous services can be a little tricky, as you may start running assertions in your main test thread while messages are still being processed.&lt;br /&gt;&lt;br /&gt;Suppose you want to ensure that your content based router sends messages to the expected target services. Your integration test suite will consist in sending valid and invalid messages to the input channel in front of this router and check they end-up in the expected destination services.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;But how to be sure that the delivery has happened and it is safe to start asserting values?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The naive solution to this problem consists in:&lt;br /&gt;&lt;pre name=&quot;code&quot; class=&quot;java&quot;&gt;Thread.sleep(1000);&lt;/pre&gt;&lt;br /&gt;It is naive because it arbitrarily slows down your test suite without giving any guarantee that the message will be delivered. It may work on your machine but the same suite running on a busy integration server will behave very differently: one second may not be enough a wait if the threads handling the message delivery behind the scene are slower than usual.&lt;br /&gt;&lt;br /&gt;A problematic fix to this broken solution consists in:&lt;br /&gt;&lt;pre name=&quot;code&quot; class=&quot;java&quot;&gt;while (messageNotReceived) Thread.sleep(1000);&lt;/pre&gt;&lt;br /&gt;This is problematic because if, for any reason, the message does not hit the expected service, this loop will hang the test suite for ever. Of course, you can add a counter to limit the loop and reduce the sleep time to be more reactive, but this amounts to re-inventing the wheel when higher level concurrency primitives are ready-made for that.&lt;br /&gt;&lt;br /&gt;Indeed, we can use a countdown latch to hold the main test thread until the message hits the expected service. Here is the code I use for my Mule integration testing:&lt;br /&gt;&lt;textarea name=&quot;code&quot; class=&quot;java&quot;&gt;&lt;br /&gt;private MuleMessage getMessageReceivedByService(final Runnable testAction,&lt;br /&gt;        final String expectedServiceName) throws Exception {&lt;br /&gt;&lt;br /&gt;    final AtomicReference&lt;MuleEventContext&gt; muleEventContextReference =&lt;br /&gt;            new AtomicReference&lt;MuleEventContext&gt;();&lt;br /&gt;&lt;br /&gt;    final CountDownLatch latch = new CountDownLatch(1);&lt;br /&gt;&lt;br /&gt;    muleContext.registerListener(new FunctionalTestNotificationListener() {&lt;br /&gt;        @Override&lt;br /&gt;        public void onNotification(final ServerNotification notification) {&lt;br /&gt;            if (expectedServiceName.equals(notification.getResourceIdentifier())) {&lt;br /&gt;                final FunctionalTestNotification functionalTestNotification = (FunctionalTestNotification) notification;&lt;br /&gt;                muleEventContextReference.set(functionalTestNotification.getEventContext());&lt;br /&gt;                latch.countDown();&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;    });&lt;br /&gt;&lt;br /&gt;    testAction.run();&lt;br /&gt;&lt;br /&gt;    assertTrue(&quot;Message did not reach service on time&quot;, latch.await(15,&lt;br /&gt;            TimeUnit.SECONDS));&lt;br /&gt;&lt;br /&gt;    return muleEventContextReference.get().getMessage();&lt;br /&gt;}&lt;br /&gt;&lt;/textarea&gt;&lt;br /&gt;I leverage the notification mechanism of Mule and the capacity its functional test component has to broadcast such an event when it is hit by a message. Though a Mule specific implementation, the design principle I discuss here is applicable to other situations.&lt;br /&gt;&lt;br /&gt;Notice how I pass the triggering action of the test (like sending a message with the MuleClient) as a Runnable to this method. This allows me to prepare a latch and register a listener before calling this Runnable and, then, to wait on the latch until it is lowered. When the execution comes back to the caller method, it can safely assess properties on the received message.&lt;br /&gt;&lt;br /&gt;Obviously, the test is designed so its normal execution leads to a message always hitting the right service. Hence, in practice, the wait on the latch is very short, way under the safeguard timeout of 15 seconds.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;But what if we want to test that no message will hit a particular service?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This is when things get tricky with asynchronous testing, because there is not systematic approach to testing the absence of an event when it can occur unpredictably in the future.&lt;br /&gt;&lt;br /&gt;One strategy I use is to turn the problem around and change the negative assertion into a positive one. For example, by always ensuring a message will go somewhere, even if it is a service that sends messages to oblivion. By doing so, instead of testing that a bad message never hits a good service, I test that a bad message hits the oblivion service.&lt;br /&gt;&lt;br /&gt;Do you have other advices to share about asynchronous testing?&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img width=&#039;1&#039; height=&#039;1&#039; src=&#039;https://blogger.googleusercontent.com/tracker/13243193-1194547393932704779?l=ddossot.blogspot.com&#039;/&gt;&lt;/div&gt;&lt;p&gt;&lt;a href=&quot;http://daviddossot.sys-con.com/node/1031709&quot; target=&quot;_blank&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <pubDate>Thu, 19 Feb 2009 18:32:00 EST</pubDate>
 <guid isPermaLink="true">http://daviddossot.sys-con.com/node/1031709</guid>
 <comments>http://daviddossot.sys-con.com/node/1031709#feedback</comments>
</item>
<item>
 <title>The Sin of Generalization</title>
 <link>http://daviddossot.sys-con.com/node/1031708</link>
 <description>The more I progress in my journey as a software engineer, the more I realize how our profession suffers from the Sin of Generalization. The good news is that this sin can be fought with a rope and a mast. Let me explain.&lt;br /&gt;&lt;br /&gt;This almost deadly sin manifests itself in two ways:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;A tool or a methodology that has been sucessful in one context gets generalized and becomes applied to other contexts, where it ill fits.&lt;/li&gt;&lt;li&gt;A generic platform or framework is created to solve all sorts of needs, while ad hoc solutions would have been more straight to the point.&lt;/li&gt;&lt;/ul&gt;This may sound funny from me, as I am the lead of &lt;a href=&quot;http://nxbre.org/&quot;&gt;NxBRE&lt;/a&gt;, a .NET generalized rule engine! The reality is that NxBRE, like all rules engines and al generalized tools, has a sweet spot where its usage makes sense. Outside of this sweet spot, using a generalized tool is in fact counterproductive, because the indiosyncracies it is bringing (limitations, bugs, specific configuration...) outweight its benefits.&lt;br /&gt;&lt;br /&gt;Of course, there is value in re-use and generic tools. The point of the matter is that it is always worth considering the relevance of a generic tool or methodology everytime you intend to use it. This sounds like an obvious statement but experience shows that generalized solutions are as attractive and noxious as &lt;a href=&quot;http://simple.wikipedia.org/wiki/Siren&quot;&gt;sirens&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Hence the rope and the mast.&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img width=&#039;1&#039; height=&#039;1&#039; src=&#039;https://blogger.googleusercontent.com/tracker/13243193-300817373125528429?l=ddossot.blogspot.com&#039;/&gt;&lt;/div&gt;&lt;p&gt;&lt;a href=&quot;http://daviddossot.sys-con.com/node/1031708&quot; target=&quot;_blank&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <pubDate>Fri, 23 Jan 2009 14:45:00 EST</pubDate>
 <guid isPermaLink="true">http://daviddossot.sys-con.com/node/1031708</guid>
 <comments>http://daviddossot.sys-con.com/node/1031708#feedback</comments>
</item>
<item>
 <title>Mule in Action, the Making of</title>
 <link>http://daviddossot.sys-con.com/node/1031707</link>
 <description>Now that dust has started to settle, I have some time to reflect on writing &lt;a href=&quot;http://muleinaction.com/&quot;&gt;Mule in Action&lt;/a&gt; and share my experience with this process.&lt;br /&gt;&lt;br /&gt;I will spare you the &quot;&lt;span style=&quot;font-style: italic;&quot;&gt;it&#039;s a long and exhausting process that is a true trial for one&#039;s will&lt;/span&gt;&quot;, because you already know that such an endeavor requires a personal investment that is beyond whatever time-consuming hobby you could have (that is basically about sacrificing all evenings and Saturdays on the altar of authorship for a solid 6 months).&lt;br /&gt;&lt;br /&gt;A technical book like &lt;a href=&quot;http://muleinaction.com/&quot;&gt;Mule in Action&lt;/a&gt; gets its relevance from the richness and correctness of the examples it contains. Inspired by Brian Goetz&#039;s experience about writing &lt;a href=&quot;http://www.briangoetz.com/blog/?p=51&quot;&gt;Java Concurrency in Practice&lt;/a&gt;, &lt;a href=&quot;http://johndemic.blogspot.com/&quot;&gt;John&lt;/a&gt; and I have decided to treat our examples like a full fledged project. For this we have created a &lt;a href=&quot;http://code.google.com/p/muleinaction/&quot;&gt;Google code project&lt;/a&gt; and built all the samples with Maven. These examples are sometimes started by a command line script, but the true value resides in the unit and integration tests that cover them.&lt;br /&gt;&lt;br /&gt;These tests are a life saver because the community edition of Mule 2, especially in its early days, was a moving target, with non-backward compatible API changes and deep behavioral alteration occurring between releases. Any time a new version of Mule is released, we upgrade to it and run a full build of the book examples. Anything that breaks signals a potential change in the book itself. But how do we know if the book needs to be changed and where?&lt;br /&gt;&lt;br /&gt;We did not use a code extraction/insertion script, like Brian did, but we decided to enable a complete traceability by tagging our code fragments and keeping this tag along them in a hidden field in the body of the book. This way, whenever we modify the source code, we know if and where the book is affected.&lt;br /&gt;&lt;br /&gt;This leads us to the format of the book itself. We opted for &lt;a href=&quot;http://www.docbook.org/&quot;&gt;DocBook&lt;/a&gt;, which is &quot;just&quot; XML backed by a schema. What does this gives us? First, the possibility to &lt;span style=&quot;font-family:courier new;&quot;&gt;grep&lt;/span&gt; for a specific code tag or sentence and replace using simple commands. Second, the possibility to &lt;span style=&quot;font-family:courier new;&quot;&gt;diff&lt;/span&gt; two versions of the text (because, of course, we store all the chapters and related images in Subversion): this is extremely convenient in a multi-author environment like ours. And, finally, the possibility to use a simple but strict writing environment. Indeed, you do not need a word processor for writing a book: it is just a useless collection of bells and whistles. Any editor with schema validation and a basic spell checker is all you need.&lt;br /&gt;&lt;br /&gt;That is for the tooling but what about the practice itself? I have quickly realized that, like a movie, a book is produced in an out-of-order manner. Trying to write a whole chapter in the reading order is futile and could lead to a very frustrating writer&#039;s block. Once I started to accept this idea, writing became way easier, with chapters appearing in the order inspiration was leading me to and backing code samples where being created. Even for a purely technical book, inspiration matters: it is a pretty stubborn animal that goes only the way it wants (am I talking about &lt;a href=&quot;http://www.mulesource.org/&quot;&gt;Mule&lt;/a&gt;?) and must not be forced otherwise.&lt;br /&gt;&lt;br /&gt;Finally, I have found that music was an extremely powerful productivity booster. Maintaining a high productivity is essential for such a technical book, which is condemned to premature obsolescence if it is not written within a short period of time. Listening to lyric-less music was for me a way to boostrap my writing sessions, while oftentimes I would have preferred to call the day over and get some rest!&lt;br /&gt;&lt;br /&gt;We struggled hard to stay away from writing a user guide, which is &lt;a href=&quot;http://mulesource.org/display/MULE2USER/Home&quot;&gt;available on-line&lt;/a&gt; anyway, and opted to focus on practical examples touching most of the common and advanced usage of this ESB. Hopefully, the book will prove good enough for our readers to get both a deep and wide coverage of Mule.&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img width=&#039;1&#039; height=&#039;1&#039; src=&#039;https://blogger.googleusercontent.com/tracker/13243193-8405703307047995718?l=ddossot.blogspot.com&#039;/&gt;&lt;/div&gt;&lt;p&gt;&lt;a href=&quot;http://daviddossot.sys-con.com/node/1031707&quot; target=&quot;_blank&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <pubDate>Sun, 18 Jan 2009 18:19:00 EST</pubDate>
 <guid isPermaLink="true">http://daviddossot.sys-con.com/node/1031707</guid>
 <comments>http://daviddossot.sys-con.com/node/1031707#feedback</comments>
</item>
<item>
 <title>Beware Phony Model Objects!</title>
 <link>http://daviddossot.sys-con.com/node/1031706</link>
 <description>While I am refactoring huge amounts of code out of EJB2 (and trying not to break too much things), I have noticed a bad design pattern that is so noxious I thought I should blog about it.&lt;br /&gt;&lt;br /&gt;I call this the &lt;span style=&quot;font-weight: bold;&quot;&gt;Phony Model Objects&lt;/span&gt; (PMO) antipattern.&lt;br /&gt;&lt;br /&gt;It basically amounts to sharing as first class model objects entities that should never be publicly exposed. These bad citizens may look inocuous at first glance. In fact, they oftentimes carry a deep functional dependency on the technical framework they depend from or are subject to change at a different pace than actual domain objects would do it.&lt;br /&gt;&lt;br /&gt;Interestingly I have found that all these PMOs are generated: whether they are EJB2 artifacts (home interfaces, entity beans, value objects, primary keys...) or web service client stubs. This re-enforces the idea that they are by-products and should be treated as such.&lt;br /&gt;&lt;br /&gt;So, if you return or accept this kind of PMOs in public methods, do not wait and immediately refactor your code to share only proper domain model objects and keep the phony ones hidden behind the surface of your API.&lt;br /&gt;&lt;br /&gt;This will eventually save you a lot of pain and efforts when the technical framework to which your PMOs happen to be coupled to will disappear and you will have to move away from them. Trust me on that one!&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img width=&#039;1&#039; height=&#039;1&#039; src=&#039;https://blogger.googleusercontent.com/tracker/13243193-297679708081253561?l=ddossot.blogspot.com&#039;/&gt;&lt;/div&gt;&lt;p&gt;&lt;a href=&quot;http://daviddossot.sys-con.com/node/1031706&quot; target=&quot;_blank&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <pubDate>Wed, 31 Dec 2008 20:35:00 EST</pubDate>
 <guid isPermaLink="true">http://daviddossot.sys-con.com/node/1031706</guid>
 <comments>http://daviddossot.sys-con.com/node/1031706#feedback</comments>
</item>
<item>
 <title>MuleCast: A Conversation with the creator of the JCR Transport</title>
 <link>http://daviddossot.sys-con.com/node/1031705</link>
 <description>Ross Mason has interviewed me (again) about the &lt;a href=&quot;http://www.mulesource.org/display/JCR/Home&quot;&gt;JCR transport for Mule&lt;/a&gt;. I also had a chance to give a few words about the brand new &lt;a href=&quot;http://www.mulesource.org/display/COMMONRETRYPOLICIES&quot;&gt;Common Retry Policies module&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://blog.mulesource.org/2008/12/mulecast-a-conversation-with-the-creator-of-the-jcr-transport/&quot;&gt;Enjoy&lt;/a&gt;!&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img width=&#039;1&#039; height=&#039;1&#039; src=&#039;https://blogger.googleusercontent.com/tracker/13243193-6833676805854165942?l=ddossot.blogspot.com&#039;/&gt;&lt;/div&gt;&lt;p&gt;&lt;a href=&quot;http://daviddossot.sys-con.com/node/1031705&quot; target=&quot;_blank&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <pubDate>Tue, 23 Dec 2008 15:11:00 EST</pubDate>
 <guid isPermaLink="true">http://daviddossot.sys-con.com/node/1031705</guid>
 <comments>http://daviddossot.sys-con.com/node/1031705#feedback</comments>
</item>
<item>
 <title>A month of e-reading</title>
 <link>http://daviddossot.sys-con.com/node/1031704</link>
 <description>After months of procrastination, I have decided to give a try to e-ink and go paperless as much as I can. I have been using a &lt;a href=&quot;http://www.sonystyle.ca/commerce/servlet/ProductDetailDisplay?storeId=10001&amp;amp;catalogId=10001&amp;amp;langId=-1&amp;amp;productId=1005736&quot;&gt;Sony PRS-700&lt;/a&gt; for a month now and I must say I am really happy with it.&lt;br /&gt;&lt;br /&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://i63.photobucket.com/albums/h122/ddossot/misc/Mia-Ereader.jpg&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 301px; height: 384px;&quot; src=&quot;http://i63.photobucket.com/albums/h122/ddossot/misc/Mia-Ereader.jpg&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;This picture does not render the actual contrast and precision of the e-ink surface.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;I opted for the Sony reader because of its openness: you plug it in an USB port and voila! You are free to drag and drop files into the reader.&lt;br /&gt;&lt;br /&gt;I used it in all sorts of lighting and places: in the dim light and shaky environment of public transportation to the comfort of a sun lit office. So far I successfully used it for:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Paperless meetings: instead of printing meetings&#039; material, I now upload them to my reader.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Long blog entries: I simply can not read long articles on a computer screen so I use the reader for long blog posts.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Reference guides: the search feature of the reader is convenient to find passages of reference guides or technical books (like &lt;a href=&quot;http://muleinaction.com/&quot;&gt;Mule in Action&lt;/a&gt;).&lt;/li&gt;&lt;li&gt;Book reviews: instead of printing the books I am reviewing, I now upload them to the reader. The annotation feature is a little too slow to take long notes on pages but fast enough to attach a few words that are reminders for building the final review.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Full fledged e-book of course! So far, I have only read a few technical e-books from InfoQ. Hundreds of pages later, I can tell it is really a great reading experience. I sometimes have to zoom on a schema, but most of the time using the landscape orientation guarantees a seamless reading.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;Despite wishing a bigger screen for a smaller price (it&#039;s Christmas time after all), my only concrete suggestion to Sony would be the addition of a smart zoom mode that would automatically trim all the useless white margins that oftentimes waste PDFs&#039; page estate.&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img width=&#039;1&#039; height=&#039;1&#039; src=&#039;https://blogger.googleusercontent.com/tracker/13243193-651880454957756942?l=ddossot.blogspot.com&#039;/&gt;&lt;/div&gt;&lt;p&gt;&lt;a href=&quot;http://daviddossot.sys-con.com/node/1031704&quot; target=&quot;_blank&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <pubDate>Sat, 20 Dec 2008 14:52:00 EST</pubDate>
 <guid isPermaLink="true">http://daviddossot.sys-con.com/node/1031704</guid>
 <comments>http://daviddossot.sys-con.com/node/1031704#feedback</comments>
</item>
<item>
 <title>How To Guarantee That Your Software Will Suck</title>
 <link>http://daviddossot.sys-con.com/node/1031703</link>
 <description>You may have recently read two eponymic &lt;a href=&quot;http://blog.objectmentor.com/articles/2008/12/08/how-to-guarantee-that-your-software-will-suck&quot;&gt;blog&lt;/a&gt; &lt;a href=&quot;http://www.codethinked.com/post/2008/12/07/How-To-Guarantee-That-Your-Software-Will-Suck.aspx&quot;&gt;posts&lt;/a&gt; about this crucial subject, so I won&#039;t give you ten more ways to suck at programming but just one.&lt;br /&gt;&lt;br /&gt;Here it is:&lt;br /&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Don&#039;t critique your code.&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;If you never ever have a critique view of your code, you are on your way to write software that sucks.&lt;br /&gt;&lt;br /&gt;People who pair program may chuckle: they already have a continuous critique process that helps producing high quality code. People who practice code reviews may chuckle too: they already have a process (and, often, tools) for ensuring code is properly discussed.&lt;br /&gt;&lt;br /&gt;So what is left for those who do not pair program or practice code review? The same applies: whenever you come back to your own code, critique it. Oftentimes, while adding a new feature, you will realize that a particular design is convoluted, a class is ill named or a method is hard to read.&lt;br /&gt;&lt;br /&gt;Do not fall into complacency with your own code: love it, hate it, critique it, refactor it!&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img width=&#039;1&#039; height=&#039;1&#039; src=&#039;https://blogger.googleusercontent.com/tracker/13243193-4088444047658421184?l=ddossot.blogspot.com&#039;/&gt;&lt;/div&gt;&lt;p&gt;&lt;a href=&quot;http://daviddossot.sys-con.com/node/1031703&quot; target=&quot;_blank&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <pubDate>Tue, 16 Dec 2008 00:01:00 EST</pubDate>
 <guid isPermaLink="true">http://daviddossot.sys-con.com/node/1031703</guid>
 <comments>http://daviddossot.sys-con.com/node/1031703#feedback</comments>
</item>
<item>
 <title>Software That Kills</title>
 <link>http://daviddossot.sys-con.com/node/1031702</link>
 <description>In the latest installment of his monthly &lt;a href=&quot;http://www.computer.org/portal/site/software/&quot;&gt;IEEE Software&lt;/a&gt; column, Philippe Kruchten asks about the relevance of &lt;a href=&quot;http://www.computer.org/portal/cms_docs_software/software/homepage/2008/s6car.pdf&quot;&gt;licensing software engineers&lt;/a&gt;. In this article, he states:&lt;br /&gt;&lt;br /&gt;&lt;blockquote style=&quot;font-style: italic;&quot;&gt;The only purpose of licensing software engineers is to protect the public.&lt;/blockquote&gt;&lt;br /&gt;He then details the reasons why it makes sense to license people who write or certify “software-that-kills”.&lt;br /&gt;&lt;br /&gt;Even if I am not licensed (and may never be), I fully agree with his positions. In fact, I feel compelled to ask why limiting licensing only to software that kills people. &lt;span style=&quot;font-weight: bold;&quot;&gt;What about software that kills businesses?&lt;/span&gt; &lt;span style=&quot;font-weight: bold;&quot;&gt;What about software that kills privacy?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Except when human lives are in jeopardy, software developers are basically free to do whatever they want when they build an application. Businesses and end users are left to goodwill and luck when it comes to receiving from software developers the professional standards they can legitimately expect from them.&lt;br /&gt;&lt;br /&gt;Should licensed software engineers be engaged to at least review the design and architecture of software that can kill businesses or privacy? Would it be enough to restore trust in a profession from which the common wisdom is to expect so few?&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img width=&#039;1&#039; height=&#039;1&#039; src=&#039;https://blogger.googleusercontent.com/tracker/13243193-8692869871574393101?l=ddossot.blogspot.com&#039;/&gt;&lt;/div&gt;&lt;p&gt;&lt;a href=&quot;http://daviddossot.sys-con.com/node/1031702&quot; target=&quot;_blank&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <pubDate>Sat, 13 Dec 2008 18:23:00 EST</pubDate>
 <guid isPermaLink="true">http://daviddossot.sys-con.com/node/1031702</guid>
 <comments>http://daviddossot.sys-con.com/node/1031702#feedback</comments>
</item>
<item>
 <title>A new module for Mule!</title>
 <link>http://daviddossot.sys-con.com/node/1031701</link>
 <description>I am happy to announce the very first release of the Common Retry Policies module for Mule 2.&lt;br /&gt;&lt;br /&gt;The goal of this project is to encourage the Mule community to nurture a set of production grade retry policies. At this point, the available policies have been tested only with a limited set of transports (JCR with JBossMQ and ActiveMQ).&lt;br /&gt;&lt;br /&gt;I expect the feedback of the community under several forms:&lt;br /&gt;&lt;p&gt; &lt;/p&gt;&lt;ul&gt;&lt;li&gt;Configuration samples that worked for you,&lt;/li&gt;&lt;li&gt;Bug reports, fixes and improvement patches,&lt;/li&gt;&lt;li&gt;Features requests.&lt;/li&gt;&lt;/ul&gt; Visit  &lt;a class=&quot;jive-link-external&quot; href=&quot;http://www.mulesource.org/display/COMMONRETRYPOLICIES/Home&quot;&gt;the project page&lt;/a&gt;  for configuration samples, links to the downloadable artifacts (Maven, standalone distribution) and to JIRA.&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img width=&#039;1&#039; height=&#039;1&#039; src=&#039;https://blogger.googleusercontent.com/tracker/13243193-4793844081385255627?l=ddossot.blogspot.com&#039;/&gt;&lt;/div&gt;&lt;p&gt;&lt;a href=&quot;http://daviddossot.sys-con.com/node/1031701&quot; target=&quot;_blank&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <pubDate>Sat, 13 Dec 2008 16:13:00 EST</pubDate>
 <guid isPermaLink="true">http://daviddossot.sys-con.com/node/1031701</guid>
 <comments>http://daviddossot.sys-con.com/node/1031701#feedback</comments>
</item>
<item>
 <title>Hope in hardship?</title>
 <link>http://daviddossot.sys-con.com/node/1031700</link>
 <description>&lt;blockquote&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;Hard times provide opportunity for change. Can&#039;t afford for a project to fail? Applying agile development principles can help. Doing projects with fewer people? Applying agile development principles can help. Limited resources throw options in sharp relief where a surfeit of resources makes putting off change easier.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style=&quot;text-align: right;&quot;&gt;Kent Beck, &lt;a href=&quot;http://www.linkedin.com/newsArticle?viewDiscussion=&amp;amp;articleID=19153559&amp;amp;gid=1010877&amp;amp;goback=.hom.ana_1010877_1228415448004_1&quot;&gt;posted in Agile Interest Group Luxembourg&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;Right now every organisation is assessing all their costs (most companies have cut between 10-30% of their workforce). In this process, CIO and Managers are being asked to do more with less, to keep the engine running with half the budget. This means they have to look to open source.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style=&quot;text-align: right;&quot;&gt;Ross Mason, &lt;a href=&quot;http://rossmason.blogspot.com/2008/12/open-source-upturn-in-economic-downturn.html&quot;&gt;from his blog&lt;/a&gt;.&lt;br /&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;br /&gt;These sound like there is a future for agile minded open source addicted developers out there. Time will tell...&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img width=&#039;1&#039; height=&#039;1&#039; src=&#039;https://blogger.googleusercontent.com/tracker/13243193-8712241782168252668?l=ddossot.blogspot.com&#039;/&gt;&lt;/div&gt;&lt;p&gt;&lt;a href=&quot;http://daviddossot.sys-con.com/node/1031700&quot; target=&quot;_blank&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <pubDate>Thu, 04 Dec 2008 13:42:00 EST</pubDate>
 <guid isPermaLink="true">http://daviddossot.sys-con.com/node/1031700</guid>
 <comments>http://daviddossot.sys-con.com/node/1031700#feedback</comments>
</item>
<item>
 <title>Last Night Eclipse Demo Camp</title>
 <link>http://daviddossot.sys-con.com/node/1031699</link>
 <description>I attended my first &lt;a href=&quot;http://wiki.eclipse.org/Eclipse_DemoCamps_November_2008/Vancouver&quot;&gt;Eclipse Demo Camp last night in Vancouver&lt;/a&gt; and it was really a great event! Of course, the profusion of food and beer offered by the Eclipse Foundation at the end of the evening surely helped building such a great impression...&lt;br /&gt;&lt;br /&gt;The whole evening was driven by the &lt;a href=&quot;http://tasktop.com/&quot;&gt;Tasktop&lt;/a&gt; guys, which gave us a chance to get a feel of the interesting ecosystem that is growing around Mylyn. I would like to turn the spotlight on two projects which are worth discovering on your own:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;http://programmerproductivity.info/tripoli/index.php&quot;&gt;Tripoli&lt;/a&gt;, an EclEmma-powered code coverage diff tool that allows you to pinpoint issues in an efficient manner.&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;http://pleiad.dcc.uchile.cl/tod/&quot;&gt;TOD&lt;/a&gt;, a so-called omniscient debugger that allows you to do back-in-time debugging without a DeLorean (which made me think a lot about what &lt;a href=&quot;http://www.replaysolutions.com/&quot;&gt;ReplaySolutions&lt;/a&gt; is building).&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;These two projects are brilliant illustrations that academia can produce concrete results in software engineering. That is surely encouraging for practitioners!&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;As a closing note, if you happen to be in Luxembourg tomorrow evening be sure to hit the &lt;/span&gt;&lt;a style=&quot;font-style: italic;&quot; href=&quot;http://wiki.eclipse.org/Eclipse_DemoCamps_November_2008/Luxembourg&quot;&gt;Eclipse Demo Camp&lt;/a&gt;&lt;span style=&quot;font-style: italic;&quot;&gt; over there. You will have a chance to see &lt;/span&gt;&lt;a style=&quot;font-style: italic;&quot; href=&quot;http://zepag.blogspot.com/&quot;&gt;Pierre-Antoine&lt;/a&gt;&lt;span style=&quot;font-style: italic;&quot;&gt; and &lt;/span&gt;&lt;a style=&quot;font-style: italic;&quot; href=&quot;http://fdewasmes.free.fr&quot;&gt;Fabrice&lt;/a&gt;&lt;span style=&quot;font-style: italic;&quot;&gt; live, which is really worth the trip!&lt;/span&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img width=&#039;1&#039; height=&#039;1&#039; src=&#039;https://blogger.googleusercontent.com/tracker/13243193-7671253266885068296?l=ddossot.blogspot.com&#039;/&gt;&lt;/div&gt;&lt;p&gt;&lt;a href=&quot;http://daviddossot.sys-con.com/node/1031699&quot; target=&quot;_blank&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <pubDate>Wed, 26 Nov 2008 17:08:00 EST</pubDate>
 <guid isPermaLink="true">http://daviddossot.sys-con.com/node/1031699</guid>
 <comments>http://daviddossot.sys-con.com/node/1031699#feedback</comments>
</item>
<item>
 <title>ESB Testing Strategies with Mule</title>
 <link>http://daviddossot.sys-con.com/node/665712</link>
 <description>To be able to do anything useful, an ESB must be configured with all sorts of parameters, from endpoint connection URIs to message transformation scripts to content-based routing definitions. Moreover, ESBs like Mule can host custom components, which will process messages and perform user-specific actions on them. &lt;p&gt;&lt;a href=&quot;http://daviddossot.sys-con.com/node/665712&quot; target=&quot;_blank&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <pubDate>Sun, 07 Sep 2008 08:30:00 EDT</pubDate>
 <guid isPermaLink="true">http://daviddossot.sys-con.com/node/665712</guid>
 <comments>http://daviddossot.sys-con.com/node/665712#feedback</comments>
</item>
</channel>
</rss>
