Thinking on hiring me?

Please read

Fernando Guillén

a Freelance Web Developer

cabecera decorativa

software development as an artistic expression

Archive for the ‘software libre’ Category

Lunes, Septiembre 13th, 2010

Vitreous: a Transparent Portfolio Manager

VitriousWhen one friend asked to me for install for her a copy of Indexhibit on my server I was wasting a bunch of mails trying to understand why she wanted this creepy and unusable portfolio manager. One of her arguments was: because one friend told me that it is a ‘transparent portofolio manager’, at this moment I thought: ‘alright so it has to be something that runs on your computer and synchs your portfolio contents from your local hard drive to the online application’.

That was awsome, but this wasn’t what Indexhibit is.

Since this moment I was looking for the moment to develop by my self the kind of ‘transparent portfolio manager’ I was thinking on.

The result is still inside of my fingers but for the moment I have an experimental version ready to work: Vitreous.

Vitreous is a simple Ruby + Sinatra + Dropbox API application that looks on your Dropbox online folder and builds a simple web site with collections and items.

Using simple tricks you can: short the collections and the items, add a description text for each item, configuring home image and description.You can manage your portfolio just creating folders on your local hard disk and adding images to them. Dropbox and Vitreous will do the rest.

The next step is to build a multi user application so you will be able to open a Vitreous Portfolio just introducing your Dropbox Api Credentials on an online form. Multiple portfolios for unique user, template system, auto cache refresh,

…(I am still a few angry with the Dropbox API… I hope they will move forward soon).

Miércoles, Agosto 25th, 2010

Ruby: DummyDropbox, mocking the Dropbox API calls.

Dummy Dropbox

Playing with the Dropbox API for an another experimental pet-project I needed to test how my mini-application was responding to different Dropbox contents. On the beginning I was configuring a real Dropbox account for testing but this was not agile and flexible. So this is because I decided to mock the dropbox ruby gem and this is because DummyDropbox has been born.

The working is simple: you point the gem to a local folder, all the dropbox API calls will think that this local folder is a real Dropbox account.


require 'dummy_dropbox'
DropboxDummy.root_path = "#{File.dirname(__FILE__)}/test/fixtures/dropbox"
session ='key', 'secret')
assert_equal( "#{File.dirname(__FILE__)}/test/fixtures/dropbox/file1.txt" ), '/file1.txt' ) 

Wondering if this could be helpful for someone.

Martes, Agosto 3rd, 2010

Ruby: FibberMailman, mocking the Net::POP3.start




Fibber MailmanLately I’m involved on projects that do a very intensive use of email accounts as input of information.

The use of mail in an automatic process is always a pain in the ass because of the huge casuistic and also for the difficulty to test it.

Nothing we can do with the first problem but for the second one here is my propose of a very simple Ruby Gem to mock the Net::POP3.start petition so you can simulate the emails that a real POP3 petition could find:

FibberMailman the mock for the Net::POP3.start.

Just charge a bunch of raw mails in an strings array and send them to the FibberMailman.lie_to_me method like this:

require 'fibber_mailman'
raw_mails = [ "/fixtures/mail1.raw_mail" ) ), "/fixtures/mail2.raw_mail" ) ),
FibberMailman.lie_to_me( raw_mails ) do
  <your code that uses the Net::POP3.start on any point>

Every petition to the Net::POP3.start method into the inside block will be feed with fake emails built from the raw mail strings.


Martes, Agosto 3rd, 2010

Lightning Talk about the OneOfZombies project

A few months ago I was on Krakow attending to the European Ruby Conference (aka EuRuKo).

There I had the opportunity to talk about one of my unfinished pet project OneOfZombies the Game.

Jueves, Abril 29th, 2010

Twitter must become in an open protocol

… if Twitter doesn’t do it, someone must to.

On a recent conversation with Raúl Murciano about the new improvements on the Twitter API I was defending the need of Twitter becoming an open protocol.

The first response could be “Why is this needed?, why don’t just use the Twitter platform?“, the answer is not easy to do with the mind it is more a feeling on the heart.

Twitter has been become on an incredible simple and useful service, twitter is everywhere and it is used for anything. It has become in the chat of our age, also in an alert system, in a marketing place, there where you want to put an small piece of information there is Twitter.

So now Twitter has proved what wonderful it is, what kind of a powerful tool it is, and all this power is always better to be shared and to open it to the people.

