rss planet warp

January 18, 2010

Spotify is the new Napster  Koke

I was searching for a solution to a small Spotify bug and found this user praise: Spotify is what napster was for ten years ago.

Then another user replied:

how do you mean?

ten years ago Napster was an illegal channel for sharing and downloading music, built p2p.

are you ironic and i missed the punchline?

Fair enough. But still this guy had a point. Spotify is not the same thing as Napster, but another milestone in the Music Industry transformation.

Napster started a revolution. I’m not talking about piracy, I’m talking about spreading the message that the current formats were obsolete and people had different musical needs. The success of the iTunes Store is a good proof of that.

Spotify, as I see it, is the beginning of the end of that revolution. Say goodbye to useless CDs and DVDs. Goodbye to paying for an album with a couple of good songs and crap for filling.

The next logical step would be a Spotify for video.

The only thing I’ve seen coming from the (music and movie) industry in the last 10 years has been the message that piracy was illegal, and immoral, and that it would kill the music and movies. Maybe they have a point, maybe not.

Recently, they’ve been trying to ban download sites in Spain. What then? Without P2P:

I found a quote yesterday that summed it up pretty well:

“People don’t go out of their way to pirate movies and TV programs; they’re not intrinsically bad people. They do it because often it’s quicker and easier than legitimate means. The quicker the film and TV industries recognise this and make it as easy to buy legal content as it is to download illegitimate content, the more likely they are to stem the flow.”

But I believe if they shut up for a minute and listen, they’d realize there’s people willing to pay, but they are not selling to them.

Related posts

Datos y no especulaciones  Dani

El día 5 de Enero (como regalo de la noche de Reyes, dirán algunos), Google presentó su propio terminal Android: Nexus One. Este móvil se lanzó con su propia versión de la plataforma Android, la 2.1.

Durante estos días se ha especulado sobre la cantidad de terminales vendidos (~20.000) en los primeros días, pero no se sabe a ciencia cierta cual es la cuota real de estos terminales o lo que han supuesto sobre el total del mercado.

Aparte, Google lanzó como recurso de programación el Android Dashboard, una página que muestra cual es la cuota del mercado Android, diferenciado por versiones del SDK. Los cálculos se realizan desde quince días antes de la fecha indicada, y muestra un sencillo gráfico para que los programadores calculen si les interesa o no soportar determinada plataforma.

Vista actual del Android Dashboard

Hoy muestra como fecha final de análisis, la del día anterior a la presentación de Nexus One, lo que quiere decir que pronto crecerá el sector de la plataforma 2.1, y veremos cuál es el impacto real de este pequeño aparatito.

January 14, 2010

Android no significa “garantía de éxito” (II)  Dani

Ha pasado algo más de un mes desde el último post. No quería que hubiera pasado tanto, pero ha sido un mes Android bastante interesante. Han salidos nuevos dispositivos, aplicaciones interesantes, juegos divertidísimos, pero como se quedó colgando en el post anterior: “Android no significa garantía de éxito”.

El por qué tiene un nombre propio: Samsung Galaxy. Cualquiera que vea las prestaciones del aparato puede quedarse bastante impresionado: buena cámara, buenísima pantalla, batería de gran duración… pero, ¿y qué tal se comporta Android? ¿qué tal está integrado? ¿cómo es que no tiene esa serigrafía que dice “with Google”?

Bien, empecemos con un poco de historia. Este terminal fue puesto a la venta (aproximadamente) en Julio de 2008. Quizá muchos usuarios no tenían muy claro entonces de lo que era aquello de “with Google” pero la explicación es sencilla: ” ‘with Google’ marca aquellos dispositivos desarrollados conjuntamente con Google, y los cuales dispondrán de actualizaciones OTA”. OTA significa ‘over-the-air’ y quiere decir que estos móviles pueden actualizarse descargandose un archivo dentro del móvil y reiniciando. Fin de complicaciones.

¿Y si no tienes un móvil ‘with Google’? Pues entonces pasará como con Samsung Galaxy, que has de disponer de un paquete de software provisto por el fabricante que te permitirá actualizar tu terminal. Aquí empieza el calvario de Galaxy. El software provisto por Samsung:

Aunque la aplicación para actualizar el teléfono, no funcione porque no lo soporta, Samsung ha ido colgando firmwares en su web durante meses. Y la gente los ha usado… pero para ello han tenido que fabricarse una herramienta que pudiera “inyectar” las actualizaciones (más que necesarias) al teléfono.

Actualizar un buen móvil puede ser una tarea casi innecesaria, puede pensar cualquiera, pero Galaxy habrá tenido entre 7 y 10 firmwares distintos. Con éxitos y fracasos a partes bastante desiguales. En uno de los más sonados firmwares rotos, la fantástica batería que en reposo debería durar 450 horas, duraba 4 aproximadamente. Una centena de veces menos que lo que afirmaba el fabricante! Para asustarse…

Pero esto fue un suma y sigue:

¿Ocurre todo esto en los terminales de HTC? Pues no lo sé ciertamente, pero lo dudo, porque se han desarrollado ‘with Google’ ;-)

Mirando las tripas que corren dentro del móvil, también se pueden observar procesos extras. Por ejemplo está el que ayuda a la comunicación con la suite de la que antes hablábamos… que lógicamente no funciona, por lo que sólo sirve para gastar batería del terminal. O buscando por las trazas del sistema, puedes encontrar “explosiones” de demonios del sistema operativo, o incluso de la capa de telefonía.

Si no supiéramos que es Android, y fuera un firmware X desarrollado por el fabricante, este terminal no tendría más de un 2 sobre 10 en su calificación. Y es lo que tienen las cosas a medio hacer, que por muy buen hardware y software base que exista detrás, si no hay una cuidadosa labor de integración entre ambas partes, no sirve de nada.

Por suerte, las cosas cambiaron hace muy pocas semanas con la aparición de dos nuevos firmwares (abreviados como IK4 e IK5) que resuelven el 90% de los problemas… pero segun los rumores que corren, Galaxy no tendrá actualizaciones posteriores a Android 1.5, cuando la mayoría del resto de terminales si.

Por tanto, por mucho Android que se pueda disfrutar, queda un sabor bastante descafeinado y muy lejos de ser un terminal “de éxito”. Aunque de todas formas, no tiene por qué ser todo tan malo en el mundo de Android si uno no va de la mano de Google, ¿no?

January 11, 2010

Practical Reporting with Ruby and Rails  Blaxter

practical reporting with ruby and railsPractical Reporting with Ruby and Rails es un libro escrito por David Berube sobre reporting con la ayuda de ruby. Se compone de varios capítulos que van desde generar un gráfico con gruff, generar xml/csv/pdf, importaciones desde feeds, hojas de cálculo o Microsoft Office. Todo esto suena bastante bien, pero es el propio carácter del libro, practical, que hace que pierda bastante puntos por su simpleza y falta de profundidad a la hora de tocar los distintos temas.

Es un libro realmente bueno si lo lees con las expectativas apropiadas, y puede llegar a ser un auténtico fiasco en otros casos. En mi particular caso fue el último escenario.

Ya es la segunda vez que me pasa con libros de esta editorial, Apress. Son libros bien escritos, tratando muchos temas, pero con un nivel bastante bajo en cuanto a profundidad de conceptos y nivel requerido. Esto no es malo, por supuesto, simplemente es algo a tener en cuenta para saber si es un libro que te reportará algún beneficio y satisfacción.

Cada capítulo suele seguir la siguiente estructura: (1) Puesta en contexto del problema a resolver, (2) introducción de herramientas a usar, (3) trozo de código, (4) explicación del código. Donde las dos últimas partes suelen ser prácticamente la totalidad del capítulo. El código suele ser bastante simple y sencillo de entender, pero a pesar de ello tendremos luego un considerable número de páginas para explicar obviedades para cualquiera que haya programado mínimamente en ruby o en reporting en general. Si a esto añadimos que el libro no es muy extenso en páginas (280 aprox.) tenemos que se podría resumir el libro en un listado de referencias a herramientas usadas y 5 o 6 snippets de código interesantes de no más de 200 líneas.

De todas formas, para alguien que esté interesado en estos temas (reporting) y que no tenga mucha experiencia (en reporting, en ruby o en ambos), es un libro bastante bueno, bien redactado, bien explicado (demasiado) y de rápida lectura. En otros casos no lo recomendaría, y personalmente no me ha gustado mucho que digamos.

