<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"><channel><description>
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));

var pageTracker = _gat._getTracker("UA-616987-2");
pageTracker._initData();
pageTracker._trackPageview();
</description><title>Reblog</title><generator>Tumblr (3.0; @reborg)</generator><link>http://reborg.tumblr.com/</link><item><title>How Ruby gems boost productivity</title><description>&lt;p&gt;The other day I was considering the huge amount of tiny gems and plug-ins that the Ruby and Rails community produces compared to the world of other more “enterprise” languages like Java or C#. One of the main differences seems to be the size: a gem can be anything from a dozen lines up to a fully featured self-contained component. I don’t have numbers to support this right now, but I have the impression that the average Java library is usually much bigger that the average gem.&lt;/p&gt;
&lt;p&gt;One of our Rails project at the studio is a kind of receptacle for bleeding edge Rails plugins: if while reading the news I find a new cool “fu” gem you can be pretty sure that it’s already installed and running in production thanks to &lt;a href="http://twitter.com/njackson" target="_blank"&gt;Nate&lt;/a&gt; :) The same often happens with Java projects: it’s easy to find a web application war file of 80+ megs full of “lightweight” Java libs. So while the Java application increases in size of a few megabytes for each new library, the increase in size in the Rails application typical plugin is barely noticeable (and sources/docs are always part of the installation).&lt;/p&gt;
&lt;p&gt;I think the reason of this difference is that in Java the price of having dependencies is much higher than Ruby so a Java developer thinks twice before adding another dependency on the classpath. If you think about it it’s just a couple of years that the Java community is creating smarter building tools. But before Maven was just a pain for large projects driven by Ant. &lt;/p&gt;
&lt;p&gt;The conclusion is that in Java the adoption threshold for a new library is much higher. In other words the library must embed a consistent added value to enter the project while libraries with a bunch of helpers methods are worth re-writing instead. This is exactly the opposite of a Rails plugin: there are tons of them consisting of few lines of code, solving everyday Rails problems, which are happily packaged and used as gems. Therefore gems are fine-grained compared to the average Java lib.&lt;/p&gt;
&lt;p&gt;There are amazing side-effects of having fine grained gems:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;the Ruby community experiences a short satisfaction cycle effect which, I think, is the most powerful motivation booster.&lt;br/&gt;
&lt;/li&gt;
&lt;li&gt;the Ruby community can benefit right away of quick fixes of everyday programming issues without waiting for the next light-weight framework.&lt;br/&gt;
&lt;/li&gt;
&lt;li&gt;Ruby gems are low-ceremony packages in which installing instructions are almost like following an IM transcription by the developer. This brings a sense of enlarged team that again boost productivity.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In conclusion: why Ruby allows for fine-granularity community support? At the root I think there is the complexity of the class-path mechanism for static typed languages that renders dependency management of libraries so cumbersome. Without an easy way of loading classes you have to pay much more attention during the building process about what dependencies you introduce and in which order. Also the fact that the rubygems support was there from the beginning and is almost part of the language is for sure another strong point.&lt;/p&gt;</description><link>http://reborg.tumblr.com/post/43001697</link><guid>http://reborg.tumblr.com/post/43001697</guid><pubDate>Mon, 21 Jul 2008 08:24:00 -0500</pubDate></item><item><title>Ruby Driven Development 4 Java
A screencast illustrating how to...</title><description>&lt;object type="application/x-shockwave-flash" width="400" height="300" data="http://vimeo.com/moogaloop.swf?clip_id=1283592&amp;server=vimeo.com&amp;fullscreen=1&amp;show_title=1&amp;show_byline=0&amp;show_portrait=0&amp;color=00ADEF"&gt;&lt;param name="quality" value="best" /&gt;&lt;param name="allowscriptaccess" value="always" /&gt;&lt;param name="allowfullscreen" value="true" /&gt;&lt;param name="scale" value="showAll" /&gt;&lt;param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=1283592&amp;server=vimeo.com&amp;fullscreen=1&amp;show_title=1&amp;show_byline=0&amp;show_portrait=0&amp;color=00ADEF" /&gt;&lt;embed src="http://www.vimeo.com/moogaloop.swf?clip_id=1283592&amp;server=www.vimeo.com&amp;show_title=1&amp;show_byline=0&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="400" height="300"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;&lt;b&gt;Ruby Driven Development 4 Java&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;A screencast illustrating how to install and use Buildr, Rspec and the Story Runner to test first a Java application. It’s long enough (1:15) to explain also some tricks and concepts behind BDD but the main goal is to explain how to move quickly from plain text requirements to working code from Ruby to Java. I’m planning to create a screencast for each user story and talk more about BDD and tracking. If you want to follow the fonts on the screen, please see the HD version on &lt;a href="http://www.vimeo.com/1283592" target="_blank"&gt;Vimeo&lt;/a&gt;. Have fun!&lt;/p&gt;
&lt;p&gt;Tech Details:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Video recording: &lt;a href="http://www.shinywhitebox.com/home/home.html" target="_blank"&gt;iShowU&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Keystrokes:  &lt;a href="http://stephendeken.net/wiki/software/keycastr/" target="_blank"&gt;KeyCastr&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Post processing: none!&lt;/li&gt;
&lt;li&gt;Format: H264&lt;/li&gt;
&lt;/ul&gt;</description><link>http://reborg.tumblr.com/post/41043378</link><guid>http://reborg.tumblr.com/post/41043378</guid><pubDate>Sat, 05 Jul 2008 00:37:00 -0500</pubDate></item><item><title>Jython Reborn</title><description>&lt;p&gt;&lt;img align="left" src="http://www.jython.org/css/jython.png" width="100" height="65"/&gt;Discussing at lunch with &lt;a href="http://jakescruggs.blogspot.com/" target="_blank"&gt;Jake&lt;/a&gt; today about &lt;a href="http://www.jython.org/Project/" target="_blank"&gt;Jython&lt;/a&gt; I said that Python is the real missing language from the JVM and Sun should be interested in bringing Python on the JVM exactly as JRuby. Well I learned tonight listening to &lt;a href="http://weblog.lonelylion.com/" target="_blank"&gt;Chris McAvoy&lt;/a&gt; at the &lt;a href="http://polyglotprogrammers.com/" target="_blank"&gt;Polyglot Programmer&lt;/a&gt; meeting that Jython is far from being dead. Judging from the fact that the current project leader was hired by Sun some months ago it looks like the future will be full of surprises. &lt;a href="http://www.developer.com/java/other/article.php/3748556" target="_blank"&gt;Here’s&lt;/a&gt; an interesting article by Chris about it.&lt;/p&gt;
&lt;p&gt;To further support the good news, we also had the Django on Jython practical demo tonight. &lt;a href="http://www.djangoproject.com/" target="_blank"&gt;Django&lt;/a&gt; is similar to Rails, with a nice embedded scaffolding which doesn’t require a specific generation step. No migrations though, but Python has an impressive set of libraries to offer that would be really nice to have on the JVM. And, by the way, Python is a powerful language even without considering the libraries. I developed only one console application with Python to handle huge &lt;a href="http://root.cern.ch/" target="_blank"&gt;Root&lt;/a&gt; tuples for physics analysis on the grid and I was up and running with all the TDD tooling in a week. Great experience.&lt;/p&gt;
&lt;p&gt;It’s surprising to see how the robustness and slick design of the JVM is also the worst enemy of Java the language. The fact that Sun is pushing so hard on the direction of multiple languages on the JVM makes me think that Java has started an inexorable but well planned decline.&lt;/p&gt;</description><link>http://reborg.tumblr.com/post/40004843</link><guid>http://reborg.tumblr.com/post/40004843</guid><pubDate>Thu, 26 Jun 2008 22:43:00 -0500</pubDate></item><item><title>Go Scott Go!</title><description>&lt;p&gt;&lt;img height="136" width="100" src="http://www.hanselman.com/blog/images/author.jpg" align="left"/&gt;This is a perfect example of cross-language person, someone who lives “on the other side” but it’s a pleasure to &lt;a href="http://www.hanselminutes.com/" target="_blank"&gt;listen to&lt;/a&gt; and &lt;a href="http://www.hanselman.com/blog/" target="_blank"&gt;reading&lt;/a&gt; about. It happened already several times that in his podcast he interviews all sort of people, not necessarily M$ connected.&lt;/p&gt;
&lt;p&gt;I’m impressed by how different the same interview can be when on the interviewer side of the microphone there is someone smart and prepared. Give it a try: &lt;a href="http://www.hanselminutes.com/default.aspx?showID=136" target="_blank"&gt;here’s&lt;/a&gt; Tom and Mary Poppendieck interviewed by Scott Hanselman in his weekly podcast and &lt;a href="http://agiletoolkit.libsyn.com/index.php?post_id=115175" target="_blank"&gt;this&lt;/a&gt; is Bob Payne’s AgileToolkit version. Scott questions are way more interesting forcing the interviewee to be careful in their replies. Not counting that most of the time I don’t care about interviewers talking about their own experience instead of making the interview. The overall effect for you as a listener is to get more involved and learn much more.&lt;/p&gt;
&lt;p&gt;I eneded up hoping that Scott can interview everybody else in his podcast. Other episodes that I suggest you to listen and I really enjoyed are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href="http://www.hanselminutes.com/default.aspx?showID=126" target="_blank"&gt;Distributed Source Control with Git&lt;/a&gt;&lt;br/&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="http://www.hanselminutes.com/default.aspx?showID=90" target="_blank"&gt;Be a Better Developer in Six Months&lt;/a&gt;&lt;br/&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="http://www.hanselminutes.com/default.aspx?showID=82" target="_blank"&gt;Scott talks to Martin Fowler and David Heinemeier Hansson&lt;/a&gt;&lt;br/&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;There is of course much more &lt;a href="http://www.hanselminutes.com/archives.aspx" target="_blank"&gt;here&lt;/a&gt;.&lt;/p&gt;</description><link>http://reborg.tumblr.com/post/39922242</link><guid>http://reborg.tumblr.com/post/39922242</guid><pubDate>Thu, 26 Jun 2008 08:53:08 -0500</pubDate></item><item><title>Strangling Strategies</title><description>&lt;p&gt;I first heard about the strangler metaphor from &lt;a href="http://www.martinfowler.com/bliki/StranglerApplication.html" target="_blank"&gt;Martin Fowler’s blog&lt;/a&gt;. In that context the strangler was any feature added to an existing legacy system using more modern criteria or technologies with the goal of gradually replace the legacy codebase. It’s actually more a strategy than a classic pattern, in the sense that depending on the specific case the steps to move from an old to a new system can be drastically different.&lt;/p&gt;
&lt;p&gt;Well, with great pleasure I attended Tyler’s &lt;a href="http://www.uniforum.chi.il.us/meetings/poly_ruby_rails.html" target="_blank"&gt;presentation&lt;/a&gt; on JRuby on Rails yesterday night at the &lt;a href="http://polyglotprogrammers.com/" target="_blank"&gt;polyglot programmers&lt;/a&gt; user group. Tyler demonstrated the practical steps to gradually replace a web-based Java application (Struts in this case) with Rails. The entire operation can be almost transparent to the eyes of the customer, management and even the team. JRuby (but also Jython, Groovy or Clojure) are strangling enablers for the Java platform adding a complete new meaning to the “Application Strangler” strategy.&lt;/p&gt;
&lt;p&gt;The general strategy, even if the implementation differs, consists of some basic principles:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;b&gt;The strangling happens in stealth mode&lt;/b&gt;. The two souls of the application should be able to coexist as long as required for the migration to succeed. This means that whatever change is necessary, from the build mechanism to the source code, special care must be taken to leave the current system unaltered until all the dependencies are routed to the substituting piece.&lt;br/&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;b&gt;No unnecessary behavior duplication&lt;/b&gt;. You should try to avoid the situation where the same code exists written in different languages and used in different places if not for some short period of time. You don’t want to force the team to maintain the same thing twice (Tyler here made the good example of the header/footer of the web page, potentially available both in Rails and Struts).&lt;br/&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;b&gt;Onion rule&lt;/b&gt;: start peeling away the most external layers. Migration will be easier if there are no inbound dependencies on the target component. For example, serving portions of the web interface with Rails is easier than migrating the domain layer. Another strategy could be to start writing tests, specs, stories, scenarios, acceptances, integration or functional test with the new language.&lt;br/&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;b&gt;Always keep in mind the reason to “strangle”&lt;/b&gt;. Rails is strong on specific part of the development process (for example controller and view development) and can speed up the team. This doesn’t necessarily mean to move the model from Java/Hibernate to Ruby/ActiveRecord if it’s not adding too much value.&lt;br/&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;b&gt;Partial strangling&lt;/b&gt;. A corollary of the previous point: the two souls can coexist for ever. The “Use the best tool for the job” principle in practice.&lt;br/&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In the project I’m working on, the test-first part is done on the Ruby side as well as acceptances. The compelling reason to do that is in my opinion the superior readability and conciseness of testing and mocking in Ruby which tends very easily to mutate into an internal DSL that fits the job. The build tool I’m using, &lt;a href="http://incubator.apache.org/buildr/" target="_blank"&gt;Buildr&lt;/a&gt;, has the same nice nature plus being built on top of Maven (the good part of it!). At the same time the &lt;a href="http://rspec.info/" target="_blank"&gt;RSpec Story Runner&lt;/a&gt; which runs plain english stories and relative scenarios fills the automation gap between business analysts, developers and QA. The build automation system and the testing frameworks are for sure another good strangling point!&lt;/p&gt;
&lt;p&gt;Take care!&lt;/p&gt;</description><link>http://reborg.tumblr.com/post/38038655</link><guid>http://reborg.tumblr.com/post/38038655</guid><pubDate>Wed, 11 Jun 2008 13:54:46 -0500</pubDate></item><item><title>Del.icio.us!</title><description>&lt;p&gt;I can’t say why for such a long time I never used &lt;a href="http://del.icio.us/" target="_blank"&gt;Del.icio.us&lt;/a&gt;. I think I subscribed years ago just to keep &lt;a href="http://del.icio.us/reborg" target="_blank"&gt;my nick name&lt;/a&gt; on it. I always preferred my local bookmarks management to a remote online system and I didn’t see too much value in sharing that information.&lt;/p&gt;
&lt;p&gt;But recently I found a compelling reasons to move my bookmarks there. I’ve observed how I use Twitter: after an initial lack of confidence I started to see how I can use it effectively. But not only. After some more practice I can see advanced ways to use Twitter, for example for &lt;a href="http://twitter.com/reborg_tracking" target="_blank"&gt;tracking activities&lt;/a&gt;. For advanced I don’t mean that I am advanced, but only that I’m using a service in a way that it was not designed for.&lt;/p&gt;
&lt;p&gt;When you move to an online service part of your workflow is when you feel the need for a strong API. Twitter, Del.icio.us, Flickr, Yahoo Pipes and a lot of other online tools are designed around a strong API from the beginning. The restful interface they usually have is what allows you to implement new ideas on top of them. As a positive side effect you’re forced to learn the technology in a fun and productive way.&lt;/p&gt;
&lt;p&gt;So I’m planning to use Del.icio.us for my bookmarks and wait for some cool idea to implement on top of it. In the meanwhile, I’m enjoying reading other user’s posts on del.icio.us. I searched a solution so that I can receive &lt;a href="http://growl.info/" target="_blank"&gt;Growl&lt;/a&gt; notifications whenever someone bookmarks a link. The Mac based solution consists of subscribing to the RSS feed of the people I’m interested in in &lt;a href="http://www.google.com/reader" target="_blank"&gt;Google Reader&lt;/a&gt; and then use the &lt;a href="http://troelsbay.eu/software/reader" target="_blank"&gt;Read Notifier&lt;/a&gt; toolbar icon setting a label “delicious” so that I’m not polluted with all the other RSS feed I’m subscribed to. Fair enough, it works perfect.&lt;/p&gt;</description><link>http://reborg.tumblr.com/post/37141479</link><guid>http://reborg.tumblr.com/post/37141479</guid><pubDate>Wed, 04 Jun 2008 08:07:25 -0500</pubDate></item><item><title>Give it some REST</title><description>&lt;p&gt;This morning I had the pleasure to listen to &lt;a href="http://www.se-radio.net/podcast/2008-05/episode-98-stefan-tilkov-rest" target="_blank"&gt;this&lt;/a&gt; podcast on &lt;a href="http://www.se-radio.net/" target="_blank"&gt;SE Radio&lt;/a&gt; while running on a beautiful sunny day. It’s an introduction but is very well explained and I recommend it to everyone, even if you know what REST is and how it works. It goes beyond the usual stuff about REST and I think it’s worth summarize the most important parts in the hope I won’t forget them so quickly. &lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;b&gt;REST works really well for loosely coupled systems&lt;/b&gt;, where the response time is not a constraint&lt;/li&gt;
&lt;li&gt;
&lt;b&gt;REST must not be confused with HTTP&lt;/b&gt;. REST can work perfectly over other protocols because it’s a paradigm. When we talk of RESTFUL though, that means quite universally over HTTP. For example: REST says access to resources must be uniform with the same interface. HTTP has the 4 methods GET, PUT, POST, DELETE and therefore is RESTFUL, or REST compliant.&lt;/li&gt;
&lt;li&gt;
&lt;b&gt;REST is not only CRUD operations&lt;/b&gt;: in the early HTTP proposal for example it was discussed another method called PATCH which stands for partial update. PATCH would be a nice addition to a RESTFUL system.&lt;/li&gt;
&lt;li&gt;
&lt;b&gt;Things in the REST world have an ID&lt;/b&gt;. The ID is created using a convention you decide. IDs identify the most important objects of the application. In the web world ID are URIs. Having an ID doesn’t mean objects are persisted or static. In memory objects can have their own IDs: a “salary increase” for example.&lt;/li&gt;
&lt;li&gt;
&lt;b&gt;The ID enables linking between objects&lt;/b&gt;: URIs can be embedded and aggregated. Humans or tools can parse IDs and do useful things with them.&lt;/li&gt;
&lt;li&gt;
&lt;b&gt;XHTML instead of XML&lt;/b&gt;: no need to have XML with validation to pass information around. It’s a good compromise for human readability and machine processing to have REST resources returned as XHTML.&lt;/li&gt;
&lt;li&gt;
&lt;b&gt;GET should be SAFE&lt;/b&gt;. An HTTP GET will never alter the state of the system. This is valid if the server is following “the standard” on the other side.&lt;/li&gt;
&lt;li&gt;You always interact with representations: objects are never seen in their specific implementation. HTTP allows to request different representations of the same object.&lt;/li&gt;
&lt;li&gt;
&lt;b&gt;Sub-resources&lt;/b&gt;: this is not a REST concept. But the idea is to append something more to the ID that describes a resource detail: for example the address of a customer. Of course the detail can have its own identifier, but the sub-resource can be easier to understand because it’s hierarchical.&lt;/li&gt;
&lt;li&gt;
&lt;b&gt;Turning Session State into Resource State&lt;/b&gt;: sessions are totally opposed to REST core concepts: REST is stateless by design. There shouldn’t be any resource which needs to be accessed but doesn’t have an ID whose content is only accessible through a “wrapping” object. The cart of an e-comm site for example, can have a resource ID instead of being saved into a session and accessed through a customer ID. Probably the main motivation to have a session was for performance reasons. The complexity is now much worse especially with sticky session and the migration of requests between servers.&lt;/li&gt;
&lt;li&gt;
&lt;b&gt;HTTP based Caching&lt;/b&gt;: REST over HTTP can take advantage of many HTTP features. Some of them are well known other aren’t. Conditional get for example. Using an  hash of the relevant content of the resource that you send in the header and is sent back, the server can decide if to serve the cached instance of the resource or not. The “expire” mechanism is part of the same sophisticated HTTP caching.  &lt;/li&gt;
&lt;li&gt;
&lt;b&gt;HTTP response codes can tell you many things&lt;/b&gt;. “This resource has moved”,  “temporary unavailable”, “not found”, “requested accepted but will process later” are some examples of the rich set of error messages an application can take advantage of if RESTFUL over HTTP.&lt;/li&gt;
&lt;li&gt;
&lt;b&gt;REST is strategically specific&lt;/b&gt;: instead of waiting on a queue of messages where the action is specified inside the message (no operations specified), the REST operations are more specific about what you should do with the resource. At the same time those operations are very light weight.&lt;/li&gt;
&lt;li&gt;
&lt;b&gt;Application objects extends REST verbs&lt;/b&gt;: it is true that the 4 main HTTP operations are limited and determine a design where there are more nouns (for example collections can have their own URI). But the key point is that when you design a REST system your objects must extend REST operations and be compliant with the based set. If the accessing application is something like WGET or CURL, then they can do only general things using the 4 verbs. If who is accessing is a business application, then they can apply additional logic on top. &lt;/li&gt;
&lt;li&gt;
&lt;b&gt;WS/CORBA vs REST difference n.1&lt;/b&gt;: the ID is proprietary while in REST the ID is a standard way to identify whatever resource (can be mapped to the some business ID or not).&lt;/li&gt;
&lt;li&gt;
&lt;b&gt;WS/CORBA vs REST difference n.2&lt;/b&gt;: collection of objects can have their own ID and be identified in isolation as container of other objects. &lt;/li&gt;
&lt;li&gt;
&lt;b&gt;WS/CORBA vs REST difference n.3&lt;/b&gt;: POST to alter collections. In WS a post will usually invoke a remote method with input parameter and this method will alter the state of the system to create a new order for example. In REST the POST is done on the collection URI and this create the new element in the collection.&lt;/li&gt;
&lt;li&gt;
&lt;b&gt;Don’t be fanatic with URI design&lt;/b&gt;: they should be readable, that’s it. No need of special meaning beyond that.&lt;/li&gt;
&lt;li&gt;
&lt;b&gt;REST for Intranets&lt;/b&gt;: it makes a lot of sense to make a Google search for your internal company resources, right? There no point in make a distinction between what is on the Internet and what is internal to the company, they are trying to solve the same problem.&lt;/li&gt;
&lt;li&gt;
&lt;b&gt;REST for distribute transactions&lt;/b&gt;: there are of course cases where REST is not a good option. If you have a legacy system that supports this kind of paradigm you’re better off searching for something else which is not REST. REST is for sure a viable options for all cases where WS-* can be used. &lt;/li&gt;
&lt;/ul&gt;</description><link>http://reborg.tumblr.com/post/36120822</link><guid>http://reborg.tumblr.com/post/36120822</guid><pubDate>Mon, 26 May 2008 13:42:03 -0500</pubDate></item><item><title>dTunes First Release</title><description>&lt;p&gt;Ladies and gentlemen, a first absolutely-beta release of “Disposable Tunes” is now available online at &lt;a href="http://dtunes.reborg.net" target="_blank"&gt;&lt;a href="http://dtunes.reborg.net" target="_blank"&gt;http://dtunes.reborg.net&lt;/a&gt;&lt;/a&gt;. It’s probably not more than a prototype, but it demonstrate what can be done. So here’s a possible start for a FAQ page: &lt;br/&gt;&lt;br/&gt;&lt;b&gt;What’s dTunes? &lt;/b&gt;&lt;br/&gt;dTunes is an mp3 fuzzy search engine and player. It mashes together results from Yahoo! search, Yahoo! Pipes and Feedity. It’s fuzzy because it’s based on those public accessible directories that come and go at any time in the web. So the results displayed right now might not be available in the next five minutes. This is the reason of the “D” at the beginning of the name: media in dTunes are disposed by design.&lt;br/&gt;&lt;br/&gt;&lt;b&gt;How can I use it?&lt;/b&gt;&lt;br/&gt;In it’s current form without playlists, you open the dTunes web page ans start a search. If results are available, you can start playing them right away. The dTunes page becomes your “desktop radio” for a couple of hours or the day. Then you close it without the need of knowing how to save, open or find those songs again.&lt;br/&gt;&lt;br/&gt;&lt;b&gt;How dTunes differs from, say, SeeqPod.com or the tons of websites with similar capabilities?&lt;/b&gt;&lt;br/&gt;There is one big difference: there is no server side. Your browser is hosting the application completely and is talking with other services on the web to grab the information it needs. For you as an end user this is not a big deal. But from the maintenance and scalability point of view can become important (assuming that dTunes will be used by millions of people in the future).&lt;br/&gt;&lt;b&gt;&lt;br/&gt;What browsers are supported?&lt;/b&gt;&lt;br/&gt;Currently Firefox, Safari and Camino with Flash support.&lt;br/&gt;&lt;br/&gt;&lt;b&gt;What are the missing features?&lt;/b&gt;&lt;br/&gt;Playlist is probably the missing feature right now. Playlists enable you to decide the sequence of songs to play, so you can do it once and enjoy a couple of hours of music. Technically there are many enhancements to be done. The list of matching sources can be expanded using other search engines or asking for more results from the same search engine. A “buy” option can also be a nice to have: since you know that the song you really like is going to “expire” one day or another, buying it is a good option to store it permanently.  And many many more.&lt;/p&gt;
&lt;p&gt;Well, let me know what you think. &lt;/p&gt;</description><link>http://reborg.tumblr.com/post/33467180</link><guid>http://reborg.tumblr.com/post/33467180</guid><pubDate>Thu, 01 May 2008 17:28:00 -0500</pubDate></item><item><title>The Elastic Server</title><description>&lt;p&gt;I’ve been impressed by the presentation I attended this afternoon at the &lt;a href="http://chicagoruby.org/" target="_blank"&gt;Chicago Ruby Group&lt;/a&gt; about the Elastic Servers. Maybe there are already other services like this but I didn’t know about it before.&lt;/p&gt;
&lt;p&gt;You can go to this&lt;a href="http://es.cohesiveft.com/" target="_blank"&gt; web site&lt;/a&gt; and have a VMWare, Parallels, Xen or others virtualization tool server prepared for you in minutes. After you download the image you can install your applications on the virtual server and re-package the whole thing for distribution. But there is more. The site offers you the possibility to deploy the server with your customization to one of the cloud services available: Amazon EC2, Google AppEngine and many more. Your image can also be made publicly available for others to download.&lt;/p&gt;
&lt;p&gt;Virtualization farms aren’t a new concept. The difference here is that you don’t need to be a system admin to create a VMWare image to distribute with your applications on it. The operative system is installed and configured with the package you want  and an admin web tool is deployed also so that you can start, stop, install applications on the virtual server without any knowledge of unix services.&lt;/p&gt;
&lt;p&gt;Here’s are some cool scenarios where you can use virtualized servers on demand:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Demo to the customer: you can create the server, install your apps on it and invite the customer to download and run the image. She can play with the application in a completely isolated environment that you have prepared&lt;/li&gt;
&lt;li&gt;Start of a new project: all the necessary infrastructure to collaborate with the customer can be deployed on an Elastic Server. One for each project! On the virtual server you can put the wiki, the mailing list, the tracking application, spreadsheets, project management application, continuous integration server and the source control system. You need to create then some customization script to give the correct names and procedure everywhere. You can deploy this server to some external cloud service, so neither you nor the customer need to allocate hardware for this.&lt;/li&gt;
&lt;li&gt;New developers on the team: this is especially good for consultancy situation. No more reading a huge list of tasks on the wiki for the new developer. You just need to prepare an image with the development environment ready to go, one for each project.&lt;/li&gt;
&lt;/ul&gt;I’m sure there are many many more scenarios for virtualization. The only limit I see to this online service is that you can install only free operative systems on the Elastic Server. So if you need a Windows environment for some reason, you have to make your own.</description><link>http://reborg.tumblr.com/post/32277225</link><guid>http://reborg.tumblr.com/post/32277225</guid><pubDate>Sat, 19 Apr 2008 18:57:00 -0500</pubDate></item><item><title>Stop Making your Own Agile!</title><description>I heard many times people talking about the fact that they are agile because they don’t strictly follow “the practices”. Good, I think. Then they describe that their TDD approach is like: first they write down some code, then they test and because testing make them think about possible corner cases, then they expand the first core with additional logic. Here’s another example about pairing: since I am in a room with 3 other people, when I’m stuck I ask one of them to help me understand what’s going wrong with my code. Another style of pairing is instead the situation where a team try to pair up when the pressure on the project is not too tight: a degenerated collective ownership.&lt;br/&gt;&lt;br/&gt;I think that Beck’s &lt;a href="http://www.amazon.com/Extreme-Programming-Explained-Embrace-Change/dp/B000OZ0N5S/ref=dp_kinw_strp_1" target="_blank"&gt;2nd book&lt;/a&gt; has been largely misunderstood. There is a reason to introduce flexibility applying a process and the possibility for a team to change practices or introduce new ones. But those changes are the product of an hard work of the team made of metrics and continuous retrospective. You start from the practices and when you realize that something is wrong in a deterministic way (i.e. numbers), then you change the practices.&lt;br/&gt;&lt;br/&gt;Being agile doesn’t mean that you’re so smart that in front of a set of rules you are empowered to skip or change those rules. Being agile means that after you followed the rules or best practices and collected a feedback (or you contextualized to a specific environment), you have the power to change those rules and adapt the process for the team. I know that what I said before sounds naive (with all that good literature around about craftsmanship, journeyman to master and pragmatism) but it looks like that the temptation to skip the hard work and jump to the master status became equivalent to agility these days.</description><link>http://reborg.tumblr.com/post/32150288</link><guid>http://reborg.tumblr.com/post/32150288</guid><pubDate>Fri, 18 Apr 2008 10:22:00 -0500</pubDate></item><item><title>Tracking Tomatoes</title><description>&lt;p&gt;I’m spending again some time to improve my time tracking process. The last step I’ve implemented is a feature I was missing before: it’s good to have the number of &lt;a href="http://www.tecnicadelpomodoro.it/tdp.html" title="Search for the english PDF version" target="_blank"&gt;tomatoes&lt;/a&gt; spent on a given task, but how about when that tomato was consumed? This is a nice to know for me to understand the amount of context switching and why there are “holes” during the day when I’m not working tomatoes. &lt;/p&gt;
&lt;p&gt;The idea is simple: when I assign a tomato to a task, I’d like to assign a timestamp and an optional description. I can then parse those timestamps and render some useful information on a report. It’s very important that registering the tomato, the timestamp and description is done as fast as possible so I don’t waste too much energy for tracking. If this pre-requisite is not true, I’m spending too much on tracking than the core business and of course I don’t want that &lt;/p&gt;
&lt;p&gt;So it turned out that the process is not really different than before. The whole infrastructure is based on OmniOutliner and QuickSilver. QuickSilver is just the interface I use because I don’t want switch countinously between applications. OmniOutliner is organized so that I have projects containing user stories at the top and tasks directly below. This is how a typical session works: &lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;I first select the line corresponding to the task I’m going to work next&lt;/li&gt;
&lt;li&gt;Then I start a countdown timer of 25 mins (I’m currently using &lt;a href="http://www.baldgeeks.com/3-2-1.htm" target="_blank"&gt;this&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;When the timer’s up, I don’t touch the keyboard and I take my 5 mins break&lt;/li&gt;
&lt;li&gt;When I’m back, I reset the timer and open QuickSilver to enter the description for the previous tomato spent&lt;/li&gt;
&lt;li&gt;Start the countown again…&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;So here’s the nice AppleScript enabling the tracking (I had to split lines with a “_”):&lt;/p&gt;using terms from application “Quicksilver”&lt;br/&gt;    on process text tomatoDescription&lt;br/&gt;        tell application “OmniOutliner”&lt;br/&gt;&lt;br/&gt;            tell document “projects-planning.oo3”&lt;br/&gt;                if selected row exists then&lt;br/&gt;                    set selectedRow to first selected row&lt;br/&gt;                    set newTomatoRowId to id of (make new row at_&lt;br/&gt;                      end of rows of selectedRow with properties_&lt;br/&gt;                      {topic:tomatoDescription})&lt;br/&gt;                    select row id newTomatoRowId&lt;br/&gt;                    set value of (cell “TStamp” of row id newTomatoRowId)_&lt;br/&gt;                      to (the (current date) as string)&lt;br/&gt;                    set value of (cell “Act” of row id newTomatoRowId)&lt;br/&gt;                      to (“1” as integer)&lt;br/&gt;                else&lt;br/&gt;                    display dialog “Please select a row.” buttons {“OK”}&lt;br/&gt;                    return&lt;br/&gt;                end if&lt;br/&gt;            end tell&lt;br/&gt;&lt;br/&gt;        end tell&lt;br/&gt;    end process text&lt;br/&gt;end using terms from&lt;p&gt;To activate this script, you need to save a file (for example tomato.scpt) in the ~/Library/Application Support/QuickSilver/Actions directory and restart QuickSilver. Then you can just open QuickSilver, type ‘.’, type the description text for the task and the script will do the rest. Of course there are some customization you have to do. I’m using names of specific columns and specific types from OmniOutliner.&lt;/p&gt;
&lt;p&gt;You can download the &lt;a href="http://reborg.net/files/tomato.scpt" target="_blank"&gt;script&lt;/a&gt; and the omnioutliner &lt;a href="http://reborg.net/files/tomato-template.zip" target="_blank"&gt;template&lt;/a&gt; if you want.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Tomatoes and GTD&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;If you’re using GTD you may want to integrate the Tomato technique in your process. The values added are many and important:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Learning how to estimate tasks and measure the actual effort taken. Why you want to do that? Because then you can plan accordingly and put priorities on tasks based also on the estimated effort. &lt;/li&gt;
&lt;li&gt;Knowing how long you estimated a task is like a game. You’ll try to be consistent with the estimate and this will help you keep your focus without distractions.&lt;/li&gt;
&lt;li&gt;Rhythm: the tomato sequence and breaks make your working day sustainable&lt;/li&gt;
&lt;/ul&gt;</description><link>http://reborg.tumblr.com/post/30824640</link><guid>http://reborg.tumblr.com/post/30824640</guid><pubDate>Fri, 04 Apr 2008 19:22:00 -0500</pubDate></item><item><title>The 5th Iteration</title><description>&lt;p&gt;The 5th iteration was fatal. &lt;/p&gt;
&lt;p&gt;I’ve spent the last 2 months in a very interesting project. On one side a traditional customer used to big architectures up-front and fixed bid projects and on the other a first time agile team. Of course one problem was to sell the small increments of the application to a customer expecting just a long-term release cycle. Even if the customer was happy to see the showcase at the end of the iteration and increments of the application day-by-day we suffered from the unavoidable paradigm impedance mismatch.&lt;br/&gt;&lt;br/&gt;Symptoms are “process smells” appearing here and there. For example “user stories” introduced to enforce an architecture that the customer perceive as important. Or the need to cut off some pairing time to develop in parallel. Or situations where the team is informed that they won’t reach the deadline and they are asked how to improve velocity. More in general I’m talking about discussions to abandon an agile practices because “they are slowing us down”. These process smells are the management failure of predicting requirements that are in fact changing over time.&lt;br/&gt;&lt;br/&gt;This is also the situation where the role of agile coach loses its meaning because the fact of getting things done is way more important than the way the goal is achieved. I also think it’s the failure of the idea that it’s possible to sell a fixed bid project as agile when it’s also fixed scope at the same time. So I’m no more involved in the project, not because I decided, but because my frustration has been perceived as negative for the good health of the team. My plan was not really different, but I was curious to see the end of the release. Damn, I missed that and I don’t want to make the same error again.&lt;/p&gt;
&lt;p&gt;I know James Coplien believes that “TDD done strictly from the YAGNI principle leads to an architectural meltdown around iteration three”. I don’t believe that, but I can re-phrase the same sentence to say: &lt;b&gt;a fixed-bid, fixed-scope agile-project leads to the typical process smells around iteration five&lt;/b&gt;. Can I push this a little further? A fixed-bid, fixed-scope agile project will gradually move to a non-agile project starting from iteration five and finishing the metamorphosis around release one. Of course it will be always sold as agile.&lt;br/&gt;&lt;br/&gt;The good news? I’m back to Rails :)&lt;/p&gt;</description><link>http://reborg.tumblr.com/post/30132671</link><guid>http://reborg.tumblr.com/post/30132671</guid><pubDate>Fri, 28 Mar 2008 19:06:26 -0500</pubDate></item><item><title>Metrics Fun</title><description>&lt;p&gt;Do you have some spare time at work? Waiting for the next user story? Or maybe just thinking what’s the meaning of that last step in test-code-refactor? Why not try to run some metrics? Maybe you have some legacy code sitting in your project, maybe is what you have just written. I can think of three metrics that quickly give you a great ROI: coverage, duplication and complexity. Of course there are many more, but let’s assume it’s the first time you run metrics on the project: you’ll be surprised with minimal effort.&lt;/p&gt;
&lt;p&gt;Working on some Ruby code recently I tried &lt;a href="http://kwala.rubyforge.org/" title="Kwala" target="_blank"&gt;Kwala&lt;/a&gt;, a metrics aggregator for Ruby. Kwala is wrapping other tools to create a nice report but it’s not easy to install. It requires dependencies to be installed manually (&lt;a href="http://saikuro.rubyforge.org/" title="Saikuro" target="_blank"&gt;Saikuro&lt;/a&gt; and &lt;a href="http://amrita.sourceforge.jp/" title="Amrita" target="_blank"&gt;Amrita&lt;/a&gt;). Other than that, the tool seems to work great. Playing with Kwala I was able to find a nice piece of code with a red labeled complexity of “25”. I stripped all the actual lines and I left only the conditional workflow:&lt;/p&gt;
&lt;p&gt;def blah()&lt;br/&gt;  if &lt;br/&gt;    case &lt;br/&gt;      when &lt;br/&gt;        case &lt;br/&gt;          when &lt;br/&gt;           &lt;br/&gt;          when &lt;br/&gt;           &lt;br/&gt;        end&lt;br/&gt;      when &lt;br/&gt;        case &lt;br/&gt;          when &lt;br/&gt;            &lt;br/&gt;        end&lt;br/&gt;      when &lt;br/&gt;        &lt;br/&gt;      when &lt;br/&gt;        &lt;br/&gt;      when &lt;br/&gt;        &lt;br/&gt;      when &lt;br/&gt;        case &lt;br/&gt;          when &lt;br/&gt;           &lt;br/&gt;         end&lt;br/&gt;      when &lt;br/&gt;        case &lt;br/&gt;          when &lt;br/&gt;            &lt;br/&gt;        end&lt;br/&gt;      when &lt;br/&gt;        case &lt;br/&gt;          when &lt;br/&gt;            &lt;br/&gt;        end&lt;br/&gt;      when &lt;br/&gt;        &lt;br/&gt;         rescue &lt;br/&gt;      when &lt;br/&gt;        &lt;br/&gt;      when &lt;br/&gt;        &lt;br/&gt;      when &lt;br/&gt;        &lt;br/&gt;    end&lt;br/&gt;  else&lt;br/&gt;    &lt;br/&gt;  end&lt;br/&gt;  if &lt;br/&gt;    return &lt;br/&gt;  else&lt;br/&gt;    return &lt;br/&gt;    &lt;br/&gt;  end&lt;br/&gt;end&lt;/p&gt;
&lt;p&gt;&lt;br/&gt;The answer is no, I didn’t write the code :) But the game is simple: make that complexity disappear using refactoring. There are tons of good articles and a &lt;a href="http://www.amazon.com/Working-Effectively-Legacy-Robert-Martin/dp/0131177052" title="Working with Legacy Code" target="_blank"&gt;well written books&lt;/a&gt; about the topic. But here’s how:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Search for usages of the method and try to understand how it is used and in what circumstances&lt;/li&gt;
&lt;li&gt;Now go inside the method and apply some embellishment like formatting and introducing meaningful new lines to split related part of the code&lt;/li&gt;
&lt;li&gt;Try to understand what the method is doing and write inline comments if necessary. A good technique is to connect the execution of the application to a debugger and follow line by line what’s going on&lt;/li&gt;
&lt;li&gt;Write unit tests that mimic usages of the method by the other parts of the application&lt;/li&gt;
&lt;li&gt;Write acceptances or integration tests that operates on the application interface portion which is related with that method&lt;/li&gt;
&lt;li&gt;Ok, with the &lt;a href="http://www.amazon.com/Refactoring-Improving-Existing-Addison-Wesley-Technology/dp/0201485672/ref=pd_bbs_sr_1?ie=UTF8&amp;s=books&amp;qid=1206667652&amp;sr=8-1" target="_blank"&gt;Refactoring&lt;/a&gt; book and the &lt;a href="http://www.amazon.com/Refactoring-Workbook-Addison-Wesley-Object-Technology/dp/0321109295/ref=pd_bbs_sr_1?ie=UTF8&amp;s=books&amp;qid=1206667720&amp;sr=8-1" target="_blank"&gt;Refactoring Workbook&lt;/a&gt; opened in front of you it’s time to start refactoring.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;When the game is started, developing is easier and iterations are more fun. The secret is to introduce a visual feedback, something you can race against day by day to measure your improvements. It’s exactly the same satisfaction you have in front of a green bars while running the test suite and the same applies for the other metrics like coverage or removing code duplication. Final suggestions:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Automate the most important metrics as part of the build&lt;/li&gt;
&lt;li&gt;Make sure nice reports from the metrics are found as part of the continuous integration report&lt;/li&gt;
&lt;li&gt;Make your self questions about those numbers&lt;/li&gt;
&lt;li&gt;Create an habit where you consistently improve the code quality as part of the micro-cycle&lt;/li&gt;
&lt;li&gt;Make metrics results part of the iteration showcase &lt;/li&gt;
&lt;/ul&gt;</description><link>http://reborg.tumblr.com/post/30038075</link><guid>http://reborg.tumblr.com/post/30038075</guid><pubDate>Thu, 27 Mar 2008 20:47:04 -0500</pubDate><category>agile metrics game fun ruby</category></item><item><title>Fun With LinkedIn</title><description>&lt;p&gt;I don’t know about you, but &lt;a href="http://www.linkedin.com" title="LinkedIn" target="_blank"&gt;LinkedIn&lt;/a&gt; never worked for me as a professional career tool. I joined at the beginning of 2005 to see what the service was all about. It helped me maintaining a resume online and know about my old friends. The reason why I say it never took off is because I’ve never seen an human resource department using it. Maybe you had a different experience and you’re happy with it. But it was very effective in one case: creating a job oriented social network of people curious about each other careers. So if I want to answer the question “but &lt;a href="http://www.wherethehellismatt.com" target="_blank"&gt;where the hell is Matt&lt;/a&gt;?” maybe I can search on LinkedIn and see what his new job is all about, if any.&lt;/p&gt;
&lt;p&gt;So supposing my attitude is the same as anybody else, I decided that the serious professional LinkedIn profile was out of place. If only my old colleagues are looking at it, well, let’s have some fun! &lt;a href="http://www.linkedin.com/in/reborg" target="_blank"&gt;Enjoy&lt;/a&gt; and don’t forget to view the full profile.&lt;br/&gt;&lt;/p&gt;</description><link>http://reborg.tumblr.com/post/28374856</link><guid>http://reborg.tumblr.com/post/28374856</guid><pubDate>Sun, 09 Mar 2008 10:25:00 -0500</pubDate></item><item><title>The Database Irritating Inconvenience</title><description>&lt;p&gt;It’s already the second or third time in my career that I encounter problems introducing a database server for object persistence from the begininng. Unfortunately in the last project I arrived too late to stop the pervasive architecture that was taking over. The problem manifests itself as long and frustrating sessions to solve deploy problems, locally or on the continous integration server or the test environment. The symptoms are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;People need  to set up different credentials to access the database or there are environment contraints that force different roles&lt;/li&gt;
&lt;li&gt;Developers want or are forced to use different names for their database locally&lt;/li&gt;
&lt;li&gt;The need to create different database instances cloning schemas and creating related scripts (unit tests wipe out the database for each tests, acceptances do not)&lt;/li&gt;
&lt;li&gt; The problem that slightly different flavors of the operating system affect the way the development database is installed and accessed&lt;/li&gt;
&lt;li&gt;A new developer joining the team is forced to install a local database server and follow a complex procedure to setup it correctly based on the team settings.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Having this decision made up-front can deeply impact delivery of business values. &lt;/p&gt;
&lt;p&gt;&lt;b&gt;But is a customer constraint!&lt;/b&gt; &lt;/p&gt;
&lt;p&gt;Let’s assume that the customer wants to see a database in place or change the data in the application using the database as the main interface from the beginning. Even in this case, the requirement of the customer should not interfere with development decisions. Embedded databases are fine, file system persistence is too. Xml based persistency maybe. But you should remove as fast as you can the constraints to use a specific service from the development environment especially if this service is fragile, unreliable or hard to maintain because is network based. Do you remember the first rule of distributed computing? Don’t do distribute computing.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;So How?&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;When it’s time to have object to persist, you just need to create an ObjectStorage object or you name it, something that can accept an object instance and make it persistent. If you’re testing when you need the storage to be in place, just mock the ObjectStorage to return the list of objects you need for your test to pass. This storage is just an object abstraction of what a database will look like. At some point in time you’ll need to give the storage a real implementation and at this point, use the best tool for the job. A database server with relative client APIs is usually overkill because it produces an external depencies on the operative system and consequentely a maintenance hassle. An embedded database is better, especially if can store in-memory. Because also files suffer from the same problem: they are external dependencies on the operative system. At some point you will need to switch the developement view of the database with a real database server. Well, of course some work needs to be done, but it’s required only for the test environment and production environement. You don’t need to do the same for the CI box or the local development workstations.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Conclusions&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;Resist the temptation to clone the development environment exactly like you think it should be in production. In production you don’t have mutiple development workstations, you don’t have a continous integration running and it’s the only place together with the QA environment where you really need to show the architecture the customer wants to see. &lt;/p&gt;</description><link>http://reborg.tumblr.com/post/28301282</link><guid>http://reborg.tumblr.com/post/28301282</guid><pubDate>Sat, 08 Mar 2008 09:55:58 -0600</pubDate></item><item><title>Smart Driven Development</title><description>&lt;p&gt;At the beginning it was very easy: you just write your test first, ahead of the application code and you’re done. Of course it turned out not to be so easy. First of all, what is a unit? It’s a class, it’s a package or what? The easy answer is: a unit is a class, so when you start test first on something, you name the unit test class as the class you intend to test. But then there are other questions you need to ansewer before coding:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Do you want a top-down or a bottom-up approach?&lt;/li&gt;
&lt;li&gt;If I start from the top and test are failing, can I commit to the continous integration? &lt;/li&gt;
&lt;li&gt;Do I need to mock objects so that I can  test also interactions? How far the interaction should be described in the test? &lt;/li&gt;
&lt;li&gt;How far I have to go wih testing, should I try for 100% coverage?&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The answer once again is flexibility. There is not a common answer for all situations, there is just a smart approach based on testing principles. I want to start from &lt;a href="http://www.infoq.com/interviews/coplien-martin-tdd" title="Bob Martin Interview" target="_blank"&gt;this&lt;/a&gt; interview with “Uncle” Bob Martin. Here are his 3 definitions of test driven development:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A test driven developer does not write a line of production code until he has written a failing unit test.&lt;/li&gt;
&lt;li&gt;A test driven developer doesn’t write more of a unit test that is sufficient to fail and waits until red bars go green before writing another one.&lt;/li&gt;
&lt;li&gt;A test driven developers doesn’t write more production code that is sufficient to pass a failing unit test.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;But these principles are just a starting point. Only experience can tell what else you need in your daily development. &lt;/p&gt;
&lt;p&gt;&lt;b&gt;Bottom-Up or Top-Down?&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;I prefer the Top-Down approach whenever possible. But I’m gradually lerning that the best place to start is where you have the best understanding of the problem.  So I’ll try to start from the top, but if it makes more sense to start from the bottom because I know what to do without too much thinking, I will create higher level testing later. In this way you can be productive while you increase your understanding of the business logic. Other approach like trying to understand the problem without coding are not as effective. There is also the risk sometimes that in order to start from the acceptance test you need to solve technical problems like how to mock external services or how the result should be produced by the system. Starting from the middle/bottom layer can bring the solution to the acceptance technical problem as a side effect.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Failing Tests&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;It’s really great when acceptance criteria has been specified for you. Even better if those are already executable and not plain english. But also in the case the customer can only produce plain english requirements it’s not bad at all. The reason is that acceptances are those “forcing constraints” driving you in the process of writing the first tests. Acceptances run as part of the continous build, exactly like unit tests. The problem is that an acceptance will fail until you have written all the necessary unit tests and production code to make it pass. You also want to integrate in the repository with the work of the team as fast as you can. So you don’t really want a situation where you wait until the end of a user story to commit your work. Well, the reason of the acceptances is to drive the design discovery process and the writing of the unit test for the lower layers. Of course it’s also a regression test for the business requirements you’re writing. But in this situation I don’t see a problem commenting out the acceptance test from the continous integration. The same for functional/integration testing. Sure you need to remember to activate them as soon as possible. Acceptance framework or unit test framework supporting testing “categories” are a great help in this. You just need to label the test as “functional” and exclude that category from the continous integration scripts. You will also see in the report from the build something like “X test skipped” that will remind you about the exclusions.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Mocking&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;For the same reason an acceptance will fail at the beginning, also testing lower layers can produce the same problem. There is a big difference though. While acceptances (written by the customer) or functional/integration tests are supposed to test the real application exactly like it will work in the production environment, you don’t have the same requirement for unit tests. In other words, you can mock interactions with other component at the interface level, leaving the implementation details for the next layer of unit testing. Yes, it’s a cycle through the upper layers of the application to the bottom. In every cycle you write a suite of tests for the current layer, mocking what has not been implemented yet. So you need to mock objects or stub results, especially your approach is top-down. The risk can be to over specify. I usually specify just types for arguments to mock method calls and sometimes I just ignore arguments. I also skip verification of mock calls when the mock is not strictly related with the subject of the unit test. You should try not to create fragile unit tests. An unit test is fragile when even small changes in the production code force you to change a lot of unit tests. This situation should happen only if you touch core business values of the application where it’s worth spending more time. But if your mocks are over specified then you aren’t only testing the core business proposition of the business logic, but also all the other structural details.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Coverage&lt;/b&gt; &lt;/p&gt;
&lt;p&gt;100% coverage is not possible or really difficult to achieve. The choice you make should be once again strategic: aim at higher coverage numbers for core business functionalities and leave the rest at an acceptable level. The coverage numbers are also very related to the tool you use. Only experience can say what is the coverage number and metrics that you should try to have in your project. In my experience there is no an universal metric or number you should see. There is a range you can expect (for example I consider  good a coverage between 60-80%) and then wait iteration after iteration to see how hard is to improve. You reach your optimal coverage when after putting a consistent effort on it, the metrics hardly increase.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Conclusions&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;I think flexibility and the capacity to contestualize experience to the surrounding environment are key factor in the success of a project. There is no silver bullet or universal rule that can be applied. There are general principles you can apply to different situation to maximize your productivity and be more effective in the less time possible. &lt;/p&gt;</description><link>http://reborg.tumblr.com/post/27969366</link><guid>http://reborg.tumblr.com/post/27969366</guid><pubDate>Tue, 04 Mar 2008 18:11:45 -0600</pubDate></item><item><title>Once again ladies and gentlemen here’s the RhinoMocks template for ReSharper to create your...</title><description>&lt;p&gt;Once again ladies and gentlemen here’s the RhinoMocks template for ReSharper to create your mocked tests in a snap. The last time was exactly the same but for JMocks with Eclipse. This time instead, the requirements are: VisualStudio, ReSharper, NUnit and RhinoMocks as references. To install:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Download &lt;a href="http://reborg.net/files/rhino-resharper-template.xml" target="_blank"&gt;this&lt;/a&gt; file (xml export of the template)&lt;/li&gt;
&lt;li&gt;In VisualStudio, ReSharper menu, choose “options”&lt;/li&gt;
&lt;li&gt;Go to “Templates” - “File Templates” and click the import icon&lt;/li&gt;
&lt;li&gt;Select the downloaded XML file&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If you just want to have a look:&lt;/p&gt;
&lt;p&gt;using NUnit.Framework;&lt;br/&gt;using Rhino.Mocks;&lt;br/&gt;using Rhino.Mocks.Constraints;&lt;br/&gt;&lt;br/&gt;namespace $namespace$&lt;br/&gt;{&lt;br/&gt;    [TestFixture]&lt;br/&gt;    public class $class$&lt;br/&gt;    {&lt;br/&gt;        private $TargetType$ _a$TargetType$;&lt;br/&gt;        private $CollaboratorType$ _a$CollaboratorType$;&lt;br/&gt;        private MockRepository _mock;&lt;br/&gt;&lt;br/&gt;        [SetUp]&lt;br/&gt;        public void SetUp()&lt;br/&gt;        {&lt;br/&gt;            _mock = new MockRepository();&lt;br/&gt;            _a$CollaboratorType$ = _mock.CreateMock();&lt;br/&gt;            _a$TargetType$ = new $TargetType$(_a$CollaboratorType$);&lt;br/&gt;        }&lt;br/&gt;&lt;br/&gt;        [Test]&lt;br/&gt;        public void TEST_METHOD_NAME()&lt;br/&gt;        {&lt;br/&gt;            using (_mock.Record())&lt;br/&gt;            {               &lt;br/&gt;            }&lt;br/&gt;&lt;br/&gt;            using (_mock.Playback())&lt;br/&gt;            {                                      &lt;/p&gt;
&lt;p&gt;            }&lt;br/&gt;        }&lt;br/&gt;    }&lt;br/&gt;}&lt;/p&gt;</description><link>http://reborg.tumblr.com/post/27197577</link><guid>http://reborg.tumblr.com/post/27197577</guid><pubDate>Sun, 24 Feb 2008 21:55:00 -0600</pubDate></item><item><title>www.iwasworkingwithrails.com</title><description>&lt;p&gt;Starting from December I joined a cool small company called &lt;a href="http://obtiva.com/" target="_blank"&gt;Obtiva&lt;/a&gt;. Don’t take that wrong: we are small by design. I think nothing will prevent Obtiva to grow and be a medium sized company one day, but this is not the goal. Obtiva is strictly people oriented and partially profit oriented. This means that Obtiva won’t accept a new project just because it’s big or profitable, but only if the project fits with developer capabilities, hopes and objectives of the company as a whole. We have an internal feedback loop to guarantee that when we set a goal, we can also measure how far or close we are. Yes, metrics, but not about code. Obtiva is not just running an Apprentice process (I’ll talk more about this in the future, but be sure to follow the work of this &lt;a href="http://softwarecraftsmanship.oreilly.com/wiki" target="_blank"&gt;guy&lt;/a&gt;) and training classes, Obtiva is also a consultancy shop.  And here’s why “I was &lt;a href="http://www.workingwithrails.com/person/10743-renzo-borgatti" target="_blank"&gt;working with Rails&lt;/a&gt;”. Too bad.&lt;/p&gt;
&lt;p&gt;With Ruby and Rails I had for sure a lot of fun. Considering that I developed in Rails just for two months, I just scratched the surface. But it was enough to promote Ruby in my toolbox. I always had a special admiration for Ruby, starting more or less 2 years ago. What attracted me was not just the neat language, but the community. For some lucky conjuncture of events (namely some Prag programmer who likes to visit far east countries in search for a new language), Ruby had  enough momentum to attract the attention of a small but very selected portion of developers. If you are a Java developer, you’ll feel lost. I strongly suggest you to use “patterns” as the learning key from the old way of thinking to the new one. This &lt;a href="http://books.google.com/books?id=wwcT08lk-DcC&amp;dq=beyond+java" target="_blank"&gt;first book&lt;/a&gt; will make the parallel at the architecture and deploy level, while &lt;a href="http://www.amazon.com/Design-Patterns-Ruby-Addison-Wesley-Professional/dp/0321490452" target="_blank"&gt;this second&lt;/a&gt; is a masterpiece to understand what’s wrong with GOF patterns in Ruby and how OO concepts differ between the two languages. The plan for the future is to stay on the Ruby wagon producing some side project but I have to fight with the scarcity of time since the beginning of my new role. And thinking out loud, what is my last successful side project? I have a proven record of inconsistency in the last few years. Well let’s see what happen.  &lt;/p&gt;</description><link>http://reborg.tumblr.com/post/26707446</link><guid>http://reborg.tumblr.com/post/26707446</guid><pubDate>Tue, 19 Feb 2008 04:52:00 -0600</pubDate></item><item><title>Search for The New Land</title><description>&lt;p&gt;It’s time for a new blog engine. iWeb is very flexible but you have to pay for that flexibility when the number of posts (or pages) is high. Now it takes more than a minute to generate the entire content. Together with comment post-processing, snippets post-processing and web synchronization this is far too much for an innocent blog post. Most of the time I’m reluctant to open iWeb and other 5(!) applications. Too hard. &lt;/p&gt;
&lt;p&gt;So enter Tumblr, the blog engine I’m using right now. I saw one of my colleague (thanks &lt;a href="http://redsquirrel.tumblr.com/" target="_blank"&gt;Dave&lt;/a&gt;) using it and I was impressed. It’s clean, fast and MAC-like! It’s also pushing the “Keep it short dude!” model, something I was clearly missing in the past blogging. So yeah, I kinda want to be more verbose, maybe speak more about personal life and stuff and be less annoying with article-like blog post which are  difficult to read. &lt;/p&gt;
&lt;a href="http://www.cduniverse.com/search/xx/music/pid/6240810/a/Search+For+The+New+Land.htm" target="_blank"&gt;&lt;/a&gt;</description><link>http://reborg.tumblr.com/post/26600462</link><guid>http://reborg.tumblr.com/post/26600462</guid><pubDate>Sun, 17 Feb 2008 23:31:00 -0600</pubDate></item></channel></rss>