Of course there is something wrong on my approach: Twitter has built Twitter so it deserves to keep it, to open it is not a profitable idea and all of us know what is what moves the world. But at the moment Twitter keeps distrustful the control of Twitter it has not anymore the right of keep it.

The natural way of Twitter is being an open protocol where there is not anymore only one service provider but a bunch of them, communicating with each other, and anyone can buildup its own Twitter server, and we can choose our favorite one. I don’t see the difference between Twitter and email, or IRC, or HTTP it self. How would you feel if the email service was offered only by one company?, doesn’t matter how fashion and nice guys they were.

The decisions are not anymore taken on an unilateral way, the power is not anymore owned by anyone, the tool is already uncontrollable (in the good sense of the word), the service is distributed and scalable, the privacy has a possibility, the competition helps to the user, this is the kind of sons Internet is proud of.

Technically it has not to be the most complicated of the protocols, the most important thing Twitter is offering to us right now is just us, the users. Despite the incredible server balancing technology is has to support, but this is just a consequence of being the Only One.

Twitter is awesome and Twitter can be proud of itself, it deserves all our ovations but is time to move on, Twitter has the right to keep what it has built and we have the right to do it better, if Twitter doesn’t do it someone must to.

The real question is: are we willing to change our fashion ‘@nick‘ by a one more standard and scalable ‘‘?

Domingo, Marzo 14th, 2010

Arduino: Phixter Visits, blinking a led each time your website receives a visit

 Arduino I’m in

PhixterVisits is a way to convert an user visit on your web site into a blinking led on your desktop.

I have received for my birthday present one of the most awesome presents a geek can received: an Arduino Workshop Kit.

The first experiment I did was, of course, a Hello World, and after that I build something I was feeling like doing for long time: blink a led when someone visits my website.

This is very useless thing, I know and I don’t care, I just think that when something happens on the web and it become in something real on my table this is kind of magic.

On the beginning was a very simple experiment and withing an afternoon I build an small Sinatra project that received requests with a numerical parameter, the Sinatra webapp sent a signal to an script on my computer through a socket, and my computer finally sent this numerical value to the Arduino that knew with led to blink on depending the value.

This was awesome, I could to hidden an ‘img’ html element on my website asking for an image that in fact was a request to the Sinatra webapp and then the rest worked by it self.

Finally I wanted to play a competition with my girlfriend, she has a very most popular website than mine is, and then I was thinking to do all this stuff much easier to configure so this is because PhixterVisits born.

PhixterVisits is composed for three layers:

Arduino Sketch and Circuit

This is the most simple layer. It is a simple Arduino sketch that opens a Serial connection with your computer waiting for numerical values from 1 to 11, on depending the value received the Arduino will send a signal to one of its digital output connections.

The circuit is also very simple as you can see on the ‘How to Install It’ section.

Local Server

The local server is also very simple but I’ve complicated it becoming what was a simple console script on a wxRuby desktop application so you can configure it and test it visually.

Web Service

Is a Rails application where you can register your self and configure what I call ‘Phixters’. The Phixters are composed by an ‘URL:Port’ address what is your local computer public ip and the port where the Local Server is listening. You configure a value for each Phixter. And finally you can copy a very small piece of html code that you have to paste on whatever place of your website you want.

This piece of html code is the one that hides the Web Service request on an image so when your user visitors are watching an image a signal was sent to the Web Service.

How To Install It

I suppose you have a few experience with Arduino, at less you have obtained to operate the ‘Hello World’ with Arduino.

The Arduino Layer

Download the Arduino Sketch and upload it to your Arduino controller.

Build the circuit as show in this draw.

Phixter Visits Arduino Sketch

On this draw and on all my tests there are only 6 leds but you can fill all the digital outputs with leds and they suppose to work. Put atention that the digital outputs 0 and 1 are not being used, that is because on the circuit there is printed ‘RX’ and ‘TX’ on this out puts and I didn’t want any serial communication interference (I really don’t know if this interference was going to happened).

For test it you can open the ‘Serial Monitor’ of your Arduino app and send numerical values like ‘1′ or ‘2′ or ‘6′, the corresponding leds should blink for while.

Local Server

Download the ‘Local Server’ wxRuby desktop application.

You must to have Ruby installed on your computer and also the ‘wxruby’ gem:

$ sudo gem install wxruby

Go to the directory you have uncompressed the ‘Phixter Visits Local Server’ app and run on console:

$ ruby wx_tcp_server.rb

Yo should see something like on this picture:

Phixter Visits Local Server off