Formación JAVA y MySQL en Zaragoza. Calendario 2010.  Warp Networks

Os informamos de los cursos públicos JAVA y MySQL, que se van a impartir en el primer semestre de 2010, en Zaragoza.

Warp Networks como partner oficial de Sun Microsystems, imparte formación certificada MySQL y JAVA.

También puede proveer a los interesados de vouchers para certificaciones Sun.

FORMACIÓN JAVA EN ZARAGOZA:

FORMACIÓN MYSQL EN ZARAGOZA:

INSCRIPCIONES E INFORMACION: training@warp.es

January 06, 2010

My 2009 in pictures  Koke

Looking back at 2009, it seems I haven’t been taking so many pictures as I did in 2008, but I see more variety. Here are some of those, some I feel proud of, some bring some good memories and some just make me smile

Most Commented Posts

December 20, 2009

boost::asio, synchronous read with timeout  Blaxter

The boost::asio (which means asynchronous input/output) library, is quite powerful library for asynchronous i/o, but it could be a bit difficult at first to figure out how to do a normal synchronous read. So, as a reminder for my future-me, and for you, this snippet it'll be very useful to accomplish that. Probably there will be another ways for doing that, but this is how I managed to do it:

using namespace boost::asio;
using namespace boost::system;
using boost::optional;
 
ip::tcp::socket _socket; // it could be another kind of socket, not only ip::tcp
 
/**
 * Dumb function to be used as handler argument and save the error_code
 * into a pointer
 *
 * e.g.: boost::bind( &set_result, some_pointer, _1 )
 */
void set_result( optional<error_code>* a, error_code b )
{
  a->reset( b );
}
 
#define TIMEOUT 60
/**
 * it uses _socket
 * if timeout happends throw a system_error exception
 */
template<typename MutableBufferSequence>
optional<error_code> read_with_timeout(
    const MutableBufferSequence& buffer
  ) throw( system_error )
{
  optional<error_code> timer_result;
  optional<error_code> read_result;
 
  deadline_timer timer( _socket.io_service() );
 
  timer.expires_from_now( seconds(TIMEOUT) );
  timer.async_wait( boost::bind(&set_result, &timer_result, _1) );
 
  boost::asio::async_read(
      _socket,
      buffer,
      boost::asio::transfer_at_least( buffer_size_helper(buffer) ),
      boost::bind( &set_result, &read_result, _1 )
    );
 
  _socket.io_service().reset();
 
  while ( _socket.io_service().run_one() )
  {
    if ( read_result )
    {
      timer.cancel();
    }
    else if ( timer_result )
    {
      _socket.cancel();
      throw system_error(
          error_code( errc::timed_out, get_generic_category() )
        );
    }
  }
  return read_result;
}
 

I hope it will be useful, have fun.

December 09, 2009

Probando la fotografía réflex digital  Jorge

Ya me he decidido a aprender un poco más en serio sobre fotografía, y para hacerlo… empezaré a usar la cámara que me han regalado hace poco, una Nikon D90.

Estas son las primeras fotos que hice en modo automático, sin complicaciones vamos:

Powered by Flickr Gallery

December 07, 2009

Android no significa “garantía de éxito” (I)  Dani

Hablar de Android hoy en día ya no resulta raro para casi nadie. Hace dos años y un mes, Google desveló el proyecto en el que estaban trabajando desde hacía ya tiempo: un sistema operativo para móviles basado en GNU/Linux. Ya entonces, y antes de que apareciera ningún dispositivo móvil liberaron un juego de bibliotecas y una extensa documentación para el desarrollo de aplicaciones. Desde entonces y hasta casi un año después, cuando apareció el HTC Dream (el primer terminal Android), la gente ya había podido comenzar a desarrollar aplicaciones.

¿Cuál fue la mayor consecuencia de una acción así? Sencillo, facilitar el desarrollo de aplicaciones significó que los primeros terminales que salieron al mercado ya podían disponer de un gran número de aplicaciones.

Además del anuncio con el que comenzaba toda esta historia, se le dio la puntilla al proyecto: “La mayor parte de Android será un proyecto liberado bajo la licencia Apache 2.0″. Fantástico. Sencillamente, era díficil pedir más. Y comenzaron a dedicar recursos. Un sitio, un repositorio, listas de correo, etc.

En las listas de correo se pueden encontrar fácilmente las respuestas de ingenieros de Google. Uno de los que tienen más dedicación (por ser exactamente este su trabajo) es Jean Baptiste Queru, quien aguanta todas las preguntas que tiene la comunidad, y encima trabaja de sol a sol por que todo el mundo pueda construir la versión deseada de Android. Su trabajo es admirable. Otra de sus grandes tareas es mantener una sincronía entre los repositorios de Android; ya que existen dos repositorios: los internos, sobre los que trabaja Google, y los externos, para la comunidad. Tanto los arreglos que la comunidad envía al proyecto, como las nuevas características desarrolladas, son transferidas de un repositorio a otro por él. También existen rumores de la fusión entre ambos repositorios, aunque parece difícil que ocurra, y más cuando (por poner un ejemplo) la publicación del código de Android 2.0 se hizo solo dos semanas más tarde de la presentación oficial.

Aparte de todo este esfuerzo para la comunidad, Google también (es obvio) tiene sus acuerdos/contratos con los fabricantes para poder desarrollar terminales que funcionen impecablemente con este sistema operativo.

Resumiendo un poco algunos de los detalles del proyecto, tenemos:

Pero, si tenemos todo este material en nuestras manos, y todo parece tan perfecto, ¿por qué no es “garantía de éxito”?

December 02, 2009

Mostrar iconos en los botones y menús de gnome  Blaxter

En la última versión de gnome, han decidido poner por defecto que no salgan iconos ni en los botones, ni en los menús. Hasta ahora, tenías iconos en todos lados, esto implicaba que los botones eran siempre más grandes de los normal (por incluir dentro de ellos el icono pertinente) lo que hacia que en general, en gnome, las cosas fuesen como más grandes. Con este cambio los layouts van a ser más compactos, aunque también más rancios y menos usuables, IMHO.

No me gusta nada este cambio, más vale una imagen que mil palabras, teniendo iconos vas más rápido porque los reconoces y no necesitas leer cosas, aparte que uno de los aspectos que más me gusta de gnome es esa sensación de que todo es grandote :) . Al menos volver a tenerlos es tarea simple, activa /desktop/gnome/interface/buttons_have_icons y /desktop/gnome/interface/menus_have_icons en el editor de configuración de gnome y ya los tendrás.

$ gconftool-2 --type bool --set /desktop/gnome/interface/buttons_have_icons true
$ gconftool-2 --type bool --set /desktop/gnome/interface/menus_have_icons true

December 01, 2009

How we track outbound links with Google Analytics Events API  Koke

eBox Platform homepage

Since the redesign of eBox platform, our bounce rate increased dramatically. After a short investigation, it made sense: our new website was just the homepage and news, and the rest of the content was on different domains (trac, eBox Technologies, …).

So our bounces were either real bounces, or people visiting our other sites (which I wouldn’t count as bounces).

My solution: track outgoing links.

I searched for a solution and found this article, but it wasn’t exactly what I wanted.

It’s a good first approach, but tracking external links as pageviews makes the analytics reports more confusing. Events Tracking API to the rescue! This API was conceived to track actions that don’t match a page view, like video plays and other application interactions.

So, with events we could track our exits separately, get the information we need, and get a more accurate Bounce rate.

The extra code:

The original article used rel="external" to mark the links to track. There is an easiest way: searching for absolute URLS in the href attribute. Also, I’m using the action parameter to differentiate between internal (our other websites) and external (facebook, twitter,…) links.

What we are tracking, and will be able to see on the Analytics reports is:

Warning: your bounce rate will probably drop by tracking events. For us, it reflects our visits more accurately, but that might not be your case.

This is what google has to say on bounce rate impact:

In general, a “bounce” is described as a single-page visit to your site. In Analytics, a bounce is calculated specifically as a session that triggers only a single GIF request, such as when a user comes to a single page on your website and then exits without causing any other request to the Analytics server for that session. However, if you implement Event Tracking for your site, you might notice a change in bounce rate metrics for those pages where Event Tracking is present. This is because Event Tracking, like page tracking is classified as an interaction request.

