Software Versioning

Every day, we cope with software versioning.

We often hear sentences like: “Hey, have you seen the new Firebug 1.3.3?”, “Have you installed Ubuntu 8.10?”, “When will Windows 7 be released?”, “Is Gmail still in Beta?” or “Check my new web 2.0 site!”

Personally, and it seems that a lot of people agree about this, I like the Ubuntu versioning pattern: the major version indicates the year of releasing, and the minor one the year’s month when it was released.

If we talk about web applications, I prefer putting the revision number of the published revision in our source control in some hidden place, so if the application is hosted in different servers is easy to know what version of the software is our server running. (Note: check the downsides: if it’s a very public project, you are making cracker’s life easier)

It’s a reality that there aren’t any standards for software versioning and naming, and frequently development teams and marketing folks use different names for the same version of a product. As always, life will be easier if we had some standards in place.

But the way, we have some de facto conventions, and we should use them. If we use the popular X.Y.Z versioning format, a change in X implies massive architecture changes, and a change in Y means that there exists compatibility with other versions with same X.

If you are using .NET Framework, you should know that you can generate your assemblies version automatically based on the time of compilation. Check the article about AssemblyVersionAttribute from the MSDN:

When specifying a version, you have to at least specify major. If you specify major and minor, you can specify an asterisk (*) for build. This will cause build to be equal to the number of days since January 1, 2000 local time, and for revision to be equal to the number of seconds since midnight local time, divided by 2.
If you specify major, minor, and build, you can specify an asterisk for revision. This will cause revision to be equal to the number of seconds since midnight local time, divided by 2.

This article came to my mind when I read about the new PHP release, PHP 5.3. The previous was only some context for my rant:

What were PHP people thinking about when they decided changing only the minor version number with a new version with backward-compatibility issues?

If you are going to feel the pain, maybe this IBM post series can ease you: What’s new in PHP V5.3.

PS: They’ve introduced goto in the language too. I won’t say anything about it. Use it at your own risk.

If programmers have make a plane…

Cola: Real-Time Shared Editing

Today when updating my RSS reader I found a link to a very interesting video in Vimeo. It is a demo about the new ‘cooperation mode’ in Eclipse. I felt in love with Gobby the first time I saw it, but never found the chance of using it.

But Cola, of the Eclipse Communication Framework team, can really revolutionize what we understand for pair programming and increase the adoption of this practice.

Check Mustafa K. Isik’s blog for further details.

Trac reports

As almost everybody knows, Trac is an enhanced wiki and issue tracking system for software development projects. Trac uses a minimalistic approach to web-based software project management.

The better part of it is that minimalistic approach. Is very easy getting started with Trac, and achieving great things with its help.

One of the features it has is the possibility to write reports with a slightly modified SQL syntax that let us to get views of the tickets, with an specific layout or style. I never needed more reports than those that trac brings us as examples, so I’m not an expert about them.

But today I faced an ugly problem. The {6} All Tickets By Milestone (Including closed) report doesn’t order the milestones by due date. So I modified it for ordering that, and this is the result:

SELECT p.value AS __color__,
   t.milestone AS __group__,
   (CASE status 
      WHEN 'closed' THEN 'color: #777; background: #ddd; border-color: #ccc;'
        (CASE owner WHEN $USER THEN 'font-weight: bold' END)
    END) AS __style__,
   id AS ticket, summary, component, status, 
   resolution,version, t.type AS type, priority, owner,
   changetime AS modified,
   time AS _time,reporter AS _reporter
  FROM ticket t
  LEFT JOIN enum p ON = t.priority AND p.type = 'priority'
  LEFT JOIN milestone m ON = t.milestone
  ORDER BY (milestone IS NULL), m.due, (status = 'closed'), 
        (CASE status WHEN 'closed' THEN modified ELSE (-1)*p.value END) DESC

Acelerando Maven2

El primer paso, si no lo has hecho ya, es instalar Maven2. Desde que compré mi nuevo portátil no he vuelto a usar Maven, por lo que describiré muy brevemente los pasos que he seguido.

Descarga Maven 2.0.9 y extraelo en tu directorio de archivos de programa (en Windows, lo extraigo en C:\Program Files). Añade una nueva variable de entorno llamada MVN con el valor C:\Program Files\apache-maven-2.0.9\bin, y edita el Path para referenciarla (añade ;%MVN% al final de tu Path). Abre una nueva consola y ejecuta mvn -v. Si devuelve la versión instalada de Maven2, todo marcha bien 🙂

Maven2 automáticamente descarga todas las dependencias que se necesiten para compilar una aplicación (vienen definidas en el POM). Por tanto, para acelerar estos procesos, es interesante añadir un mirror cercano geográficamente. En mi caso, el CICA es mirror de Apache, por lo que está en mi propia ciudad 🙂

Para más información, consulta Maven Guide Mirror Settings.

PD: El asunto de esta entrada era sólo un paso necesario para una futura entrada, y estaba escrito en inglés, pero al final era esfuerzo inútil (ya veréis por que motivo en próximos capítulos). He preferido publicar este minipost antes que borrar una parte del esbozo del siguiente.