You have to know the name of the USB port of your Arduino and replace the text box named ‘Arduino Serial Port’ with yours one.

Select a port where you want the Local Server listens, for example ‘20000′.

Push ‘listen’.

You should see something like this bellow:

Phixter Visits Local Server

If you want to test it you can push ’stop’ and play with the ‘Send test value’ buttons. If you click on these buttons a corresponding led should blink.

Press ‘listen’ again and let the Local Server listening.

The Web Service

Go to PhixterVisits, register your self and create a Phixter for your web site like this:

Phixter Visits Web Service create Phixter

On URL:Port you have to put the public IP of your computer (or whatever computer your Local Server is listing), the Port is the port you have said to Local Server to listen.

Look that I’m using the ‘’ service so I don’t have to take care of my non-static public IP.

You can create any number of Phixters you want, one of them could be for a different website, just take care you are using the correct ‘code’ of each one.

Very important also is that I’m not going to talk about how to configure the NAT of my home router. This is diferent on each router and is the same theory of ‘opening the ports’ for your emule. Although I’m not talking of this step, this step is very important and the Web Service won’t can talk with your Local Server if this is not well configured.

You can check the communication from your Phixter on the Web Server to your Local Server on your desktop computer by pushing the button ‘check’ as you see bellow:

Phixter Visits Web Service go to check

This will send a signal to the URL:Port configured on this Phixter sending the value indicated, if everything is connected and working a led will blink on your Arduino circuit and a Ok message will appear on the Web Server page.

The HTML code on your Web Site

Still on the Phixter Visits Web Site, go to the ‘code’ of your Phixter:

Phixter Visits Web Service go to code

Copy the code on the textarea:

Phixter Visits Web Service Phixter’s code

And paste it on some place on your web site, be intelligent here and don’t put it on a place that an image is not going to be loaded.

From now on each time your website is loaded this image will want to be loaded and a request will arrive to the Web Service which will send a signal to your Local Server which will send a signal to your Arduino which will make the corresponding led to blink.

What is next

The game now is to connect to the Arduino not leds but DC motors so when a signal arrive the motor will work for a while and then stop until the next signal arrive. The motor will move some kind of figure like a horse or something then the race can start.

Phixter Visits Horse Race

Also will be great not to depend on a computer to communicate with the Web Service, using a ethernet interface directly connected to Arduino could be great.

The Code

All the code of this project, even the the Phixter Visits Web Service is available on the Phixter Visits Github Repository.


Play with this code and instructions on your own risk, I’m a very beginner on all of this Arduino stuff and some problems could happen to your loved kit.


You can do whatever you want with the code, attributions will be grateful.

Creative Commons License

Phixter Visits by Fernando Guillen is licensed under a Creative Commons Attribution 3.0 Unported License.

Lunes, Marzo 1st, 2010

iPhone Verb Conjugations

iPhone Verb Conjugations

VerbConjugations is simple iPhone application that tries to help the people that is learning Spanish to find out how a verb is conjugated.

With this application you can ask for any infinitive verb and you’ll obtain how this verb is conjugated is different tenses and persons.

The application also has an offline mode so you can check the verbs already searched without Internet connection.

The application works on any iPhone/iPod with SDK 3.0 or higher.

Let it a try, it is free, and leave a review, it is my first iPhone app and I would love to receive any kind of comment or issue.

The license is completely opened and you can check/download the code on the iPhoneVerbConjugations GitHub repository.

Available on Apple Store

Domingo, Septiembre 27th, 2009

Conferencia Rails 2009, just around the corner

 Conferencia Rail 2008

Another year, another conference, the conference that opened my eyes to the amazing word of Ruby, there on 2007, is just tuning the last details.

Conferencia Rails 2009, this year bigger, more impressive, with new venue, bigger organization team, more energy, and asking to the english spoken community  to meet us with talks.

This year I am not being to much helpful on the organization team, I know they are not missing me: a big and strong bunch of people is helping this year with new energy and ideas. I am on the register application support one more year. You can check the code and help sending patches here on the ConfRor2009 github repository.

As more news arrive to me about the Conferencia Rails 2009 more sad I feel, this is because this year I will not can assists to the event, I will be on New York on an weird adventure.

The Call for Papers is almost closed. Be hurry and propose your talk to Conferencia Rails 2009 on the registration app.

Lunes, Abril 6th, 2009

Ruby on Rails, Scotland on Rails 2009

Un fin de semana en Edimburgo rodeado de amantes, curiosos y rock-stars de Ruby on Rails, además de un montón de colegas de profesión y pasión, no me lo podía perder: Scotland on Rails.