For example, suppose you have a page with a video player where the bounce rate is historically high, and you have not implemented Event Tracking for the page. If you subsequently set up Event Tracking for the player, you might notice a decrease in the bounce rate for that page, because Analytics will record user interaction with the player and send that interaction to the server as an additional GIF request. Thus, even though the same percentage of visitors to the page might still exit without viewing any other page on your site, their interaction with the video player triggers Event Tracking calls, which disqualifies their visit as a bounce.

In this way, “bounces” for your event-enabled pages means something slightly different: a single-page visit that includes no user interaction on tracked events.

Related posts

November 29, 2009

Is it… me?  Hector

I have completed BBC’s The Big Personality Test.

You just need to create an account, and after answering some questions, you will get your Big Five personality traits, with your scores for Openness, Conscientiousness, Extroversion, Agreeableness and Extroversion.

These are my results:

Openness

You scored 4.5 out of 5 for Openness

You scored high on Openness.

This trait is sometimes known as ‘Openness to experience’. People with scores like yours tend to be imaginative and curious about a wide range of things, from appreciating different art forms to exploring new places, cultures and foods.

Generating lots of imaginative ideas probably comes very easily to you. However, it’s likely that you are prone to daydreaming too.

Innovators, investigators and creators often score highly on this trait. It has also been suggested that Openness is related to a person’s likelihood to hold unusual beliefs. Do you enjoy the odd conspiracy

Conscientiousness

You scored 4.2 out of 5 for Conscientiousness

You scored high on Conscientiousness.

Conscientiousness describes how dependable, organised and hard-working a person is likely to be. This may be the reason why, of all the personality traits, Conscientiousness is the most consistent indicator of job success. People with scores like yours tend to be extremely dependable and organised. It’s likely that your life is well-planned and you approach things in a thorough manner.

At work, you probably approach tasks methodically and thoroughly, with everything in its right place.

Some studies have shown the more Conscientious an individual is, the more disciplined they are likely to be about exercise and diet.

Extroversion

You scored 3.1 out of 5 for Extroversion

You scored medium on Extroversion.

Extroversion is characterised by positive emotions and the tendency to seek out pleasure-stimulating or risk-taking activities. People with scores like yours are likely to be comfortable meeting new people and will usually enjoy social occasions.

You are likely to have a generally positive outlook on life and may display a greater gift for leadership compared to those with low scores on this trait.

People with high Extroversion are more likely to lead risky lifestyles and take greater risks in pursuit of rewards. Health studies have shown they are more likely to smoke and less likely to get enough sleep than people who score less highly on this trait.

Agreeableness

You scored 4 out of 5 for Agreeableness

You scored high on Agreeableness.

Agreeableness measures how sympathetic and considerate a person is likely to be. People with scores like yours are likely to find it very easy to get along with other people. You probably find that you are sensitive to the feelings of others and that people find it easy to warm to you.

As a ‘people person’ you will probably be very comfortable in situations that require teamwork.

Neuroticism

You scored 3.9 out of 5 for Neuroticism

You scored high on Neuroticism.

In the context of the Big Five personality traits, the term ‘Neuroticism’ relates to a person’s response to threatening or stressful situations. People with scores like yours may find that they often feel tense or anxious, and may well experience changeable moods.

Some scientists have suggested that Neuroticism was beneficial in evolutionary terms. Early man may have found it advantageous to live in a population where certain individuals had a high sensitivity to threats to the group’s survival.

There is evidence to suggest that Neuroticism, when combined with high scores in personality traits such as Conscientiousness, can result in a powerful work ethic and a will to succeed.

Mostrar notificaciones emergentes desde la consola  Blaxter

A veces es útil mostrar algún tipo de notificación gráfica para informarte, por ejemplo, de cuándo se ha terminado una tarea. Las notificaciones emergentes de Ubuntu, añadidas hace un par de versiones, son una muy buena opción.

Dos opciones, (1) instalarnos esta librería de perl libnet-dbus-perl, y nos ponemos esta función en nuestro ~/.bashrc

