<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Luca Guidi</title>
    <link>/</link>
    <description>Recent content on Luca Guidi</description>
    <generator>Hugo</generator>
    <language>en</language>
    <atom:link href="/rss.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Why Your `app version` Golang CLI Command Loads Your Database Client (And How to Fix It)</title>
      <link>/2025/10/23/why-your-app-version-golang-cli-command-loads-your-database-client-and-how-to-fix-it/</link>
      <pubDate>Thu, 23 Oct 2025 00:00:00 +0000</pubDate>
      <guid>/2025/10/23/why-your-app-version-golang-cli-command-loads-your-database-client-and-how-to-fix-it/</guid>
      <description>&lt;p&gt;You type &lt;code&gt;myapp version&lt;/code&gt; to check the version number.&#xA;But behind the scenes, your application loads the database client, git service, API handlers, and file system watchers.&#xA;All that code initialization for a command that just prints a version string.&lt;/p&gt;&#xA;&lt;p&gt;This is the hidden cost of traditional dependency injection in Golang CLI applications.&#xA;Every command pays the startup cost of all commands.&#xA;This post shows how I solved this problem with a simple two-phase initialization pattern that achieves true lazy loading while keeping tests clean.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Setup Hanami with Sidekiq</title>
      <link>/2023/02/20/setup-hanami-with-sidekiq/</link>
      <pubDate>Mon, 20 Feb 2023 00:00:00 +0000</pubDate>
      <guid>/2023/02/20/setup-hanami-with-sidekiq/</guid>
      <description>&lt;h2 id=&#34;introduction&#34;&gt;Introduction&lt;/h2&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://sidekiq.org/&#34;&gt;Sidekiq&lt;/a&gt; is the standard in the Ruby ecosystem for background jobs.&#xA;This short tutorial will show you how to set up Sidekiq in a &lt;a href=&#34;https://hanamirb.org/&#34;&gt;Hanami&lt;/a&gt; application using Docker Compose.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;For the basic setup, please look at my previous tutorial&lt;/strong&gt;: &lt;a href=&#34;/2023/02/13/getting-started-with-hanami-and-docker-compose/&#34;&gt;Getting Started with Hanami and Docker Compose&lt;/a&gt;.&#xA;We&amp;rsquo;ll modify that demo application to support Sidekiq.&lt;/p&gt;&#xA;&lt;h2 id=&#34;steps&#34;&gt;Steps&lt;/h2&gt;&#xA;&lt;h3 id=&#34;1-add-the-sidekiq-gem&#34;&gt;1. Add the Sidekiq gem&lt;/h3&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;⚡ bundle add sidekiq&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id=&#34;2-add-a-sidekiq-provider&#34;&gt;2. Add a Sidekiq provider&lt;/h3&gt;&#xA;&lt;p&gt;Add a Hanami provider for Sidekiq (&lt;code&gt;config/providers/sidekiq.rb&lt;/code&gt;).&lt;/p&gt;</description>
    </item>
    <item>
      <title>Getting Started with Hanami and Docker Compose</title>
      <link>/2023/02/13/getting-started-with-hanami-and-docker-compose/</link>
      <pubDate>Mon, 13 Feb 2023 00:00:00 +0000</pubDate>
      <guid>/2023/02/13/getting-started-with-hanami-and-docker-compose/</guid>
      <description>&lt;h1 id=&#34;introduction&#34;&gt;Introduction&lt;/h1&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://hanamirb.org/&#34;&gt;Hanami 2.0&lt;/a&gt; is the perfect Ruby framework for building robust and fast API applications. The 2.0 version comes without a persistency layer (that will be a 2.2 feature).&lt;/p&gt;&#xA;&lt;p&gt;Today we&amp;rsquo;ll learn how to set up a Hanami app with a secure Redis instance using Docker Compose in a few steps.&lt;/p&gt;&#xA;&lt;p&gt;As a prerequisite, you&amp;rsquo;ll need &lt;a href=&#34;https://www.docker.com/&#34;&gt;Docker&lt;/a&gt;, &lt;a href=&#34;https://curl.se/&#34;&gt;cURL&lt;/a&gt;, &lt;a href=&#34;https://www.ruby-lang.org/en/&#34;&gt;Ruby&lt;/a&gt; 3.2+, and &lt;a href=&#34;https://hanamirb.org&#34;&gt;Hanami&lt;/a&gt; 2.0+.&lt;/p&gt;&#xA;&lt;h1 id=&#34;steps&#34;&gt;Steps&lt;/h1&gt;&#xA;&lt;h2 id=&#34;1-generate-the-app&#34;&gt;1. Generate the app&lt;/h2&gt;&#xA;&lt;p&gt;Generate a new Hanami 2.0 app.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Getting Started with Hanami and GraphQL</title>
      <link>/2023/02/06/getting-started-with-hanami-and-graphql/</link>
      <pubDate>Mon, 06 Feb 2023 00:00:00 +0000</pubDate>
      <guid>/2023/02/06/getting-started-with-hanami-and-graphql/</guid>
      <description>&lt;h1 id=&#34;introduction&#34;&gt;Introduction&lt;/h1&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://hanamirb.org/&#34;&gt;Hanami 2.0&lt;/a&gt; is a productive Ruby framework that quickly supports you in building API applications.&lt;/p&gt;&#xA;&lt;p&gt;Today we will see how to get started with Hanami and GraphQL in ten steps.&lt;/p&gt;&#xA;&lt;p&gt;We will create the app and a simple code to support the GraphQL schema with a simple Query, including a request spec. The theme is a classic Star Wars schema.&lt;/p&gt;&#xA;&lt;p&gt;As a prerequisite, you&amp;rsquo;ll need Ruby 3.2 and Hanami 2.0.3.&lt;/p&gt;</description>
    </item>
    <item>
      <title>2022: A Year of Growth and Accomplishments</title>
      <link>/2022/12/23/2022-a-year-of-growth-and-accomplishments/</link>
      <pubDate>Fri, 23 Dec 2022 00:00:00 +0000</pubDate>
      <guid>/2022/12/23/2022-a-year-of-growth-and-accomplishments/</guid>
      <description>&lt;p&gt;It&amp;rsquo;s been a &lt;strong&gt;busy and rewarding year&lt;/strong&gt;, both personally and professionally.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;I turned 40 in June&lt;/strong&gt;! That was an opportunity to think about time passing. I&amp;rsquo;m committed to spending time doing the things I always wanted to do but never took the courage to do.&lt;/p&gt;&#xA;&lt;p&gt;For example, I started taking &lt;strong&gt;swimming lessons&lt;/strong&gt;. 🏊 For a person that was terrified by deep water, it&amp;rsquo;s a vast improvement. 💪&lt;/p&gt;&#xA;&lt;p&gt;Another exciting news was to &lt;strong&gt;start playing live electronic music&lt;/strong&gt;. 🎧&#xA;It happened a few times, and that was fun! A lot of fun! 😎&lt;/p&gt;</description>
    </item>
    <item>
      <title>Striking a Balance: Why Prioritizing Both People and Processes is Key to Success in Agile Teams</title>
      <link>/2022/12/13/striking-a-balance-why-prioritizing-both-people-and-processes-is-key-to-success-in-agile-teams/</link>
      <pubDate>Tue, 13 Dec 2022 00:00:00 +0000</pubDate>
      <guid>/2022/12/13/striking-a-balance-why-prioritizing-both-people-and-processes-is-key-to-success-in-agile-teams/</guid>
      <description>&lt;p&gt;As a software architect who has worked in Agile environments for several years, I have seen the benefits of the Agile Manifesto&amp;rsquo;s emphasis on &amp;ldquo;people over processes.&amp;rdquo;&lt;/p&gt;&#xA;&lt;p&gt;However, there is also value in challenging this principle and considering the potential drawbacks of prioritizing people over processes in certain situations.&lt;/p&gt;&#xA;&lt;p&gt;One of the main arguments for prioritizing people over processes is that it allows for more flexibility and adaptability in the development cycle. By focusing on team members&amp;rsquo; talents and skills, Agile teams can respond quickly to changes and challenges as they arise. This approach can be especially beneficial in fast-paced industries where the market and technology constantly evolve.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Open Source Updates: Q1 2021</title>
      <link>/2021/04/12/open-source-updates-q1-2021/</link>
      <pubDate>Mon, 12 Apr 2021 00:00:00 +0000</pubDate>
      <guid>/2021/04/12/open-source-updates-q1-2021/</guid>
      <description>&lt;h2 id=&#34;hanami-ci-stability&#34;&gt;Hanami CI stability&lt;/h2&gt;&#xA;&lt;p&gt;I was one of the early adopters of Travis CI, but in more than a decade the service that served so well the Open Source community is not the first class solution that it used to be.&lt;/p&gt;&#xA;&lt;p&gt;We decided to migrate to GitHub Actions, so &lt;strong&gt;I spent time to migrate all the Hanami gems to GitHub Actions&lt;/strong&gt;. Not all the Open Source work is for the game of the fame.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Open Source Updates: December 2020</title>
      <link>/2021/01/11/open-source-updates-december-2020/</link>
      <pubDate>Mon, 11 Jan 2021 00:00:00 +0000</pubDate>
      <guid>/2021/01/11/open-source-updates-december-2020/</guid>
      <description>&lt;h2 id=&#34;brief-2020-recap&#34;&gt;Brief 2020 recap&lt;/h2&gt;&#xA;&lt;p&gt;During 2020 due to the pandemic and new job role (software backend architect at Toptal) I had less time to dedicate to Open Source.&#xA;Luckily enough, other amazing people took care of projects that I care about.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Two people above all: &lt;a href=&#34;https://github.com/timriley&#34;&gt;Tim Riley&lt;/a&gt; for &lt;a href=&#34;https://github.com/hanami&#34;&gt;Hanami 2&lt;/a&gt; and &lt;a href=&#34;https://github.com/tubbo&#34;&gt;Tom Scott&lt;/a&gt; for &lt;a href=&#34;https://github.com/redis-store&#34;&gt;redis-store&lt;/a&gt;.&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;p&gt;Let&amp;rsquo;s start with the easy one: &lt;strong&gt;I don&amp;rsquo;t actively maintain redis-store anymore&lt;/strong&gt;, Tom is the main person behind it, but I&amp;rsquo;m immensely grateful that he&amp;rsquo;s devoted to the project, which &lt;strong&gt;after 12 years is very mature&lt;/strong&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Ruby Method Overloading</title>
      <link>/2020/07/22/ruby-method-overloading/</link>
      <pubDate>Wed, 22 Jul 2020 00:00:00 +0000</pubDate>
      <guid>/2020/07/22/ruby-method-overloading/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://en.wikipedia.org/wiki/Function_overloading&#34;&gt;Method Overloading&lt;/a&gt; is a programming language feature that allows you to define multiple signatures (and implementations) of the same method.&lt;/p&gt;&#xA;&lt;p&gt;Ruby doesn&amp;rsquo;t have such a feature. It was a shocking discovery when I switched from Java.. a very long time ago.&lt;/p&gt;&#xA;&lt;p&gt;We can somehow trick the language using optional and keyword arguments.&lt;/p&gt;&#xA;&lt;p&gt;But how can we have real isolated implementations of the same method? I wrote a hack to make this possible based on method arity.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Hanami::API on Amazon AWS Lambda</title>
      <link>/2020/03/04/hanamiapi-on-amazon-aws-lambda/</link>
      <pubDate>Wed, 04 Mar 2020 00:00:00 +0000</pubDate>
      <guid>/2020/03/04/hanamiapi-on-amazon-aws-lambda/</guid>
      <description>&lt;p&gt;The &lt;a href=&#34;https://hanamirb.org&#34;&gt;Hanami&lt;/a&gt; team &amp;amp; I, recently &lt;a href=&#34;http://hanamirb.org/blog/2020/02/26/introducing-hanami-api.html&#34;&gt;announced&lt;/a&gt; &lt;strong&gt;Hanami::API&lt;/strong&gt;: a minimal, extremely fast, lightweight Ruby framework for HTTP APIs.&lt;/p&gt;&#xA;&lt;p&gt;Its minimalism, the small memory footprint and its performance, make &lt;strong&gt;Hanami::API&lt;/strong&gt; a &lt;strong&gt;good candidate to build microservices&lt;/strong&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Today, we&amp;rsquo;re gonna deploy a small service on &lt;a href=&#34;https://aws.amazon.com/lambda/&#34;&gt;Amazon AWS Lambda&lt;/a&gt;.&#xA;It&amp;rsquo;s an Amazon AWS product that allows to deploy an autoscaling HTTP service.&#xA;You are charged for every 100ms your code executes and the number of times your code is triggered.&#xA;Having a fast framework like &lt;strong&gt;Hanami::API&lt;/strong&gt; helps to reduce the costs of running a service on AWS Lambda.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Introducing hanami-cli</title>
      <link>/2017/10/10/introducing-hanami-cli/</link>
      <pubDate>Tue, 10 Oct 2017 00:00:00 +0000</pubDate>
      <guid>/2017/10/10/introducing-hanami-cli/</guid>
      <description>&lt;p&gt;Introducing &lt;code&gt;hanami-cli&lt;/code&gt;: a general purpose Command Line Interface (CLI) for Ruby.&#xA;Learn why &lt;a href=&#34;http://hanamirb.org&#34;&gt;Hanami&lt;/a&gt; replaced &lt;code&gt;thor&lt;/code&gt; in favor of &lt;code&gt;hanami-cli&lt;/code&gt; and how to use it &lt;strong&gt;to build a CLI application in 5 minutes&lt;/strong&gt;.&lt;/p&gt;&#xA;&lt;h2 id=&#34;why-not-thor&#34;&gt;Why not &lt;code&gt;thor&lt;/code&gt;?&lt;/h2&gt;&#xA;&lt;p&gt;For long time we used &lt;code&gt;thor&lt;/code&gt; 🔨 to build the Command Line Interface (CLI) of Hanami. But as the time passed, we needed more control on the internals of our implementation.&lt;/p&gt;&#xA;&lt;p&gt;The Hanami 🌸 command line needs &lt;strong&gt;two crucial features&lt;/strong&gt;: subcommands and extendibility.&lt;/p&gt;</description>
    </item>
    <item>
      <title>How To Test Ruby CLI: Console</title>
      <link>/2017/02/08/how-to-test-ruby-cli-console/</link>
      <pubDate>Wed, 08 Feb 2017 00:00:00 +0000</pubDate>
      <guid>/2017/02/08/how-to-test-ruby-cli-console/</guid>
      <description>&lt;p&gt;One of the most &lt;strong&gt;interesting challenges&lt;/strong&gt; I met during &lt;a href=&#34;http://hanamirb.org&#34;&gt;Hanami&lt;/a&gt; development is to write isolated integration tests. The framework ships with an extensive Command Line Interface (CLI) to generate (or destroy) code, start the server, open a Ruby (or a database) console, create/drop the database, run the migrations, precompile assets, and print informations.&lt;/p&gt;&#xA;&lt;h2 id=&#34;console&#34;&gt;Console&lt;/h2&gt;&#xA;&lt;p&gt;Hanami console is an interactive &lt;a href=&#34;https://en.wikipedia.org/wiki/Read%E2%80%93eval%E2%80%93print_loop&#34;&gt;REPL&lt;/a&gt; based on &lt;a href=&#34;https://en.wikipedia.org/wiki/Interactive_Ruby_Shell&#34;&gt;IRB&lt;/a&gt;, which is useful to interact with the objects defined in a project.&lt;/p&gt;</description>
    </item>
    <item>
      <title>How To Test Ruby CLI: Code Generators</title>
      <link>/2017/02/01/how-to-test-ruby-cli-code-generators/</link>
      <pubDate>Wed, 01 Feb 2017 00:00:00 +0000</pubDate>
      <guid>/2017/02/01/how-to-test-ruby-cli-code-generators/</guid>
      <description>&lt;p&gt;One of the most &lt;strong&gt;interesting challenges&lt;/strong&gt; I met during &lt;a href=&#34;http://hanamirb.org&#34;&gt;Hanami&lt;/a&gt; development is to write isolated integration tests. The framework ships with an extensive Command Line Interface (CLI) to generate (or destroy) code, start the server, open a Ruby (or a database) console, create/drop the database, run the migrations, precompile assets, and print informations.&lt;/p&gt;&#xA;&lt;h2 id=&#34;code-generators&#34;&gt;Code Generators&lt;/h2&gt;&#xA;&lt;p&gt;Code generators is a helpful feature that allows to generate code files. The main purpose is to speedup the development process. Hanami has &lt;a href=&#34;http://hanamirb.org/guides/command-line/generators&#34;&gt;code generators&lt;/a&gt; for projects, apps, actions, models, and migrations. Here&amp;rsquo;s an example:&lt;/p&gt;</description>
    </item>
    <item>
      <title>How To Test Ruby CLI: The Setup</title>
      <link>/2017/01/20/how-to-test-ruby-cli-the-setup/</link>
      <pubDate>Fri, 20 Jan 2017 00:00:00 +0000</pubDate>
      <guid>/2017/01/20/how-to-test-ruby-cli-the-setup/</guid>
      <description>&lt;p&gt;One of the most &lt;strong&gt;interesting challenges&lt;/strong&gt; I met during &lt;a href=&#34;http://hanamirb.org&#34;&gt;Hanami&lt;/a&gt; development is to write isolated integration tests.&#xA;The framework ships with an extensive Command Line Interface (CLI) to generate (or destroy) code, start the server, open a Ruby (or a database) console, create/drop the database, run the migrations, precompile assets, and print informations.&lt;/p&gt;&#xA;&lt;h2 id=&#34;full-isolation&#34;&gt;Full Isolation&lt;/h2&gt;&#xA;&lt;p&gt;As I want to have integration tests to &lt;strong&gt;use CLI commands for real&lt;/strong&gt;, the test suite is free of mocks/stubs.&#xA;When I ran it, only real commands are executed against the shell.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Lessons Learned In Open Source: The Motivations</title>
      <link>/2017/01/17/lessons-learned-in-open-source-the-motivations/</link>
      <pubDate>Tue, 17 Jan 2017 00:00:00 +0000</pubDate>
      <guid>/2017/01/17/lessons-learned-in-open-source-the-motivations/</guid>
      <description>&lt;p&gt;It was a rainy Wednesday. That 5th of Oct 2011, I was driving to work, stuck in the traffic, while the radio announced it: Steve Jobs was died.&lt;/p&gt;&#xA;&lt;p&gt;I was shocked. For me and more than one generation, he was &lt;strong&gt;the&lt;/strong&gt; iconic leader, whom fame and success went beyond his tech career.&lt;/p&gt;&#xA;&lt;p&gt;&amp;ldquo;Can I achieve the same?&amp;rdquo; I thought.&lt;/p&gt;&#xA;&lt;p&gt;Since that day, we self-proclaimed visionaries, we tried to emulate his attitude. For some of us it&amp;rsquo;s the stupid game of being mean with employees, for others, it&amp;rsquo;s to found startups to try to &lt;em&gt;&amp;ldquo;disrupt&amp;rdquo;&lt;/em&gt; tech industry with the &lt;em&gt;&amp;ldquo;next big thing™&amp;rdquo;&lt;/em&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Isolate Global State</title>
      <link>/2016/12/27/isolate-global-state/</link>
      <pubDate>Tue, 27 Dec 2016 00:00:00 +0000</pubDate>
      <guid>/2016/12/27/isolate-global-state/</guid>
      <description>&lt;p&gt;Using global state in software programs, is handy for development, but evil to maintain.&lt;/p&gt;&#xA;&lt;p&gt;It can easily become source of &lt;strong&gt;bugs&lt;/strong&gt; that are triggered by edge cases which are hard to track down.&lt;/p&gt;&#xA;&lt;p&gt;Let&amp;rsquo;s see why, and how we can mitigate the problem.&lt;/p&gt;&#xA;&lt;h2 id=&#34;an-example-of-the-problem&#34;&gt;An Example Of The Problem&lt;/h2&gt;&#xA;&lt;p&gt;For instance, in Hanami code base we need to test how the framework configures itself according to certain env variables.&lt;/p&gt;&#xA;&lt;p&gt;We &lt;strong&gt;used&lt;/strong&gt; to test like this:&lt;/p&gt;</description>
    </item>
    <item>
      <title>The Penguin That Can&#39;t Fly</title>
      <link>/2016/06/07/the-penguin-that-cant-fly/</link>
      <pubDate>Tue, 07 Jun 2016 00:00:00 +0000</pubDate>
      <guid>/2016/06/07/the-penguin-that-cant-fly/</guid>
      <description>&lt;h4 id=&#34;a-short-story-about-oop-interfaces-and-soft-typing&#34;&gt;A short story about OOP, interfaces and &lt;em&gt;soft typing&lt;/em&gt;&lt;/h4&gt;&#xA;&lt;hr&gt;&#xA;&lt;p&gt;Today is the day at the headquarters of Spectacular Foo Ltd. The rising firm of the indie gaming scene is going to release its next blockbuster title: &lt;em&gt;Banal Birds&lt;/em&gt;.&lt;/p&gt;&#xA;&lt;p&gt;The year is 2019, Ruby 3 is three times faster and has &lt;em&gt;soft typing&lt;/em&gt;, what a crazy coincidence that solves everything! It was a nostalgic decision but, you, as the lead developer decided to use Ruby for this project.&lt;/p&gt;</description>
    </item>
    <item>
      <title>25,000&#43; Req/s for Rack JSON API with MRuby</title>
      <link>/2015/12/09/25000-requests-per-second-for-rack-json-api-with-mruby/</link>
      <pubDate>Wed, 09 Dec 2015 00:00:00 +0000</pubDate>
      <guid>/2015/12/09/25000-requests-per-second-for-rack-json-api-with-mruby/</guid>
      <description>&lt;p&gt;Last month I gave the &lt;a href=&#34;https://speakerdeck.com/jodosha/lotus-rubyday-2015&#34;&gt;closing keynote&lt;/a&gt; at &lt;a href=&#34;http://www.rubyday.it&#34;&gt;RubyDay 2015&lt;/a&gt; by talking about &lt;a href=&#34;http://lotusrb.org&#34;&gt;Lotus&lt;/a&gt; and the future of Ruby.&lt;/p&gt;&#xA;&lt;p&gt;For the attendees, the most surprising part of my speech was about &lt;a href=&#34;http://mruby.org&#34;&gt;MRuby&lt;/a&gt;. It’s a minimal version of Ruby, that can be embedded in any system that supports C.&lt;/p&gt;&#xA;&lt;p&gt;I think that this technology can play a key role for Ruby in the next years. The simplicity of the language can be used within complex systems.&lt;/p&gt;</description>
    </item>
    <item>
      <title>JSON API Apps With Lotus</title>
      <link>/2015/11/24/json-api-apps-with-lotus/</link>
      <pubDate>Tue, 24 Nov 2015 00:00:00 +0000</pubDate>
      <guid>/2015/11/24/json-api-apps-with-lotus/</guid>
      <description>&lt;p&gt;Do you need a fast and lightweight JSON API app? It must be powerful, flexible, quick to develop and easy to deploy?&lt;/p&gt;&#xA;&lt;p&gt;There is a simple solution for all these requirements: to use Lotus gems to build it.&lt;/p&gt;&#xA;&lt;p&gt;Lotus is well known for full stack web applications (via &lt;code&gt;lotusrb&lt;/code&gt;), but all the gems of this &lt;strong&gt;toolkit&lt;/strong&gt; can be used as standalone components in existing Ruby applications.&lt;/p&gt;&#xA;&lt;p&gt;It this case we will compose together the router and the actions to create a JSON API app that returns informations for books.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Effective TDD With Ruby: Tmux Setup</title>
      <link>/2015/11/17/effective-tdd-with-ruby-tmux-setup/</link>
      <pubDate>Tue, 17 Nov 2015 00:00:00 +0000</pubDate>
      <guid>/2015/11/17/effective-tdd-with-ruby-tmux-setup/</guid>
      <description>&lt;p&gt;Do you find &lt;a href=&#34;https://en.wikipedia.org/wiki/Test-driven_development&#34;&gt;Test Driven Development&lt;/a&gt; (TDD) good in theory but hard to practice? Do you think it requires too much discipline and you don’t have time? Or, are you just struggling to get your workflow streamlined? Fighting to glue your tools together?&lt;/p&gt;&#xA;&lt;p&gt;Well, you can improve a &lt;strong&gt;lot&lt;/strong&gt;, by borrowing some tricks from me. I’ve practiced TDD with Ruby for many years now, and built an entire &lt;a href=&#34;http://lotusrb.org&#34;&gt;web framework&lt;/a&gt; only with these techniques.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Effective TDD With Ruby: Vim Setup</title>
      <link>/2015/10/27/effective-tdd-with-ruby-vim-setup/</link>
      <pubDate>Tue, 27 Oct 2015 00:00:00 +0000</pubDate>
      <guid>/2015/10/27/effective-tdd-with-ruby-vim-setup/</guid>
      <description>&lt;p&gt;Do you find &lt;a href=&#34;https://en.wikipedia.org/wiki/Test-driven_development&#34;&gt;Test Driven Development&lt;/a&gt; (TDD) good in theory but hard to practice? Do you think it requires too much discipline and you don’t have time? Or, are you just struggling to get your workflow streamlined? Fighting to glue your tools together?&lt;/p&gt;&#xA;&lt;p&gt;Well, you can improve a &lt;strong&gt;lot&lt;/strong&gt;, by borrowing some tricks from me. I’ve practiced TDD with Ruby for many years now, and built an entire &lt;a href=&#34;http://lotusrb.org&#34;&gt;web framework&lt;/a&gt; only with these techniques.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Effective TDD With Ruby: Time &amp; Flow</title>
      <link>/2015/10/20/effective-tdd-with-ruby-time-flow/</link>
      <pubDate>Tue, 20 Oct 2015 00:00:00 +0000</pubDate>
      <guid>/2015/10/20/effective-tdd-with-ruby-time-flow/</guid>
      <description>&lt;p&gt;Do you find &lt;a href=&#34;https://en.wikipedia.org/wiki/Test-driven_development&#34;&gt;Test Driven Development&lt;/a&gt; (TDD) good in theory but hard to practice? Do you think it requires too much discipline and you don’t have time? Or, are you just struggling to get your workflow streamlined? Fighting to glue your tools together?&lt;/p&gt;&#xA;&lt;p&gt;Well, you can improve a &lt;strong&gt;lot&lt;/strong&gt;, by borrowing some tricks from me. I’ve practiced TDD with Ruby for many years now, and built an entire &lt;a href=&#34;http://lotusrb.org&#34;&gt;web framework&lt;/a&gt; only with these techniques.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Effective Remote Working</title>
      <link>/2015/10/13/effective-remote-working/</link>
      <pubDate>Tue, 13 Oct 2015 00:00:00 +0000</pubDate>
      <guid>/2015/10/13/effective-remote-working/</guid>
      <description>&lt;p&gt;Going remote is an appealing lifestyle, but without a guidance we can easily get lost. What’s the right balance between professional and personal life? How to make sure that you’ll finish your tasks by the end of the day?&lt;/p&gt;&#xA;&lt;p&gt;You can get it right without too much effort. It’s just a matter of forming the right habits.&lt;/p&gt;&#xA;&lt;p&gt;I work as a remote software engineer for three years now. During this time, I was successfully employed at &lt;a href=&#34;https://litmus.com&#34;&gt;Litmus&lt;/a&gt; first and then at &lt;a href=&#34;https://codeship.com&#34;&gt;Codeship&lt;/a&gt;. Now I’m a independent consultant (hire me) and &lt;a href=&#34;https://github.com/jodosha&#34;&gt;Open Source&lt;/a&gt; developer. All remote, while having a family and an office in our living room.&#xA;Here’s what I’ve got to share.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Lotus And Microservices</title>
      <link>/2015/05/05/lotus-and-microservices/</link>
      <pubDate>Tue, 05 May 2015 00:00:00 +0000</pubDate>
      <guid>/2015/05/05/lotus-and-microservices/</guid>
      <description>&lt;h2 id=&#34;the-monolith-is-good-at-the-beginning&#34;&gt;The monolith is good (at the beginning)&lt;/h2&gt;&#xA;&lt;p&gt;The easiest and convenient way to build a complex system is to use &lt;a href=&#34;http://en.wikipedia.org/wiki/Message_passing&#34;&gt;&lt;em&gt;message passing&lt;/em&gt;&lt;/a&gt;.&#xA;When all the components live in the same process, engineer’s life is easier.&lt;/p&gt;&#xA;&lt;p&gt;Development cycles are shorter, interfaces can change quickly.&#xA;When deploy time arrives, we will have only one deliverable to push.&#xA;This is just great.&lt;/p&gt;&#xA;&lt;p&gt;{% twitter There is an analogy between “message passing” and in person communication. %}&lt;/p&gt;</description>
    </item>
    <item>
      <title>A New Roadmap For Lotus</title>
      <link>/2015/01/01/a-new-roadmap-for-lotus/</link>
      <pubDate>Thu, 01 Jan 2015 00:00:00 +0000</pubDate>
      <guid>/2015/01/01/a-new-roadmap-for-lotus/</guid>
      <description>&lt;p&gt;Last year &lt;a href=&#34;/2014/12/23/2014-retrospective-a-year-of-lotus.html&#34;&gt;was great&lt;/a&gt;, and 2015 brings new challenges to Lotus.&lt;/p&gt;&#xA;&lt;h2 id=&#34;learn-from-mistakes&#34;&gt;Learn from mistakes&lt;/h2&gt;&#xA;&lt;p&gt;When I released the first version back in June it was a wild, unexpected success.&#xA;There was an uncommon hype for the initial version of a &lt;em&gt;&amp;ldquo;yet another web framework for Ruby&amp;rdquo;&lt;/em&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Probably, Lotus&amp;rsquo; vision met the needs of a lot of developers in our Community.&#xA;The demand of a rich, stable ecosystem of libraries and patterns to build applications that are dead simple to build and maintain.&lt;/p&gt;</description>
    </item>
    <item>
      <title>2014 Retrospective: A Year Of Lotus</title>
      <link>/2014/12/23/2014-retrospective-a-year-of-lotus/</link>
      <pubDate>Tue, 23 Dec 2014 00:00:00 +0000</pubDate>
      <guid>/2014/12/23/2014-retrospective-a-year-of-lotus/</guid>
      <description>&lt;p&gt;This has been &lt;strong&gt;a great year&lt;/strong&gt; for &lt;a href=&#34;http://lotusrb.org&#34;&gt;Lotus&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;At the beginning of 2014 I decided to open source this less invasive and simple framework for Rack.&lt;/p&gt;&#xA;&lt;p&gt;Back in the day, it was just a software stored in my hard drive.&#xA;An experiment that turned to be a fresh take for web development with Ruby.&#xA;It had in it the seminal work of what is Lotus today, but it required &lt;strong&gt;patience&lt;/strong&gt; for its blossoming.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Introducing Lotus::Validations</title>
      <link>/2014/10/23/introducing-lotusvalidations/</link>
      <pubDate>Thu, 23 Oct 2014 00:00:00 +0000</pubDate>
      <guid>/2014/10/23/introducing-lotusvalidations/</guid>
      <description>&lt;p&gt;Data validation is an important piece in software architecture.&#xA;It guarantees that the successive layers will operate on correct input.&#xA;In the existing Ruby frameworks we&amp;rsquo;re used to see this responsibility flatten down into models.&lt;/p&gt;&#xA;&lt;p&gt;The problem with this approach is that we end to mix a lot of validations for &lt;strong&gt;different use cases&lt;/strong&gt; in a &lt;strong&gt;single place&lt;/strong&gt;.&#xA;When the application grows in complexity, we add new validations.&#xA;If often happens that some rules are incompatible with others, then we introduce nasty conditionals to trigger only a subset of them.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Meaningful Exceptions</title>
      <link>/2014/09/22/meaningful-exceptions/</link>
      <pubDate>Mon, 22 Sep 2014 00:00:00 +0000</pubDate>
      <guid>/2014/09/22/meaningful-exceptions/</guid>
      <description>&lt;p&gt;Writing detailed API documentation helps to improve software design.&lt;/p&gt;&#xA;&lt;p&gt;We already know that explaining a concept to someone leads us to a better grasp. &lt;strong&gt;This is true for our code too.&lt;/strong&gt;&#xA;This &lt;em&gt;translation&lt;/em&gt; process to a natural language forces us to think about a method from the outside perspective.&#xA;We describe the intent, the input, the output and how it reacts under unexpected conditions.&#xA;Put it in black and white and you will find something to refine.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Introducing Lotus</title>
      <link>/2014/06/23/introducing-lotus/</link>
      <pubDate>Mon, 23 Jun 2014 00:00:00 +0000</pubDate>
      <guid>/2014/06/23/introducing-lotus/</guid>
      <description>&lt;p&gt;A year and a half ago I felt frustrated by the state of the art of web development with Ruby.&#xA;Secretly, in my spare time, I started hacking with new ideas, taking nothing for granted, destroying and starting from scratch several times, until the software was distilled in a beautiful API.&lt;/p&gt;&#xA;&lt;p&gt;It took me a decade to get here, by following a process of &lt;strong&gt;subtraction of what isn&amp;rsquo;t essential&lt;/strong&gt;.&#xA;Countless refinements to achieve modularity, to balance elegance with performance, and convenience with solid design.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Three Things To Know About Composition</title>
      <link>/2014/06/09/three-things-to-know-about-composition/</link>
      <pubDate>Mon, 09 Jun 2014 00:00:00 +0000</pubDate>
      <guid>/2014/06/09/three-things-to-know-about-composition/</guid>
      <description>&lt;p&gt;A few days ago &lt;a href=&#34;https://twitter.com/tenderlove&#34;&gt;Aaron Patterson&lt;/a&gt; wrote a in &lt;a href=&#34;http://tenderlovemaking.com/2014/06/04/yagni-methods-slow-us-down.html&#34;&gt;interesting article&lt;/a&gt; about composition vs inheritance with Ruby.&lt;/p&gt;&#xA;&lt;p&gt;He says that when inheriting our classes directly from Ruby&amp;rsquo;s core objects such as &lt;code&gt;Array&lt;/code&gt;, our public API for that object will become too large and difficult to maintain.&lt;/p&gt;&#xA;&lt;p&gt;Consider a powerful object like &lt;code&gt;String&lt;/code&gt; which has 164 public methods, once our library will be released, we should maintain all that amount of code.&#xA;It doesn&amp;rsquo;t worth the trouble, probably because we just wanted to pick a few methods from it.&#xA;It&amp;rsquo;s better to compose an object that hides all that complexity derived from &lt;code&gt;String&lt;/code&gt;, and to expose only the wanted behaviors.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Rails Is Not Dead</title>
      <link>/2014/05/19/rails-is-not-dead/</link>
      <pubDate>Mon, 19 May 2014 00:00:00 +0000</pubDate>
      <guid>/2014/05/19/rails-is-not-dead/</guid>
      <description>&lt;p&gt;A few years ago, my lead develop of the time, told me: &lt;em&gt;&amp;ldquo;Beware of the coupling that you&amp;rsquo;re introducing in your models&amp;rdquo;&lt;/em&gt;.&#xA;My answer was: &lt;em&gt;&amp;ldquo;Hey, you don&amp;rsquo;t know what you&amp;rsquo;re talking about, this is ActiveRecord&amp;rdquo;&lt;/em&gt;.&lt;/p&gt;&#xA;&lt;p&gt;I was an unexperienced developer fascinated by the innovation that Rails introduced.&#xA;After all, my technology was able to get rid of all that configurations, and all that boring stuff from the past.&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;- Patterns?&lt;br/&gt;&#xA;- I don&#39;t need them. I have the Holy Grail: MVC.&lt;br /&gt;&#xA;- Interfaces?&lt;br /&gt;&#xA;- Are you kidding me? This isn&#39;t Java, it&#39;s Ruby!&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;We all have been there.&#xA;We were recovering from the consequences of the &lt;em&gt;New Economy&lt;/em&gt; economy bubble burst.&#xA;A new wave of technologies was raising: AJAX, Rails, and the Web 2.0.&#xA;All was exciting, we felt like we&amp;rsquo;d learned from the past mistakes.&#xA;We were creating a new way to sell software, we needed to be agile, fast and pragmatic.&lt;/p&gt;</description>
    </item>
    <item>
      <title>We Are All Wrong About Software Design</title>
      <link>/2014/04/28/we-are-all-wrong-about-software-design/</link>
      <pubDate>Mon, 28 Apr 2014 00:00:00 +0000</pubDate>
      <guid>/2014/04/28/we-are-all-wrong-about-software-design/</guid>
      <description>&lt;p&gt;We are all wrong. When it comes to talk about opinions this is the way that things work.&#xA;Everyone has her or his own beliefs shaped by years of experience in the field, frustrating code, books, successes, etc.&#xA;How can all these backgrounds fall into a one unified theory? &lt;strong&gt;They just can&amp;rsquo;t.&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;You&amp;rsquo;ve always been told to pick the right tool for the job.&#xA;But what&amp;rsquo;s the &lt;em&gt;right tool&lt;/em&gt;?&#xA;&lt;strong&gt;You decide it&lt;/strong&gt;, according to your practical knowledge.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Introducing Lotus::Model</title>
      <link>/2014/04/23/introducing-lotusmodel/</link>
      <pubDate>Wed, 23 Apr 2014 00:00:00 +0000</pubDate>
      <guid>/2014/04/23/introducing-lotusmodel/</guid>
      <description>&lt;p&gt;Almost all the Ruby frameworks for the Model layer mix up business logic with database details.&#xA;This kind of architecture leads to &lt;a href=&#34;http://en.wikipedia.org/wiki/God_object&#34;&gt;god classes&lt;/a&gt;, slow build times and to a general &lt;a href=&#34;https://speakerdeck.com/jodosha/a-rails-criticism&#34;&gt;bad design&lt;/a&gt;.&#xA;These problems are well known to legacy projects&amp;rsquo;s maintainers.&lt;/p&gt;&#xA;&lt;p&gt;What if we assign these roles to &lt;strong&gt;smaller components&lt;/strong&gt; that are able to collaborate &lt;strong&gt;together&lt;/strong&gt;?&#xA;Imagine how life changing would be to &lt;strong&gt;work just with objects&lt;/strong&gt;, without worrying how to persist them.&#xA;How easy and fast would be testing them? How small and well defined would be your objects?&lt;/p&gt;</description>
    </item>
    <item>
      <title>Thread Safety With Ruby</title>
      <link>/2014/03/27/thread-safety-with-ruby/</link>
      <pubDate>Thu, 27 Mar 2014 00:00:00 +0000</pubDate>
      <guid>/2014/03/27/thread-safety-with-ruby/</guid>
      <description>&lt;p&gt;&lt;strong&gt;Moore&amp;rsquo;s law is over&lt;/strong&gt;.&#xA;Modern computation is exploited by running processes on multiple cores.&#xA;Ruby has always ignored this trend, and the community didn&amp;rsquo;t put enough attention on this topic.&lt;/p&gt;&#xA;&lt;p&gt;Ruby&amp;rsquo;s model for concurrency is based on threads.&#xA;It was typical approach for object oriented languages, designed in the 90s.&#xA;A thread is sequence of instructions that can be scheduled and executed in the context of a process.&#xA;Several threads can be running at the same time.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Introducing Lotus::View</title>
      <link>/2014/03/23/introducing-lotusview/</link>
      <pubDate>Sun, 23 Mar 2014 00:00:00 +0000</pubDate>
      <guid>/2014/03/23/introducing-lotusview/</guid>
      <description>&lt;p&gt;The missing part of all the Ruby web frameworks is the &lt;strong&gt;distinction between views and templates&lt;/strong&gt;.&#xA;A &lt;em&gt;view&lt;/em&gt; is an object that encapsulates the presentation logic of a page.&#xA;A &lt;em&gt;template&lt;/em&gt; is a file that defines the semantic and visual elements of a page.&#xA;In order to show a result to an user, a template must be &lt;em&gt;rendered&lt;/em&gt; by a view.&lt;/p&gt;&#xA;&lt;p&gt;Keeping things separated, helps to declutter templates and models from presentation logic.&#xA;Also, since views are objects they are easily testable.&#xA;If you ever used &lt;a href=&#34;http://mustache.github.io/&#34;&gt;Mustache&lt;/a&gt;, you are already aware of the advantages.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Redis Scripting with MRuby</title>
      <link>/2014/02/26/redis-scripting-with-mruby/</link>
      <pubDate>Wed, 26 Feb 2014 00:00:00 +0000</pubDate>
      <guid>/2014/02/26/redis-scripting-with-mruby/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;http://www.mruby.org&#34;&gt;MRuby&lt;/a&gt; is a lightweight Ruby.&#xA;It was created by Matz with the purpose of having an embeddable version of the language.&#xA;Even if it just reached the version 1.0, the hype around MRuby wasn&amp;rsquo;t high.&#xA;However, there are already projects that are targeting &lt;a href=&#34;https://github.com/matsumoto-r/ngx_mruby&#34;&gt;Nginx&lt;/a&gt;, &lt;a href=&#34;https://github.com/mattn/go-mruby&#34;&gt;Go&lt;/a&gt;, &lt;a href=&#34;http://mobiruby.org&#34;&gt;iOS&lt;/a&gt;, &lt;a href=&#34;https://github.com/mattn/mruby-v8&#34;&gt;V8&lt;/a&gt;, and even &lt;a href=&#34;https://github.com/kyab/mruby-arduino&#34;&gt;Arduino&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;The direct competitor in this huge market is &lt;a href=&#34;http://www.lua.org&#34;&gt;Lua&lt;/a&gt;: a lightweight scripting language.&#xA;Since the version 2.6.0 Redis introduced &lt;a href=&#34;http://redis.io/commands#scripting&#34;&gt;scripting&lt;/a&gt; capabilities with Lua.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# redis-cli&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&amp;gt; &lt;span class=&#34;nb&#34;&gt;eval&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;return 5&amp;#34;&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;0&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;integer&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;5&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&#xA;&lt;p&gt;&lt;strong&gt;Today is the 5th Redis birthday&lt;/strong&gt;, and I&amp;rsquo;d like celebrate this event by embedding my favorite language.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Introducing Lotus::Controller</title>
      <link>/2014/02/23/introducing-lotuscontroller/</link>
      <pubDate>Sun, 23 Feb 2014 00:00:00 +0000</pubDate>
      <guid>/2014/02/23/introducing-lotuscontroller/</guid>
      <description>&lt;p&gt;Lotus development is going well.&#xA;The experiment of open source a framework per month is &lt;strong&gt;sustainable&lt;/strong&gt;.&#xA;I have the time to cleanup the code, write a good documentation and deliver great solutions.&lt;/p&gt;&#xA;&lt;p&gt;This month, I’m proud to announce &lt;a href=&#34;https://github.com/lotus/controller&#34;&gt;Lotus::Controller&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;It’s a &lt;strong&gt;small but powerful&lt;/strong&gt; and &lt;strong&gt;fast&lt;/strong&gt; framework.&#xA;It works standalone or with &lt;a href=&#34;https://github.com/lotus/router&#34;&gt;Lotus::Router&lt;/a&gt; and it implements the &lt;a href=&#34;http://rack.github.io&#34;&gt;Rack&lt;/a&gt; protocol.&lt;/p&gt;&#xA;&lt;h2 id=&#34;actions&#34;&gt;Actions&lt;/h2&gt;&#xA;&lt;p&gt;The core of Lotus::Controller are the actions.&#xA;&lt;strong&gt;An action is an HTTP endpoint.&lt;/strong&gt;&#xA;This is the biggest difference with other frameworks where they use huge classes as controllers.&#xA;Think of Rails, where a single controller is responsible of many actions and holds too much informations.&#xA;Lotus is simple: &lt;strong&gt;one class per action&lt;/strong&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Building Sinatra with Lotus</title>
      <link>/2014/01/28/building-sinatra-with-lotus/</link>
      <pubDate>Tue, 28 Jan 2014 00:00:00 +0000</pubDate>
      <guid>/2014/01/28/building-sinatra-with-lotus/</guid>
      <description>&lt;p&gt;The beauty of &lt;a href=&#34;http://lotusrb.org&#34;&gt;Lotus&lt;/a&gt; is the composition of its frameworks. Each of them is well designed to achieve one and only one goal.&#xA;The main advantage of this architecture is that delevopers can easily use and reuse those frameworks in countless ways.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;/2014/01/23/introducing-lotus-router.html&#34;&gt;Lotus::Router&lt;/a&gt; accepts anonymous functions as endpoints.&#xA;This feature can be used to build &lt;a href=&#34;http://sinatrarb.com&#34;&gt;Sinatra&lt;/a&gt; with it.&lt;/p&gt;&#xA;&lt;h2 id=&#34;initial-setup&#34;&gt;Initial setup&lt;/h2&gt;&#xA;&lt;p&gt;We need to setup a &lt;code&gt;Gemfile&lt;/code&gt; with:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-ruby&#34; data-lang=&#34;ruby&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;source&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;https://rubygems.org&amp;#39;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;gem&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;lotus-router&amp;#39;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&#xA;&lt;p&gt;As second step, we create an &lt;em&gt;Hello World&lt;/em&gt; application with Lotus::Router (run with &lt;code&gt;rackup application.rb&lt;/code&gt;):&lt;/p&gt;</description>
    </item>
    <item>
      <title>Introducing Lotus::Router</title>
      <link>/2014/01/23/introducing-lotusrouter/</link>
      <pubDate>Thu, 23 Jan 2014 00:00:00 +0000</pubDate>
      <guid>/2014/01/23/introducing-lotusrouter/</guid>
      <description>&lt;p&gt;For me, the first step in the long path of &lt;a href=&#34;/2014/01/01/announcing-lotus.html&#34;&gt;building a web framework&lt;/a&gt; was an HTTP router.&#xA;By understanding requests coming from an user, it pays back with an immediate gratification: start it, open a browser and see a result.&lt;/p&gt;&#xA;&lt;p&gt;My hope was to embark on a short journey, and reuse as much as possible existing libraries.&#xA;But I soon discovered that the biggest problem of Ruby web frameworks is reusability of components.&#xA;Rails uses &lt;a href=&#34;https://github.com/rails/journey&#34;&gt;journey&lt;/a&gt;, which is coupled with ActionPack code base.&#xA;Sinatra has its own hardcoded routing system.&#xA;Plain Rack apps require the developer to fiddle with low level details of &lt;code&gt;env&lt;/code&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Announcing Lotus</title>
      <link>/2014/01/01/announcing-lotus/</link>
      <pubDate>Wed, 01 Jan 2014 00:00:00 +0000</pubDate>
      <guid>/2014/01/01/announcing-lotus/</guid>
      <description>&lt;p&gt;I&amp;rsquo;m pleased to announce Lotus: the Open Source project I&amp;rsquo;ve conceived, hacked and built during the last year.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Lotus is a full stack web framework for Ruby&lt;/strong&gt;, built with lightness, performances and testability in mind.&#xA;It aims to bring back Object Oriented Programming to web development, leveraging on stable APIs, a minimal DSL, and plain objects.&lt;/p&gt;&#xA;&lt;h2 id=&#34;standalone-frameworks&#34;&gt;Standalone frameworks&lt;/h2&gt;&#xA;&lt;p&gt;It&amp;rsquo;s composed by &lt;strong&gt;standalone frameworks&lt;/strong&gt; (controllers, views, etc..), each one is shipped as an independent gem, in order to remark the separation of concerns.&#xA;They can be used with any &lt;a href=&#34;http://rack.github.io&#34;&gt;Rack&lt;/a&gt; compatible application for a specific need: for instance, &lt;a href=&#34;http://lotusrb.org/router&#34;&gt;Lotus::Router&lt;/a&gt; can be used to dispatch HTTP requests for a pool of &lt;a href=&#34;http://www.sinatrarb.com&#34;&gt;Sinatra&lt;/a&gt; applications.&lt;/p&gt;</description>
    </item>
    <item>
      <title>On Happiness</title>
      <link>/2013/12/17/on-happiness/</link>
      <pubDate>Tue, 17 Dec 2013 00:00:00 +0000</pubDate>
      <guid>/2013/12/17/on-happiness/</guid>
      <description>&lt;p&gt;As a naive younger man, I have always been disappointed by how many year resolutions have missed in the past.&#xA;Mostly because they are a failure by design: the &lt;em&gt;wishful self&lt;/em&gt; is delighted to dictate the new &lt;em&gt;agenda of change&lt;/em&gt;, where all the lazyness, tiredness, and unforeseen accidents will magically disappear to leave room to a bright, joyful and productive future.&#xA;This will never happen.&lt;/p&gt;&#xA;&lt;h2 id=&#34;what-really-works-is-to-plan-nothing&#34;&gt;What really works is to plan nothing&lt;/h2&gt;&#xA;&lt;p&gt;If you aim to write more, just find the time and do it.&#xA;Don&amp;rsquo;t plan, do it.&#xA;Todo lists were invented to sit and watch us with disapproval, they always generate a sensation of unfulfillment, we are always inadequate and behind the goal.&#xA;And if we&amp;rsquo;re still struggling, we probably have chosen the wrong desire.&#xA;Better admit the failure, turn it down, than blindly follow somebody else&amp;rsquo;s dream.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Introducing Redis Store</title>
      <link>/2012/06/18/introducing-redis-store/</link>
      <pubDate>Mon, 18 Jun 2012 00:00:00 +0000</pubDate>
      <guid>/2012/06/18/introducing-redis-store/</guid>
      <description>&lt;p&gt;&lt;strong&gt;[ I wrote this post for Redis ToGo, you can find the original article &lt;a href=&#34;http://blog.togo.io/introducing/redis-store/&#34;&gt;here&lt;/a&gt; and the related discussion on &lt;a href=&#34;http://news.ycombinator.com/item?id=4124246&#34;&gt;Hacker News&lt;/a&gt;. ]&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;Redis Store aims to be a toolkit for your Ruby applications, it natively supports sharding, master/slave replication, marshalling, timeouts and namespaces. Plus, it&amp;#8217;s really easy to use with the most popular frameworks, such as Ruby on Rails.&lt;/p&gt;&#xA;&lt;p&gt;If you love modularity, you will love Redis Store too: under the hood it just activates, at runtime, the best set of low level features requested by the above software layers. It&amp;#8217;s delivered as a set of gems, one for each targeted framework, with a common background that&amp;#8217;s the redis-store gem itself. This decision helped me a lot to deal with different versions of Ruby, several frameworks, and versions.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Lean Rails App Setup</title>
      <link>/2012/02/27/lean-rails-app-setup/</link>
      <pubDate>Mon, 27 Feb 2012 00:00:00 +0000</pubDate>
      <guid>/2012/02/27/lean-rails-app-setup/</guid>
      <description>&lt;p&gt;I&amp;#8217;m currently working as a consultant for an UN agency (&lt;a href=&#34;http://www.ifad.org&#34;&gt;IFAD&lt;/a&gt;) and we have a portfolio of &lt;strong&gt;~15 Rails&lt;/strong&gt; apps, developed in the last four years. The environment is heterogeneous and an half dozen of these projects are interfacing with legacy software and they are legacy themselves. As counterpart, the new apps we are developing are running on the latest bleeding edge technologies (Ruby 1.9.3, Rails 3.2, MongoDB, Redis, WebSockets etc..).&lt;/p&gt;</description>
    </item>
    <item>
      <title>HTML5 Geolocation Testing with Cucumber</title>
      <link>/2011/02/13/html5-geolocation-testing-with-cucumber/</link>
      <pubDate>Sun, 13 Feb 2011 00:00:00 +0000</pubDate>
      <guid>/2011/02/13/html5-geolocation-testing-with-cucumber/</guid>
      <description>&lt;p&gt;&lt;strong&gt;[ I wrote this post for &lt;a href=&#34;http://frestyl.com&#34; target=&#34;_blank&#34;&gt;frestyl&lt;/a&gt;, you can find the original article &lt;a href=&#34;http://frestyl.wordpress.com/2011/01/24/html5-geolocation-testing-with-cucumber/&#34;&gt;here&lt;/a&gt;. ]&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;&#xA;Here at frestyl we&#39;re working hard, using cutting edge technologies to promote their wider-scale adoption and to help set the new standards with our direct experience. In the past months our geolocation service has been changed from a somewhat flaky IP lookup to the new &lt;a href=&#34;http://www.w3.org/TR/geolocation-API/&#34; target=&#34;_blank&#34;&gt;HTML5 W3C draft&lt;/a&gt;. Our users noticed the difference and they are happier of the new level of precision.&#xA;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Why Customer Service Matters</title>
      <link>/2011/01/30/why-customer-service-matters/</link>
      <pubDate>Sun, 30 Jan 2011 00:00:00 +0000</pubDate>
      <guid>/2011/01/30/why-customer-service-matters/</guid>
      <description>&lt;p&gt;A few months ago I bought a flash music player for my &lt;a href=&#34;http://theplayli.st&#34;&gt;music blog&lt;/a&gt;.&lt;br/&gt;&lt;br/&gt;&#xA;&lt;p&gt;Surprisingly, it doesn’t support &lt;a href=&#34;http://en.wikipedia.org/wiki/M4a&#34;&gt;.m4a&lt;/a&gt; files. I noticed that lack, once I payed for it. Just for curiosity (and to know if I was missing something in the documentation), I filed &lt;a href=&#34;http://bit.ly/eu3tkx&#34;&gt;an issue&lt;/a&gt; in their support forum (as of the 30rd of June), asking if their player can reproduce other formats rather than the aforementioned one. I still didn’t got a reply from the software firm. I solved the issue by myself, converting all the music in mp3 and it’s no longer a problem to me. They just could have replied with a &lt;em&gt;“yes”&lt;/em&gt; or a &lt;em&gt;“no”&lt;/em&gt; and I would be happy just to be aware, but they didn’t. Aside to this issue, I asked for other technical questions and still no words from them.&lt;br/&gt;&lt;br/&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to install ruby-debug on Ruby 1.9</title>
      <link>/2009/09/04/how-to-install-ruby-debug-on-ruby-19/</link>
      <pubDate>Fri, 04 Sep 2009 00:00:00 +0000</pubDate>
      <guid>/2009/09/04/how-to-install-ruby-debug-on-ruby-19/</guid>
      <description>&lt;p&gt;One of the major problem which &lt;a href=&#34;http://yehudakatz.com/2009/07/17/what-do-we-need-to-get-on-ruby-1-9/&#34;&gt;prevent the migration to Ruby 1.9&lt;/a&gt; is the lack of the porting of ruby-debug.&lt;/p&gt;&#xA;&lt;p&gt;Here the steps I followed to made it working on my MacBook with Multiruby:&lt;/p&gt;&#xA;&lt;p&gt;&lt;code class=&#34;bash&#34;&gt;&lt;br/&gt;&#xA;sudo gem install rake-compiler ruby_core_source --no-rdoc --no-ri&lt;br/&gt;&#xA;sudo gem install ruby-debug19 --no-rdoc --no-ri&lt;br/&gt;&lt;/code&gt;&lt;/p&gt;&#xA;&lt;p&gt;I hope it works for you too!&lt;/p&gt;</description>
    </item>
    <item>
      <title>Rails: Unobtrusive and i18n Javascript confirm</title>
      <link>/2009/06/17/rails-unobtrusive-and-i18n-javascript-confirm/</link>
      <pubDate>Wed, 17 Jun 2009 00:00:00 +0000</pubDate>
      <guid>/2009/06/17/rails-unobtrusive-and-i18n-javascript-confirm/</guid>
      <description>&lt;p&gt;How many times do you heard you should &lt;strong&gt;separate content from behavior&lt;/strong&gt;? Never? Hmmm don&amp;#8217;t try to cheat me.. So, why do you still use &lt;code&gt;:confirm&lt;/code&gt; option for &lt;code&gt;link_to&lt;/code&gt; helper?&lt;/p&gt;&#xA;&lt;p&gt;Here a little snippet to archive our goal, and as extra bonus, you get it i18n:&lt;/p&gt;&#xA;&lt;p&gt;&lt;code class=&#34;html&#34;&gt;&lt;br/&gt;&#xA;&amp;lt;script type=&#34;text/javascript&#34;&amp;gt;&lt;br/&gt;&#xA;window._authenticity_token = &#34;&#34;;&lt;br/&gt;&#xA;&amp;lt;/script&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&lt;p&gt;     t(:&amp;#8217;asset.destroy&amp;#8217;),&lt;br/&gt;&#xA;      :class          =&amp;gt; &amp;#8220;delete&amp;#8221;,&lt;br/&gt;&#xA;      :&amp;#8217;data-confirm&amp;#8217; =&amp;gt; t(:&amp;#8217;asset.destroy_confirm&amp;#8217;) %&amp;gt;&lt;br/&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;code class=&#34;javascript&#34;&gt;&lt;br/&gt;&#xA;    $(document).ready(function(){&lt;br/&gt;&#xA;      $(&#34;.delete&#34;).bind(&#34;click&#34;, function() {&lt;br/&gt;&#xA;        if(window.confirm($(this).attr(&#34;data-confirm&#34;))) {&lt;br/&gt;&#xA;          $.ajax({&lt;br/&gt;&#xA;            url: $(element).attr(&#34;href&#34;),&lt;br/&gt;&#xA;            data: {&lt;br/&gt;&#xA;              _method: &#34;delete&#34;,&lt;br/&gt;&#xA;              authenticity_token: window._authenticity_token&lt;br/&gt;&#xA;            },&lt;br/&gt;&#xA;            type: &#39;post&#39;,&lt;br/&gt;&#xA;            dataType: &#39;script&#39;&lt;br/&gt;&#xA;          });&lt;br/&gt;&#xA;        }&lt;br/&gt;&#xA;        return false;&lt;br/&gt;&#xA;      });&lt;br/&gt;&#xA;    });&lt;br/&gt;&lt;/code&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Memoria: Statistics for Redis</title>
      <link>/2009/06/13/memoria-statistics-for-redis/</link>
      <pubDate>Sat, 13 Jun 2009 00:00:00 +0000</pubDate>
      <guid>/2009/06/13/memoria-statistics-for-redis/</guid>
      <description>&lt;p&gt;A couple of days ago &lt;a href=&#34;http://twitter.com/jodosha/status/2117046130&#34;&gt;I setup this blog&lt;/a&gt; with &lt;a href=&#34;http://code.google.com/p/redis/&#34;&gt;Redis&lt;/a&gt; as cache container, thanks to my Ruby gem: &lt;a href=&#34;http://github.com/jodosha/redis-store&#34;&gt;redis-store&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Now, following the old &lt;em&gt;itch-your-own-scratches&lt;/em&gt; rule, I created a little &lt;a href=&#34;http://www.sinatrarb.com&#34;&gt;Sinatra&lt;/a&gt; web application for Redis statistics: &lt;a href=&#34;http://github.com/jodosha/memoria&#34;&gt;Memoria&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img src=&#34;http://img.skitch.com/20090613-nqmj7guc6n8ptwt3bgsbuipuw7.jpg&#34; width=&#34;446px&#34; heigth=&#34;330px&#34; alt=&#34;Memoria screenshot&#34;/&gt;&lt;/p&gt;&#xA;&lt;p&gt;# Getting Started&lt;br/&gt;&lt;code class=&#34;bash&#34;&gt;&lt;br/&gt;&#xA;(sudo) gem install sinatra dm-core do_sqlite3 rspec&lt;br/&gt;&#xA;(sudo) gem install ezmobius-redis-rb jodosha-memoria -s &lt;a href=&#34;http://gems.github.com&#34;&gt;http://gems.github.com&lt;/a&gt;&lt;br/&gt;&#xA;memoria /path/to/installation&lt;br/&gt;&#xA;cd /path/to/installation&lt;br/&gt;&#xA;cp memoria.yml.example memoria.yml&lt;br/&gt;&#xA;rackup config.ru --port 9292 mongrel&lt;br/&gt;&lt;/code&gt;&lt;/p&gt;&#xA;&lt;p&gt;Memoria is still in an &lt;em&gt;embryonic stage&lt;/em&gt;, feel free to suggest features.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Hanoi: Automated jQuery tests with QUnit</title>
      <link>/2009/06/09/hanoi-automated-jquery-tests-with-qunit/</link>
      <pubDate>Tue, 09 Jun 2009 00:00:00 +0000</pubDate>
      <guid>/2009/06/09/hanoi-automated-jquery-tests-with-qunit/</guid>
      <description>&lt;p&gt;About a month ago, we have released &lt;a href=&#34;http://adva-cms.org&#34;&gt;adva-cms&lt;/a&gt; 0.2.0, the &lt;a href=&#34;http://adva-cms.org/2009/4/28/out-now-adva-cms-0-dot-2-0-the-usability-release&#34;&gt;most relevant change&lt;/a&gt; was the migration from &lt;a href=&#34;http://prototypejs.org&#34;&gt;Prototype&lt;/a&gt; to &lt;a href=&#34;http://jquery.com&#34;&gt;jQuery&lt;/a&gt;. I always been a loyal Prototype fan, and, until then, I always tested my code with `unittest.js`, combined with `jstest.rb`.&#xA;&lt;p&gt;Like other rewrite we needed to rely on a solid test layer, but what I noticed was the lack of a valid automation support for &lt;strong&gt;QUnit&lt;/strong&gt;, the test framework used internally by the jQuery team. So, in a couple of days I built what we need, just creating a custom version of &lt;code&gt;jstest.rb&lt;/code&gt; and changing a little bit QUnit, in order to communicate with it.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Click To Globalize for Rails 2.3</title>
      <link>/2009/04/10/click-to-globalize-for-rails-23/</link>
      <pubDate>Fri, 10 Apr 2009 00:00:00 +0000</pubDate>
      <guid>/2009/04/10/click-to-globalize-for-rails-23/</guid>
      <description>&lt;p&gt;For all of you who don&amp;#8217;t know what I&amp;#8217;m talking about, **Click to Globalize** is a Rails plugin for in-place translations. Now it&amp;#8217;s compatible with Rails 2.3 and It&amp;#8217;s also the most clean and polish version of ever, let me explain what&amp;#8217;s changed.&#xA;&lt;/p&gt;&lt;h3&gt;Engine&lt;/h3&gt;&#xA;Yes, **Click to Globalize** is now an [engine](&lt;a href=&#34;http://rails-engines.org/&#34;&gt;http://rails-engines.org/&lt;/a&gt;), this means all the controllers, the helpers, the routes and the other stuff, now lives in `vendor/plugins`. No more clutter with flying files, except for one javascript and one stylesheet.&#xA;&lt;h3&gt;I18n&lt;/h3&gt;&#xA;The [i18n team](&lt;a href=&#34;http://i18n-rails.org/&#34;&gt;http://i18n-rails.org/&lt;/a&gt;) (myself included) worked hard to build a **consistent API** for i18n. Starting from Rails 2.2 we have bundled a gem for this purpose, and now my plugin is totally compliant with this system, this **agnosticism** allow you to use whatever i18n backend you want. Click to Globalize is **no longer a Globalize extension!!**  &#xA;&lt;h3&gt;RESTful&lt;/h3&gt;&#xA;The plugin now bundles two **full RESTful** controllers: `TranslationsController` and `LocalesController`, respectively `/translations` and `/locales`.&#xA;&lt;h3&gt;Lightweight&lt;/h3&gt;&#xA;I replaced the annoying `around_filter` system, with a more lightweight one, based on the observation of `ActionView#render`.&#xA;&lt;h3&gt;Formatting&lt;/h3&gt;&#xA;I removed the support for **Markdown** and **Textile**, personally I never used so much, and don&amp;#8217;t think they are so related with i18n.&#xA;&lt;h3&gt;Deprecations&lt;/h3&gt;&#xA;The old `globalize?` method is deprecated in favor of `in_place_translations?`.  &#xA;&lt;p&gt;You can find all the new instructions to the [project page](&lt;a href=&#34;http://lucaguidi.com/projects/click-to-globalize&#34;&gt;&lt;a href=&#34;http://lucaguidi.com/projects/click-to-globalize&#34;&gt;http://lucaguidi.com/projects/click-to-globalize&lt;/a&gt;&lt;/a&gt;) or on [GitHub](&lt;a href=&#34;http://github.com/jodosha/click-to-globalize&#34;&gt;&lt;a href=&#34;http://github.com/jodosha/click-to-globalize&#34;&gt;http://github.com/jodosha/click-to-globalize&lt;/a&gt;&lt;/a&gt;).&lt;br&gt;&#xA;Enjoy!&lt;/p&gt;</description>
    </item>
    <item>
      <title>Boost Rails Sessions</title>
      <link>/2009/03/31/boost-rails-sessions/</link>
      <pubDate>Tue, 31 Mar 2009 00:00:00 +0000</pubDate>
      <guid>/2009/03/31/boost-rails-sessions/</guid>
      <description>&lt;p&gt;There are many dark corners and hidden features in a big framework like **Rails**.  &lt;/p&gt;&#xA;&lt;p&gt;Digging inside the code of **ActiveRecord** I discovered an interesting class: **SqlBypass**. When you set your session store on ActiveRecord it will use a **Base** subclass for deal with database store. This configuration adds an useless overhead for your application, because each session read/write will go through the complex callbacks system of ActiveRecord.  &lt;/p&gt;&#xA;&lt;p&gt;For these reason is highly advisable to use **SqlBypass**. As the name suggest it bypasses all the callbacks and simply performs read/write operations.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Rake tasks for run Rails engines migrations</title>
      <link>/2009/02/24/rake-tasks-for-run-rails-engines-migrations/</link>
      <pubDate>Tue, 24 Feb 2009 00:00:00 +0000</pubDate>
      <guid>/2009/02/24/rake-tasks-for-run-rails-engines-migrations/</guid>
      <description>&lt;p&gt;I created a patch for run engine&amp;#8217;s migrations&lt;/p&gt;~&#xA;&lt;p&gt;&#xA;  I created a patch for run engine&amp;#8217;s migrations, it adds two Rake tasks:&#xA;  &lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;code&gt;db:migrate:engines&lt;/code&gt;&lt;/li&gt;&#xA;    &lt;li&gt;&lt;code&gt;db:migrate:engines:down&lt;/code&gt;&lt;/li&gt;&#xA;  &lt;/ul&gt;&lt;p&gt;&#xA;The first one allows to run all the migrations stored in the db/migrate directory of each plugin.&#xA;It runs migrations in the same order &lt;code&gt;Rails::Initializer&lt;/code&gt; register the plugins, this means if you force an order by &lt;code&gt;environment.rb&lt;/code&gt;, it will be reflected on migrations order.&#xA;&lt;p&gt;Example:&#xA;You have four plugins in your app: &lt;code&gt;apple&lt;/code&gt;, &lt;code&gt;bar&lt;/code&gt;, &lt;code&gt;foo&lt;/code&gt;, &lt;code&gt;pear&lt;/code&gt;.&lt;br/&gt;&lt;code class=&#34;ruby&#34;&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to use Sprockets with Rails</title>
      <link>/2009/02/23/how-to-use-sprockets-with-rails/</link>
      <pubDate>Mon, 23 Feb 2009 00:00:00 +0000</pubDate>
      <guid>/2009/02/23/how-to-use-sprockets-with-rails/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;http://conio.net/&#34; title=&#34;Sam Stephenson&#34;&gt;Sam Stephenson&lt;/a&gt; has recently released a Javascript preprocessor called &lt;a href=&#34;http://getsprockets.org&#34; title=&#34;Sprockets&#34;&gt;Sprockets&lt;/a&gt;.&#xA;It&amp;#8217;s distributed as Ruby gem, and it helps to declare scripts dependencies through special comments, and safely build them one script. It&amp;#8217;s very useful for maintain your Javascript projects, extract reusable code and share across applications.&lt;/p&gt;&#xA;&lt;h2&gt;Installation&lt;/h2&gt;&#xA;&lt;p&gt;&#xA;  &lt;code class=&#34;bash&#34;&gt;&#xA;$ (sudo) gem install sprockets&#xA;  &lt;/code&gt;&#xA;  It will also install &lt;code&gt;sprocketize&lt;/code&gt; executable.&#xA;&lt;/p&gt;&#xA;&lt;h2&gt;How it works?&lt;/h2&gt;&#xA;&lt;p&gt;&#xA;  To declare a dependency use &lt;code&gt;require&lt;/code&gt; directive:&lt;br/&gt;&lt;code class=&#34;javascript&#34;&gt;&#xA;//= require &lt;prototype&gt;&#xA;//= require &#34;cookies&#34;&#xA;  &lt;/prototype&gt;&lt;/code&gt;&#xA;  When you use angular brackets the script will be searched in all the Sprockets load path, if you use quotes instead, you are forcing to load the file from the current directory. Usually you should use the first way to require frameworks or libraries and the second one for your scripts.&#xA;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Getting started with Cached Models</title>
      <link>/2009/02/17/getting-started-with-cached-models/</link>
      <pubDate>Tue, 17 Feb 2009 00:00:00 +0000</pubDate>
      <guid>/2009/02/17/getting-started-with-cached-models/</guid>
      <description>&lt;p&gt;&lt;object width=&#34;600&#34; height=&#34;376&#34;&gt;&lt;param name=&#34;allowfullscreen&#34; value=&#34;true&#34;&gt;&lt;param name=&#34;allowscriptaccess&#34; value=&#34;always&#34;&gt;&lt;param name=&#34;movie&#34; value=&#34;http://vimeo.com/moogaloop.swf?clip_id=3243531&amp;amp;server=vimeo.com&amp;amp;show_title=1&amp;amp;show_byline=1&amp;amp;show_portrait=0&amp;amp;color=00ADEF&amp;amp;fullscreen=1&#34;&gt;&lt;embed src=&#34;http://vimeo.com/moogaloop.swf?clip_id=3243531&amp;amp;server=vimeo.com&amp;amp;show_title=1&amp;amp;show_byline=1&amp;amp;show_portrait=0&amp;amp;color=00ADEF&amp;amp;fullscreen=1&#34; type=&#34;application/x-shockwave-flash&#34; allowfullscreen=&#34;true&#34; allowscriptaccess=&#34;always&#34; width=&#34;600&#34; height=&#34;376&#34;&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;http://vimeo.com/3243531&#34;&gt;Getting started with CachedModels&lt;/a&gt; from &lt;a href=&#34;http://vimeo.com/user1310784&#34;&gt;Luca Guidi&lt;/a&gt; on &lt;a href=&#34;http://vimeo.com&#34;&gt;Vimeo&lt;/a&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Rails caching and Javascript pt. 2</title>
      <link>/2009/02/13/rails-caching-and-javascript-pt-2/</link>
      <pubDate>Fri, 13 Feb 2009 00:00:00 +0000</pubDate>
      <guid>/2009/02/13/rails-caching-and-javascript-pt-2/</guid>
      <description>&lt;p&gt;In the previous &lt;a href=&#34;http://jodosha.tumblr.com/2009/02/09/rails-caching-and-javascript-pt-1.html&#34; title=&#34;Rails caching and Javascript&#34;&gt;article&lt;/a&gt; I showed how to take the advantage of Javascript for page caching.&lt;/p&gt;&#xA;&lt;p&gt;This cache strategy allows to generate static HTML and allow the web server to serve it, without waste a useless Rails request/response cycle. But, since the cached page is stateless we ask help to Javascript for make it a little bit dynamic.&lt;/p&gt;&#xA;&lt;h2&gt;Flash&lt;/h2&gt;&#xA;&lt;p&gt;&#xA;  All of you has probably noticed that &lt;a&gt;flash&lt;/a&gt; object is an enemy of page caching. Let me show you why.&lt;br/&gt;&lt;code class=&#34;ruby&#34;&gt;&#xA;class SessionController &#xA;  Now suppose the application is in a blank state, when the user hits the &lt;code&gt;dashboard_url&lt;/code&gt;, ActionPack will cache the page, including the flash status. This means it will be always rendered, even if the flash will be expired.&#xA;&lt;/code&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Rails caching and Javascript pt. 1</title>
      <link>/2009/02/09/rails-caching-and-javascript-pt-1/</link>
      <pubDate>Mon, 09 Feb 2009 00:00:00 +0000</pubDate>
      <guid>/2009/02/09/rails-caching-and-javascript-pt-1/</guid>
      <description>&lt;p&gt;Rails offer a multi-level view caching based on: &lt;a href=&#34;http://api.rubyonrails.com/classes/ActionController/Caching/Pages.html&#34; title=&#34;Page Caching API&#34;&gt;page&lt;/a&gt;, &lt;a href=&#34;http://api.rubyonrails.com/classes/ActionController/Caching/Actions.html&#34; title=&#34;Action Cache API&#34;&gt;action&lt;/a&gt; and &lt;a href=&#34;http://api.rubyonrails.com/classes/ActionController/Caching/Fragments.html&#34; title=&#34;Fragment Cache API&#34;&gt;fragment&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;h2&gt;Page Caching&lt;/h2&gt;&#xA;&lt;p&gt;&#xA;  For Rails cache a page means to generate the HTML code on the first visit, then allow front-end web server to send it statically.&lt;br/&gt;&#xA;  This is the fastest way to serve pages, because Rails puts the cached page in the public folder, the web server intercept the request and doesn&amp;#8217;t forward it to the application server, avoiding an useless Rails request cycle.&lt;br/&gt;&lt;code class=&#34;ruby&#34;&gt;&#xA;class HomeController &#xA;&lt;/code&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Hash deep search</title>
      <link>/2009/02/04/hash-deep-search/</link>
      <pubDate>Wed, 04 Feb 2009 00:00:00 +0000</pubDate>
      <guid>/2009/02/04/hash-deep-search/</guid>
      <description>&lt;p&gt;I&amp;#8217;m back and I wanna share those simple snippets with you:&lt;/p&gt;~&#xA;&lt;p&gt;&#xA;&lt;code class=&#34;ruby&#34;&gt;&#xA;class Hash&#xA;  def deep_has_key?(key)&#xA;    self.has_key?(key) || any? {|k, v| v.deep_has_key?(key) if v.is_a? Hash}&#xA;  end&#xA;  alias :deep_include? :deep_has_key?&#xA;  alias :deep_key? :deep_has_key?&#xA;  alias :deep_member? :deep_has_key?&#xA;&lt;p&gt;def deep_has_value?(value)&#xA;self.has_value?(value) || any? {|k,v| v.deep_has_value?(value) if v.is_a? Hash}&#xA;end&#xA;alias :deep_value? :deep_has_value?&#xA;end&#xA;&lt;/code&gt;&lt;/p&gt;&#xA;&lt;/p&gt;&#xA;&lt;p&gt;&#xA;Example:&lt;br/&gt;&lt;code class=&#34;ruby&#34;&gt;&#xA;{:a =&amp;gt; {:c =&amp;gt; &#39;c&#39;}, :b =&amp;gt;{:d =&amp;gt; {:e =&amp;gt; &#39;e&#39;}}}.deep_has_key?(:e) # =&amp;gt; true&#xA;{:a =&amp;gt; {:c =&amp;gt; &#39;c&#39;}, :b =&amp;gt;{:d =&amp;gt; {:e =&amp;gt; &#39;e&#39;}}}.deep_has_key?(:z) # =&amp;gt; false&#xA;&lt;p&gt;{:a =&amp;gt; {:c =&amp;gt; &amp;lsquo;c&amp;rsquo;}, :b =&amp;gt;{:d =&amp;gt; {:e =&amp;gt; &amp;rsquo;e&amp;rsquo;}}}.deep_has_value?(&amp;rsquo;e&amp;rsquo;) # =&amp;gt; true&#xA;{:a =&amp;gt; {:c =&amp;gt; &amp;lsquo;c&amp;rsquo;}, :b =&amp;gt;{:d =&amp;gt; {:e =&amp;gt; &amp;rsquo;e&amp;rsquo;}}}.deep_has_value?(&amp;lsquo;z&amp;rsquo;) # =&amp;gt; false&#xA;&lt;/code&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Skip Mocha</title>
      <link>/2008/10/23/skip-mocha/</link>
      <pubDate>Thu, 23 Oct 2008 00:00:00 +0000</pubDate>
      <guid>/2008/10/23/skip-mocha/</guid>
      <description>&lt;p&gt;Yesterday &lt;a href=&#34;http://jodosha.tumblr.com/2008/10/22/cached-models-003.html&#34;&gt;I confessed&lt;/a&gt; how messed up was &lt;a href=&#34;http://jodosha.tumblr.com/2008/10/10/cached-models-002.html&#34; title=&#34;CachedModels 0.0.2&#34;&gt;CachedModels 0.0.2&lt;/a&gt;. The problem was pretty simple: I made some mistakes mocking up &lt;a href=&#34;http://www.danga.com/memcached/&#34;&gt;Memcached&lt;/a&gt; behaviors.&lt;/p&gt;&#xA;&lt;h3&gt;The Dilemma&lt;/h3&gt;&#xA;&lt;p&gt;&#xA;  I massively use &lt;a href=&#34;http://mocha.rubyforge.org/&#34;&gt;Mocha&lt;/a&gt; for track how many calls CachedModels performs against the cache, and (ideally) for run test suite without any server active.&#xA;  But, this approach led me to broken results. Should I keep out Mocha from my tests?&#xA;&lt;/p&gt;&#xA;&lt;h3&gt;The Solution&lt;/h3&gt;&#xA;&lt;p&gt;&#xA;  Why don&amp;#8217;t mock the mock? We know, Ruby allows to add behaviors to classes at runtime, Mocha itself take this advantage.&#xA;  I added to my &lt;code&gt;test_helper.rb&lt;/code&gt; the following code:&lt;br/&gt;&lt;code class=&#34;ruby&#34;&gt;&#xA;if ENV[&#39;SKIP_MOCHA&#39;] == &#39;true&#39;&#xA;  class Object&#xA;    def expects(*args)&#xA;      self&#xA;    end&#xA;&lt;pre&gt;&lt;code&gt;def method_missing(method_name, *args, &amp;amp;amp;block)&#xA;end&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;end&lt;/p&gt;</description>
    </item>
    <item>
      <title>Cached Models 0.0.3</title>
      <link>/2008/10/22/cached-models-003/</link>
      <pubDate>Wed, 22 Oct 2008 00:00:00 +0000</pubDate>
      <guid>/2008/10/22/cached-models-003/</guid>
      <description>&lt;p&gt;Since I began to work as professional developer I learned a lot of stuff, but, first of all I learned to be honest with customers and with the Community.&#xA;I have to admit: &lt;a href=&#34;http://lucaguidi.com/2008/10/10/cached-models-0-0-2&#34;&gt;CachedModels 0.0.2&lt;/a&gt; was a huge mess.&lt;/p&gt;&#xA;&lt;p&gt;&#xA;  It was a broken version, due to wrong mocks in test. I apologize for all the problems you could encountered using it. Since I discovered all the errors, I worked hard to restore all the lost functionalities.&#xA;  But it wasn&amp;#8217;t enough for me, so I focused my attention on performances, reducing cache accesses: now &lt;a href=&#34;http://gist.github.com/10203&#34; title=&#34;Benchmarks for CachedModels&#34;&gt;benchmark&lt;/a&gt; test tooks &lt;strong&gt;36.015132&lt;/strong&gt; fewer seconds than plain ActiveRecord!&#xA;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Cached Models 0.0.2</title>
      <link>/2008/10/10/cached-models-002/</link>
      <pubDate>Fri, 10 Oct 2008 00:00:00 +0000</pubDate>
      <guid>/2008/10/10/cached-models-002/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;http://lucaguidi.com/pages/cached_models&#34; title=&#34;CachedModels&#34;&gt;CachedModels&lt;/a&gt; hit &lt;a href=&#34;http://github.com/jodosha/cached-models/tree/v0.0.2&#34; title=&#34;Cached Models v0.0.2&#34;&gt;0.0.2&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;First of all, I transformed it to a Ruby gem, so you can use it &lt;strong&gt;outside Rails!&lt;/strong&gt; Second, I dramatically &lt;strong&gt;enhanced performances&lt;/strong&gt;, avoiding useless cache lookups and expirations. Take a look at the new &lt;a href=&#34;http://gist.github.com/10203&#34; title=&#34;Benchmarks for CachedModels&#34;&gt;benchmark stats&lt;/a&gt;: 1000 requests with a level of concurrency equal to 100, tooks 6 fewer seconds, if compared with standard ActiveRecord.&lt;/p&gt;&#xA;&lt;p&gt;I strongly encourage you to upgrade to the newer version.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Released Sashimi 0.2.1</title>
      <link>/2008/09/29/released-sashimi-021/</link>
      <pubDate>Mon, 29 Sep 2008 00:00:00 +0000</pubDate>
      <guid>/2008/09/29/released-sashimi-021/</guid>
      <description>&lt;p&gt;I&amp;#8217;ve just released a new version of &lt;a href=&#34;http://lucaguidi.com/pages/sashimi&#34;&gt;Sashimi&lt;/a&gt; (&lt;strong&gt;0.2.1&lt;/strong&gt;), it fixes a bug for Ubuntu.&lt;/p&gt;&#xA;&lt;h2&gt;The Problem&lt;/h2&gt;&#xA;&lt;p&gt;&#xA;  When the script starts tries to load repository concerned classes: &lt;code&gt;GitRepository&lt;/code&gt; and &lt;code&gt;SvnRepository&lt;/code&gt;, which are subclasses of &lt;code&gt;AbstractRepository&lt;/code&gt;. In &lt;code&gt;repositories.rb&lt;/code&gt; I use &lt;code&gt;Dir#[]&lt;/code&gt; to load all the &lt;code&gt;.rb&lt;/code&gt; files in a certain directory, but the order of the resulting array is unpredictable, so if the first class was &lt;strong&gt;not&lt;/strong&gt; &lt;code&gt;AbstractRepository&lt;/code&gt; &lt;strong&gt;Sashimi&lt;/strong&gt; was crashing.&#xA;&lt;/p&gt;&#xA;&lt;h2&gt;The Solution&lt;/h2&gt;&#xA;&lt;p&gt;&#xA;  I&amp;#8217;ve fixed it, so, if you have experienced this problem, please update &lt;strong&gt;Sashimi&lt;/strong&gt; with:&lt;br/&gt;&lt;code class=&#34;bash&#34;&gt;&#xA;$ (sudo) gem update sashimi&#xA;  &lt;/code&gt;&#xA;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Cached Models</title>
      <link>/2008/09/10/cached-models/</link>
      <pubDate>Wed, 10 Sep 2008 00:00:00 +0000</pubDate>
      <guid>/2008/09/10/cached-models/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;http://lucaguidi.com/pages/cached_models&#34;&gt;&lt;strong&gt;cached_models&lt;/strong&gt;&lt;/a&gt; provides to your models a transparent approach to use &lt;a href=&#34;http://www.rubyonrails.org&#34; title=&#34;Ruby on Rails&#34;&gt;Rails&lt;/a&gt; internal &lt;a href=&#34;http://as.rubyonrails.org/classes/ActiveSupport/Cache.html&#34; title=&#34;ActiveSupport::Cache API&#34;&gt;cache mechanism&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;&#xA;  Usually, when you decide to use cache for your ActiveRecord results, you have to manually implement complex expiring policies.&#xA;  &lt;strong&gt;cached_models&lt;/strong&gt; simplifies your code:&lt;br/&gt;&lt;code class=&#34;ruby&#34;&gt;&#xA;class Author  true&#xA;end&#xA;&lt;p&gt;class Post  true&#xA;end&#xA;&lt;/code&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;That’s all!!&lt;/strong&gt;.&lt;/p&gt;&#xA;&lt;/p&gt;&#xA;&lt;p&gt;&#xA;  A more complex example..&lt;br/&gt;&lt;code class=&#34;ruby&#34;&gt;&#xA;class Project  true&#xA;&lt;p&gt;has_many :tickets, :cached =&amp;gt; true&#xA;has_many :recent_tickets, :limit =&amp;gt; 5,&#xA;:order =&amp;gt; &amp;lsquo;id DESC&amp;rsquo;, :cached =&amp;gt; true&#xA;end&lt;/p&gt;</description>
    </item>
    <item>
      <title>Ruby Time marshaling bug in pre-1.9</title>
      <link>/2008/08/29/ruby-time-marshaling-bug-in-pre-19/</link>
      <pubDate>Fri, 29 Aug 2008 00:00:00 +0000</pubDate>
      <guid>/2008/08/29/ruby-time-marshaling-bug-in-pre-19/</guid>
      <description>&lt;p&gt;&#xA;  Ruby&amp;#8217;s &lt;strong&gt;&lt;code&gt;Time&lt;/code&gt;&lt;/strong&gt; has a bug: when try to serialize an timezoned time, then unserialize it back, the result will use the server local time, instead of use the original time zone.&lt;br/&gt;&lt;code&gt;&#xA;&amp;gt;&amp;gt; utc = Time.now.utc&#xA;=&amp;gt; Fri Aug 29 09:07:37 UTC 2008&#xA;&amp;gt;&amp;gt; marshaled = Marshal.dump utc&#xA;=&amp;gt; &#34;\004\bu:\tTime\r\251\037\e\200\344\254T\036&#34;&#xA;&amp;gt;&amp;gt; Marshal.load marshaled&#xA;=&amp;gt; Fri Aug 29 11:07:37 +0200 2008&#xA;&lt;/code&gt;&#xA;&lt;/p&gt;&#xA;&lt;p&gt;&#xA;This bug &lt;a href=&#34;http://eigenclass.org/hiki.rb?Changes+in+Ruby+1.9#l158&#34; title=&#34;Timezone information preserved on Marshal.dump/load&#34;&gt;doesn&amp;#8217;t affects Ruby 1.9&lt;/a&gt;, but we still don&amp;#8217;t use that version for production purpose. If you use 1.8.x with Rails 2.1.0, your cached timestamps (including ActiveRecord objects), are probably wrong.&lt;br/&gt;&lt;code&gt;&#xA;&amp;gt;&amp;gt; comment = Comment.first&#xA;=&amp;gt; #&amp;lt;Comment id: 865423346, post_id: 1, text: &#34;Nice post.&#34;, created_at: &#34;2008-08-29 09:27:48&#34;, updated_at: &#34;2008-08-29 09:27:48&#34;&amp;gt;&#xA;&amp;gt;&amp;gt; Rails.cache.write(&#39;comment&#39;, comment)&#xA;=&amp;gt; true&#xA;&amp;gt;&amp;gt; Rails.cache.read(&#39;comment&#39;)&#xA;=&amp;gt; #&amp;lt;Comment id: 865423346, post_id: 1, text: &#34;Nice post.&#34;, created_at: &#34;2008-08-29 09:27:48&#34;, updated_at: &#34;2008-08-29 09:27:48&#34;&amp;gt;&#xA;&amp;gt;&amp;gt; comment.update_attributes :text =&amp;gt; &#34;Nice post!&#34;&#xA;=&amp;gt; true&#xA;&amp;gt;&amp;gt; Rails.cache.write(&#39;comment&#39;, comment)&#xA;=&amp;gt; true&#xA;&amp;gt;&amp;gt; Rails.cache.read(&#39;comment&#39;)&#xA;=&amp;gt; #&amp;lt;Comment id: 865423346, post_id: 1, text: &#34;Nice post!&#34;, created_at: &#34;2008-08-29 09:27:48&#34;, updated_at: &#34;2008-08-29 11:28:42&#34;&amp;gt;&#xA;&lt;/code&gt;&#xA;&lt;p&gt;Look at the last &lt;code&gt;updated_at&lt;/code&gt; attribute, it uses local time instead of UTC time zone.&lt;br/&gt;&#xA;The first time everything goes right, because &lt;code&gt;#updated_at&lt;/code&gt; wasn’t invoked and casted to a Time instance. It’s a string, and the marshaling is ok.&lt;br/&gt;&#xA;But, when I update the object, ActiveRecord changes the value of that timestamp, but before, it cast it to a Time, and everything goes wrong.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Click To Globalize: Ready for Rails 2.1!</title>
      <link>/2008/07/21/click-to-globalize-ready-for-rails-21/</link>
      <pubDate>Mon, 21 Jul 2008 00:00:00 +0000</pubDate>
      <guid>/2008/07/21/click-to-globalize-ready-for-rails-21/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;http://lucaguidi.com/pages/click-to-globalize&#34;&gt;Click to Globalize&lt;/a&gt; is ready for &lt;strong&gt;Rails 2.1&lt;/strong&gt;!&lt;/p&gt;&#xA;&lt;p&gt;&#xA;  I spent a lot of time to make this release the best of ever! I know that a lot of time has passed since the latest Rails major release, and I apologize for this.&#xA;  The official &lt;a href=&#34;http://www.globalize-rails.org/&#34; title=&#34;Globalize for Ruby on Rails&#34;&gt;Globalize&lt;/a&gt; it seems dead, but the great work of &lt;a href=&#34;http://nateclark.com/&#34;&gt;Nate Clark&lt;/a&gt; (&lt;em&gt;aka heythisisnate&lt;/em&gt;) has made it &lt;a href=&#34;http://github.com/heythisisnate/globalize/tree&#34; title=&#34;heythisisnate&#39;s Globalize at GitHub&#34;&gt;compatible with Rails 2.1&lt;/a&gt;. Thanks Nate!&#xA;  The &lt;a href=&#34;http://lucaguidi.com/2008/7/18/what-s-new-in-rails-edge-i18n&#34; title=&#34;What&#39;s New In Rails Edge: i18n&#34;&gt;Rails Edge now includes&lt;/a&gt; a basic support for i18n!&#xA;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Sashimi 0.2.0!</title>
      <link>/2008/07/14/sashimi-020/</link>
      <pubDate>Mon, 14 Jul 2008 00:00:00 +0000</pubDate>
      <guid>/2008/07/14/sashimi-020/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;http://lucaguidi.com/pages/sashimi&#34;&gt;Sashimi&lt;/a&gt; has just hit &lt;a href=&#34;http://github.com/jodosha/sashimi/commits/v0.2.0&#34;&gt;0.2.0&lt;/a&gt;!&lt;/p&gt;&#xA;&lt;p&gt;This release has no sugar for you! No new features, just test improvements and code robustness.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Sashimi: Getting Started Tutorial</title>
      <link>/2008/06/30/sashimi-getting-started-tutorial/</link>
      <pubDate>Mon, 30 Jun 2008 00:00:00 +0000</pubDate>
      <guid>/2008/06/30/sashimi-getting-started-tutorial/</guid>
      <description>&lt;p&gt;&#xA;  Here a &lt;strong&gt;getting started&lt;/strong&gt; tutorial for &lt;a href=&#34;http://lucaguidi.com/pages/sashimi&#34; title=&#34;Sashimi&#34;&gt;Sashimi&lt;/a&gt;.&#xA;  &lt;a href=&#34;http://lucaguidi.com/assets/2008/6/30/sashimi_getting_started.mov&#34; title=&#34;Sashimi getting started&#34;&gt;&lt;img src=&#34;http://lucaguidi.com/assets/2008/6/30/sashimi_getting_started.png&#34; width=&#34;600px&#34; height=&#34;450px&#34; alt=&#34;Sashimi getting started tutorial&#34;/&gt;&lt;/a&gt;&#xA;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Released Sashimi 0.1.6</title>
      <link>/2008/06/23/released-sashimi-016/</link>
      <pubDate>Mon, 23 Jun 2008 00:00:00 +0000</pubDate>
      <guid>/2008/06/23/released-sashimi-016/</guid>
      <description>&lt;p&gt;I just released a &lt;strong&gt;new version&lt;/strong&gt; of Sashimi, with tiny fixes and a new home!&lt;/p&gt;~&#xA;&lt;p&gt;In fact the project is also hosted on &lt;strong&gt;RubyForge&lt;/strong&gt;, now you can install the gem with:&lt;br/&gt;&lt;code class=&#34;bash&#34;&gt;&#xA;$ (sudo) gem install sashimi&#xA;&lt;/code&gt;&lt;br/&gt;&#xA;or with:&lt;br/&gt;&lt;code class=&#34;bash&#34;&gt;&#xA;$ (sudo) gem install jodosha-sashimi --source=http://gems.github.com&#xA;&lt;/code&gt;&#xA;&lt;/p&gt;&#xA;&lt;p&gt;If you wish, you can visit the project pages on &lt;a href=&#34;http://github.com/jodosha/sashimi&#34; title=&#34;GitHub Sashimi page&#34;&gt;GitHub&lt;/a&gt; and on &lt;a href=&#34;http://rubyforge.org/projects/sashimi/&#34; title=&#34;RubyForge Sashimi page&#34;&gt;RubyForge&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE&lt;/strong&gt; The release 0.1.6 is &lt;strong&gt;broken&lt;/strong&gt;, you are strongly encouraged to update your gem with the newest &lt;strong&gt;0.1.7&lt;/strong&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Speaker at RailsConf Europe 2008</title>
      <link>/2008/06/18/speaker-at-railsconf-europe-2008/</link>
      <pubDate>Wed, 18 Jun 2008 00:00:00 +0000</pubDate>
      <guid>/2008/06/18/speaker-at-railsconf-europe-2008/</guid>
      <description>&lt;p&gt;I&amp;#8217;m proud to announce my presence as speaker at the &lt;a href=&#34;http://www.railsconfeurope.com/&#34;&gt;RailsConf Europe 2008&lt;/a&gt; with a speech on &lt;a href=&#34;http://lucaguidi.com/pages/click-to-globalize&#34;&gt;Click to Globalize&lt;/a&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Rails: Single File App</title>
      <link>/2008/06/03/rails-single-file-app/</link>
      <pubDate>Tue, 03 Jun 2008 00:00:00 +0000</pubDate>
      <guid>/2008/06/03/rails-single-file-app/</guid>
      <description>&lt;p&gt;I took inspiration from the &lt;a href=&#34;http://m.onkey.org/2008/2/16/single-file-rails-application&#34; title=&#34;Single File Rails Application&#34;&gt;Pratik Naik post&lt;/a&gt;, and realized a more simplistic version of its &lt;a href=&#34;http://rubyonrails.org&#34;&gt;Rails&lt;/a&gt; single file app. My implementation has only &lt;strong&gt;Rails&lt;/strong&gt; as unique dependency.&lt;br/&gt;&lt;code class=&#34;ruby&#34;&gt;&#xA;require &#39;rubygems&#39;&#xA;require &#39;action_controller&#39;&#xA;require &#39;webrick&#39;&#xA;require &#39;webrick_server&#39;&#xA;&lt;p&gt;class HelloWorldController  &amp;lsquo;Hello World!&amp;rsquo; end&#xA;end&lt;/p&gt;&#xA;&lt;p&gt;ActionController::Routing::Routes.draw do |map|&#xA;map.root :controller =&amp;gt; &amp;ldquo;hello_world&amp;rdquo;&#xA;end&lt;/p&gt;&#xA;&lt;p&gt;DispatchServlet.dispatch :port =&amp;gt; 3000,&#xA;:server_root  =&amp;gt; File.dirname(&lt;strong&gt;FILE&lt;/strong&gt;)&#xA;&lt;/code&gt;&lt;/p&gt;&lt;/p&gt;&#xA;&lt;p&gt;&#xA;&lt;strong&gt;Update 2008-06-04&lt;/strong&gt;: I just wrote another version which also uses &lt;strong&gt;ActiveRecord&lt;/strong&gt; and a &lt;strong&gt;template&lt;/strong&gt;.&lt;br/&gt;&lt;code class=&#34;ruby&#34;&gt;&#xA;require &#39;rubygems&#39;&#xA;require &#39;activerecord&#39;&#xA;require &#39;action_controller&#39;&#xA;require &#39;webrick&#39;&#xA;require &#39;webrick_server&#39;&#xA;&lt;p&gt;ActiveRecord::Base.establish_connection(&#xA;:adapter  =&amp;gt; &amp;lsquo;sqlite3&amp;rsquo;,&#xA;:database =&amp;gt; &amp;rsquo;tiny_rails.sqlite3&amp;rsquo;,&#xA;:timeout  =&amp;gt; 5000)&lt;/p&gt;</description>
    </item>
    <item>
      <title>Ruby: Class Methods Proxy</title>
      <link>/2008/05/29/ruby-class-methods-proxy/</link>
      <pubDate>Thu, 29 May 2008 00:00:00 +0000</pubDate>
      <guid>/2008/05/29/ruby-class-methods-proxy/</guid>
      <description>&lt;p&gt;&#xA;  Did you ever used class methods inside your instance methods? If yes, you probably noticed how &lt;strong&gt;frustrating&lt;/strong&gt; can be to use the &lt;code&gt;self.class.my_class_method&lt;/code&gt; syntax. A solution could be to create a private method which encapsulates the class one.&lt;br/&gt;&lt;code class=&#34;ruby&#34;&gt;&#xA;class Repository&#xA;  def self.path&#xA;    @@path&#xA;  end&#xA;&lt;p&gt;def print_path&#xA;puts path&#xA;end&lt;/p&gt;&#xA;&lt;p&gt;private&#xA;def path&#xA;self.class.path&#xA;end&#xA;end&#xA;&lt;/code&gt;&lt;br/&gt;&#xA;In the above example, &lt;code&gt;#print_path&lt;/code&gt; can print the &lt;code&gt;@@code&lt;/code&gt; value, without worrying about it’s a class value, because we have wrapped it.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Faster JavaScript Trim</title>
      <link>/2008/05/28/faster-javascript-trim/</link>
      <pubDate>Wed, 28 May 2008 00:00:00 +0000</pubDate>
      <guid>/2008/05/28/faster-javascript-trim/</guid>
      <description>&lt;p&gt;I&amp;#8217;ve recently discovered the very interesting &lt;a href=&#34;http://blog.stevenlevithan.com/archives/faster-trim-javascript&#34;&gt;Steven Levithan post&lt;/a&gt; about the &lt;strong&gt;JavaScript&amp;#8217;s trim&lt;/strong&gt; function of the &lt;strong&gt;String&lt;/strong&gt; class.&lt;/p&gt;&#xA;&lt;p&gt;&#xA;  So, here my version:&lt;br/&gt;&lt;code class=&#34;javascript&#34;&gt;&#xA;function trim13 (str) {&#xA;  var ws = /\s/, _start = 0, end = str.length;&#xA;  while(ws.test(str.charAt(_start++)));&#xA;  while(ws.test(str.charAt(--end)));&#xA;  return str.slice(_start - 1, end + 1);&#xA;}&#xA;&lt;/code&gt;&#xA;&lt;/p&gt;&#xA;&lt;h3&gt;More numbers, please!&lt;/h3&gt;&#xA;&lt;p&gt;&#xA;  I tested my function against the &lt;a href=&#34;http://stevenlevithan.com/demo/trim.cfm&#34;&gt;benchmarking page&lt;/a&gt; of the original post.&#xA;  &lt;strong&gt;Note&lt;/strong&gt;: times are expressed in &lt;acronym title=&#34;milliseconds&#34;&gt;MS&lt;/acronym&gt; and are the average of ten executions per browser.&#xA;  &lt;strong&gt;Update [2008-05-29]:&lt;/strong&gt; I re-runned all the tests and updated results, because &lt;a href=&#34;http://blog.stevenlevithan.com/&#34;&gt;Steven&lt;/a&gt; noticed that test suite was wrong (few whitespaces).&#xA;  &lt;/p&gt;</description>
    </item>
    <item>
      <title>Sashimi: Just Received A Tasteful Update</title>
      <link>/2008/05/20/sashimi-just-received-a-tasteful-update/</link>
      <pubDate>Tue, 20 May 2008 00:00:00 +0000</pubDate>
      <guid>/2008/05/20/sashimi-just-received-a-tasteful-update/</guid>
      <description>&lt;p&gt;On yesterday &lt;a href=&#34;http://jodosha.tumblr.com/2008/05/19/sashimi-a-rails-plugins-manager-gem.html&#34; title=&#34;Sashimi: A Rails Plugins Manager Gem&#34;&gt;I announced&lt;/a&gt; &lt;a href=&#34;http://lucaguidi.com/pages/sashimi&#34;&gt;Sashimi&lt;/a&gt; and now it&amp;#8217;s already time of tasteful updates.&lt;/p&gt;&#xA;&lt;h3&gt;Changes&lt;/h3&gt;&#xA;&lt;p&gt;First, thanks to all the people that appreciated my work. Second, new commands and options are avaliable for Sashimi.&lt;/p&gt;&#xA;&lt;p&gt;Update all plugins in your repository:&lt;br/&gt;&lt;code class=&#34;bash&#34;&gt;&#xA;$ sashimi update --all&#xA;&lt;/code&gt;&#xA;&lt;/p&gt;&#xA;&lt;p&gt;Install a plugin to your Rails app:&lt;br/&gt;&lt;code class=&#34;bash&#34;&gt;&#xA;$ sashimi install --rails click-to-globalize&#xA;&lt;/code&gt;&lt;br/&gt;&lt;strong&gt;NOTE&lt;/strong&gt; this is an alias for the &lt;code&gt;add&lt;/code&gt; command.&#xA;&lt;/p&gt;&#xA;&lt;p&gt;Update a plugin of a Rails app:&lt;br/&gt;&lt;code class=&#34;bash&#34;&gt;&#xA;$ sashimi update --rails click-to-globalize&#xA;&lt;/code&gt;&lt;br/&gt;&lt;strong&gt;NOTE&lt;/strong&gt; If your application is versioned with Svn or Git, Sashimi will automatically schedules for add/remove the added/removed files.&#xA;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Sashimi: A Rails Plugins Manager Gem</title>
      <link>/2008/05/19/sashimi-a-rails-plugins-manager-gem/</link>
      <pubDate>Mon, 19 May 2008 00:00:00 +0000</pubDate>
      <guid>/2008/05/19/sashimi-a-rails-plugins-manager-gem/</guid>
      <description>&lt;p&gt;I have a really, really bad memory: each time I need to install a &lt;a href=&#34;http://rubyonrails.org&#34; title=&#34;Ruby on Rails home page&#34;&gt;Rails&lt;/a&gt; plugin, I Google to find the repository, then try to download the code. Often, I remember the url, but the server is down. Damn!&lt;/p&gt;&#xA;&lt;p&gt;All this annoying issues kill the Rails rapidity on application prototyping. But, what if all the plugins which I need are available &lt;strong&gt;offline&lt;/strong&gt; on my notebook? I can forget about all that urls, and I should stop to worry about the server status.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Acts As Resource: Rails 2.1 ready and moved to GitHub</title>
      <link>/2008/05/14/acts-as-resource-rails-21-ready-and-moved-to-github/</link>
      <pubDate>Wed, 14 May 2008 00:00:00 +0000</pubDate>
      <guid>/2008/05/14/acts-as-resource-rails-21-ready-and-moved-to-github/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;http://lucaguidi.com/pages/acts-as-resource&#34;&gt;Acts As Resource&lt;/a&gt; is &lt;strong&gt;ready&lt;/strong&gt; for the imminent &lt;strong&gt;Rails 2.1&lt;/strong&gt;!&lt;/p&gt;&#xA;&lt;p&gt;I also moved it to &lt;a href=&#34;http://github.com&#34;&gt;GitHub&lt;/a&gt;, the new repo is &lt;a href=&#34;http://github.com/jodosha/acts-as-resource/tree/master&#34;&gt;&lt;a href=&#34;http://github.com/jodosha/acts-as-resource/tree/master&#34;&gt;http://github.com/jodosha/acts-as-resource/tree/master&lt;/a&gt;&lt;/a&gt;, the SVN one is &lt;strong&gt;deprecated&lt;/strong&gt;.&lt;/p&gt;&#xA;&lt;p&gt;If you enjoyed this post, feel free to recommend me on &lt;a href=&#34;http://www.workingwithrails.com/recommendation/new/person/8829-luca-guidi&#34;&gt;Working With Rails&lt;/a&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Click to Globalize: rewritten and moved to GitHub</title>
      <link>/2008/05/12/click-to-globalize-rewritten-and-moved-to-github/</link>
      <pubDate>Mon, 12 May 2008 00:00:00 +0000</pubDate>
      <guid>/2008/05/12/click-to-globalize-rewritten-and-moved-to-github/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;http://lucaguidi.com/pages/click-to-globalize&#34;&gt;Click to Globalize&lt;/a&gt; has been rewritten, in order to use all instance methods of the &lt;strong&gt;JavaScript&lt;/strong&gt; class, instead of class methods.&lt;/p&gt;&#xA;&lt;p&gt;&#xA;I also fixed some tiny issues: &#xA;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;The &lt;code&gt;form_authentication_token&lt;/code&gt; method is called only if the application is protected against the CSRF attacks (&lt;code&gt;protect_against_forgery?&lt;/code&gt; returns &lt;code&gt;true&lt;/code&gt;)&lt;/li&gt;&#xA;&lt;li&gt;It uses as parameter key what &lt;code&gt;request_forgery_protection_token&lt;/code&gt; returns, instead of the hard-coded &lt;code&gt;authenticity_token&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;The &lt;strong&gt;JavaScript&lt;/strong&gt; class uses &lt;strong&gt;Prototype&lt;/strong&gt;&amp;#8217;s &lt;strong&gt;dom:loaded&lt;/strong&gt; custom event.&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;p&gt;I also migrated the plugin &lt;a href=&#34;http://github.com&#34;&gt;GitHub&lt;/a&gt;. The new repo is &lt;a href=&#34;http://github.com/jodosha/click-to-globalize/tree/master&#34;&gt;&lt;a href=&#34;http://github.com/jodosha/click-to-globalize/tree/master&#34;&gt;http://github.com/jodosha/click-to-globalize/tree/master&lt;/a&gt;&lt;/a&gt;, so the oldest one is &lt;strong&gt;deprecated&lt;/strong&gt;.&#xA;Have a nice globalization!&lt;/p&gt;</description>
    </item>
    <item>
      <title>Ruby on Rails: Test Model Domain Changes</title>
      <link>/2008/04/28/ruby-on-rails-test-model-domain-changes/</link>
      <pubDate>Mon, 28 Apr 2008 00:00:00 +0000</pubDate>
      <guid>/2008/04/28/ruby-on-rails-test-model-domain-changes/</guid>
      <description>&lt;p&gt;You know how tests are fundamental for a well-developed project, for this reason we should create step-by-step a net of test cases. Of course we also should be able to change rapidly our tests as the same we do with our code. &lt;a href=&#34;http://rubyonrails.org&#34;&gt;Ruby on Rails&lt;/a&gt; is a great framework, because its shortcuts, the wide usage of &lt;acronym title=&#34;Domain Specific Language&#34;&gt;DSL&lt;/acronym&gt; etc.. All this stuff can save a lot of time, but what about tests? Are we really able to &lt;em&gt;follow&lt;/em&gt; our code?&lt;/p&gt;</description>
    </item>
    <item>
      <title>Bit.Fall</title>
      <link>/2008/04/04/bitfall/</link>
      <pubDate>Fri, 04 Apr 2008 00:00:00 +0000</pubDate>
      <guid>/2008/04/04/bitfall/</guid>
      <description>&lt;p&gt;&lt;object width=&#34;425&#34; height=&#34;355&#34;&gt;&lt;param name=&#34;movie&#34; value=&#34;http://www.youtube.com/v/ygQHj1W0PPM&amp;amp;hl=en&#34;&gt;&lt;param name=&#34;wmode&#34; value=&#34;transparent&#34;&gt;&lt;embed src=&#34;http://www.youtube.com/v/ygQHj1W0PPM&amp;amp;hl=en&#34; type=&#34;application/x-shockwave-flash&#34; wmode=&#34;transparent&#34; width=&#34;425&#34; height=&#34;355&#34;&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Bit.Fall&lt;/strong&gt; by &lt;strong&gt;&lt;a href=&#34;http://sphericalrobots.org/&#34; title=&#34;Julius Popp&#34;&gt;Julius Popp&lt;/a&gt;&lt;/strong&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Make your elements draggable and resizeable with Resizeable.js</title>
      <link>/2008/03/19/make-your-elements-draggable-and-resizeable-with-resizeablejs/</link>
      <pubDate>Wed, 19 Mar 2008 00:00:00 +0000</pubDate>
      <guid>/2008/03/19/make-your-elements-draggable-and-resizeable-with-resizeablejs/</guid>
      <description>&lt;p&gt;Hello, I&amp;#8217;m still alive and I want to share a useful &lt;strong&gt;JavaScript&lt;/strong&gt; class: &lt;strong&gt;Resizeable.js&lt;/strong&gt;. It allows to make &lt;strong&gt;draggable and resizeable&lt;/strong&gt; your DOM elements!&lt;/p&gt;&#xA;&lt;h3&gt;How it works?&lt;/h3&gt;&#xA;&lt;p&gt;&#xA;&lt;code class=&#34;javascript&#34;&gt;&#xA;new Resizeable(&#39;element&#39;);&#xA;&lt;/code&gt;&#xA;&lt;/p&gt;&#xA;&lt;p&gt;Your element has now &lt;strong&gt;two sensible areas&lt;/strong&gt;: the border area and the central area. If you click on the central area and move the mouse around, keeping the left button pressed, your element will be &lt;strong&gt;dragged&lt;/strong&gt;. If you are on the border area, and perform the same gesture, your element will be &lt;strong&gt;resized&lt;/strong&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Ruby: XML Parsing With SAX</title>
      <link>/2008/01/30/ruby-xml-parsing-with-sax/</link>
      <pubDate>Wed, 30 Jan 2008 00:00:00 +0000</pubDate>
      <guid>/2008/01/30/ruby-xml-parsing-with-sax/</guid>
      <description>&lt;p&gt;&lt;strong&gt;&lt;acronym title=&#34;Simple API for XML&#34;&gt;SAX&lt;/acronym&gt;&lt;/strong&gt; is an &lt;a href=&#34;http://en.wikipedia.org/wiki/Event-driven&#34;&gt;&lt;strong&gt;event-driven&lt;/strong&gt;&lt;/a&gt; parser for &lt;acronym title=&#34;eXtensible Markup Language&#34;&gt;XML&lt;/acronym&gt;.&lt;/p&gt;&#xA;It &lt;strong&gt;sequentially&lt;/strong&gt; reads the xml and generates special events. So, if you want to use SAX, you should implement the code to handle them. It&amp;#8217;s quite different from the &lt;strong&gt;&lt;acronym title=&#34;Document Object Model&#34;&gt;DOM&lt;/acronym&gt;&lt;/strong&gt; model, where the whole xml is parsed and loaded in an &lt;a href=&#34;http://en.wikipedia.org/wiki/Tree_(data_structure)&#34; title=&#34;Tree (data structure)&#34;&gt;tree&lt;/a&gt;.&#xA;As you can see, the first approach is more difficult than the DOM one. Why we should use it? Depends.&#xA;If you want to extract certain informations from a big file, probably you should choose a SAX implementation, in this way you can avoid the initial DOM loading overhead.&#xA;&lt;h3&gt;The Ruby XML Library&lt;/h3&gt;&#xA;&lt;p&gt;The Ruby core library has a built-in XML parser (both DOM and SAX) called &lt;strong&gt;REXML&lt;/strong&gt;, but it&amp;#8217;s terribly slow, it&amp;#8217;s highly advisable to use &lt;a href=&#34;http://libxml.rubyforge.org/&#34;&gt;&lt;strong&gt;libxml&lt;/strong&gt;&lt;/a&gt;. It&amp;#8217;s a binding to the popular library from &lt;strong&gt;Gnome&lt;/strong&gt; and it was released as gem.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Click To Globalize: High Resolution Video Tutorial</title>
      <link>/2008/01/26/click-to-globalize-high-resolution-video-tutorial/</link>
      <pubDate>Sat, 26 Jan 2008 00:00:00 +0000</pubDate>
      <guid>/2008/01/26/click-to-globalize-high-resolution-video-tutorial/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;http://www.lucaguidi.com/videos/click_to_globalize_getting_started.mov&#34; title=&#34;Click To Globalize: Getting Started&#34;&gt;&lt;img src=&#34;http://lucaguidi.com/assets/2008/1/26/click_to_globalize_getting_started.png&#34; width=&#34;400&#34; height=&#34;300&#34; alt=&#34;Click To Globalize: Getting Started [High Resolution]&#34;/&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;The video tutorial for &lt;a href=&#34;http://www.lucaguidi.com/pages/click-to-globalize&#34; title=&#34;Click to Globalize&#34;&gt;Click to Globalize&lt;/a&gt; is now available in high resolution: &lt;a href=&#34;http://www.lucaguidi.com/videos/click_to_globalize_getting_started.mov&#34; title=&#34;Click To Globalize: Getting Started&#34;&gt;Click To Globalize: Getting Started&lt;/a&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>MondoPOP</title>
      <link>/2008/01/05/mondopop/</link>
      <pubDate>Sat, 05 Jan 2008 00:00:00 +0000</pubDate>
      <guid>/2008/01/05/mondopop/</guid>
      <description>&lt;p&gt;&lt;img src=&#34;http://www.lucaguidi.com/assets/2008/1/5/mondopop.png&#34; alt=&#34;mondopop logo&#34; title=&#34;MondoPOP&#34; width=&#34;110&#34; height=&#34;125&#34;/&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;http://www.mondopop.it&#34; title=&#34;MondoPOP&#34;&gt;MondoPOP&lt;/a&gt; is a permanent expo of &lt;strong&gt;Pop toys&lt;/strong&gt;, located in &lt;strong&gt;Rome&lt;/strong&gt;.&lt;/p&gt;&#xA;&lt;p&gt;I&amp;#8217;ve been there a month ago, and I was fascinated about this new wave of artists, writers and crews. I think it&amp;#8217;s a great think, to support this kind of projects: people who transform their passion in a work.&lt;/p&gt;&#xA;&lt;p&gt;Good luck, guys!!&lt;/p&gt;</description>
    </item>
    <item>
      <title>Ruby: How To Avoid A respond_to? Call</title>
      <link>/2008/01/02/ruby-how-to-avoid-a-respond_to-call/</link>
      <pubDate>Wed, 02 Jan 2008 00:00:00 +0000</pubDate>
      <guid>/2008/01/02/ruby-how-to-avoid-a-respond_to-call/</guid>
      <description>&lt;p&gt;I&amp;#8217;m writing this post as contribution to the &lt;a href=&#34;http://www.metodiagili.it/campagna-anti-if.html&#34; title=&#34;Campagna Anti-IF&#34; lang=&#34;it&#34;&gt;Campagna Anti-IF&lt;/a&gt; (Anti-IF Campaign).&lt;/p&gt;&#xA;&lt;h3&gt;Problem&lt;/h3&gt;&#xA;&lt;p&gt;I&amp;#8217;m developing an internal Rails plugin for widgets, it provides a class called &lt;code&gt;Widget&lt;/code&gt; (really unconventional :-P), and each widget should inherit from it.&#xA;The actual implementation provides a callback called &lt;code&gt;before_render&lt;/code&gt;, that allows to add some logic to a widget, if implemented it&amp;#8217;s called before the widget rendering.&lt;/p&gt;&#xA;&lt;p&gt;Ruby doesn&amp;#8217;t have abstract methods, so I have to check if the subclass has the implementation of mentioned method:&lt;br/&gt;&lt;code class=&#34;ruby&#34;&gt;&#xA;    # Rendering code..&#xA;    before_render if respond_to? :before_render&#xA;    # ...&#xA;&lt;/code&gt;&#xA;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Rails: How To Create Custom Validations</title>
      <link>/2007/12/21/rails-how-to-create-custom-validations/</link>
      <pubDate>Fri, 21 Dec 2007 00:00:00 +0000</pubDate>
      <guid>/2007/12/21/rails-how-to-create-custom-validations/</guid>
      <description>&lt;p&gt;Often our model objects leaning toward to be confused or noisy, due to validations DSLs. Imagine a class &lt;code&gt;Answer&lt;/code&gt;, with an attribute, that should be exactly a string representation of a boolean. Ok, I know it&amp;#8217;s an odd example, but: it&amp;#8217;s trivial enough to make this example clear, and.. It happened to me to deal with this situation. :-P&lt;/p&gt;&#xA;&lt;p&gt;&#xA;&lt;code class=&#34;ruby&#34;&gt;&#xA;    class Answer  %w( true false ),&#xA;                             :message =&amp;gt; &#34;Should be exactly true or false.&#34;&#xA;    end&#xA;&lt;/code&gt;&#xA;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Rome JavaDay 07: Slides</title>
      <link>/2007/12/19/rome-javaday-07-slides/</link>
      <pubDate>Wed, 19 Dec 2007 00:00:00 +0000</pubDate>
      <guid>/2007/12/19/rome-javaday-07-slides/</guid>
      <description>&lt;div style=&#34;width:425px&#34; id=&#34;__ss_188919&#34;&gt;&lt;strong style=&#34;display:block;margin:12px 0 4px&#34;&gt;&lt;a href=&#34;http://www.slideshare.net/jodosha/jruby-e-dsl&#34; title=&#34;JRuby e DSL&#34;&gt;JRuby e DSL&lt;/a&gt;&lt;/strong&gt;&lt;object id=&#34;__sse188919&#34; width=&#34;425&#34; height=&#34;355&#34;&gt;&lt;param name=&#34;movie&#34; value=&#34;http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=jruby-e-dsl-1196605069100526-3&amp;amp;stripped_title=jruby-e-dsl&#34;&gt;&lt;param name=&#34;allowFullScreen&#34; value=&#34;true&#34;&gt;&lt;param name=&#34;allowScriptAccess&#34; value=&#34;always&#34;&gt;&lt;embed name=&#34;__sse188919&#34; src=&#34;http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=jruby-e-dsl-1196605069100526-3&amp;amp;stripped_title=jruby-e-dsl&#34; type=&#34;application/x-shockwave-flash&#34; allowscriptaccess=&#34;always&#34; allowfullscreen=&#34;true&#34; width=&#34;425&#34; height=&#34;355&#34;&gt;&lt;/embed&gt;&lt;/object&gt;&lt;div style=&#34;padding:5px 0 12px&#34;&gt;View more &lt;a href=&#34;http://www.slideshare.net/&#34;&gt;presentations&lt;/a&gt; from &lt;a href=&#34;http://www.slideshare.net/jodosha&#34;&gt;jodosha&lt;/a&gt;.&lt;/div&gt;&lt;/div&gt;&#xA;&lt;p&gt;&#xA;The &lt;a href=&#34;http://roma.javaday.it/roma/&#34;&gt;Rome JavaDay 07&lt;/a&gt; staff has created a &lt;a href=&#34;http://www.slideshare.net/group/javaday-italy/slideshows&#34; title=&#34;Javaday Italy&#34;&gt;Slideshare group&lt;/a&gt;.&#xA;I have already uploaded my presentation about: &lt;a href=&#34;http://www.slideshare.net/jodosha/jruby-e-dsl/&#34; title=&#34;JRuby and DSLs&#34;&gt;JRuby and DSLs&lt;/a&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Subsonica in Rome</title>
      <link>/2007/12/19/subsonica-in-rome/</link>
      <pubDate>Wed, 19 Dec 2007 00:00:00 +0000</pubDate>
      <guid>/2007/12/19/subsonica-in-rome/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;http://www.flickr.com/photos/jodosha/2120759205/&#34; title=&#34;Me &amp;amp; Boosta by jodosha, on Flickr&#34;&gt;&lt;img src=&#34;http://farm3.static.flickr.com/2407/2120759205_2dfe17bb7f_m.jpg&#34; width=&#34;240&#34; height=&#34;160&#34; alt=&#34;Me &amp;amp; Boosta&#34;/&gt;&lt;/a&gt;&lt;br/&gt;&#xA;I met &lt;a href=&#34;http://www.subsonica.it&#34; title=&#34;Subsonica&#34;&gt;Subsonica&lt;/a&gt; during a dj-set in Rome.&lt;/p&gt;&#xA;&lt;p&gt;You can find my shots &lt;a href=&#34;http://www.flickr.com/photos/jodosha/tags/subsonica/&#34; title=&#34;Subsonica on my Flickr page&#34;&gt;here&lt;/a&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Click To Globalize: Rails 2.0 Ready</title>
      <link>/2007/12/14/click-to-globalize-rails-20-ready/</link>
      <pubDate>Fri, 14 Dec 2007 00:00:00 +0000</pubDate>
      <guid>/2007/12/14/click-to-globalize-rails-20-ready/</guid>
      <description>&lt;p&gt;I have finished to work on &lt;a href=&#34;http://www.lucaguidi.com/pages/click-to-globalize&#34; title=&#34;Click To Globalize&#34;&gt;Click To Globalize&lt;/a&gt;, to made it Rails 2.0 compatible.&lt;/p&gt;&#xA;&lt;h3&gt;What&amp;#8217;s Changed?&lt;/h3&gt;&#xA;&lt;p&gt;All and nothing: from the user point of view, the plugin has the same behaviors of the previous version. My recent activity was a refactoring, now it:&#xA;  &lt;/p&gt;&lt;ul&gt;&lt;li&gt;Works with &lt;a href=&#34;http://activereload.net/2007/3/6/your-requests-are-safe-with-us&#34; title=&#34;Your requests are safe with us&#34;&gt;CSRF Killer&lt;/a&gt;&lt;/li&gt;&#xA;    &lt;li&gt;Works with &lt;a href=&#34;http://prototype.js&#34; title=&#34;Prototype&#34;&gt;Prototype 1.6.0.1&lt;/a&gt; and &lt;a href=&#34;http://script.aculo.us&#34; title=&#34;Scriptaculous&#34;&gt;Scriptaculous 1.8.0.1&lt;/a&gt;&lt;/li&gt;&#xA;    &lt;li&gt;Works with rewritten version of Scriptaculous &lt;code&gt;Ajax.InPlaceEditor&lt;/code&gt;&lt;/li&gt;&#xA;    &lt;li&gt;Works with new Prototype events handling&lt;/li&gt;&#xA;    &lt;li&gt;Uses new Prototype&amp;#8217;s &lt;code&gt;Element#addMethods&lt;/code&gt; and &lt;code&gt;Function#wrap&lt;/code&gt; to add methods and &lt;acronym title=&#34;Aspect Orient Programming&#34;&gt;AOP&lt;/acronym&gt;&lt;/li&gt;&#xA;    &lt;li&gt;Uses Protoype &lt;code&gt;Hash#get&lt;/code&gt;, instead of square brackets&lt;/li&gt;&#xA;    &lt;li&gt;Uses &lt;code&gt;.html.erb&lt;/code&gt; as helper, instead of &lt;code&gt;.rhtml&lt;/code&gt;&lt;/li&gt;&#xA;    &lt;li&gt;Has a more clean installation/disinstallation process&lt;/li&gt;&#xA;    &lt;li&gt;Has DRYed up tests&lt;/li&gt;&#xA;    &lt;li&gt;Hasn&amp;#8217;t prototype.js into the packaging&lt;/li&gt;&#xA;  &lt;/ul&gt;&lt;h3&gt;How To Use It?&lt;/h3&gt;&#xA;&lt;p&gt;&#xA;  &lt;strong&gt;Rails 2.0&lt;/strong&gt;&lt;br/&gt;&lt;code lang=&#34;shell&#34;&gt;&#xA;    $ ./script/plugin install &lt;a href=&#34;http://dev.23labs.net/svn/rails/plugins/click_to_globalize/trunk&#34;&gt;http://dev.23labs.net/svn/rails/plugins/click_to_globalize/trunk&lt;/a&gt;&#xA;  &lt;/code&gt;&lt;br/&gt;&lt;strong&gt;Rails 1.2.x&lt;/strong&gt;&lt;br/&gt;&lt;code lang=&#34;shell&#34;&gt;&#xA;    $ ./script/plugin install &lt;a href=&#34;http://dev.23labs.net/svn/rails/plugins/click_to_globalize/branches/for-1.2.x&#34;&gt;http://dev.23labs.net/svn/rails/plugins/click_to_globalize/branches/for-1.2.x&lt;/a&gt;&#xA;  &lt;/code&gt;&#xA;&lt;p&gt;For a detailed guide, howtos, snippets, video-tutorials and other infos, please visit the &lt;a href=&#34;http://www.lucaguidi.com/pages/click-to-globalize&#34; title=&#34;Click To Globalize&#34;&gt;Click To Globalize&lt;/a&gt; page.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Acts As Resource: Rails 2.0 Ready</title>
      <link>/2007/12/09/acts-as-resource-rails-20-ready/</link>
      <pubDate>Sun, 09 Dec 2007 00:00:00 +0000</pubDate>
      <guid>/2007/12/09/acts-as-resource-rails-20-ready/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;http://www.lucaguidi.com/pages/acts-as-resource&#34; title=&#34;Acts As Resource&#34;&gt;Acts As Resource&lt;/a&gt; is ready for Rails 2.0!!&lt;/p&gt;&#xA;&lt;p&gt;This plugin combines both &lt;strong&gt;ActiveRecord&lt;/strong&gt; and &lt;strong&gt;ActiveResource&lt;/strong&gt; features in &lt;strong&gt;one&lt;/strong&gt; class. It easily allows to deal with a remote &lt;acronym title=&#34;Representational State Transfer&#34;&gt;REST&lt;/acronym&gt; service or with a local database.&lt;/p&gt;&#xA;&lt;p&gt;If you want read more visit the &lt;a href=&#34;http://www.lucaguidi.com/pages/acts-as-resource&#34; title=&#34;Acts As Resource&#34;&gt;plugin page&lt;/a&gt; or install with:&lt;br/&gt;&lt;code class=&#34;shell&#34;&gt;&#xA;    $ ./script/plugin install &lt;a href=&#34;http://dev.23labs.net/svn/rails/plugins/acts_as_resource&#34;&gt;http://dev.23labs.net/svn/rails/plugins/acts_as_resource&lt;/a&gt;&#xA;&lt;/code&gt;&#xA;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Click To Globalize: Working On Rails 2.0 Compatibility</title>
      <link>/2007/12/09/click-to-globalize-working-on-rails-20-compatibility/</link>
      <pubDate>Sun, 09 Dec 2007 00:00:00 +0000</pubDate>
      <guid>/2007/12/09/click-to-globalize-working-on-rails-20-compatibility/</guid>
      <description>&lt;p&gt;As you already know, Rails 2.0 it&amp;#8217;s shipped with updated version of &lt;a href=&#34;http://prototypejs.org&#34; title=&#34;Prototype&#34;&gt;Prototype&lt;/a&gt; and &lt;a href=&#34;http://script.aculo.us&#34; title=&#34;Scriptaculous&#34;&gt;Scriptaculous&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Prototype team has committed some breaking changes (e.g. Hash class), and Scriptaculous now has a brand new, rewritten &lt;code&gt;InPlaceEditon&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Those elements are fundamental for &lt;a href=&#34;http://www.lucaguidi.com/pages/click-to-globalize&#34; title=&#34;Click To Globalize&#34;&gt;Click To Globalize&lt;/a&gt; and I&amp;#8217;m working on new version for Rails 2.0.&lt;/p&gt;&#xA;&lt;p&gt;Be patient, I&amp;#8217;ll soon release it.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Ruby on Rails 2.0: Released</title>
      <link>/2007/12/08/ruby-on-rails-20-released/</link>
      <pubDate>Sat, 08 Dec 2007 00:00:00 +0000</pubDate>
      <guid>/2007/12/08/ruby-on-rails-20-released/</guid>
      <description>&lt;p&gt;As I &lt;a href=&#34;http://jodosha.tumblr.com/2007/12/06/ruby-on-rails-20-will-be-soon-released.html&#34; title=&#34;Ruby on Rails 2.0 Will Be Soon Released&#34;&gt;previously announced&lt;/a&gt; Ruby on Rails 2.0&amp;#160;&lt;a href=&#34;http://weblog.rubyonrails.org/2007/12/7/rails-2-0-it-s-done&#34; title=&#34;Rails 2.0: It&#39;s done!&#34;&gt;was released.&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;What&amp;#8217;s new?&lt;/p&gt;&#xA;&lt;h3&gt;Active Record&lt;/h3&gt;&#xA;&lt;ul&gt;&lt;li&gt;Performances&lt;/li&gt;&#xA;    &lt;li&gt;Sexy Migrations&lt;/li&gt;&#xA;    &lt;li&gt;Foxy Fixtures&lt;/li&gt;&#xA;    &lt;li&gt;XML Deserialization&lt;/li&gt;&#xA;    &lt;li&gt;JSON Serialization&lt;/li&gt;&#xA;    &lt;li&gt;acts_as Plugins Removal From Core&lt;/li&gt;&#xA;    &lt;li&gt;Database Adapters Gems&lt;/li&gt;&#xA;    &lt;li&gt;with_scope Protection&lt;/li&gt;&#xA;  &lt;/ul&gt;&lt;h3&gt;Action Pack&lt;/h3&gt;&#xA;&lt;p&gt;&#xA;  &lt;/p&gt;&lt;ul&gt;&lt;li&gt;Resources&lt;/li&gt;&#xA;    &lt;li&gt;REST Improvements&lt;/li&gt;&#xA;    &lt;li&gt;Multiview&lt;/li&gt;&#xA;    &lt;li&gt;Record Identification&lt;/li&gt;&#xA;    &lt;li&gt;HTTP Loving&lt;/li&gt;&#xA;    &lt;li&gt;Security Improvements&lt;/li&gt;&#xA;    &lt;li&gt;Exception Handling&lt;/li&gt;&#xA;    &lt;li&gt;Cookie Store Sessions&lt;/li&gt;&#xA;    &lt;li&gt;New Request Profiler&lt;/li&gt;&#xA;    &lt;li&gt;AtomFeedHelper&lt;/li&gt;&#xA;  &lt;/ul&gt;&lt;h3&gt;Active Resource&lt;/h3&gt;&#xA;&lt;ul&gt;&lt;li&gt;Official Inclusion In Core&lt;/li&gt;&#xA;    &lt;li&gt;Remote CRUD&lt;/li&gt;&#xA;  &lt;/ul&gt;&lt;h3&gt;Action Mailer&lt;/h3&gt;&#xA;&lt;p&gt;&#xA;  &lt;/p&gt;</description>
    </item>
    <item>
      <title>Ruby on Rails 2.0 Will Be Soon Released</title>
      <link>/2007/12/06/ruby-on-rails-20-will-be-soon-released/</link>
      <pubDate>Thu, 06 Dec 2007 00:00:00 +0000</pubDate>
      <guid>/2007/12/06/ruby-on-rails-20-will-be-soon-released/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;http://www.rubyonrails.org&#34; title=&#34;Ruby on Rails&#34;&gt;Ruby on Rails 2.0&lt;/a&gt; will be released in the next hours!!&lt;/p&gt;</description>
    </item>
    <item>
      <title>Pop Art!</title>
      <link>/2007/12/03/pop-art/</link>
      <pubDate>Mon, 03 Dec 2007 00:00:00 +0000</pubDate>
      <guid>/2007/12/03/pop-art/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;http://www.flickr.com/photos/jodosha/2081240810/&#34; title=&#34;Pop Art! Ticket by jodosha, on Flickr&#34;&gt;&lt;img src=&#34;http://farm3.static.flickr.com/2354/2081240810_1459549672_m.jpg&#34; width=&#34;240&#34; height=&#34;160&#34; alt=&#34;Pop Art! Ticket&#34;/&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;In the last week-end I was at the &lt;a href=&#34;http://www.scuderiequirinale.it/canale.asp?id=709&#34; title=&#34;Pop Art!&#34;&gt;Pop Art!&lt;/a&gt; exposition.&lt;/p&gt;&#xA;&lt;p&gt;More than &lt;strong&gt;50 artists&lt;/strong&gt; (including &lt;strong&gt;Warhol&lt;/strong&gt;, &lt;strong&gt;Lichtenstein&lt;/strong&gt; and &lt;strong&gt;Rauschenberg&lt;/strong&gt;) &lt;strong&gt;100 works&lt;/strong&gt;, from 1956 and 1968, for trace the history of the pop art movement.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Subsonica Live In Rome</title>
      <link>/2007/12/03/subsonica-live-in-rome/</link>
      <pubDate>Mon, 03 Dec 2007 00:00:00 +0000</pubDate>
      <guid>/2007/12/03/subsonica-live-in-rome/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;http://www.subsonica.it&#34; title=&#34;Subsonica&#34;&gt;Subsonica&lt;/a&gt; is one of my favourite band. It&amp;#8217;s a Torino based pop electronic quintet, that just turned 10 years of activity.&lt;/p&gt;&#xA;&lt;p&gt;They just posted a video of their recent dig in Rome. I was there, near the stage. Great experience!!&lt;/p&gt;&#xA;&lt;p&gt;&lt;embed src=&#34;http://lads.myspace.com/videos/vplayer.swf&#34; flashvars=&#34;m=23124989&amp;amp;v=2&amp;amp;type=video&#34; type=&#34;application/x-shockwave-flash&#34; width=&#34;430&#34; height=&#34;346&#34;&gt;&lt;/embed&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Acts As Resource: Combining ActiveRecord and ActiveResource</title>
      <link>/2007/11/28/acts-as-resource-combining-activerecord-and-activeresource/</link>
      <pubDate>Wed, 28 Nov 2007 00:00:00 +0000</pubDate>
      <guid>/2007/11/28/acts-as-resource-combining-activerecord-and-activeresource/</guid>
      <description>&lt;p&gt;Would you use both &lt;strong&gt;ActiveRecord&lt;/strong&gt; and &lt;strong&gt;ActiveResource&lt;/strong&gt; in &lt;strong&gt;one&lt;/strong&gt; class?&#xA;  Now with &lt;strong&gt;Acts As Resource&lt;/strong&gt; you can!!&lt;/p&gt;&#xA;&lt;h3&gt;Example&lt;/h3&gt;&#xA;&lt;code class=&#34;ruby&#34;&gt;&#xA;  class Carrot&#xA;    acts_as_resource&#xA;    self.site = &#39;http://localhost:3000&#39;&#xA;&lt;pre&gt;&lt;code&gt;belongs_to :bunny&#xA;&#xA;validates_presence_of :color&#xA;validates_uniqueness_of :color&#xA;validates_length_of :color, :within =&amp;amp;gt; 2..23,&#xA;                    :if =&amp;amp;gt; lambda { |c| c.color &amp;amp;amp;&amp;amp;amp; !c.color.empty? }&#xA;validates_format_of :color,&#xA;                    :with =&amp;amp;gt; /[\w\s]+$/,&#xA;                    :if =&amp;amp;gt; lambda { |c| c.color &amp;amp;amp;&amp;amp;amp; !c.color.empty? }&#xA;&#xA;before_create :please_call_me_before_create&#xA;def self.validate&#xA;  logger.debug(&amp;quot;VALIDATE #{color}&amp;quot;)&#xA;end&#xA;&#xA;def please_call_me_before_create&#xA;  logger.debug(&amp;quot;Ohhh, so you called me..&amp;quot;)&#xA;end&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;end&#xA;&lt;/code&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Ruby: Read A File With One Line Of Code</title>
      <link>/2007/11/27/ruby-read-a-file-with-one-line-of-code/</link>
      <pubDate>Tue, 27 Nov 2007 00:00:00 +0000</pubDate>
      <guid>/2007/11/27/ruby-read-a-file-with-one-line-of-code/</guid>
      <description>&lt;p&gt;This snippet shows how to read a file and puts all the lines into an array.&lt;/p&gt;&#xA;&lt;code lang=&#34;ruby&#34;&gt;&#xA;    f = *open(&#39;file.txt&#39;).map {|l| l.rstrip}&#xA;    # =&amp;gt; [&#34;Hi, from the&#34;, &#34;txt file.&#34;]&#xA;&lt;/code&gt;&#xA;&lt;h3&gt;Explanation&lt;/h3&gt;&#xA;&lt;p&gt;The &lt;strong&gt;open&lt;/strong&gt; method returns an &lt;a href=&#34;http://www.ruby-doc.org/core/classes/IO.html&#34; title=&#34;IO class on Ruby API DOC&#34;&gt;IO&lt;/a&gt; object, that include the &lt;strong&gt;Enumerable&lt;/strong&gt; module, now we can just use &lt;strong&gt;#map&lt;/strong&gt; (or &lt;strong&gt;#collect&lt;/strong&gt;).&lt;/p&gt;&#xA;&lt;p&gt;The &lt;strong&gt;splat&lt;/strong&gt; operator is only a sugar syntactical shortcut for &lt;strong&gt;map&lt;/strong&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Rome JavaDay 07</title>
      <link>/2007/11/21/rome-javaday-07/</link>
      <pubDate>Wed, 21 Nov 2007 00:00:00 +0000</pubDate>
      <guid>/2007/11/21/rome-javaday-07/</guid>
      <description>&lt;p&gt;I&amp;#8217;ll be at the &lt;a href=&#34;http://roma.javaday.it/roma/&#34; title=&#34;Rome JavaDay 07 - Home Page&#34;&gt;Rome JavaDay 07&lt;/a&gt; as speaker, with a presentation on &lt;strong&gt;JRuby and &lt;acronym title=&#34;Domain Specific Language&#34;&gt;DSL&lt;/acronym&gt;&lt;/strong&gt;.&lt;/p&gt;&#xA;&lt;p&gt;See you at the conference!!&lt;/p&gt;</description>
    </item>
    <item>
      <title>Rails: How To Modify Template Contents Before Rendering</title>
      <link>/2007/11/15/rails-how-to-modify-template-contents-before-rendering/</link>
      <pubDate>Thu, 15 Nov 2007 00:00:00 +0000</pubDate>
      <guid>/2007/11/15/rails-how-to-modify-template-contents-before-rendering/</guid>
      <description>&lt;p&gt;Just a quick snippet to modify template contents before &lt;strong&gt;ActionView&lt;/strong&gt; render them via &lt;strong&gt;ERB&lt;/strong&gt;.&lt;/p&gt;&#xA;&lt;code lang=&#34;ruby&#34;&gt;&#xA;    ActionView::Base.class_eval do&#xA;      alias_method :action_view_render_template, :render_template&#xA;      def render_template(template_extension, template, file_path = nil, local_assigns = {})&#xA;        template ||= read_template_file(file_path, template_extension)&#xA;        template = &#34;&lt;div&gt;#{template}&lt;/div&gt;&#34; # add your contents here.&#xA;        action_view_render_template(template_extension, template, file_path, local_assigns)&#xA;      end&#xA;    end&#xA;&lt;/code&gt;&#xA;&lt;p&gt;You can add this code to &lt;strong&gt;environment.rb&lt;/strong&gt;, but is preferible a &lt;strong&gt;plugin&lt;/strong&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Parallels: How To Install Ubuntu 7.10</title>
      <link>/2007/11/03/parallels-how-to-install-ubuntu-710/</link>
      <pubDate>Sat, 03 Nov 2007 00:00:00 +0000</pubDate>
      <guid>/2007/11/03/parallels-how-to-install-ubuntu-710/</guid>
      <description>&lt;p&gt;This is a guide to install &lt;strong&gt;Ubuntu 7.10 (Gutsy Gibbon)&lt;/strong&gt; on &lt;strong&gt;Parallels 3.0&lt;/strong&gt; and &lt;strong&gt;Leopard&lt;/strong&gt;.&lt;/p&gt;&#xA;&lt;h3&gt;Configuration&lt;/h3&gt;&#xA;&lt;ul&gt;&lt;li&gt;MacBook 13&amp;#8221;&lt;/li&gt;&#xA;  &lt;li&gt;Intel Core Duo 2Ghz&lt;/li&gt;&#xA;  &lt;li&gt;1Gb RAM&lt;/li&gt;&#xA;  &lt;li&gt;80Gb HD&lt;/li&gt;&#xA;  &lt;li&gt;MacOS X 10.5 (Leopard)&lt;/li&gt;&#xA;  &lt;li&gt;Parallels 3.0 (build 5160)&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;h3&gt;Preparation&lt;/h3&gt;&#xA;&lt;p&gt;If you have installed &lt;strong&gt;Leopard&lt;/strong&gt; you should upgrade your Parallels version at the &lt;strong&gt;build 5160&lt;/strong&gt; (&lt;a href=&#34;http://www.parallels.com/en/support/leopard/&#34; title=&#34;Mac OS 10.5 (Leopard) support on Parallels website&#34;&gt;Leopard Support&lt;/a&gt;).&lt;/p&gt;&#xA;&lt;h3&gt;Installation&lt;/h3&gt;&#xA;&lt;ol&gt;&lt;li&gt;Download the disk image (&lt;strong&gt;ubuntu-7.10-alternate-i386.iso&lt;/strong&gt;) from the Ubuntu website.&lt;/li&gt;&#xA;  &lt;li&gt;Start Parallels and choose &lt;strong&gt;Typical&lt;/strong&gt;, then &lt;strong&gt;Linux&lt;/strong&gt; from &lt;strong&gt;OS Type&lt;/strong&gt; and &lt;strong&gt;Ubuntu Linux&lt;/strong&gt; from &lt;strong&gt;OS Version&lt;/strong&gt;.&lt;/li&gt;&#xA;  &lt;li&gt;Specify a name for the virtual machine: &lt;strong&gt;Ubuntu Linux 7.10&lt;/strong&gt;.&lt;/li&gt;&#xA;  &lt;li&gt;Optimize for better performance of: &lt;strong&gt;Virtual machine&lt;/strong&gt;.&lt;/li&gt;&#xA;  &lt;li&gt;Click on &lt;strong&gt;More Options&lt;/strong&gt;, then select &lt;strong&gt;ISO image&lt;/strong&gt; and choose the disk image.&lt;/li&gt;&#xA;  &lt;li&gt;Now should start the installation process: choose &lt;strong&gt;Install in text mode&lt;/strong&gt; from the first screen.&lt;/li&gt;&#xA;  &lt;li&gt;Choose your &lt;strong&gt;language&lt;/strong&gt; and &lt;strong&gt;locale&lt;/strong&gt;. When prompt for the &lt;strong&gt;keyboard layout detection&lt;/strong&gt;, choose &lt;strong&gt;no&lt;/strong&gt;. Now should appear a page to pick the keyboard layout. On the following screen &lt;strong&gt;do not&lt;/strong&gt; select the &lt;em&gt;Macintosh&lt;/em&gt; layout.&lt;/li&gt;&#xA;  &lt;li&gt;&lt;strong&gt;Network configuration:&lt;/strong&gt; enter the name of the computer.&lt;/li&gt;&#xA;  &lt;li&gt;&lt;strong&gt;Partition disks:&lt;/strong&gt; choose &lt;strong&gt;Guided - use entire disk and set up LVM&lt;/strong&gt;. On the following screen choose &lt;strong&gt;Yes&lt;/strong&gt;, then &lt;strong&gt;Finish partitioning and write changes to disk&lt;/strong&gt;. Don&amp;#8217;t worry about disk dimension, the &lt;acronym title=&#34;Logical Volume Manager&#34;&gt;LVM&lt;/acronym&gt; don&amp;#8217;t really use that space.&lt;/li&gt;&#xA;  &lt;li&gt;Choose your &lt;strong&gt;timezone&lt;/strong&gt;.&lt;/li&gt;&#xA;  &lt;li&gt;Setup an &lt;strong&gt;user&lt;/strong&gt;.&lt;/li&gt;&#xA;  &lt;li&gt;Have a coffee.&lt;/li&gt;&#xA;  &lt;li&gt;Optional: If the installation process prompts for the download of your &lt;strong&gt;language pack&lt;/strong&gt;, install it &lt;strong&gt;now&lt;/strong&gt;.&lt;/li&gt;&#xA;  &lt;li&gt;Screen resolution: &lt;strong&gt;1280x800&lt;/strong&gt;.&lt;/li&gt;&#xA;  &lt;li&gt;Take a break.&lt;/li&gt;&#xA;  &lt;li&gt;Installation complete: choose &lt;strong&gt;Continue&lt;/strong&gt;. This should reboot your virtual machine.&lt;/li&gt;&#xA;  &lt;li&gt;Login, click on the &lt;strong&gt;Network Connection&lt;/strong&gt; icon, then choose your connection. This should activate your &lt;acronym title=&#34;Local Area Network&#34;&gt;LAN&lt;/acronym&gt; connection.&lt;/li&gt;&#xA;  &lt;li&gt;Click on the &lt;strong&gt;Updates&lt;/strong&gt; icon, then upgrade your system.&lt;/li&gt;&#xA;&lt;/ol&gt;&lt;h3&gt;Done&lt;/h3&gt;&#xA;&lt;p&gt;Now your Linux box should be ready. Feel free to comment if something goes wrong.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Kubrik exhibition</title>
      <link>/2007/10/30/kubrik-exhibition/</link>
      <pubDate>Tue, 30 Oct 2007 00:00:00 +0000</pubDate>
      <guid>/2007/10/30/kubrik-exhibition/</guid>
      <description>&lt;p&gt;&lt;img src=&#34;http://farm3.static.flickr.com/2021/1800899004_7f6bb03297_m.jpg&#34; alt=&#34;Stanley Kubrik exhibition in Rome&#34; width=&#34;160px&#34; height=&#34;240px&#34;/&gt;&lt;/p&gt;&#xA;&lt;p&gt;Sunday I went to a &lt;strong&gt;Stanley Kubrik&lt;/strong&gt; exhibition in Rome. He is one of my favourite directors.&lt;/p&gt;&#xA;&lt;p&gt;The exhibition is full of screenplays, shots and things regarding his movies. It was very exciting!!&lt;/p&gt;&#xA;&lt;p&gt;If you are in &lt;strong&gt;Rome&lt;/strong&gt; you can visit &lt;a href=&#34;http://www.palazzoesposizioni.it/&#34;&gt;Palazzo delle Esposizioni&lt;/a&gt; until the Jan 6th, 2008.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Rails To Italy 07 Updates</title>
      <link>/2007/10/26/rails-to-italy-07-updates/</link>
      <pubDate>Fri, 26 Oct 2007 00:00:00 +0000</pubDate>
      <guid>/2007/10/26/rails-to-italy-07-updates/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;http://www.railstoitaly.org/&#34;&gt;Rails To Italy 07&lt;/a&gt; conference has just started, stay tuned.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE: 10:38&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;Sorry, network problems &lt;strong&gt;Zed Shaw&lt;/strong&gt;, has finished his keynote.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;James Cox&lt;/strong&gt; now is talking about Rails scalability&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE: 14:37&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;Waiting for &lt;strong&gt;Thomas Fuchs&lt;/strong&gt;!!&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Sorry, but in the past two days we have had a lot of network problems.&lt;/strong&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Rails To Italy 07 - Q&amp;A Session with DHH</title>
      <link>/2007/10/16/rails-to-italy-07---qa-session-with-dhh/</link>
      <pubDate>Tue, 16 Oct 2007 00:00:00 +0000</pubDate>
      <guid>/2007/10/16/rails-to-italy-07---qa-session-with-dhh/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;http://www.railstoitaly.org&#34; title=&#34;Rails To Italy 07&#34;&gt;Rails To Italy 07&lt;/a&gt; will have a &lt;acronym title=&#34;Questions &amp;amp; Answers&#34;&gt;Q&amp;amp;A&lt;/acronym&gt; session with &lt;a href=&#34;http://www.loudthinking.com/&#34; title=&#34;Loud Thinking&#34;&gt;David Heinemeier Hansson&lt;/a&gt;, the creator of &lt;a href=&#34;http://www.rubyonrails.org&#34; title=&#34;Ruby on Rails&#34;&gt;Ruby on Rails&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;If you want to ask something to him, just send a mail to &lt;a href=&#34;mailto:program@railstoitaly.org&#34; title=&#34;program@railstoitaly.org&#34;&gt;program@railstoitaly.org&lt;/a&gt;, the organization will select the questions.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Rails: How to force plugins loading in 2.0</title>
      <link>/2007/10/08/rails-how-to-force-plugins-loading-in-20/</link>
      <pubDate>Mon, 08 Oct 2007 00:00:00 +0000</pubDate>
      <guid>/2007/10/08/rails-how-to-force-plugins-loading-in-20/</guid>
      <description>&lt;p&gt;Sometimes a &lt;a href=&#34;http://www.rubyonrails.org&#34;&gt;Rails&lt;/a&gt; plugin can be dependant from another one. Since plugins are loaded in alphabetic order, probably you need to load the third part plugin first.&lt;/p&gt;&#xA;&lt;p&gt;The release &lt;strong&gt;&lt;del&gt;1.2.4&lt;/del&gt; 2.0PR&lt;/strong&gt; introduces breaking changes for this mechanism.&lt;/p&gt;&#xA;&lt;p&gt;I&amp;#8217;m developing a plugin called &lt;strong&gt;ClickToGlobalize&lt;/strong&gt;, that&amp;#8217;s dependant on &lt;a href=&#34;http://www.globalize-rails.org/&#34;&gt;Globalize&lt;/a&gt;, here the code for plugin initialization:&lt;/p&gt;&#xA;&lt;code class=&#34;ruby&#34;&gt;&#xA;    # Force Globalize loading.&#xA;    if Rails::VERSION::STRING.match /^1\.2+/&#xA;      load_plugin(File.join(RAILS_ROOT, &#39;vendor&#39;, &#39;plugins&#39;, &#39;globalize&#39;))&#xA;    else&#xA;      Rails::Initializer.run { |config| config.plugins = [ :globalize ] }&#xA;    end&#xA;&lt;pre&gt;&lt;code&gt;require &#39;click_to_globalize&#39;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/code&gt;&#xA;&lt;h3&gt;Explanation&lt;/h3&gt;&#xA;&lt;p&gt;Use the old mechanism if the current release is minor than the last release with it (&lt;del&gt;1.2.3&lt;/del&gt; 1.2.4), else use the &lt;a href=&#34;http://railsmanual.com/class/Rails::Initializer&#34; title=&#34;Rails::Initializer API Doc&#34;&gt;Rails::Initializer&lt;/a&gt; class.&lt;/p&gt;</description>
    </item>
    <item>
      <title>JPG Magazine: Emotion Capture theme</title>
      <link>/2007/10/05/jpg-magazine-emotion-capture-theme/</link>
      <pubDate>Fri, 05 Oct 2007 00:00:00 +0000</pubDate>
      <guid>/2007/10/05/jpg-magazine-emotion-capture-theme/</guid>
      <description>&lt;p&gt;I’m partecipating to the &lt;strong&gt;&lt;a href=&#34;http://www.jpgmag.com/themes/60&#34; title=&#34;Emotion Capture&#34;&gt;Emotion Capture&lt;/a&gt;&lt;/strong&gt; theme on &lt;a href=&#34;http://www.jpgmag.com&#34;&gt;JPG Magazine&lt;/a&gt; with this photo:&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;http://www.jpgmag.com/photos/280115&#34; title=&#34;Summer&#34;&gt;&lt;img src=&#34;http://www.lucaguidi.com/files/summer.jpg&#34; title=&#34;Summer&#34; alt=&#34;Portrait of an enigmatic smile of a young girl.&#34; width=&#34;200&#34; height=&#34;300&#34;/&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h3&gt;How to vote&lt;/h3&gt;&#xA;&lt;p&gt;Please register yourself on JPG Magazine, then go to the photo page and vote. The contest deadline is Dec 12th.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Ruby: How to check the operating system</title>
      <link>/2007/10/05/ruby-how-to-check-the-operating-system/</link>
      <pubDate>Fri, 05 Oct 2007 00:00:00 +0000</pubDate>
      <guid>/2007/10/05/ruby-how-to-check-the-operating-system/</guid>
      <description>&lt;p&gt;Today I&amp;#8217;m finishing the code cleanup for my latest Rails plugin (will be soon released) and I want to execute some rake tasks, only if the &lt;acronym title=&#34;Operating System&#34;&gt;OS&lt;/acronym&gt; supports certain system calls.&lt;/p&gt;&#xA;&lt;p&gt;The following snippet helps to check the current platform.&lt;/p&gt;&#xA;&lt;code class=&#34;ruby&#34;&gt;&#xA;    # (c) 2007 Luca Guidi (&lt;a href=&#34;http://www.lucaguidi.com&#34;&gt;www.lucaguidi.com&lt;/a&gt;) - Released under MIT License.&#xA;    # This code was inspired by Prototype rake test tasks.&#xA;    require &#39;webrick&#39;&#xA;&lt;pre&gt;&lt;code&gt;class OperatingSystem&#xA;  class  &amp;lt;/code&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;</description>
    </item>
    <item>
      <title>Rails To Italy 07 - Coding Challenge</title>
      <link>/2007/09/25/rails-to-italy-07---coding-challenge/</link>
      <pubDate>Tue, 25 Sep 2007 00:00:00 +0000</pubDate>
      <guid>/2007/09/25/rails-to-italy-07---coding-challenge/</guid>
      <description>&lt;h3&gt;Coding Challenge&lt;/h3&gt;&#xA;&lt;p&gt;The Rails To Italy conference has started a Coding Challenge. The topic will be &amp;#8220;Your Favourite Thing&amp;#8221; - create a small, interactive web application that is related to your favorite thing or activity*.&lt;/p&gt;&#xA;&lt;h3&gt;Prizes&lt;/h3&gt;&#xA;&lt;p&gt;Prizes are 1 iPhone or iPod touch + 2 iPod shuffle!&lt;/p&gt;&#xA;&lt;h3&gt;Deadline&lt;/h3&gt;&#xA;&lt;p&gt;Submission deadline is the 20th October 2007.&lt;/p&gt;&#xA;&lt;p&gt;[&lt;a href=&#34;http://www.railstoitaly.org/en/challenge&#34; title=&#34;Rails To Italy 07 - Coding Challenge&#34;&gt;Rails To Italy 07 - Coding Challenge&lt;/a&gt;]&lt;/p&gt;</description>
    </item>
    <item>
      <title>Brand new blog</title>
      <link>/2007/09/03/brand-new-blog/</link>
      <pubDate>Mon, 03 Sep 2007 00:00:00 +0000</pubDate>
      <guid>/2007/09/03/brand-new-blog/</guid>
      <description>&lt;p&gt;I have migrated my blog from &lt;a href=&#34;http://www.thedigitalconspiracy.net&#34;&gt;the old one&lt;/a&gt; to this system, please follow here my articles and posts.&lt;/p&gt;&#xA;&lt;p&gt;That blog will &lt;strong&gt;not&lt;/strong&gt; be updated.&lt;/p&gt;&#xA;&lt;p&gt;Thanks, Luca.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Javascript Alias Method</title>
      <link>/2007/09/03/javascript-alias-method/</link>
      <pubDate>Mon, 03 Sep 2007 00:00:00 +0000</pubDate>
      <guid>/2007/09/03/javascript-alias-method/</guid>
      <description>&lt;p&gt;Working with a dynamic and complete language like &lt;strong&gt;Ruby&lt;/strong&gt;, I feel the lack of many native methods. Lately, I&amp;#8217;m &lt;em&gt;working-by-plugin&lt;/em&gt;  implementing new code, and injecting it into the old one from Rails or Prototype, and so on..&#xA;It&amp;#8217;s a very nice and grateful way of add and remove features on the fly, and change the aspect of the code.&#xA;In fact this kind of tecniques and programming paradigms are also called &lt;acronym title=&#34;Aspect Oriented Programming&#34;&gt;AOP&lt;/acronym&gt;, due to the capability to change the &lt;em&gt;aspect&lt;/em&gt; of an object, and, of course, its behaviors.&#xA;For this purpose, I feel very useful the Ruby &lt;code&gt;alias_method&lt;/code&gt;. Of course, it&amp;#8217;s a way to create an alias, and eventually override that method, and reuse the brand new name into the old one!!&#xA;So playing around a bit with Javascript, I have add this feature to the Object class:&lt;br/&gt;&lt;code class=&#34;javascript&#34;&gt;&#xA;    Object.aliasMethod = function(object, newMethodName, oldMethodName) { &#xA;      object[newMethodName] = object[oldMethodName]; &#xA;    };&#xA;&lt;/code&gt;&#xA;&lt;p&gt;Here a little example:&#xA;&lt;code class=&#34;javascript&#34;&gt;&#xA;String.prototype = Object.extend(String.prototype, {&#xA;capitalize: function() {&#xA;return &amp;lsquo;The capitalized version of &amp;lsquo;+this+&amp;rsquo; is: &amp;lsquo;+this.aliasedCapitalizeMethod()+&amp;rsquo;.&amp;rsquo;;&#xA;}&#xA;});&lt;/p&gt;</description>
    </item>
    <item>
      <title>Flickr pro-account</title>
      <link>/2007/04/25/flickr-pro-account/</link>
      <pubDate>Wed, 25 Apr 2007 00:00:00 +0000</pubDate>
      <guid>/2007/04/25/flickr-pro-account/</guid>
      <description>&lt;p&gt;I&amp;#8217;ve just bought a flickr pro-account, now I can upload a tons of shots..&lt;/p&gt;&#xA;&lt;p&gt;PS: this is my account page: &lt;a href=&#34;http://www.flickr.com/photos/jodosha/&#34; title=&#34;jodosha Flickr page&#34;&gt;jodosha&lt;/a&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>ActiveForm 0.2.0 released</title>
      <link>/2007/03/28/activeform-020-released/</link>
      <pubDate>Wed, 28 Mar 2007 00:00:00 +0000</pubDate>
      <guid>/2007/03/28/activeform-020-released/</guid>
      <description>&lt;p&gt;&lt;strong&gt;ActiveForm&lt;/strong&gt; is a &lt;strong&gt;JavaScript&lt;/strong&gt; library, based on &lt;a href=&#34;http://prototypejs.org/&#34;&gt;Prototype&lt;/a&gt;, useful to validate&#xA;your forms in an automagically and pluggable way.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Automagically?&lt;/strong&gt; Simply, You have to declare your fields, eventually your error messages, and.. &lt;strong&gt;nothing else!!&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Pluggable? ActiveForm&lt;/strong&gt; contains most common validations (regular expressions, presence, conditional presence..),&#xA;and it performs them in a certain order. If you don&amp;#8217;t like this, you can simply redeclare a method, or exclude it from validation process.&lt;/p&gt;&#xA;&lt;p&gt;Features:&#xA;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Highrise</title>
      <link>/2007/03/20/highrise/</link>
      <pubDate>Tue, 20 Mar 2007 00:00:00 +0000</pubDate>
      <guid>/2007/03/20/highrise/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;http://37signals.com&#34;&gt;37signals&lt;/a&gt; officially launced &lt;a href=&#34;http://www.highrisehq.com&#34;&gt;Highrise&lt;/a&gt;.&#xA;It&amp;#8217;s a new &lt;strong&gt;organization service&lt;/strong&gt;, to share contacts and tasks with your team or your friends. It allows to to track people, phone calls, events, and also supports &lt;strong&gt;mail tasks&lt;/strong&gt;.&lt;/p&gt;&#xA;&lt;p&gt;I&amp;#8217;ve just signed up.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Twittervision</title>
      <link>/2007/03/18/twittervision/</link>
      <pubDate>Sun, 18 Mar 2007 00:00:00 +0000</pubDate>
      <guid>/2007/03/18/twittervision/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;http://twittermap.com/twittervision&#34;&gt;Twittervision&lt;/a&gt; is a simple mashup of &lt;strong&gt;Twitter&lt;/strong&gt; and &lt;strong&gt;Google Maps&lt;/strong&gt;. It allows to geolocate twitters entries.&lt;/p&gt;&#xA;&lt;p&gt;To change your location you must send an update, using &lt;strong&gt;L:&lt;/strong&gt; operator, followed your location. I.e.: L:Florence, Italy.&#xA;You can also &amp;#8220;tag&amp;#8221; your location: home, work, school, club..&lt;/p&gt;&#xA;&lt;p&gt;It&amp;#8217;s very cool, and causes an &lt;strong&gt;high addiction&lt;/strong&gt;.&#xA;&lt;img src=&#34;/assets/2007/3/18/twittervision2.png&#34; alt=&#34;Twittervision screenshot&#34;/&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Play random files with Ruby</title>
      <link>/2007/03/02/play-random-files-with-ruby/</link>
      <pubDate>Fri, 02 Mar 2007 00:00:00 +0000</pubDate>
      <guid>/2007/03/02/play-random-files-with-ruby/</guid>
      <description>&lt;p&gt;I&amp;#8217;ve written a class to play random files, you can define the player path and allowed file extentions.&#xA;It will search recursively for all readable files, starting from execution from the folder passed as argument or, if miss, from current folder. Tested on a &lt;strong&gt;linux box&lt;/strong&gt; with &lt;strong&gt;mplayer&lt;/strong&gt;.&lt;/p&gt;&#xA;&lt;p&gt;&#xA;&lt;strong&gt;Usage:&lt;/strong&gt;&lt;br/&gt;&lt;code class=&#34;bash&#34;&gt;&#xA;    $ ./shuffle&#xA;    # play recursively all files from current folder&#xA;    $ ./shuffle /path/to/files&#xA;    # play recursively all files from specified folder&#xA;&lt;/code&gt;&lt;br/&gt;&#xA;&lt;p&gt;That’s the source code.&lt;br/&gt;&lt;code class=&#34;ruby&#34;&gt;&#xA;#!/usr/bin/ruby&lt;/p&gt;</description>
    </item>
    <item>
      <title>Little Miss Sunshine</title>
      <link>/2007/02/26/little-miss-sunshine/</link>
      <pubDate>Mon, 26 Feb 2007 00:00:00 +0000</pubDate>
      <guid>/2007/02/26/little-miss-sunshine/</guid>
      <description>&lt;p&gt;&lt;strong&gt;Little Miss Sunshine&lt;/strong&gt; has won &lt;strong&gt;two&lt;/strong&gt; oscars!!&lt;/p&gt;&#xA;&lt;p&gt;I&amp;#8217;m very happy, I have watched this movie just a week ago, and I like it.&#xA;It&amp;#8217;s a nice story about an odd american family that cross the US aboard an old volksvagen van. It&amp;#8217;s funny, it&amp;#8217;s sad, it&amp;#8217;s sweet. You have to see it.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Ruby on Rails: Validate URL</title>
      <link>/2007/02/21/ruby-on-rails-validate-url/</link>
      <pubDate>Wed, 21 Feb 2007 00:00:00 +0000</pubDate>
      <guid>/2007/02/21/ruby-on-rails-validate-url/</guid>
      <description>&lt;p&gt;Hi, just a snippet to validate an url with &lt;strong&gt;Ruby on Rails&lt;/strong&gt;.&lt;/p&gt;&#xA;&lt;code class=&#34;ruby&#34;&gt;&#xA;    class WebSite  /^((http|https):\/\/)*[a-z0-9_-]{1,}\.*[a-z0-9_-]{1,}\.[a-z]{2,4}\/*$/i&#xA;&lt;pre&gt;&lt;code&gt;  def validate&#xA;    errors.add(:url, &amp;quot;unexistent&amp;quot;) unless WebSite.existent_url?(:url)&#xA;  end&#xA;&#xA;  def self.existent_url?(url)&#xA;    uri = URI.parse(url)&#xA;    http_conn = Net::HTTP.new(uri.host, uri.port)&#xA;    resp, data = http_conn.head(&amp;quot;/&amp;quot; , nil)&#xA;    resp.code == &amp;quot;200&amp;quot;&#xA;  end&#xA;end&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/code&gt;</description>
    </item>
    <item>
      <title>Shot A Day: 2007 January</title>
      <link>/2007/01/31/shot-a-day-2007-january/</link>
      <pubDate>Wed, 31 Jan 2007 00:00:00 +0000</pubDate>
      <guid>/2007/01/31/shot-a-day-2007-january/</guid>
      <description>&lt;p&gt;&#xA;My 2007 January roundup on &lt;strong&gt;Shot A Day&lt;/strong&gt; project.&#xA;&lt;img id=&#34;image70&#34; src=&#34;/assets/2007/1/31/shot_a_day_2007_january_mini.png&#34; alt=&#34;Shot A Day 2007 January&#34;/&gt;&#xA;Look at whole gallery at &lt;a href=&#34;http://www.flickr.com/photos/jodosha/&#34;&gt;my page&lt;/a&gt; on flickr.&#xA;&lt;/p&gt;</description>
    </item>
    <item>
      <title>MPlayer console tip</title>
      <link>/2007/01/17/mplayer-console-tip/</link>
      <pubDate>Wed, 17 Jan 2007 00:00:00 +0000</pubDate>
      <guid>/2007/01/17/mplayer-console-tip/</guid>
      <description>&lt;p&gt;&lt;img id=&#34;image43&#34; src=&#34;http://www.thedigitalconspiracy.net/wp-content/uploads/2007/01/mplayer_tip.png&#34; alt=&#34;MPlayer tip screenshot&#34; class=&#34;profile&#34;/&gt;&#xA;I&amp;#8217;ve discovered an interesting tip for &lt;a href=&#34;http://www.mplayerhq.hu/&#34;&gt;MPlayer&lt;/a&gt; to play all folder&amp;#8217;s media files. enter:&lt;br/&gt;&lt;code class=&#34;shell&#34;&gt;&#xA;    mplayer *&#xA;&lt;/code&gt;&lt;br/&gt;&#xA;&lt;p&gt;It automatically enqueue your files.&#xA;If you use fast forward (&lt;em&gt;up key&lt;/em&gt;) mplayer treats your playlist like one file, so you can navigate between your files. Unfortunately it works only with forward seek.&lt;/p&gt;&#xA;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Javascript HashMap</title>
      <link>/2006/10/30/javascript-hashmap/</link>
      <pubDate>Mon, 30 Oct 2006 00:00:00 +0000</pubDate>
      <guid>/2006/10/30/javascript-hashmap/</guid>
      <description>&lt;p&gt;&lt;p lang=&#34;en&#34;&gt;Reading around i&amp;#8217;ve discovered that Javascript associative arrays returns unpredictable results, i.e. &lt;strong&gt;length&lt;/strong&gt; param is not correctly handled.&lt;/p&gt;&#xA;&lt;p lang=&#34;en&#34;&gt;&lt;strong&gt;Array&lt;/strong&gt; object should be used only with a numeric index and best way to avoid this problem is to use &lt;strong&gt;Object&lt;/strong&gt;.&lt;/p&gt;&#xA;&lt;p lang=&#34;en&#34;&gt;&lt;strong&gt;But, if I wanna put more objects in my object?&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p lang=&#34;en&#34;&gt;Of course i can do this with previous method, but i don&amp;#8217;t like it :-P. So, i&amp;#8217;ve written a 100% &lt;acronym title=&#34;Object Oriented Programming&#34;&gt;OOP&lt;/acronym&gt; class, that use &lt;a class=&#34;liexternal&#34; href=&#34;http://prototypejs.org&#34;&gt;Prototype&lt;/a&gt; and it simulate a java &lt;a class=&#34;liexternal&#34; href=&#34;http://java.sun.com/j2se/1.4.2/docs/api/java/util/HashMap.html&#34;&gt;HashMap&lt;/a&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Welcome to my blog!!</title>
      <link>/2006/03/16/welcome-to-my-blog/</link>
      <pubDate>Thu, 16 Mar 2006 00:00:00 +0000</pubDate>
      <guid>/2006/03/16/welcome-to-my-blog/</guid>
      <description>&lt;p&gt;Welcome to my blog!!&lt;/p&gt;</description>
    </item>
    <item>
      <title>Sponsors</title>
      <link>/sponsors/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>/sponsors/</guid>
      <description>&lt;h3 id=&#34;my-work&#34;&gt;My Work&lt;/h3&gt;&#xA;&lt;p&gt;I&amp;rsquo;m working hard &lt;strong&gt;every day for 15 years&lt;/strong&gt; to keep Ruby Community vibrant.&lt;/p&gt;&#xA;&lt;p&gt;That includes speak at &lt;a href=&#34;https://www.youtube.com/results?search_query=luca&amp;#43;guidi&amp;#43;ruby&#34;&gt;&lt;strong&gt;conferences&lt;/strong&gt;&lt;/a&gt;, create &lt;a href=&#34;https://www.youtube.com/channel/UCAprzjCQpYdzyN9Bv-Iq1sA&#34;&gt;&lt;strong&gt;screencasts&lt;/strong&gt;&lt;/a&gt;, write &lt;a href=&#34;/&#34;&gt;&lt;strong&gt;blog posts&lt;/strong&gt;&lt;/a&gt;, and play a role in &lt;a href=&#34;https://github.com/jodosha&#34;&gt;&lt;strong&gt;Open Source&lt;/strong&gt;&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;During these years, I contributed to several important Open Source projects like &lt;a href=&#34;https://github.com/rails/rails&#34;&gt;Ruby on Rails&lt;/a&gt;, &lt;a href=&#34;https://github.com/rack/rack&#34;&gt;Rack&lt;/a&gt;, &lt;a href=&#34;https://github.com/redis/redis-rb&#34;&gt;redis-rb&lt;/a&gt;, &lt;a href=&#34;https://github.com/go-acme/lego&#34;&gt;lego&lt;/a&gt;, and created my own: &lt;a href=&#34;https://github.com/hanami&#34;&gt;Hanami&lt;/a&gt; and &lt;a href=&#34;https://github.com/redis-store&#34;&gt;redis-store&lt;/a&gt;.&#xA;I&amp;rsquo;m in the &lt;a href=&#34;https://github.com/dry-rb&#34;&gt;dry-rb&lt;/a&gt; core team as well.&lt;/p&gt;&#xA;&lt;p&gt;I&amp;rsquo;m currently working on &lt;a href=&#34;https://github.com/hanami/hanami/issues/1067&#34;&gt;Hanami 2&lt;/a&gt; and &lt;a href=&#34;https://github.com/hanami/api&#34;&gt;Hanami::API 1&lt;/a&gt;. 🌸&lt;/p&gt;&#xA;&lt;h3 id=&#34;sponsors&#34;&gt;Sponsors&lt;/h3&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://www.legalforce.co.jp/&#34;&gt;&lt;img src=&#34;/images/sponsors/legalforce.png&#34; alt=&#34;LegalForce&#34;&gt;&lt;/a&gt;&#xA;&lt;a href=&#34;https://hanamimastery.com/&#34;&gt;&lt;img src=&#34;/images/sponsors/hanamimastery.jpeg&#34; alt=&#34;Hanami Mastery&#34;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;sponsorship&#34;&gt;Sponsorship&lt;/h3&gt;&#xA;&lt;p&gt;&lt;strong&gt;If you want to support my initiatives, please consider to sponsor me via: &lt;a href=&#34;https://github.com/sponsors/jodosha&#34;&gt;GitHub Sponsors&lt;/a&gt;.&lt;/strong&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>What I&#39;m doing Now</title>
      <link>/now/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>/now/</guid>
      <description></description>
    </item>
  </channel>
</rss>
