ROI is a hard matter when it comes to software development.

A huge number of managers simply don't get the case for Automated Unit Testing; no matter how many times they've heard about its benefits;
no matter how many times they have dared to say (liar...) that their teams are doing unit testing.

Even worse... there are still a huge number of software developers that still don't get it.
And a lot of technical managers; not only your usual "pointy haired boss" but those technically fluent that have won your respect over the years... not even they seem to fully understand that automated unit testing is a direct money saver.

So I'll write about a small event in a project I'm involved right now (and I mean... now...).

The core of the system has got a coverage of 100% of the lines.
Even though that's not as good as it can get, it makes me feel confident, and makes it harder for anyone to justify *why* is his code missing full coverage.

(Don't get scared. It's not hard to get coverage if you stablish the policy from the beggining, and it's easy to get the team involved if you bring them the tools to do it)

Well, back to the story, this morning, I've started myself coding a small change for that project:

Some contents are stored in two languages, and our client have now asked for the languages to be four. "No problem", I thought. "I'll scan that code" (not even 500 lines counting code and tests) "and extend the proper parts to hold the new fields. I'll do it myself so I don't disturb the development team."

It took me about 30 minutes to get the fix done and the tests still were running OK.
So I thought... "Should I write some specific testcase to test this new fields?"

My first answer to myself was "Naaaah... the code is right, I've done it carefully. The existing tests on the matter still pass. Don't be test-obssesed, Jorge!"

But... just for... obssesion, right... I did change some values in the test data to hold some values in the new languages, added some assertions on that new data, and run the tests again.

Some tests (not directly related) started failing miserably when trying to consolidate the contents stored in the new languages.

It took me another 10 minutes to fix and test it.

Now, let's think about Return on Investment...

  • Let's say that I don't write that last test.
  • Let's say thas this code would have passed the integration test (it would indeed, because nobody will care about thoroughly testing french contents beyond "yes, they appear in the proper place").
  • Let's say that, once the code is in production, somebody discover that french contents don't seem to be taken into account when reporting to the management.

How long would it take to fix that bug?

How many man/hours would the whole organization spend to
  1. ...isolate the failure so they understand what's happening,
  2. ...record the bug,
  3. ...send it to the first level support,
  4. ...forward it to the appropiate technical team
  5. ...assign someone to solve it,
  6. ...get it deployed and tested by the concerned agents
  7. ...ask for the code to be released
  8. ...release
?

Now, compare this number to the fifteen minutes it has taken to fix it.

That's the Return on Investment you'll get if automated testing is correctly used in your teams.

Daily.

Now go, tell your friends.


_

Leyendo el resumen de la entrevista a Steve Wozniak... ok, seguro que no tiene la misma capacidad de comunicación que Steve Jobs. Pocos la tienen.

Pero para todo lo que se ha escrito sobre Wozniak y Jobs... no deja de sorprenderme cuánto se parecen el "Stay hungry, stay foolish!" de Jobs y el "Follow your heart" de Wozniak.

"La recompensa está en tu cabeza. Haces lo que quieres hacer. Y la pasión puede ser un incentivo mayor que el dinero."


Así que mejor ser claro. Haz lo que realmente te guste. Punto.

Ya sea cambiar el mundo, escribir, sembrar lechugas, diseñar circuitos o jugar al poker...

El consenso universal sobre la vida dice que, o bien esta es la única vida que tenemos, o bien hay otras que no parecen requerir pasión ni lucha.

En cualquier caso el momento para seguir tu pasión es ahora.


_

Pues eso, que desde hoy, Amazon proporciona almacenamiento persistente a sus instancias de "Elastic Computing Cloud" (EC2).

Y no solo eso, que podría parecer facil dado que ya tienen su "Simple Storage Server" (S3, el guardian de mi musica por ahora), sino que añaden caracteristicas interesantísimas para las empresas como replicación dinámica entre volúmenes que fisicamente residen en distintas zonas geográficas, api para almacenar backups de momentos en el tiempo en S3, ... en fin, que cada vez tengo menos excusas para tocar un cable.

Update: Los precios son en linea con los que tenían hasta ahora:

$0.10 per GB-Month of EBS provisioned storage
$0.10 per 1 million EBS I/O requests

De hecho, estos días estoy usando una imagen de Debian con Oracle para pruebas de integración de un proyecto en curso, y añadirle un disco persistente ha sido tan sencillo como 3 clicks en el interfaz de ElasticFox dentro de mi Firefox.

Y si no conoces ElasticFox... ahí queda una foto:
ElasticFox en mi Firefox

Vale, post eminentemente técnico, no se me pierdan.
Resulta que estoy trabajando contra un Apache 'restringido', y no acepta ProxyPass/ProxyPassReverse.

Y claro, cuando uno quiere presentar varios servidores en un único front... esa es la opción más habitual... al menos hasta donde yo se.

Así que, anulada esa opción, me he pegado (hacía años!!) contra el Voodoo de mod_rewrite.
Como dice la propia documentación...

`` Despite the tons of examples and docs, mod_rewrite is voodoo. Damned cool voodoo, but still voodoo. ''
-- Brian Moore
bem@news.cmc.net
Pero combinandolo con un precioso script James Marshall de nombre CGIProxy, resulta que no hay más. Sacabó. Hecho. Fácil.

Instalar el cgi nph-proxy.cgi (ni siquiera he tenido que reconfigurarlo!) y este es el contenido del .htaccess del subdominio....

RewriteEngine On
RewriteCond %{REQUEST_URI} !^/cgi-bin/!*
RewriteRule ^(.*)$ /cgi-bin/nph-proxy.cgi/000000A/http/www.nasa.gov:8383/$1


...por el que toda petición a dicho subdominio será respondidad por el servidor intranet.nasa.gov del puerto 8383 sin que el cliente lo note.

A disfrutar!!



Update: Sí, sí... no es *necesario* configurarla... pero he añadido www.nasa.gov como único valor en @ALLOWED_SERVERS para evitar que se use como navegador anónimo por algún listillo...

_

Jajajajaja... haciendo una nueva imagen de EC2 para un proyecto me acabo de encontrar con este mensaje...

[...]
/mnt/gailenora
/mnt/img-mnt
1+0 records in
1+0 records out
1048576 bytes (1.0 MB) copied, 0.00264 s, 397 MB/s
mke2fs 1.40.4 (31-Dec-2007)
NOTE: rsync with preservation of extended file attributes failed. Retrying rsync
without attempting to preserve extended file attributes...
NOTE: rsync seemed successful but exited with error code 23.
This probably means
that your version of rsync was built against a kernel with HAVE_LUTIMES defined, although the current kernel was not built with this option enabled.
The bundling
process will thus ignore the error and continue bundling.
If bundling completes
successfully, your image should be perfectly usable.
We, however, recommend that
you install a version of rsync that handles this situation more elegantly.
/etc/fstab:
# Legacy /etc/fstab
# Supplied by: ec2-ami-tools-1.3-20041
/dev/sda1 / ext3 defaults 1 1
/dev/sda2 /mnt ext3 defaults 0 0
[...]


No es que no sea claro. Es claro (aunque verboso).
No es que yo sea "el típico usuario final". Me considero un aceptable conocedor de las entrañas de los sistemas operativos en general... pero...

Si este mensaje lo diera un cuadro de diálogo de Windows sería portada en todos los foros antimicrosoft del universo...

"En algún lugar entre el proveedor de almacenamiento, la infraestructura de red, el data center y la capa de abstracción de software, reside el culpable de todo este desastre. Y el hecho de que cada provedor culpe a otro añade más diversión"

"El CEO de Linkup dice que al menos el 55 por ciento de los datos estaban a salvo"


Más aquí

_



http://www.youtube.com/watch?v=gsXnK0ouTL8

En fin...

_