function notify()
{
    perl -e "use Net::DBus; my \$sessionBus = Net::DBus->session; my \$notificat
ionsService = \$sessionBus->get_service('org.freedesktop.Notifications'); my \$n
otificationsObject = \$notificationsService->get_object('/org/freedesktop/Notifi
cations', 'org.freedesktop.Notifications'); my \$notificationId; \$notificationI
d = \$notificationsObject->Notify(shift, 0, '', '$1', '$2', [], {}, -1);"
}
$ notify foooooooo baaarrr

notify

El primer parámetro es el título y el segundo el contenido.

Otra forma (2) todavía más fácil es instalarnos el paquete libnotify-bin, el cual contiene el binario notify-send que hace justamente esto. Probablemente la primera solución nos servirá para cualquier distro, mientras que la segunda solo en debian, ubuntu y derivados. Ambas funcionan exactamente igual y sin problemas.

November 27, 2009

Redesigning eBox homepage  Koke

It’s been 3 weeks since we launched the new eBox Platform homepage, and I wanted to share the different steps through the redesign.

Do you like the new design?

Do you like any of the previous steps better?

Do you have any suggestions?

Related posts

November 23, 2009

How to know, in ruby, which methods have been added and by whom?  Blaxter

If you are not very careful, monkeypatching could be very harmful. One thing to remember is that you should never override a method to add funcionality, for those kind of thinks you must use alias chain method pattern, a safer way of doing that.

For the rest of the monkeypatching, i.e. add new methods, you could debug them really easy with something like this:

class Class
   def method_added(method_name)
      puts "#{method_name} added to #{self}, callstack:"
      puts caller.map{|line| "\t#{line}" }.join("\n")
   end
end

You can always add more code to filter by class or by method's name. Let's see an example:

$ more example.rb
require 'date'
require 'time'
 
class Class
   def method_added(method_name)
      return if %w(method_added).include? method_name.to_s
      puts "#{method_name} added to #{self}, callstack:"
      puts caller.map{|line| "\t#{line}" }.join("\n")
   end
end
 
class Time
   def to_date
      Date.ordinal self.year, self.yday
   end
end
 
class Date
   def to_time
      Time.parse self.to_s
   end
end
 
raise "to_date not working" unless
   Time.now.to_date == Date.today
raise "to time not working" unless
   Time.now.to_date.to_time == Date.today.to_time

The output will be:

$ ruby example.rb
to_date added to Time, callstack:
	example.rb:13
to_time added to Date, callstack:
	example.rb:19

Nice, isn't it?. Remember to be carefull with your monkeypatching, with great power comes great responsibility, it's just a tool, neither magic nor the panacea.

November 21, 2009

Comandos Windows para linuxeros: kill -9, ps, route, servicios  Blaxter

Si por cuestiones del destino tienes la mala suerte de tener que lidiar con este sistema operativo, he aquí unas pequeñas ayudas para típicas tareas a realizar, traduciendo desde comandos *nix.

Espero que nunca tengas que usarlos, por el bien de tu salud mental. Si llega a ser el caso, y no hay forma de salir del atolladero sin matar gente, te recomiendo usar alguna que otra ayuda en este hostil, adverso y aciago entorno.

Hola qué tal  Blaxter

Cuando no apetece escribir, simplemente no apetece escribir, qué le vamos a hacer. Después de mucho tiempo creo que toca ya volver a dar mal por estos lares. Van ya cerca de 5 años con el blog, y aunque últimamente las redes sociales y el microblogging han quitado muchos usuarios a los blogs (posiblemente todos aquellos que creaban un blog y a los cuatro post lo dejaban abandonado), a la blogosfera la veo mejor que nunca.

De nuevo, como otras muchas veces, tengo el dilema sobre qué idioma elegir, español o inglés. Mientras que con el primero puedo conseguir, a veces, no cometer faltas ortográficas y crear frases coherentes y comprensibles por otros seres humanos, el segundo, por suerte o desgracia, es el idioma neutral y empleado principalmente en esto del interné, nuevas tecnologías y especialmente en el desarrollo de software. Posiblemente iré decidiéndolo post a post, intercalando, para dar emoción al asunto.

Y tú, ¿has dejado de escribir en tu blog? Él no lo haría.

November 18, 2009

Fixing Snow Leopard ruby readline  Koke

Building ruby readline

Since I upgraded to Snow Leopard I’ve been missing readline whe using irb. As I discovered in this article, this is due to apple’s ruby linking to libedit instead of libreadline. I didn’t have that problem before the upgrade since I had compiled ruby myself.

This time, I was looking for another solution. I could have compiled ruby with readline support, but then probably I’d had to reinstall some gems too. So I present you the quick way to fix your readline

Step 0: Setup temp dir

mkdir -p /tmp/rlruby
cd /tmp/rlruby
sudo -s

Step 1: Install readline

curl -O ftp://ftp.cwru.edu/pub/bash/readline-6.0.tar.gz
tar xvf readline-6.0.tar.gz
cd readline-6.0
./configure && make && make install
cd ..

Step 2: Get ruby source

To keep the complications to a minimum, I downloaded ruby from apple (check 10.6.2 open source, or other releases). The current patchlevel is ruby-75 so fetch that one:

curl -O http://www.opensource.apple.com/tarballs/ruby/ruby-75.tar.gz
tar xvf ruby-75.tar.gz
cd ruby-75

Step 4: Build readline extension

We don’t need to build all ruby, just the readline extension

cd ruby/ext/readline/
ruby extconf.rb
make

At this point, you’ll probably get the following error:

readline.c: In function ‘username_completion_proc_call’:
readline.c:730: error: ‘username_completion_function’ undeclared (first use in this function)
readline.c:730: error: (Each undeclared identifier is reported only once
readline.c:730: error: for each function it appears in.)
readline.c: In function ‘username_completion_proc_call’:
readline.c:730: error: ‘username_completion_function’ undeclared (first use in this function)
readline.c:730: error: (Each undeclared identifier is reported only once
readline.c:730: error: for each function it appears in.)
lipo: can't open input file: /var/folders/s4/s4qO7oueE3ijABAH7qB6Dk+++TI/-Tmp-//ccW5lOLL.out (No such file or directory)
make: *** [readline.o] Error 1

We need to tell gcc that our readline is in /usr/local

make readline.o CFLAGS='-I/usr/local/include -DHAVE_RL_USERNAME_COMPLETION_FUNCTION'
cc -arch i386 -arch x86_64 -pipe -bundle -undefined dynamic_lookup -o readline.bundle readline.o -L/usr/local/lib -L/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib -L. -arch i386 -arch x86_64 -lruby -lreadline -lncurses -lpthread -ldl

To be sure we are using the real readline run otool and make sure libedit doesn’t appear on the results:

$ otool -L readline.bundle
readline.bundle:
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/libruby.1.dylib (compatibility version 1.8.0, current version 1.8.7)
/usr/lib/libncurses.5.4.dylib (compatibility version 5.4.0, current version 5.4.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.0.0)

Step 5: Replace readline.bundle

cd /System/Library/Frameworks/Ruby.framework/Versions/Current/usr/lib/ruby/1.8/universal-darwin10.0/
mv readline.bundle readline.bundle.libedit
cp /tmp/rlruby/ruby-75/ruby/ext/readline/readline.bundle readline.bundle

Now launch irb and check if all your favorite shortcuts are in place

Most Commented Posts

November 10, 2009

Sick of getting your wordpress hacked? (contest below)  Koke

Crashed again

I sure am. After a proper installation/configuration, the most important factor is to always stay updated to the last version. I’m managing at this time 8 or more blogs/websites running different versions of WordPress and it’s hard to keep them up to date.

Automatic upgrades help, although they still terrify me after the 2.8 crash.

The problem is, some of these blogs are set up for friends or old projects, and I forgot to frequently check if they are using the latest version. Most of the times, they become crammed with spam, and eventually trigger google’s malware detectors. Most of the times I notice the hack because of firefox malware warning.

So I started a side project to help me keep track of all those blogs and their versions, and it’s seems is close to see the light. This is how it looks right now:

beta screenshot

I will need testing, so if you want to participate in the beta, fill the signup form, and I’ll send some invitations.

Also, I’m looking for a nice name for the thing. If you have a good idea, put it in the ‘Proposed name’ field on the signup form. The winner(*) will get the first beta invitation and free full access to the product for 1 year after it launches. Make sure a .com domain is available for the name you propose or it won’t have many chances.

(*) There will be only 1 winner: the first person to propose the chosen product name. Simple rules, but… without rules we are nothing but savages.

Related posts

November 08, 2009

Discovr: a flickr experiment gone wrong  Koke

I need help with this. I had a dream… Well, not so much as a dream, maybe a “It’d be cool to…”

I thought it’d be nice to discover new photos on flickr using your favorite photos and the people who also favorited those photos, and the favorite photos of those who also favorited my pictures. Still with me?

It’s actually a quite simple code (about 500 lines, check it on github: discovr), but it’s terribly slow. Some possible reasons:

The simplified algorithm goes like this.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
  # method from class User
  def similar_pictures
    similar = {}
 
    favorites.each do |favorite|
      favorite.favorited_by.each do |user|
        user.favorites.each do |v|
          similar[k] ||= {:weight => 0, :picture => v[:picture]}
          similar[k][:weight] += 1
        end
      end
    end
 
    similar.values.sort {|a,b| b[:weight] <=> a[:weight]}.select {|v| v[:weight] > 1}
  end

So I’ve created a github repository and uploaded the code: discovr at github. Feel free to clone, test and improve

Related posts

November 04, 2009

Cómo me quedé sin teléfono (VIII)  Golo

Este verano estuve un par de semanas sin teléfono, por culpa de una portabilidad. Partes I, II, III, IV, V, VI, y VII

Mi Terminal

Por un fallo del distribuidor en mi última portabilidad, tengo un compromiso de permanencia. Esta experiencia me ha servido para darme cuenta del chollo que suponen los distribuidores para la operadora.

Si el distribuidor comete un fallo, la operadora alega que yo no he firmado el contrato con ellos, y el distribuidor alega que el operador no le ayuda con el problema. En definitiva, entre unos y otros el cliente se come los mocos.

Justo después de que este distribuidor intente darme largas, paso por el distribuidor de un amigo, donde sí tienen el terminal que yo quería con mi primera portabilidad.

Con el calentón no me lo pienso Así que inicio la portabilidad, y sin problemas, en una semana… ¡¡¡Lo tengo!!! ¡¡¡eoeooeoeoeeo!!!

Y todavía no me lo acabo de creer :) .

Eso sí, me costará entrar en la lista de morosos por no pagar un compromiso de permanencia que no tengo que pagar. Y reclamaciones, juicios y lo que haga falta para volver a salir… pero… ¡¡¡Lo tengo!!!

November 03, 2009

Cómo me quedé sin teléfono (VII)  Golo

Este verano estuve un par de semanas sin teléfono, por culpa de una portabilidad. Partes I, II, III, IV, V, y VI

Estoy sin contrato ni compromiso de permanencia, huyo de mi distribuidor.

Compromiso de Permanencia

El plan es, vuelvo a mi operador anterior, con el terminal que ya tengo, y como si nada hubiera pasado. Eso sí, vuelvo sin compromiso de permanencia, que ya me canso de que me tengan agarrao.

Todo es tan bonito… hasta que la comercial se equivoca al hacer los papeles, y me pone permanencia de 18 meses.

– Oye perdona, habíamos quedado que si no me llevo terminal, no tenía compromiso de permanencia…

– ¡Ay!, Sí, perdona, vaya, ahora no me deja cambiarlo el sistema, lo cambiamos en el contrato, vuelve la semana que viene y lo cambiamos por teléfono en el sistema.

La semana siguiente estoy de vacaciones. Me paso cuando puedo, pero la chica está de vacaciones. “Vuelve la semana que viene”. Tengo mudanzas por medio, estoy un poco liado, me paso un par de meses después. “Es que la chica ya no trabaja aquí, te digo donde trabaja y te pasas.”

Y hasta ahí aguanto. Yo hice el contrato con el distribuidor, no con una comercial. “Veremos a ver si podemos hacer algo desde aquí.”

Pues más les vale, porque en mi copia del contrato dice que no tengo compromiso de permanencia.

November 02, 2009

Cómo me quedé sin teléfono (VI)  Golo

Este verano estuve un par de semanas sin teléfono, por culpa de una portabilidad. Partes I, II, III, IV, y V

En una hoja de reclamaciones el distribuidor se compromete a darme el terminal solicitado en cuanto tenga existencias. ¿Será verdad?

Camino de vuelta

