BetterSoftware 2010: Agile Tricks

This week I attended Better Software 2010, where I gave a presentation about the making of the DoomBoard . I had a lot of fun and attended a lot of interesting presentations from great professionals.

Here’s my slides.

MIKAMAI, most innovative Italian company in 2009?

I don’t usually like to post out of pride, but it’s always a nice feeling when your hard work is recognized by other people.

In this case Buongiorno’s David Casalini, in an interview with nextinnovation.it when asked

If you could give the 2009 Prize for Most Innovative Italian Company, you would give it to …? And why?

he replied

[...] I really like a Milano based company, Mikamai, a small team but very good, with lots of ideas, focused on people and they have a tech know-how that is frighteningly good.

Thanks, David!

Vhgen 1.1

Here’s the latest update to my vhgen script for apache2 vhost templating.

The importance of being up-to-date

Since I started working in the web development business the release of Rails 3 has been the first time I really felt I had to understand what was going on because otherwise I would be left behind.

There were simpler times where just reading the feeds of the most important blogs allowed me to be up-to-date, but either I’m getting old or the information has become too fractioned, because this time the only reason for me (and everyone in MIKAMAI) to get started with Rails 3 was to resume a practice that unfortunately we left behind in the past year: the internal presentations.

Starting last thursday, and hopefully never stopping, thursday afternoons aren’t about working for others, but are about everyone sharing his knoweledge with the others.

Last thursday was obviously all about Rails 3, so a couple of us connected their macs to the big screen and demoed new features of Rails 3.

It was nice, interesting questions were asked during the demos, and the overall mood was pretty good. I look forward to the next session.

Continous Integration with RunCodeRun

Last thursday MIKAMAI hosted a Ruby Social Club meeting. Here’s the slides for my presentation.

WordPress + Lighttpd + WP-Supercache + Mobile Support

Last year I made some work on lighttpd support for wp-supercache. It instantly became very popular and basically anyone running wordpress on lighttpd uses it, even if it lacks support for wp-supercache newest features.

The amazing Jean Pierre Wenzel has recently released an updated version that adds a much needed mobile support.

You can check it out here.

Thanks Jean Pierre!

Updated Language Redirect Extension for Radiant

Thanks to the great work of netzpirat, the good old Language Redirect Extension has been updated to work with Radiant 0.8.0.

Thanks netzpirat!

Deploy Drupal with Capistrano, a year later

Here’s the slides for the presentation I gave at the latest Ruby Social Club in Milano.

Stacktrace and FB Garage

For those of you who understand Italian, Stacktrace has published one article of mine, regarding the planning of FB Garage Milano.

It was a fun event both to plan, execute and attend, I hope the article transmits the action that happened behind the lines.

Apache Vhost Templating

In Mikamai our deployment platform of choice is Ubuntu Linux. I like a lot the way Apache is set up on Debian based distributions, with the sites-available directory, but nonetheless creating new virtual hosts is a royal PITA.

Today I finally solved the problem once and for all via a super simple ruby templating script. Here it is, it uses a nice gem, optiflags, to parse the commandline arguments:

#!/usr/bin/env ruby
 
require 'rubygems'
require 'optiflag'
 
module MyOptions extend OptiFlagSet
  flag "d" do
    description "The domain name the vhost should serve"
    long_form "domain"
  end
 
  optional_flag "a" do
    description "Email of the admin. If not specified defaults to info@domain"
    long_form "admin"
  end
 
  optional_switch_flag "w" do
    description "Adds www to non www redirection"
    long_form "www_redirect"
  end
 
  and_process!
end
 
flags = MyOptions.flags
 
admin = flags.a ? flags.a : "info@#{flags.d}"
domain = flags.d
quoted_domain = flags.d.gsub(/\./, "\\.")
 
TEMPLATE=<<-EOT
<VirtualHost *:80>
        ServerName #{domain}
        ServerAdmin #{admin} 
 
        DocumentRoot /var/apps/#{domain}
        <Directory />
                Options FollowSymLinks
                AllowOverride None
        </Directory>
        <Directory /var/apps/#{domain}>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride All 
                Order allow,deny
                allow from all
        </Directory>
 
        ErrorLog /var/log/apache2/#{domain}.log
 
        # Possible values include: debug, info, notice, warn, error, crit,
        # alert, emerg.
        LogLevel warn
 
        CustomLog /var/log/apache2/#{domain}.log combined
 
</VirtualHost>
EOT
 
REDIRECTION=<<-EOT
<VirtualHost *:80>
  ServerName www.#{domain}
  ServerAdmin #{admin} 
 
  RewriteEngine On
  RewriteCond %{HTTP_HOST} ^www\\.#{quoted_domain}
  RewriteRule (.*) http://#{domain}/$1 [R=301,L]
</VirtualHost>
EOT
 
puts TEMPLATE
puts REDIRECTION if flags.w?

I use it like this:

$ vhgen -d domain.com -w > /etc/apache2/sites-available/my_vhost
$ a2ensite my_vhost