Gueto español en SoR 2009

El fin de semana comenzó el jueves con un curso de un montón de horas de lo que se esperaba fuera un acercamiento a RoR y se convirtió en curso avanzado de Ruby a base de demostraciones malabaristas de lo que con este lenguaje se puede hacer.

Allí estábamos Raul, Flype, Ray y yo mismo con la cabeza apunto de explotar. Todo el día en una especie de destripamiento de carnicero de las entrañas de Ruby.

Acabé con agujetas de tener la boca abierta.. bueno espera que la cierre para escribir estas otras 2 líneas. Nos acaban de mostrar una especie de trigers o callbacs que se disparan cada vez que incluyes un módulo o incluso cada vez que declaras un método de una clase. Pueden funcionar como filtros también.

OMG.. ahora nos acaban de mostrar una clase que inspecciona Ruby en sí mismo: ObjectSpace.

Todos los ejercicios que vimos están en un proyecto de github:

Los posteriores días transcurrieron entre interesantísimas charlas, otras no tanto, alguna otra en la que no me enteré de nada, chistes, gueto español, cenas, desayunos, paseos, cervezas.. una delicia vaya.

Unas de las partes de la conferencia con menos expectativas pero que resultó ser super interesante fueron las Lightning Talks. En ellas se hablaron de unas cuantas idas de olla, de varios generadores de back y de una gran premier: la presentación de RedCar, un editor TexMate-style para Linux desarrollado por un chaval que no aparentaba ni 20 años.

Los posteriores días post-conferencia fueron aún más dulces, acompañado de un ángel fui a visitar a un amigo en Glasgow que nos llevó de paseo por las highlands.

… Feliz de mi profesión.

PD: por cierto, terminé la conferencia siendo premiado en el sorteo de 250 libras en libros de O’Reilly :) .. que repartí gustoso con mis compañeros de gueto por mi imposibilidad de leérmelos todos antes de que se quedasen anticuados.

Domingo, Enero 18th, 2009

Ruby on Rails, Passenger… ¡alucinantemente simpático!

Estoy instalando Passenger (aka mod_rails) en el servidor de staging porque es lo que está ahora de moda para poner aplicaciones Rails en producción y la verdad que empiezo a entender porque.

La instalación es super sencilla, se instala como una gema:

$ sudo gem install passenger

Que en realidad lo que instala es el instalador en sí, que se encarga de buscar tu apache, compilar los módulos, buscar posibles dependencias que falten, decirte como arreglar estas dependencias y finalmente explicarte como activar el módulo y como configurar el apache para activar tu primera aplicación rails.

Osea que más que un instalador es un tutorial super amigable y fácil de seguir.

Una vez todo instalado y configurado mi primer virtual host apuntando a mi aplicación Rails intento acceder a ella y salta un error, pero no es un error de esos feos, de casque total que no sabes lo que es y tienes que empezar a navegar por los logs para detectarlo, no.. el error aparece en forma de página web dispensada por el propio Passenger que te explica amable y elegantemente que no tienes Rails 2.2.2 instalado y el comando que debes ejecutar para arreglarlo.. super simpático.

Instalado rails 2.2.2 me salta otro error, debidamente capturado otra vez por el módulo y con varias explicaciones, posibles causas y consejos para resolverlo.. en este caso me falta el database.yml.. normal que no funcione.. pero lo increíble es lo majo que está siendo conmigo Passenger.

Arreglado esto intentamos volver a acceder a la aplicación.. pum! nuevo error, falta una gema.. no pasa nada Passenger también me sugiere “A required library may not installed. Please install all libraries that this application requires.”.

Error de acceso a BD, ups! Passenger no me ha dado feedback de esto, una simple pantalla blanca con un poco sutil “500 Internal Server Error“. Ha habido que acudir a los logs para detectar la causa.. un punto menos Passenger :)

Toma otro 500 en frío, no había corrido las migraciones, ya lo sabía, era para ver como se portaba Passenger, parece ser que una vez arrancada la aplicación ya deja de capturar los errores, una pena, con lo bonitos que los muestra.

La balanza se inclina muy favorablemente y estoy encantado con Passenger.

a Freelance Web Developer is proudly powered by WordPress
Entries (RSS) and Comments (RSS).

Creative Commons License
Fernando Guillen's blog by Fernando Guillen is licensed under a Creative Commons Attribution-NoDerivs 3.0 Unported License.