Desgraciadamente, para contratos de empresa, el procedimiento de reclamación se realiza vía burofax. Mi hoja de reclamaciones no sirve para nada :( .

El distribuidor se pone en contacto conmigo para indicarme que si no me llevo un teléfono antes de final de mes, darán de baja mi número de teléfono.

Después de varias quejas en todos los medios de atención al cliente del operador, y llamadas casi diarias al distribuidor (que ya empezaba a cansarse de mí), el distribuidor accede a cancelarme el contrato. Eso sí, manteniéndome el número sin compromiso de permanencia, para que pueda portar a otro operador.

Así que acudo a un distribuidor de mi viejo operador para realizar otra portabilidad, la segunda en un mes.

November 01, 2009

Cómo me quedé sin teléfono (V)  Golo

Este verano estuve un par de semanas sin teléfono, por culpa de una portabilidad. Partes I, II, III, y IV

Me intentaron vender un teléfono que yo no quería sin permitirme cambiarlo. Me dieron tres precios diferentes para el mismo terminal… toca reclamar.

Reclamaciones

Es el momento de ponerse en contacto con la companía de telecomunicaciones.

Puesto que el proceso de portabilidad se ha realizado a través de un distribuidor, desde el operador no “pueden” hacer nada. Saber eso, me cuesta dos horas y cinco llamadas.

En el distribuidor me prometen ponerse en contacto conmigo al día siguiente para solucionar mi problema.

Al día siguiente me quedo sin teléfono, el proceso de portabilidad ha finalizado.

Después de mucho pelearme con el servicio telefónico consigo sacarles que el distribuidor puede cambiarme el teléfono. Respuesta del distribuidor: “Entonces pierdo 500 euros”…

Resulta que el distribuidor ha cometido un fallo, y en vez de solucionarlo humildemente, me pone más problemas para que me acojone y deje de quejarme.

El distribuidor al final accede a realizar el cambio, pero no puede asegurar cuándo recibirá terminales. Los dos terminales que tenían ya los han repartido a otros clientes.

Por si acaso, me llevo escrito este acuerdo en una hoja de reclamaciones.

October 31, 2009

Cómo me quedé sin teléfono (IV)  Golo

Este verano estuve un par de semanas sin teléfono, por culpa de una portabilidad. Partes I, II, y III

Me prometieron un teléfono que yo creía que era difícil de conseguir, me cambiaron el precio el día antes de ir a recogerlo, y aún así quise seguir adelante con la portabilidad.

El gran día

Y llegó el gran día.

Acudo a la otra tienda del distribuidor a recoger mi terminal. Y… ¡Sorpresa! Allí nadie sabe que me tienen que cambiar el terminal. De hecho…

¡¡¡Mi terminal no se puede cambiar!!!

Si me hubieran avisado antes hubiera cancelado la portabilidad. Ahora no es posible técnicamente, ya que queda demasiado poco para que sea efectiva.

Más preocupante es cuando me dice la dependienta:

“Pero si el teléfono que has pedido no lo tenemos en catálogo…”

Me he quedado sin el teléfono que quería, nadie me había dicho que no lo tenían, y no me ofrecían ninguna solución.¿Podría ser peor? Sí.

En la tienda disponen de dos terminales como el que solicité, pero en otro color. Pregunto por ellos.

“Pero ese terminal no es gratis, tienes que abonar 99€.”

Tercer cambio de precio en tres días. ¿Alguien da más?

Continuará… (con final feliz)

October 28, 2009

ANSTE en O’Reilly  Dani

Hoy es un día curioso. Zaragoza se ha despertado bastante gris y oscura, pero sin embargo hay una noticia que alegraría la mañana a cualquiera. Estábamos a la espera de la confirmación y, por fin ha llegado gracias a este post. ANSTE, developed by Warp Networks, como diría cualquier inglés orgulloso de su obra, ya ha aparecido en una publicación de O’Reilly (Oh! Really?). En el libro Beautiful Testing, uno de los capítulos está dedicado a la herramienta GPL de pruebas automatizadas ANSTE. Este sistema se ha utilizado para realizar las pruebas del proyecto eBox Platform (que se lanzó como spin-off de Warp el año pasado), y ahorrar costes de realización de pruebas durante su desarrollo. Gracias a ANSTE, en eBox pueden definir complejos escenarios de red (rutas, reglas del cortafuegos, interacción entre máquinas, etc) y ejecutar varios conjuntos de tests sin necesidad de la acción humana.

En el libro, se relata cuál fue el origen de la idea, la necesidad de tener un proyecto de estas características y una introducción a cómo se pueden realizar los tests, para mostrar toda la potencia de la plataforma. Además, los royalties derivados de la publicación del libro, serán donados al proyecto de la Fundación de Naciones UnidasNothing But Nets“, que envía redes anti-mosquitos a África para prevenir la malaria.

Enhorabuena a todos los autores, pero por supuesto más especialmente a Isaac, quien redactó el capítulo del libro, y a José Antonio, como ilustre y excelentísimo desarrollador de la herramienta ;-) .

ANSTE incluido en el libro Beautiful Testing de O’Reilly  Warp Networks

Estamos orgullosos de anunciar que un ensayo sobre Advanced Network Service Testing Environment (ANSTE) ha sido incluido en el libro de O’Reilly, Beatiful Testing, que será publicado el próximo 30 de octubre. El libro ha sido editado por Tim Riley y Adam Goucher y dispone de 23 ensayos de 27 testers y desarrolladores líderes que ilustran las cualidades y técnicas que hacen del testing un verdadero arte.

La herramienta ANSTE fue desarrollada por Warp Networks para llevar a cabo las pruebas sobre la plataforma eBox . Según Isaac Clerencia desarrollador de tecnologías en eBox y autor del ensayo Testing Network Services in Multimachine Scenarios, “la plataforma eBox es una compleja herramienta que integra una serie de servicios de red independientes, lanzado como un conjunto de módulos también independientes que necesitan ser probados a fondo para evitar regresiones y para verificar el correcto funcionamiento de cada función”.

En cuanto a la motivación del proyecto, Clerencia agrega “después de más de un año desde que comenzamos a desarrollar la plataforma eBox, obtener una nueva versión a punto se había convertido en una lucha por optimizar las pruebas y asegurar la calidad”

De ese reto ha nacido ANSTE, en palabras de José Antonio Calvo -desarrollador de la herramienta y actualmente en el equipo de ebox Technologies-  “como no se pudo encontrar una herramienta de prueba que se adaptara a nuestras necesidades, hemos terminado el desarrollo de nuestra propia suite de pruebas de fuentes abiertas”.

Como resultado, “ANSTE permite definir con facilidad escenarios de redes complejas con múltiples máquinas virtuales, capaz de ejecutar de forma remota el calendario de pruebas de acuerdo a una serie de ensayos pre-definidos que incluyen el command-based y el Selenium-based test y finalmente obtener un informe completo que está disponible a través de una interfaz web “.

“Creemos que ANSTE es una solución muy completa para ejecutar las pruebas en el proceso de desarrollo de software que incluya varias máquinas conectadas a una red”, dijo Isaac Clerencia. “ANSTE ya ha sido utilizado con éxito para poner a prueba MySQL Cluster y pensamos que también podría ser útil para otros proyectos, tales como XMMP o Squid, por ejemplo. Estamos contentos por estar incluidos en Beautiful Testing para dar más visibilidad al proyecto por una buena causa”.

October 26, 2009

Consulta los tiempos de los autobuses de zaragoza desde el iPhone  Koke

Después de experimentar una temporada con el SDK del iPhone, aquí llega mi primera aplicación, con sabor local.

Descarga: iBus

e-book Papyre en las Jornadas Escribit  Warp Networks

Entre el 27 y el 30 de octubre de 2009 tendrá lugar en Zaragoza Escribit, Jornadas sobre Literatura y Nuevas Tecnologías. La iniciativa promovida por la Asociación Aragonesa de Escritores cuenta con el patrocinio de los Departamentos de Ciencia, Tecnología y Universidad y de Educación, Cultura y Deporte del Gobierno de Aragón.

Uno de los temas a tratar en las jornadas serán los nuevos canales y soportes de difusión y la nueva economía de los derechos de explotación on line.

En esta línea se enmarcará el Taller “El libro electrónico, Utilidades del e-book” a cargo de Juan Gónzalez de la Cámara, fundador y director general de Grammata, firma española que comercializa el e-book Papyre, dispositivo sobre el que está trabajando Warp Networks en el desarrollo de nuevas aplicaciones.

La cita para este taller es el 29 de octubre a las 18:00, y al igual que todas las jornadas se desarrollará en la Biblioteca de Aragón en Zaragoza.

October 23, 2009

My day yesterday 2009  Golo

This is an experiment I discovered thanks to my friend eckelon. You have to record one day of your life, create a 90 sec video without editing the sound, and upload it to the facebook group (My Day Yesterday).

So, this was my day yesterday :D

October 19, 2009

Primer curso MySQL Cluster en España  Warp Networks

Nuevo: ¡¡¡Elige cualquier Paquete de certificación ‘Success’ en Java o MySQL (curso + voucher de certificación) y podrá volver a examinarse gratuitamente, en caso de que no apruebe. Promoción sólo hasta el 31 de diciembre!!!

Reserve su curso ahora y obtenga un descuento del 10% + iPod Touch de regalo

El próximo 30 de noviembre se impartirá el primer curso MySQL Cluster, en Zaragoza, a cargo del partner oficial Warp Networks.

MySQL Cluster ofrece tanto la alta disponibilidad como el rendimiento necesarios para aplicaciones de tiempo real. Dada su flexibilidad, MySQL Cluster es ideal también para situaciones que requieran un alto grado de escalabilidad.

El curso, pretende que el alumno conozca los detalles más importantes sobre clustering, necesarios para iniciarse con MySQL Cluster. Cómo configurar adecuadamente y gestionar los nodos del clúster para asegurar alta disponibilidad, instalar los diferentes nodos, y proporcionar un mejor entendimiento de su funcionamiento interno.

Detalles del curso:

Para formalizar su inscripción por favor ponerse en contacto con su partner oficial a través de training@warp.es, o en el teléfono: + 34 976 39 26 44.

(*) Plazas Limitadas.

October 18, 2009

Anabolicse Now  Hector

I love the smell of Chlorine in the morning.

October 17, 2009

Using kdesvn-build with Qt 4.6 git repo  Hector

KDE’s trunk has switched to Qt 4.6 recently, and qt-copy doesn’t seem to be updated, so trying to compile KDE using kdesvn-build-1.9.1 fails.

I downloaded the most recent kdesvn-build (and config file) from KDE’s Subversion, which includes preliminary git support, and tried to build qt-copy using it, but I had some issues with my connection, and after that I started to experience strange problems when running kdesvn-build qt-copy, with messages like:

fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed

So then I changed the repository URL in the config file and cloned the repository by hand…

git clone -- http://git.gitorious.org/+kde-developers/qt/kde-qt.git ~/kdesvn/qt-copy

…and added the repo in the .kdesvn-build-data file in kdesvn-build directory, as the build script does:

  'qt-copy' => {
    . . .
    'git-cloned-repository' => 'http://git.gitorious.org/+kde-developers/qt/kde-qt.git',
    . . .
  },

After that changes, I was able to launch kdesvn-build as usual, and now I’m waiting for everything compiled against Qt 4.6 :)

September 28, 2009

¡Felicidades Warp Networks!  Dani

Hoy hace cinco años un grupo de personas pensaron que la situación empresarial del momento, respecto al uso de software libre, no era tan buena como ellos querían. Pensaron entonces que tenían el suficiente conocimiento y valor como para poder iniciar un pequeño proyecto en el que trabajar a gusto y compartir ese sueño común. Ese grupo de personas plantó ese día la semilla de una empresa que ha ido creciendo hasta ser lo que hoy es: una empresa referente en tecnologías de código abierto, y que trabaja con empresas locales, nacionales e internacionales.

Durante todo este tiempo en Warp se han intentado hacer mejor algunas cosas, tanto hacia fuera como hacia dentro. Y para llegar a cumplir cinco años y estar donde está, este camino no ha sido una aventura en solitario.

Warp es así gracias a los trabajadores pasados y presentes, ya que con su profesionalidad, trabajo (y sobre todo buen rollo) se han podido hacer grandes cosas. También es así gracias a los clientes que ha tenido, por haber dado su confianza a la empresa durante este tiempo. Y ahora no es así (pero lo será) gracias a los que en un futuro se animen a ser parte de un equipo que quiera hacer las cosas bien y conseguir un mundo mejor (y dominado por nosotros :-) ). También parece ser que el caldo de cultivo ya era bueno, y que conseguir reunir a lo mejor de cada casa ha terminado de hacer el resto.

Por todo esto hoy toca decir: ¡Felicidades Warp!

PD: Dejo un pequeño regalo para compartirlo con todo aquel que quiera celebrar el cumpleaños con nosotros
Wallpaper Warp 5 Aniversario

September 25, 2009

Cuando las esperas se hacen largas  Dani

Hay días duros en la vida de un informático, en los que la tregua no es una opción. Se deben asumir los retos y enfrentarse a ellos con todas las armas posibles. En caso de desesperación, uno puede aprender de fuentes externas que ayuden a sobrellevar la labor encomendada.

Así, en nuestros largos tiempos de espera, hemos asimilado bien la lección y hemos decidido ponerla en práctica:
Compiling!

PD: Para que no parezca que fue una farsa, aquí queda también una secuencia de la cruenta batalla

Batalla a vida o muerte

Batalla a vida o muerte

September 06, 2009

Cámaras Lomo  Jorge

Hace un tiempo descubrí por Internet la Lomografía, y en cuanto vi una tienda con cámaras Lomo no pude resistirme a comprar una desechable y una Colorsplash. Bueno, en realidad me las regaló Olga.

Aquí la muestra del primer revelado:

Powered by Flickr Gallery

August 25, 2009

Se han terminado las vacaciones  Jorge

Una muestra de relax, paz y tranquilidad… hasta el año que viene!!!

Powered by Flickr Gallery

August 24, 2009

Blaapps 0.5.0 Released  Golo

After 21 months of sporadic work, I’ve finished the application for my “Thesis”. Today I’m proud to announce the release of Blaapps Application Framework version 0.5.0.

Blaaps Logo for version 0.5.0

I’ve done lots of work transforming rudder Application Server, a previous project, into an Application Framework.

Blaapps Architecture

The Kernel of Blaapps is based on core Subsystems. Two of them are the most important:

The Deployer reads components called Modules, and loads them into memory. Modules are like plugins, hot plug-gable extensions to the application.

Messaging brings the infrastructure for the inter-module comunication.

Other features which are usually needed for Application development are packaged as Kernel Modules. In this version, two modules are included:

Remote helps you to publish objects into a RMI Registry.

Persistence Is a JPA (Hibernate) wrapper.

As you can see, blaapps 0.5.0 is reinventing the wheel. There’s lots of plugin frameworks, and the EJB 3.0 standards helps you with persistence and remote objects. So why develop something like blaapps?

The first reason was that I wanted to learn how to do cool stuff, like Dependency Injection. Blaapps contains “only” 1800 lines of code, so it’s easier to learn from blaapps than from a real Application Server.

The second one is that I wanted something fast for my developments. Blaapps is very limited, but it starts in few seconds.

What’s next? Once I present my Thesis and became an official engineer, I’ll start with blaapps 0.6.0. There’s already a Milestone planning which will focus on making easier the building of GUIs.

A new gem: rubygems is it jruby?  Blaxter

A few days ago after seeing this tweet, I've decided to migrate the gem rubygems-isit19 to jruby. Thanks to this, when you install another gem you'll be able to read about compability of this gem with jruby, the information is fetched from isitjruby.com website.

Once you have installed the gem you will have two main features, it's easier if I just show you. First the messages when you install gems:

 
$ jgem install daemons
 
daemons 1.0.10 probably might not work, blaxter says 1.0 fails
Update http://isitjruby.com/daemons with your experiences!
 
Successfully installed daemons-1.0.10
1 gem installed
$ jgem install cucumber
 
cucumber 0.3.97 might work, 100% say 0.3.11.3 works on jruby
Update http://isitjruby.com/cucumber with your experiences!
 
Successfully installed cucumber-0.3.97
1 gem installed
$ jgem install faker
 
faker 0.3.1 is 100% verified jruby
Update http://isitjruby.com/faker with your experiences!
 
Successfully installed faker-0.3.1
1 gem installed
 

And also we have an explicit gem command:

 
$ jgem isitjruby faker
faker 0.3.1:    http://isitjruby.com/faker
    Blaxter says 0.3.1 works on GNU/Linux
        it works perfectly, and it passes all test.
$ jgem isitjruby daemons
daemons 1.0.10:    http://isitjruby.com/daemons
    blaxter says 1.0 fails on GNU/Linux
        Daemons use fork, jruby doesn't support fork, so it doesn't work and
        never will
 

And that's it. The code is on github be free of fork me or open any issues. The important thing is populate with relevant information isitjruby.com for benefit of all jruby community. Oh I forgot to tell you how to install it, very easy, I've uploaded the gem to gemcutter so you can install it with something like

$ jgem install rubygems-isitjruby -s http://gemcutter.org

It's also in github, but I think (and I hope) gemcutter will be the next rubyforge, so better gemcutter :) .

July 16, 2009

42foo: all the virtual hosts you need for your web development  Koke

I’ve done a fair amount of web “design” (mostly implementing designs of others) and development in the past, I usually set up a lot of virtual hosts in my local apache. I’ve done that in three different ways.

The quick&dirty hosts file

Point any of your development domains to 127.0.0.1 in the /etc/hosts file. It’s the easiest way, but you need to add them one by one. At some point, mine could look like this:

127.0.0.1 warp.dev
127.0.0.1 ebox-platform.dev
127.0.0.1 ebox-technologies.dev
127.0.0.1 jorgebernal.dev
127.0.0.1 projectA.dev
# ... and so on

Getting smart with dnsmasq

This is a more automated method. You install dnsmasq and configure 127.0.0.1 as your DNS server. Then add this to your conf:

address=/.dev/127.0.0.1

This worked well, and acted as a dns cache. But I had some trouble with dynamic dns entries at our old office: projects.warp.es would point to a local address inside the office and our remote IP from outside, so I found myself clearing the cache too often.

42foo: the zero-code web service

So I made it external. I bought 42foo.com and set up a bind zone with this:

@                       A       127.0.0.1
*                       A       127.0.0.1

So warp.42foo.com, ebox-platform.42foo.com or whateveryourprojectis.42foo.com always point to 127.0.0.1

You still have to set up the virtual host, but there is one step less for web development. Feel free to use it, and let me know if you set up something similar with a shorter domain name :)

Related posts

Probably the best compact camera out there: Panasonic Lumix DMC-LX3  Koke

LX3k_slant_500

Sorry for the title. Actually there is no overall “best camera”, “best laptop” or “best whatever”. It always depends on what you need. If you just need a compact camera to take some pictures of your family trips or your college parties, almost any camera will do the trick for a much lower price.

That said, if you are serious about learning photography you should probably get a DSLR. You can get a Nikon D40 for about $400 or a Canon Rebel XS (aka 1000D) for about $500. I own the older Nikon D50 and I love it. Most of the pictures in this website were taken with that camera. I would only upgrade to the Nikon D700 but the gain isn’t worth $3000 to me.

Then, why am I recommending the LX3? Simple. The only problem I have with my D50 (and any other DSLR for that matter) is the size. It’s not too big for a DSLR, but it’s not a gadget to carry everywhere.

So, if you want a portable camera which allows you to learn photography, the LX3 is for you. I won’t go too technical here, but let’s highlight some of the features

If you want more details, read the full review at dpreview.

Some samples:

I added more contrast on this one, but the original was already amazing.

Macro focus works like a charm

Not actually a video, but a time-lapse. It has a hi-speed burst mode where it can take 3-megapixel stills at 6fps

Get a drink on Vimeo

Not mine, but shot with a LX3, although it seems to have gone through some good post-production

Words Don’t Mean The Same Thing To You… on Vimeo

If you like what you see, you can get the LX3 on Amazon for $567.99

Most Commented Posts

July 09, 2009

Backup incremental de tu base de datos con Git  Blaxter

Una forma realmente interesante de realizar backups de tus bases de datos (por ser trivial y muy potente) es usando Git. El proceso es simple y se basa en la realización de los dumps de la base de datos de forma que cada fila de las tablas sea un insert aislado, de esa forma en cada commit solo estaremos salvando las diferencias respecto al último estado (tanto deletes como inserts, como updates).

En el caso concreto de MySQL inicialmente haríamos algo como esto:

$ mkdir mydatabase && cd mydatabase
$ mysqldump --skip-extended-insert > data.sql
$ git init
$ git add data.sql
$ git commit -m "Initial dump of mydatabase"

A partir de entonces podemos automatizar el proceso con un script tan simple como este:

$ cat /usr/bin/git_backup_database
#!/bin/sh
BACKUP_DIRECTORY=$1
DATABASE=$2
 
cd $BACKUP_DIRECTORY && \
mysqldump --skip-extended-insert $DATABASE > data.sql && \
git commit -am "Updating dump `date +%Y_%m_%d__%H_%M`"

Según el volumen de consultas que tenga tu base de datos, te será interesante ponerlo en cron con una frecuencia determina u otra. Adicionalmente sería recomendable ejecutar $ git gc para optimizar el repositorio. Por ejemplo, dos veces al día y una vez a la semana mantenimiento:

0 0 * * * /usr/bin/git_backup_database /path/to/mydatabase mydatabase
0 12 * * * /usr/bin/git_backup_database  /path/to/mydatabase mydatabase
0 1 * * 1 cd /path/to/mydatabase && git gc

Además desde otro equipo nadie te impide hacer un $ git clone ssh://equipo:path/to/mydatabase y tener todo el historial de la base de datos en un plis (bueno eso es relativo, que ocupará lo suyo...) o incluso programar un $ git pull para tener varios backups en distintas maquinas. En definitiva, se abren un sinfín de opciones :) .

June 25, 2009

CarHire.ie discriminating against Spaniards … and Irishmen too  Isaac

I was just having a look today at several car rental websites for a weekend trip out of Dublin when I came across this ‘interesting’ answer in the FAQ at CarHire.ie.

What are your age limits?
23 – 74 years. … snip … The minimum age for holders of Irish, Italian, Spanish, Portuguese and Israeli licences is 30 years.

and also:

Holder of Italian, Spanish, Portuguese and Israeli licences there is a non waiveable excess of €2,500.

Is this kind of discrimination legal? Why did they throw in Israeli people too? Why not Greeks? Don’t they trust even their own Irish people?!

May 19, 2009

Sourceforge community choice awards  Richi

Para Boost C++ Libraries

… y para EBox Platform.

¿Para quién si no?

April 21, 2009

Closing the blog, opening a new one  Nacho

So, this is it, I arrived to the end of this blog. It’s been almost four years since I opened “Embracing Open Sources” and now after 100 posts this is going to be my last writing here. It has been a great experience and I have learned a lot. Keeping a blog open has forced me to think deeply about the matters I was going to write about. It has also taught me what a blog really is and how to work with it. And it has helped me to keep and create professional contacts. I just hope it has also been useful to somebody else :-)

I have made a selection of the top 10 posts of this blog. Most of them are summaries and comments on other people’s articles or presentations but, anyway, for me that’s already valuable :-)

At this very moment I am opening a new blog, Learning to Fly, where I will be reflecting my experiences and the lessons I learn during my new professional challenges launching eBox as a sustainable company. See you there!

April 10, 2009

New professional challenges  Nacho

129 days since my last post in this blog. The earth has completed one third of a circle around the sun. 44 million people have been born and 20 million people have died on earth. Around 18.000 species have disappeared on the planet. And there is a new president at the White House. All of this and much more happened since my last post.

But what could keep me so long for posting? Work, it couldn’t be otherwise. Over a year ago we considered that eBox had already enough entity to become a company by itself, so we span it out from Warp, creating eBox Technologies S.L., getting some seed funding and starting to develop its own business model. Well, the whole past twelve months have been focused mostly on building the new organization and hiring the right people. By December, when I wrote my last post, we had already an excellent technical team (lead by our beloved CTO, Javier Uruen) and we started the enormous task of forming the management team, which until then consisted basically on I, me and myself. Now, it is up and running, and it looks really promising, with Javi Vázquez as our operations officer, Heidi as our marketing officer, Koke as our IT officer and (last but not least) Esther as our happiness officer.

However, that was not the only professional challenge I have been facing. By the same time when we founded eBox Technologies, the companies in the region decided to join and founded an association of open source businesses, where I was chosen the president. It sounds very glamorous but I can assure that being the president of a just born association means a lot of work and no glamor at all. So, we created CESLA, defined a strategic plan during 2008 and in the last few months we have been putting this plan into practice, launching the first projects and organizing the first CESLA event.

Moreover, being the main responsible for CESLA included also a site on the board of AEIA, the regional IT association. During the last few months AEIA has suffered a full renovation, including board, strategy, management, statute and even name and logo. It will be all presented in ten days, so stay tuned ;-)

And finally, right after its foundation CESLA got integrated in Asolif, the federation of open source businesses in Spain, which guarantees a site on the board for the president of each regional association. Asolif was founded around the same time as CESLA, so it needed a similar effort to be launched. Now it is finally organized and with a growing activity, thanks to the actions taken by its president Dani and its new manager Agustín.

So many things have happened in the past months. I have learned a lot and met a bunch of interesting people. My context, goals and responsibilities have changed. My points of view have evolved. I think this is a good moment to start a new stage as a blogger, close this blog and start a new one with a different approach, lined up with the new challenges I am currently facing. More information in my next (and last) post in this blog :-)

February 02, 2009

Las cosas del karma  Koke

Ya sabes: si eres legal, eres legal.

November 30, 2008

Zombies de Centro comercial  Crash


Zombies en el centro comercial, y no me refiero al amanecer de los muertos no, ni a ninguna película de John Carpenter. Sino nuestros centros comerciales, y los zombies de su interior.

Ayer estuve en un centro comercial en Vitoria, pero supongo esa escena se repitió por todos y cada uno de los centros comerciales de este país y problablemente de esto a lo que le llaman ‘el primer mundo’.

Por los atavoces del centro comercial atronaban villancicos, uno tras otro los mismos de todos los años, ande ande ande, pastorcillos, campanitas y su **** ****. Contrastaba con el frio exterior un calor notable con la humedad relativa acentuada por la transpiración de los que allí moraban.

Había gente, mucha gente, no demasiada, pero mucha.  Yo me acerqué a mirar una prenda que necesito y por eso del comparar precios . Algo bueno si que saqué, me encontré de bruces en una tienda de videojuegos con un dvd de segunda mano de la película de ‘Tommy’ la ópera rock de The Who, lo cual creo que me alegró la tarde de dos modos, una por encontrarla que es una joya, y dos que la sgae no se llevo ni un sucio céntimo  de los 4.95 euros de mi exquisita compra.

En uno de los momentos la gente comenzó a agolparse en las baradillas de la escalera porque abajo había una actuación de unas señoritas que debían estar haciendo la danza del vientre. Lo supongo por la música porque no miré.

Allí estaban cientos de personas, con sus abrigos, metidos en el centro comercial, agarrando sus bolsas con una mano y a sus hijos con la otra, mirando chicas moviendo el culo. Todos con una sonrisa vacía. Solo faltaba una lluvia de prozac, para darles a todos un pasaporte al país felicidad total y absoluta.

Mientras están ahí no están pensando y me están haciendo ganar dinero seguro que pensarán algunos

Así que me dió miedo, aseguro que me dió miedo ver cientos de personas cuyo fin de semana, dias de esparcimiento físico y mental lo derrochan en sitios donde hacen lo que otros quieren que hagan, con su mente en blanco como zombies.

La gente en ese estado ‘no da problemas’ que es lo que a muchos les viene bien.

Y luego a los que le dedicamos la vida a la informática nos llaman frikis y que hay que salir más de casa, o peor aún son ellos los que se creen normales.

He decidido que para ser normal y para llegar a estados alterados de conciencia como su zombificación. Prefiero echar unos tragos una risas, y despotricar sobre el mundo, que al fin y al cabo es mas sano, al menos para la mente y así huir de la lobotomía colectiva.

November 25, 2008

The coolest IP on the net  Isaac

My workmate Josh just discovered this :P

٢ isaac@cooper:~
% host 69.69.69.69
69.69.69.69.in-addr.arpa domain name pointer the-coolest-ip-on-the-net.com.

September 28, 2008

Google Developer Day 2008  Crash


Un gran día fue como decía en su blog mi amigo y compañero Alberto Gimeno.

Por la mañana un desayuno y por la cara, que esas cosas siempre animan la mañana, sobre todo a Alberto, que junto con plunchete estuvieron toda la noche cambiando el motor de plantillas de Debug_mode=ON mientras yo estaba dormido como un bebé. Lo siento chicos.

Bien, el día comenzó  tras la acreditación la recogida de una bolsa con unos obsequios (exquisito el pendrive con forma de muñeco de lego) y el desayuno acudimos al acto de apertura, donde Javier Rodriguez Zapatero director de Google España comenzó una ronda de presentaciones, entre las que estuvo la de Chris Dibona poniendonos los dientes largos con el google phone.

Tras esta presentación  fuimos al taller de Google App Engine Donde se iba a trabajar sobre un ejemplo que nos dieron los ingenieros de google de una wiki. No obstante…  Nosotros la verdad nos desviamos un poco del ejemplo y seguimos trabajando en unas cuantas cosas referentes a Debug_Mode=ON. En la ronda de presentación de los ejemplos donde salimos a enseñar un poco nuestra recién nacida web.

Tras la comida, no pudimos entrar a la charla sobre startups, que estaba “hasta la bandera”, estuvimos escuchando a los chicos de la charla de Gadgets sociales, fue interesante escucharles y siempre se dan ideas. Pero la mención de honor para estos chicos, es que la charla fue entretenida, supieron contrarrestar esos inconvenientes de la franja horaria (hora de la siesta :) ) en la que tuvieron que presentar.

Y luego…. Pues sí Otra vez al taller de Google App Engine, esta vez con Daniel Latorre que se vino también, por la mañana estuvimos separados el en unas charlas y Alberto  y yo en el Taller.

El día fue muy grande porque Debug_Mode=ON suscitó bastante expectación y hubo gente interesada en ello y estuvimos gustosos de atenderles e intercambiar impresiones como Miguel Angel Ajo. Lo que fue ya no grande, si no enorme cuando a algunos de los ingenieros de google se nos acercaron y bueno sobre todo Mano Marks, que nos ayudó con los problemas que estabamos teniendo con las quotas de servicio.

Tras el acto de cierre, nos dejaron abierta la Lanzadera, para poder darnos unos viajecitos y luego, nos invitaron a picoteo y a una barra libre, que eso siempre anima…

July 12, 2008

BitTorrent to download eBox  Quique

BitTorrent is a P2P protocol to share files. It is quite cool to share quite big files such as High Definition multimedia or ISO files. An eBox user asked to download eBox iso files not using HTTP but a P2P protocol because of his bad network connection. I completely agree in this matter, how many of you does a HTTP download crash on the middle or become corrupt (uhmm, wget should work in this matter…).

Well, I decided to create a HOWTO (in Spanish) for my mates in Pulsar about how to set a tracker up. And now it is serving as coordination point among bittorrrent clients to download eBox isos :D . So far 23 people has downloaded completely eBox using this method.

How beautiful is sharing!

May 22, 2008

Un multitouch pad… casero  Richi

Visto en Yet Another Geek Blog

May 18, 2008

Programming languages  Quique

Everyone who has met me a little in a computer atmosphere will understand how I’m really fed up with programming language arguments. They are totally biased by people that really love his language, they think they own the language and stand up and face the argument with vacous subjective sentences. Anyway, my response about the critical question “Which programming language is better?” is “It depends on the problem to solve”. An example, the other day two colleagues of mine spend their time on knowing how to parse and substitute a regular expression in Ruby or Python (I just don’t remember though). Finally, the solution was found after a long time (don’t remember how much but not little). I asked them why not to use Perl (I just remember what Perl stands for “Practical Extraction and Report Language”) to handle regular expressions. I think one of them was impressed by Perl solution :-P .

I do not love any programming language since they are just tools for me to apply solutions to problems. Sincerely, I don’t want to start up a flame or whatever. I really like strong (safe) type system likes Ada or Python does but I found useful weak type system such as Bash or Perl (in some way). Every programming language has their pros and cons, I said that since I have learnt and used more than 10 languages using 4 different paradigms…

Anyway, I want to share the following question: which language should I learn the basics and principles? Any comment will be appreciated.

I have just started with Python (Dynamic OO language) and Erlang (Functional language).

Update: There is an article talking about the same thing. I think I agree with Martin Fowler in this matter…

March 07, 2005

Shame on you Europe  Javi

Europe has become a banana republic. The European council has ignored the requests of several member countries, the European parliament and the will of the European people adopting the Software Patent Directive. This shows how lobbies and megacorps rule Europe, citizens are just spectators. Sad day for democracy. This is not the Europe we [...]

February 23, 2005

Solidarity with Nacho  Javi

Hereby I would like to report an abuse on our dear friend Nacho . Due to some dark reasons his blog has been banned out from our planet. This post is intended to express our solidarity with him, and from this humble corner we demand his back to our planet. While this unfair [...]