<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
 
 <title>Javier Aguirre</title>
 <link href="http://javaguirre.net/atom.xml" rel="self"/>
 <link href="http://javaguirre.net"/>
 <updated>2013-06-15T10:56:12+02:00</updated>
 <id>http://javaguirre.net</id>
 <author>javaguirre</author>

 
 <entry>
   <title>Taikoa and the future</title>
   <author>javaguirre</author>
   <link href="http://javaguirre.net/2013/06/15/taikoa-and-future"/>
   <updated>2013-06-15T00:00:00+02:00</updated>
   <id>http://javaguirre.net/2013/06/15/taikoa-and-future</id>
   <content type="html">&lt;p&gt;As some of you may know, I left &lt;a href='http://wadobo.com'&gt;Wadobo&lt;/a&gt; last month and started a new company based in The Netherlands, &lt;a href='http://taikoa.net'&gt;Taikoa&lt;/a&gt;. It was very nice to work with people as proffesional as &lt;a href='http://danigm.net'&gt;Danigm&lt;/a&gt; and &lt;a href='http://twitter.com/edulix'&gt;Edulix&lt;/a&gt;, we all share a vision how our company should be.&lt;/p&gt;

&lt;p&gt;But this was a logical step for me, I wanted to focus more in my life here and I don&amp;#8217;t plan to go back to Spain. You never know but we are so comfortable in our new place, I am in love with &lt;a href='http://www.flickr.com/search/?q=delft'&gt;Delft&lt;/a&gt;, It&amp;#8217;s a charming little city near cities with a shiny entrepeneurial and freelance life!&lt;/p&gt;

&lt;p&gt;The things I value the most here are how people respect the work I do, the quietness of life and the transport, I love to use the bike for everything and the good quality of train service, the lack of stress when moving, It&amp;#8217;s a big contrast from Madrid.&lt;/p&gt;

&lt;p&gt;Going back to the company, I still work closely with Wadobo, everything is going very well.&lt;/p&gt;

&lt;p&gt;I am gonna write about technical stuff in &lt;a href='http://taikoa.net/lab'&gt;Taikoa Lab&lt;/a&gt;, leaving this blog for more personal matters and opinions.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Flashing Firefox OS in the Geeksphone Peak</title>
   <author>javaguirre</author>
   <link href="http://javaguirre.net/2013/05/06/flashing-firefox-os-geeksphone-peak"/>
   <updated>2013-05-06T00:00:00+02:00</updated>
   <id>http://javaguirre.net/2013/05/06/flashing-firefox-os-geeksphone-peak</id>
   <content type="html">&lt;p&gt;The &lt;a href='https://developer.mozilla.org/en-US/docs/Mozilla/Firefox_OS/Firefox_OS_build_prerequisites'&gt;official tutorial&lt;/a&gt; is excellent to do all the process smoothly, you will need to read it first. I wanted to share with you some problems I found building Firefox OS for the Geeksphone Peak. I am using ArchLinux, but some of the problems aren&amp;#8217;t OS related.&lt;/p&gt;

&lt;p&gt;After getting the &lt;em&gt;B2G&lt;/em&gt; code you will need to use the &lt;code&gt;./config.sh&lt;/code&gt; to build it for the Peak, It&amp;#8217;s not in the documentation but you actually can build the peak (the options are there for this device).&lt;/p&gt;

&lt;p&gt;To do it you will need its manifest, you can find it in.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;git clone git://github.com/mozilla-b2g/b2g-manifest.git&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;So when you want to build it for Peak without the manifest it will crash, but you can just get the &lt;code&gt;peak.xml&lt;/code&gt; from the previous repository.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;./config.sh peak route_for_b2g-manifest/peak.xml&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Following the official instructions and doing this for the Peak you will be able to config B2G for your device.&lt;/p&gt;

&lt;p&gt;When this is finished you will need to have your device connected to run&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;./build.sh&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Keep in mind you need to create the udev rule as It&amp;#8217;s documented in the Mozilla instructions.&lt;/p&gt;

&lt;p&gt;When the build is done you can flash it, so having the Android SDK correctly installed and in the &lt;code&gt;PATH&lt;/code&gt;, you can just.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;./flash.sh&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;If it doesn&amp;#8217;t work(it just freezes in &lt;strong&gt;waiting for device&lt;/strong&gt;) I realised I would need root permissions for one of the commands in the script, the one unlocking the Bootloader, &lt;code&gt;fastboot oem unlock&lt;/code&gt;, so If It doesn&amp;#8217;t work for you try with&amp;#8230;&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;sudo ./flash.sh&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;This didnt&amp;#8217;t work for me because the bootloader was still locked, so this was what I did to fix that.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;adb reboot bootloader
sudo fastboot oem unlock&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;In the chinese page you can push &lt;code&gt;Vol+&lt;/code&gt; to change the checkbox, once is changed you just push the &lt;code&gt;Power&lt;/code&gt; button. That&amp;#8217;s it! You have your phone unlocked! :-)&lt;/p&gt;

&lt;p&gt;Now we could flash the phone, the OS image has changed, so you need to activate the developer remote debugging again to use the flash script.&lt;/p&gt;

&lt;p&gt;Once you do that, you just&amp;#8230;&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;./flash.sh # or sudo ./flash.sh&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;And that will be it! Have fun!&lt;/p&gt;

&lt;p&gt;Note: I couldn&amp;#8217;t record the errors I had in the process, sorry, but If you have any doubts don&amp;#8217;t hesitate to ask, I will try to answer when I have time.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Geeksphone out of stock, again</title>
   <author>javaguirre</author>
   <link href="http://javaguirre.net/2013/05/03/geeksphone-shop-out-of-stock"/>
   <updated>2013-05-03T00:00:00+02:00</updated>
   <id>http://javaguirre.net/2013/05/03/geeksphone-shop-out-of-stock</id>
   <content type="html">&lt;p&gt;It seems the geeksphone is out of stock again! Firefox OS is having the attention it deserves and I&amp;#8217;m happy for it.&lt;/p&gt;

&lt;p&gt;When I was waiting for the shop to open, I create a small script to know when was opened again, just for fun. If you are eager to get one like I was, maybe you would like to use it. :-)&lt;/p&gt;
&lt;pre&gt;&lt;code data-language='python'&gt;import requests
import time

WAIT = 600
r = requests.get('http://shop.geeksphone.com')
while True:
    if r.status_code == 200:
        print 'Geeksphone available'
    time.sleep(WAIT)

&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;You can change the print to send you an email for example.&lt;/p&gt;
&lt;pre&gt;&lt;code data-language='python'&gt;import requests
import time
import smtplib
from email.mime.text import MIMEText

WAIT = 600
r = requests.get('http://shop.geeksphone.com')
while True:
    if r.status_code == 200:
        server = 'mymachine@localhost'
        client = 'youremail@whatever.com'
        msg = MIMEText('Geeksphone available!')
        msg['Subject'] = 'Important message'
        msg['From'] = server
        msg['To'] = client
        s = smtplib.SMTP('localhost')
        s.sendmail(server, [client], msg.as_string())
        s.quit()
        break
    time.sleep(WAIT)

&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;If you want to send an email to yourself, install an application like Postfix or Exim for Python to be able to send it.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Continuous Integration, important and fun</title>
   <author>javaguirre</author>
   <link href="http://javaguirre.net/2013/05/02/continuous-integration-important-fun"/>
   <updated>2013-05-02T00:00:00+02:00</updated>
   <id>http://javaguirre.net/2013/05/02/continuous-integration-important-fun</id>
   <content type="html">&lt;p&gt;Three months ago I installed a server in my place, a month ago I installed my own continuous integration service with &lt;a href='http://jenkins-ci.org/'&gt;Jenkins&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;It&amp;#8217;s the first time I&amp;#8217;m using my own CI service and I couldn&amp;#8217;t be happier, I&amp;#8217;m saving time and money with this service even when I&amp;#8217;m just alone in some of the projects. It helps me being much more careful with my projects and to keep a log of the projects status. I have it here listening in localhost, so It doesn&amp;#8217;t have connection to the outside, when I want to see it from the outside I just create a ssh tunnel for that moment.&lt;/p&gt;

&lt;p&gt;I have always been very interested in improving my development skills, usually learning new technologies, but I&amp;#8217;ve been thinking how to save time and control it this last months and I&amp;#8217;m very happy about it. Productivity is always an important matter for a freelance and a difficult one to measure if you don&amp;#8217;t have certain discipline. That&amp;#8217;s why I&amp;#8217;m using &lt;a href='https://github.com/vim-scripts/vimwiki'&gt;Vimwiki&lt;/a&gt; and &lt;em&gt;gtimelog&lt;/em&gt; every day to control it and create reports of the hours I&amp;#8217;m working. My clients want to know too, so I could use the same tool for their reports.&lt;/p&gt;

&lt;p&gt;I love the command line and &lt;em&gt;gtimelog&lt;/em&gt; is GTK+, so I&amp;#8217;m using a &lt;a href='http://reinout.vanrees.org/weblog/2013/04/17/gtimelog-for-timelogging.html'&gt;tweaked version from Reinout Van Rees&lt;/a&gt; to achieve that.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Squid y túnel SSH para estar como en casa, Firefox mediante</title>
   <author>javaguirre</author>
   <link href="http://javaguirre.net/2013/03/25/squid-y-tunel-ssh-para-estar-como-en-casa"/>
   <updated>2013-03-25T00:00:00+01:00</updated>
   <id>http://javaguirre.net/2013/03/25/squid-y-tunel-ssh-para-estar-como-en-casa</id>
   <content type="html">&lt;p&gt;Esta semana he puesto a funcionar un proxy vía un servidor en España, al principio fue una tarea ardua, porque no tenía ni idea de lo que necesitaba y no le estaba preguntando los términos correctos a Google, pero tras pelearme y poner en funcionamiento OpenVPN y algunas cosas más me di cuenta que tenía un problema de concepto y que lo que yo necesitaba para ver las motos y la F1 como si estuviera allí era otra cosa.&lt;/p&gt;

&lt;p&gt;En Holanda no tenemos televisión en la casa y para ver algo tienes que pagar, mi actual compañía de Internet me ofrecía un paquete por &lt;code&gt;38.50&lt;/code&gt;(IVA de aquí incluido) que es menos que lo que pagaba en Madrid sólo por internet, pero nuestra negativa a no tener televisión es más de convivencia y deshacernos de cosas innecesarias.&lt;/p&gt;

&lt;p&gt;Después de entender conceptos y saber lo que necesitaba, montar el proxy para que Firefox entrara con Ip española fue la mar de fácil, voy a comentar aquí lo que se necesita, aunque en muchos lugares podéis encontrar una solucion parecida, eso sí en inglés. El sistema que me sirve a mí es el siguiente:&lt;/p&gt;

&lt;p&gt;En el servidor instalar &lt;a href='http://www.squid-cache.org/'&gt;Squid&lt;/a&gt; &lt;code&gt;apt-get install squid&lt;/code&gt; o &lt;code&gt;pacman -S squid&lt;/code&gt;, el paquete puede llamarse también &lt;code&gt;squid3&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;La configuración de squid, como sabréis estará normalmente en &lt;code&gt;/etc/squid(3)&lt;/code&gt; y no habrá que tocarla mucho, son unas 5000 líneas, pero sin comentar yo tenía poquitas, lo ideal es tener la aplicación escuchando únicamente en localhost por seguridad, y que ssh se encargue de la conexión de los puertos entre el servidor y nuestra máquina local.&lt;/p&gt;

&lt;p&gt;Una vez instalado y comprobado que Squid funciona (viendo que el puerto está activo con &lt;code&gt;netstat&lt;/code&gt;, mirando con &lt;code&gt;ps ax&lt;/code&gt; si el proceso se ha lanzado y si no tenemos ningún firewall incordiando), hacemos el túnel ssh. Si lo pusimos en el puerto por defecto de Squid bastará usar un comando del tipo:&lt;/p&gt;
&lt;pre&gt;&lt;code data-language='bash'&gt;ssh -C2TNvg -L 3128:localhost:3128 usuario@servidor
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Si todo ha ido bien podemos probar el proxy con la siguiente orden.&lt;/p&gt;
&lt;pre&gt;&lt;code data-language='bash'&gt;curl --proxy 127.0.0.1:3128 http://javaguirre.net
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Si no hay ningún problema recibirás el html de la página principal de esta web.&lt;/p&gt;

&lt;p&gt;Una vez funcione la llamada curl podemos introducir los datos del proxy en la configuración de Firefox. Elegimos &lt;code&gt;Preferencias, Avanzado, Configuración en Conexión&lt;/code&gt; y dentro &lt;code&gt;Configuración Manual&lt;/code&gt; en Firefox, en el &lt;code&gt;SOCKS y en HTTP&lt;/code&gt; Host tenemos que meter &lt;code&gt;127.0.0.1&lt;/code&gt; y el puerto el &lt;code&gt;3128&lt;/code&gt;. También se puede poner las mismas opciones (Ip, puerto) en &lt;code&gt;SSL y FTP&lt;/code&gt; si queremos usar el proxy para esos servicios.&lt;/p&gt;

&lt;p&gt;Con esto ya tenemos el proxy funcionando y deberíamos poder acceder a las webs que queramos. :-P&lt;/p&gt;

&lt;p&gt;Referencias:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href='https://calomel.org/firefox_ssh_proxy.html'&gt;https://calomel.org/firefox_ssh_proxy.html&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</content>
 </entry>
 
 <entry>
   <title>/dev/haag meeting and Gitlab</title>
   <author>javaguirre</author>
   <link href="http://javaguirre.net/2013/02/25/dev-haag-meeting-and-gitlab"/>
   <updated>2013-02-25T00:00:00+01:00</updated>
   <id>http://javaguirre.net/2013/02/25/dev-haag-meeting-and-gitlab</id>
   <content type="html">&lt;p&gt;Last Friday I had the opportunity to go to my first &lt;a href='http://www.devhaag.nl/'&gt;/dev/haag meeting&lt;/a&gt;, It is a really serious and well organized event with well-prepared talks.&lt;/p&gt;

&lt;p&gt;The first one was about &lt;em&gt;Reverse Launching&lt;/em&gt; and Gitlab, &lt;a href='http://blog.gitlab.com/'&gt;Sytse Sijbrandij&lt;/a&gt; gave us an interesting talk about trying to get feedback even before starting to ship anything, just feeding discussion about a possible market and checking the interest of people in that project in case it would came to reality.&lt;/p&gt;

&lt;p&gt;The second one was about the beautiful &lt;a href='https://www.rijksmuseum.nl/'&gt;RijksMuseum new website&lt;/a&gt;, &lt;strong&gt;Elaine Oliver&lt;/strong&gt; gave us a talk about how important is to be &lt;em&gt;responsive&lt;/em&gt; nowadays and their approach to get it for this site.&lt;/p&gt;

&lt;p&gt;The last talk was about a topic I&amp;#8217;m concern about, &lt;a href='https://twitter.com/DrWhax'&gt;DrWhax&lt;/a&gt; tried to immerse us in the world of cryptography in Internet and told us about the &lt;a href='http://en.wikipedia.org/wiki/CryptoParty'&gt;Cryptoparties&lt;/a&gt; and a more securized world.&lt;/p&gt;

&lt;p&gt;It was interesting to talk about &lt;strong&gt;Gitlab&lt;/strong&gt; and its possibilities with &lt;strong&gt;Sytse&lt;/strong&gt;, I had a really good time there and I will repeat next time for sure.&lt;/p&gt;

&lt;p&gt;I also got some conclusions about what we are missing in &lt;em&gt;Wadobo&lt;/em&gt; without a real project of our own, I think we need to improve that, explore options and try to put more efforts in our projects and less in consulting.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>After FOSDEM 2013</title>
   <author>javaguirre</author>
   <link href="http://javaguirre.net/2013/02/16/after-fosdem-2013"/>
   <updated>2013-02-16T00:00:00+01:00</updated>
   <id>http://javaguirre.net/2013/02/16/after-fosdem-2013</id>
   <content type="html">&lt;p&gt;This year has been my first time at &lt;em&gt;FOSDEM&lt;/em&gt;. I liked the experience but I think I could have enjoyed it more with a community behind, I think this kind of event has more meaning when you are part of a FLOSS community, otherwise you are not enjoying all that offers.&lt;/p&gt;

&lt;p&gt;In general the focus of the conferences has been mobile development(Firefox OS and others) and I missed more Hardware content, I am very interested in robotics and it would be good if talks about Open Hardware and 3d printers could have taken place, I understand that&amp;#8217;s not anybody&amp;#8217;s fault, but I wanted to point it out.&lt;/p&gt;

&lt;p&gt;FOSDEM has increased my interest in contributing in a big project, concretely &lt;strong&gt;Mozilla&lt;/strong&gt;, I think there are a lot of interesting stuff to do and learn there and it&amp;#8217;s a great place to improve skills as a developer.&lt;/p&gt;

&lt;p&gt;I&amp;#8217;m very interested in C++, It&amp;#8217;s a logical step for me, to start doing something with this language to be able to contribute in more different and meaningful projects.&lt;/p&gt;

&lt;p&gt;Good experience, I think we will repeat next year, hopefully. :-)&lt;/p&gt;

&lt;p&gt;If you want more, Danigm &lt;a href='http://danigm.net/fosdem13.html'&gt;has written much more and detailed than me in his blog(ES)&lt;/a&gt;.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Playing with Bootstrap tour, Anchors for navigation and onShown event</title>
   <author>javaguirre</author>
   <link href="http://javaguirre.net/2013/02/04/bootstrap-tour-anchors-playing-events"/>
   <updated>2013-02-04T00:00:00+01:00</updated>
   <id>http://javaguirre.net/2013/02/04/bootstrap-tour-anchors-playing-events</id>
   <content type="html">&lt;p&gt;Today I have been finishing the integration of &lt;em&gt;Bootstrap tour&lt;/em&gt; in our &lt;em&gt;AngularJS&lt;/em&gt; application. I was having a problem with navigation with the path element in the steps because they does not support anchors for navigation, so I did a little &lt;a href='https://github.com/sorich87/bootstrap-tour/pull/42'&gt;pull request&lt;/a&gt; to fix that to my needs.&lt;/p&gt;

&lt;p&gt;The second problem I had was the position of popovers, I wanted to change it after it was shown and I didn&amp;#39;t found a good event to cover my needs in the documentation. Although checking the code I fond an &lt;code&gt;onShown&lt;/code&gt; event I&amp;#8217;m using to fix the position of some of the steps. The solution would be something like this.&lt;/p&gt;
&lt;pre&gt;&lt;code data-language='javascript'&gt;var tour = new Tour({
    onShown: function (tour) {
        if(tour._current === 0 || tour._current === null) {
            //do something for the first step
        }
        else if(tour._current == 4) {
            //do something for the fourth step
        }
    }
});
&lt;/code&gt;&lt;/pre&gt;</content>
 </entry>
 
 <entry>
   <title>Checking Boostrap Tour</title>
   <author>javaguirre</author>
   <link href="http://javaguirre.net/2013/01/31/checking-bootstrap-tour"/>
   <updated>2013-01-31T00:00:00+01:00</updated>
   <id>http://javaguirre.net/2013/01/31/checking-bootstrap-tour</id>
   <content type="html">&lt;p&gt;Today we have been started using &lt;a href='http://sorich87.github.com/bootstrap-tour'&gt;Bootstrap Tour&lt;/a&gt;, interesting stuff. It seems to be easy to create tours for your site with it, but I couldn&amp;#39;t get it working perfectly yet.&lt;/p&gt;

&lt;p&gt;It&amp;#8217;s developed with &lt;em&gt;Coffeescript&lt;/em&gt; and has some good events too.&lt;/p&gt;

&lt;p&gt;It uses &lt;em&gt;localStorage&lt;/em&gt; or &lt;em&gt;cookies&lt;/em&gt; to store the current step of the tour and can navigate through your site when you go further in it.&lt;/p&gt;

&lt;p&gt;I have some trouble with the integration with my &lt;em&gt;Angular app&lt;/em&gt;, something normal, and I have fixed &lt;a href='https://github.com/sorich87/bootstrap-tour/pull/41'&gt;a little bug too&lt;/a&gt;, we had time for everything. :-)&lt;/p&gt;

&lt;p&gt;There are some things to finish in our integration, I hope we could contribute more in the project.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Avoiding nodes overlapping in d3 trees</title>
   <author>javaguirre</author>
   <link href="http://javaguirre.net/2013/01/30/fixing-nodes-overlapping-d3-tree"/>
   <updated>2013-01-30T00:00:00+01:00</updated>
   <id>http://javaguirre.net/2013/01/30/fixing-nodes-overlapping-d3-tree</id>
   <content type="html">&lt;p&gt;This is a simple example to avoid overlapping between siblings in a &lt;a href='http://mbostock.github.com/d3/talk/20111018/tree.html'&gt;d3 tree&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I have been working a lot with d3 trees lately and dynamic node resizing, which is cool to have a complex representation for you data.&lt;/p&gt;

&lt;p&gt;When using simple d3 trees with different node sizes, they sometimes overlap with each other. I knew there is a &lt;em&gt;separation method&lt;/em&gt;, but I couldn&amp;#8217;t get it working for my case, so using an &lt;a href='http://mbostock.github.com/d3/talk/20110921/collision.html'&gt;example designed for d3 force element&lt;/a&gt; I could adapt to my current simple tree.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;function collide(node, node_sibling) {
  var r = node.size,
      n1y1 = node.x - r,
      n1y2 = node.x + r;
  var r2 = node_sibling.size,
      n2y1 = node_sibling.x - r2,
      n2y2 = node_sibling.x + r2;
  result = (n1y1 &amp;lt; n2y2 &amp;amp;&amp;amp; n1y1 &amp;gt; n2y1) || (n1y2 &amp;gt; n2y2 &amp;amp;&amp;amp; n1y2 &amp;lt; n2y1);

  return result;
}&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The size property doesn&amp;#8217;t exist in nodes, so it will be whatever property you want to control the size of them.&lt;/p&gt;

&lt;p&gt;I&amp;#8217;m just checking in one dimension (&lt;code&gt;x&lt;/code&gt;) because I want to control only siblings in my tree and they are aligned across the &lt;code&gt;y&lt;/code&gt; axis. You could do the same with the &lt;code&gt;y&lt;/code&gt; property in this function.&lt;/p&gt;

&lt;p&gt;This kind of function could be approximately the same for other d3 elements.&lt;/p&gt;

&lt;p&gt;To use it in a tree we could use it inside a &lt;code&gt;forEach loop&lt;/code&gt; in nodes.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;function detectCollisions(nodes) {
  nodes.forEach(function(d, index) {
    for (var i=0; i &amp;lt; siblings.length; i++)
    {
        if(d.id != siblings[i].id) {
            if(collide(d, sibligns[i])) {
                // Do something, like change the position
                // of the current sibling
            }
        }
    }
  });
}&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;This is it by now, I will get more deeply into it soon if I think there is something worth to comment.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Using SessionAuthentication With Tastypie tests for Django</title>
   <author>javaguirre</author>
   <link href="http://javaguirre.net/2013/01/29/using-session-authentication-tastypie-tests"/>
   <updated>2013-01-29T00:00:00+01:00</updated>
   <id>http://javaguirre.net/2013/01/29/using-session-authentication-tastypie-tests</id>
   <content type="html">&lt;p&gt;Today I have been studying more deeply how to create good &lt;a href='http://django-tastypie.readthedocs.org/en/latest/testing.html'&gt;tests with Tastypie&amp;#8217;s alpha version documentation&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;It was easy to start if you knew about &lt;a href='http://docs.python.org/2/library/unittest.html#unittest.TestCase'&gt;TestCase&lt;/a&gt; and django test &lt;a href='https://docs.djangoproject.com/en/1.2/topics/testing/#default-test-client'&gt;Client&lt;/a&gt;, but still Tastypie documentation has a lot of blanks in this part.&lt;/p&gt;

&lt;p&gt;I was using &lt;a href='http://django-tastypie.readthedocs.org/en/latest/authentication_authorization.html#sessionauthentication'&gt;SessionAuthentication&lt;/a&gt; to authenticate my resources and it uses Django sessions in background, so it had to be easy to test it with the &lt;em&gt;ResourceTestCase&lt;/em&gt;. It wasn&amp;#8217;t as easy as it seemed and we needed to check the code to understand how to do it.&lt;/p&gt;

&lt;p&gt;In a real Django app we could use login method from &lt;code&gt;django.test.client.Client&lt;/code&gt;, and I thought &lt;code&gt;tastypie.test.TestApiClient&lt;/code&gt; could be inheriting from it, but because you can have different kinds of authentication it wasn&amp;#8217;t the right choice for the Tastypie api test client architecture.&lt;/p&gt;

&lt;p&gt;If we read TestApiClient&amp;#8217;s &lt;code&gt;__init__&lt;/code&gt; we can see it has a client attribute, instantiating from &lt;code&gt;django.client.Client&lt;/code&gt;.&lt;/p&gt;
&lt;pre&gt;&lt;code data-language='python'&gt;class TestApiClient(object):
    def __init__(self, serializer=None):
        &quot;&quot;&quot;
        Sets up a fresh ``TestApiClient`` instance.

        If you are employing a custom serializer, you can pass the class to the
        ``serializer=`` kwarg.
        &quot;&quot;&quot;
        self.client = Client()
        self.serializer = serializer

        if not self.serializer:
            self.serializer = Serializer()
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;With this in mind and following the same idea we could just do this in our tests.&lt;/p&gt;
&lt;pre&gt;&lt;code data-language='python'&gt;from tastypie.test import ResourceTestCase, TestApiClient


class ExampleResourceTest(ResourceTestCase):
    def setUp(self):
        self.api_client = TestApiClient()
        self.get_credentials()
        self.example = {'title': 'My Data'}

    def get_credentials(self):
        result = self.api_client.client.login(username='myuser',
                                              password='secret')
        return result

    def test_post_project(self):
        self.assertHttpCreated(self.api_client.post('/api/v1/example/',
                                                    format='json',
                                                    data=self.example))
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Now we can build authenticated requests for tests using &lt;code&gt;SessionAuthentication&lt;/code&gt; in &lt;strong&gt;Tastypie&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Easy after all. :-)&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Google Font for jQuery Mobile Themeroller</title>
   <author>javaguirre</author>
   <link href="http://javaguirre.net/2013/01/22/google-font-for-jquery-mobile-themeroller"/>
   <updated>2013-01-22T00:00:00+01:00</updated>
   <id>http://javaguirre.net/2013/01/22/google-font-for-jquery-mobile-themeroller</id>
   <content type="html">&lt;p&gt;This weekend I started to play with &lt;strong&gt;Phonegap&lt;/strong&gt; + &lt;strong&gt;jQuery Mobile&lt;/strong&gt; for a new project I&amp;#8217;m developing. I never have worked with it before, but I think it could be a good stack if we mix it with backbone and some other technologies, so I&amp;#8217;m gonna give it a try.&lt;/p&gt;

&lt;p&gt;In my research I found &lt;a href='http://jquerymobile.com/themeroller/index.php'&gt;Theme Roller&lt;/a&gt;, a very good service to customize your jquery mobile theme, so I started using it and I realize it could be good to have google font support(among other things) to use it in the preview.&lt;/p&gt;

&lt;p&gt;This new functionality is based in the work they were doing before, I reused the font input, so if you add a google font in the list of fonts(it has to be the first one in the list) and you click &lt;em&gt;update font&lt;/em&gt;, it will preview your font in the swatches view and will add it to your zip package when you download it.&lt;/p&gt;

&lt;p&gt;For example if the fonts are &lt;code&gt;Dosis, Arial, sans-serif&lt;/code&gt; it will try to add the Google Font &lt;code&gt;Dosis&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;I made a &lt;a href='https://github.com/jquery/web-jquery-mobile-theme-roller/pull/126'&gt;pull request with this functionality&lt;/a&gt; and you can check it in my &lt;a href='https://github.com/javaguirre/web-jquery-mobile-theme-roller'&gt;own copy of the project&lt;/a&gt;, there is a &lt;a href='http://themeroller.javaguirre.net'&gt;demo&lt;/a&gt; too.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Feedback&lt;/strong&gt; is much appreciated!&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>New changes in Gramophone</title>
   <author>javaguirre</author>
   <link href="http://javaguirre.net/2013/01/07/big-changes-in-gramophone"/>
   <updated>2013-01-07T00:00:00+01:00</updated>
   <id>http://javaguirre.net/2013/01/07/big-changes-in-gramophone</id>
   <content type="html">&lt;p&gt;News about &lt;strong&gt;Gramophone&lt;/strong&gt; music server! We have done so many changes. I said us because I&amp;#8217;ve joined forces with &lt;a href='https://github.com/dbrgn'&gt;Danilo Bragen&lt;/a&gt;, a highly skilled developer who had a &lt;a href='https://github.com/dbrgn/musig'&gt;similar project&lt;/a&gt;, but he was builting it with &lt;strong&gt;Flash&lt;/strong&gt; and &lt;strong&gt;jPlayer&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Due to his suggestions we moved from cherrypy to Flask. I really prefer Flask too, but I wanted to have the less dependencies possible. I think the change is a good idea since we both have experience with Flask and we both feel more comfortable with it.&lt;/p&gt;

&lt;p&gt;We changed the &lt;em&gt;Audio.js&lt;/em&gt; player too and we are using &lt;strong&gt;jPlayer&lt;/strong&gt; now, which has more community, supports much more file extensions and has a stable development.&lt;/p&gt;

&lt;p&gt;Filters and searching for tracks, authors and artists are also available, and we have done a little improvement in the design, although we need to work more on the frontend part and the update collection task in the server.&lt;/p&gt;

&lt;p&gt;You can follow the development in &lt;a href='https://github.com/javaguirre/gramophone'&gt;github&lt;/a&gt;.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Developing Gramophone music server</title>
   <author>javaguirre</author>
   <link href="http://javaguirre.net/2012/12/17/gramophone-music-server"/>
   <updated>2012-12-17T00:00:00+01:00</updated>
   <id>http://javaguirre.net/2012/12/17/gramophone-music-server</id>
   <content type="html">&lt;p&gt;It&amp;#8217;s been a while since I received my &lt;em&gt;Raspberry PI&lt;/em&gt; and just a few weeks since I stopped paying my &lt;em&gt;Spotify&lt;/em&gt; premium account.&lt;/p&gt;

&lt;p&gt;Spotify it&amp;#8217;s a good service but the applications for GNU/Linux and Android aren&amp;#8217;t good enough. The Spotify app for Linux runs under Wine and has some bugs such as losing the connection unexpectedly and not reconnecting again unless you rerun the app, sometimes the search bar is not working, it uses a lot of resources (it&amp;#8217;s using Wine, so it&amp;#8217;s not a surprise) and sometimes crashes in &lt;a href='http://dwm.suckless.org/'&gt;dwm&lt;/a&gt; (I think this last problem has to be with Wine, not with the Spotify app).&lt;/p&gt;

&lt;p&gt;The Android app has a vertical layout, and that&amp;#8217;s it, so in my &lt;em&gt;Android tablet&lt;/em&gt; it&amp;#8217;s a real pain, the &lt;em&gt;natural&lt;/em&gt; position for my tablet when is placed somewhere is horizontal, so this problem added with some usability issues made me decide to stop using the service.&lt;/p&gt;

&lt;p&gt;I wanted to use a music server in my Raspberry PI to fulfill my needs of music at home, but the one I liked is &lt;a href='http://subsonic.org/'&gt;subsonic&lt;/a&gt; and it&amp;#8217;s pretty heavy. I was doing some research and I found some alternatives, but I wanted something simple. I love music and I have some free mondays so it&amp;#8217;s the perfect excuse to start building a web music server for my &lt;em&gt;RaspPI&lt;/em&gt;. :-)&lt;/p&gt;

&lt;p&gt;I&amp;#8217;ve called it Gramophone (I&amp;#8217;m a romantic :-P ), it&amp;#8217;s built with &lt;em&gt;Python3&lt;/em&gt; and &lt;a href='http://www.cherrypy.org/'&gt;CherryPy&lt;/a&gt;, and the frontend is built with &lt;em&gt;Backbonejs&lt;/em&gt;. The database now is Sqlite, I want to install the less packages possible to run the server. For the audio plugin it&amp;#8217;s using &lt;a href='http://kolber.github.com/audiojs/'&gt;audiojs&lt;/a&gt;, it&amp;#8217;s simple but it hasn&amp;#8217;t been updated for a long time, so maybe in the future it could be a good idea to change it.&lt;/p&gt;

&lt;p&gt;You could follow it&amp;#8217;s development in &lt;a href='https://github.com/javaguirre/gramophone'&gt;its github repository&lt;/a&gt;.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>PyLapse, Timelapse builder in Python</title>
   <author>javaguirre</author>
   <link href="http://javaguirre.net/2012/12/12/pylapse"/>
   <updated>2012-12-12T00:00:00+01:00</updated>
   <id>http://javaguirre.net/2012/12/12/pylapse</id>
   <content type="html">&lt;p&gt;It&amp;#8217;s been a while since I don&amp;#8217;t write anything, I&amp;#8217;ve been really busy since I joined &lt;strong&gt;Wadobo&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Last weekend I built a first version of &lt;strong&gt;PyLapse&lt;/strong&gt;. It intends to be a simple program to build timelapses from my Raspberry PI, but It would be really easy to use if you use &lt;strong&gt;GNU/Linux&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;All the instructions and everything about the project is in the &lt;a href='https://github.com/javaguirre/pylapse'&gt;PyLapse repository&lt;/a&gt;. I need to improve the video generation, but I understand some people would like to build it themselves once they have the pictures, so you could use the app just for getting the pictures every X seconds and then manually generate the video with a proffesional program.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>New look!</title>
   <author>javaguirre</author>
   <link href="http://javaguirre.net/2012/11/12/new-look"/>
   <updated>2012-11-12T00:00:00+01:00</updated>
   <id>http://javaguirre.net/2012/11/12/new-look</id>
   <content type="html">&lt;p&gt;Celebrating my recent incorporation to &lt;a href='http://wadobo.com'&gt;Wadobo&lt;/a&gt; I&amp;#8217;ve changed the look of my site &lt;em&gt;inspired&lt;/em&gt; by &lt;a href='http://wadobo.github.com'&gt;wadobo.github.com&lt;/a&gt; :-P. I&amp;#8217;ve been playing with the @media and screen in the css to have a navigation list more &lt;em&gt;responsive&lt;/em&gt;, I hope you like this change. :-)&lt;/p&gt;

&lt;p&gt;The code is &lt;a href='https://github.com/javaguirre/jekyll-bootstrap/tree/my_blog/_includes/themes/wadobo'&gt;in my repository&lt;/a&gt;.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Me uno a Wadobo</title>
   <author>javaguirre</author>
   <link href="http://javaguirre.net/2012/11/07/me-uno-a-wadobo"/>
   <updated>2012-11-07T00:00:00+01:00</updated>
   <id>http://javaguirre.net/2012/11/07/me-uno-a-wadobo</id>
   <content type="html">&lt;p&gt;Ya hace cuatro meses que estoy viviendo en Holanda, y tras dejar mi primer trabajo debido a expectativas no cumplidas tuve la suerte de conseguir dos proyectos y empezar a trabajar por mi cuenta.&lt;/p&gt;

&lt;p&gt;En aquel tiempo en el que estuve tomando la decisión de crear una empresa en Holanda, mi amigo Edu me llamó ofreciéndome entrar en &lt;a href='http://wadobo.com' title='wadobo'&gt;Wadobo&lt;/a&gt;, una empresa con sede en Sevilla pero en la que sus integrantes trabajan desde donde quieren, centrándose en la felicidad.&lt;/p&gt;

&lt;p&gt;Conozco a Dani y a Edu desde que estudiaba en la universidad, todos formábamos parte de un grupo de gente que tiene intereses comunes llamados Sugus, la Asociación de Software Libre de la Universidad de Sevilla, así que cuando me lo propusieron no me lo pensé. Para mí ya en aquella época ellos eran una referencia y afines a mis ideas.&lt;/p&gt;

&lt;p&gt;Tras mi experiencia en Madrid en diversos entornos tenía muy claro que lo que quería era ser mi propio jefe y ahorrarme muchos problemas que surgen debido al, según mi opinión, mal entendimiento de lo que una empresa o grupo de trabajo de desarrollo de software saludable debe ser, y esa fue una de las razones por la cual me quería ir fuera de España, quería sentir cómo se veían las cosas fuera.&lt;/p&gt;

&lt;p&gt;Por otra parte siempre he querido trabajar con personas afines al movimiento de Software Libre, intentando siempre dedicar mi día a día, todo lo posible, a participar en este tipo de proyectos.&lt;/p&gt;

&lt;p&gt;Unirme a &lt;a href='http://wadobo.com' title='wadobo'&gt;Wadobo&lt;/a&gt; es un paso lógico para mí en mi evolución profesional y algo por lo que estoy muy contento. :-)&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Starting with Mutt</title>
   <author>javaguirre</author>
   <link href="http://javaguirre.net/2012/10/19/starting-with-mutt"/>
   <updated>2012-10-19T00:00:00+02:00</updated>
   <id>http://javaguirre.net/2012/10/19/starting-with-mutt</id>
   <content type="html">&lt;p&gt;It&amp;#8217;s been a while since I wasn&amp;#8217;t happy with &lt;em&gt;Thunderbird&lt;/em&gt;, thinking it could be much better for me if I switch to a shiny command line email client, today was that day, I&amp;#8217;m switching to &lt;a href='http://www.mutt.org/'&gt;Mutt&lt;/a&gt;. :-)&lt;/p&gt;

&lt;p&gt;Although it wasn&amp;#8217;t a bed of roses, I had to search a lot to have the perfect configuration I wanted. I started with &lt;a href='http://stevelosh.com/blog/2012/10/the-homely-mutt/'&gt;this inspiring article&lt;/a&gt; I read last week, and I just started searching for this little but essential things I was missing.&lt;/p&gt;

&lt;p&gt;My configuration is almost final now, I want to change some colours in the scheme, but that&amp;#8217;s just fine tuning. I&amp;#8217;m using offlineimap in the way Steve Losh recommends it, but I desisted from using &lt;em&gt;msmtp&lt;/em&gt; for sending emails, I&amp;#8217;m gonna use the native smtp support in &lt;em&gt;Mutt&lt;/em&gt; and &lt;a href='https://wiki.archlinux.org/index.php/Mutt#Multiple_accounts'&gt;gpg encryption for the passwords&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;For sending emails from different accounts or &lt;em&gt;alternates&lt;/em&gt;, I spent some time until &lt;a href='http://wiki.mutt.org/?MuttFaq/Header'&gt;realising&lt;/a&gt; I needed to put the &lt;code&gt;set reverse_name&lt;/code&gt; property because Mutt didn&amp;#8217;t want to let me just change the &lt;em&gt;From&lt;/em&gt; with my desired email address.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;set reverse_name
set my_user = &amp;quot;mail@example.com&amp;quot;
alternates javaguirre@example2.com info@gmail.com contact@example.net
set smtp_url=&amp;quot;smtp://$my_user:$my_password@smtp.gmail.com/&amp;quot;&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;These are the most important changes I&amp;#8217;ve done to have it like I wanted, if you want to configure it in a different way you could follow the links above. :-)&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>The power of f and t in Vim</title>
   <author>javaguirre</author>
   <link href="http://javaguirre.net/2012/10/12/the-power-of-f-and-t-in-vim"/>
   <updated>2012-10-12T00:00:00+02:00</updated>
   <id>http://javaguirre.net/2012/10/12/the-power-of-f-and-t-in-vim</id>
   <content type="html">&lt;p&gt;Today I would like to write about some of the magic of Vim! I usually study how to code faster learning new Vim commands, some of my favourites are &lt;code&gt;f&lt;/code&gt; and &lt;code&gt;t&lt;/code&gt;, they&amp;#8217;re really handy when you need to change parts of a line and these parts are not wrapped by anything, such as marks, brackets or a simple word.&lt;/p&gt;

&lt;p&gt;We&amp;#8217;d better see an example:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;// specify an alternate install location for Bower
bower: {
  dir: &amp;#39;app/scripts/vendor&amp;#39;
},&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;we would like to erase &lt;code&gt;scripts/vendor&lt;/code&gt; from the code above, and the cursor is in the &lt;code&gt;dir&lt;/code&gt; word, to achieve our goal we could do &lt;code&gt;fs&lt;/code&gt; to go there and then &lt;code&gt;3dw&lt;/code&gt;, but the second command could be replaced by &lt;code&gt;dt&amp;#39;&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;If we wanted to delete &lt;code&gt;app/&lt;/code&gt; we could do &lt;code&gt;dT&amp;#39;&lt;/code&gt;, but if we wanted to jump to the last slash (from our actual position, the first s in scripts) and then delete everything behind and inside the marks we could do &lt;code&gt;f/&lt;/code&gt; and then &lt;code&gt;dT&amp;#39;&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;This example was really easy, but if you didn&amp;#8217;t know these commands it&amp;#8217;s a fast solution when you couldn&amp;#8217;t just delete an inner word (&lt;code&gt;diw&lt;/code&gt;), something between quotation marks (&lt;code&gt;di&amp;#39;&lt;/code&gt;), etc.&lt;/p&gt;

&lt;p&gt;These are the things that make me love Vim. :-)&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Returning to Symfony, building API and playing with AngularJS</title>
   <author>javaguirre</author>
   <link href="http://javaguirre.net/2012/10/11/returning-to-symfony"/>
   <updated>2012-10-11T00:00:00+02:00</updated>
   <id>http://javaguirre.net/2012/10/11/returning-to-symfony</id>
   <content type="html">&lt;p&gt;It&amp;#8217;s been almost two months since I started working again, now I have two projects, one of them using &lt;strong&gt;Symfony&lt;/strong&gt; because my teammate in this project knew PHP, so it was the right choice.&lt;/p&gt;

&lt;p&gt;Symfony has improved so much since I started using it a few years ago, now they use the package manager called &lt;em&gt;composer&lt;/em&gt;, it has a good template engine(&lt;em&gt;Twig&lt;/em&gt;), and more. There are a lot of ways to do the same, so you could choose the better solution for your current situation.&lt;/p&gt;

&lt;p&gt;In our case we wanted to use Symfony with &lt;strong&gt;AngularJS&lt;/strong&gt;, the Javascript client framework from Google, so a Restful API was necessary. There is a really complete bundle (modules/plugins in Symfony) to achieve this, &lt;a href='https://github.com/FriendsOfSymfony/FOSRestBundle'&gt;FOSRestBundle&lt;/a&gt;, but I thought it was too complex for what I wanted, so I decided to use a mix with the &lt;code&gt;@Template&lt;/code&gt; annotation in the Controller and define the routing with the &lt;code&gt;_format&lt;/code&gt; special variable.&lt;/p&gt;

&lt;p&gt;The controller would look more or less like this&amp;#8230;&lt;/p&gt;
&lt;pre&gt;&lt;code data-language='php'&gt;
    ...

    /**
     * @Template()
     */
	public function indexAction()
    {
        $products = $this-&gt;getDoctrine()
                -&gt;getRepository()
                -&gt;find();

        return array(&quot;products&quot; =&gt; $products);
    }

    /**
     *  @Template()
     */
    public function showAction($id)
    {
        $product = $this-&gt;getDoctrine()
                -&gt;getRepository()
                -&gt;findOneById($id);

        return array(&quot;product&quot; =&gt; $product);
    }

    /**
     *  @Template()
     */
	public function newAction()
    {
        return array(&quot;product&quot; =&gt; new Product());
	}

    /**
     *  @Template()
     */
	public function deleteAction($id)
    {
        $em = $this-&gt;getDoctrine()-&gt;getManager();
        $product = $em
                -&gt;getRepository()
                -&gt;find($id);

        if (!$product)
        {
            throw $this-&gt;createNotFoundException('msg');
        }

        $em-&gt;remove($product);
        $em-&gt;flush();

        return new RedirectResponse($this-&gt;generateUrl('product_index'));
	}

    /**
     *  @Template()
     */
    public function editAction($id)
    {
        return $this-&gt;render(&quot;MyBundle:Product:new.html.twig&quot;);
	}

    /**
     *  @Template()
     */
    public function saveAction($product_id=-1)
    {
        ... save stuff getting JSON object
    }
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This would be a normal Controller defining CRUD actions for Product, we didn&amp;#8217;t need to define a template &lt;code&gt;render&lt;/code&gt; here because the &lt;code&gt;@Template&lt;/code&gt; annotation will take care of finding the right template according to the name of the action (&lt;code&gt;*.html.twig&lt;/code&gt; or &lt;code&gt;*.json.twig&lt;/code&gt; in my case). In the editAction we wanted to show a specific template so we didn&amp;#8217;t need to write the &lt;code&gt;@Template&lt;/code&gt; annotation and we write the render explicitly.&lt;/p&gt;

&lt;p&gt;About the model, for this to work is necessary for the Entity to implement the &lt;code&gt;JsonSerializable&lt;/code&gt; interface (new in &lt;strong&gt;PHP 5.4&lt;/strong&gt;), and then create the &lt;code&gt;jsonSerialize&lt;/code&gt; method returning the array.&lt;/p&gt;

&lt;p&gt;Our routing file could be like this one:&lt;/p&gt;
&lt;pre&gt;&lt;code data-language='php'&gt;
    _product_index:
        pattern: /products/all
        defaults: { _controller: MyBundle:Product:index }
        requirements:
            _format: json
            _method: GET

    _product_new:
        pattern: /products/new
        defaults: {_controller: MyBundle:Product:new, _format: json }
        requirements:
            _method: GET

    product_get:
        pattern: /products/{id}
        defaults: {_controller: MyBundle:Product:show, _format: json }
        requirements:
            _method: GET

    product_create:
        pattern: /products/create
        defaults: { _controller: MyBundle:Product:save, _format: json}
        requirements:
            _method: POST

    product_save:
        pattern: /products/{id}
        defaults: { _controller: MyBundle:Product:save, _format: json}
        requirements:
            _method: PUT

    product_delete:
        pattern: /products/{id}
        defaults: { _controller: MyBundle:Product:delete, _format: json }
        requirements:
            _method: DELETE
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;To retrieve this data easily from Angular we would create a resource:&lt;/p&gt;
&lt;pre&gt;&lt;code data-language='javacript'&gt;
    angular.module('myServices', ['ngResource']).
        factory('Product', function($resource) {
            return $resource('/products/:productId', {}, {
                query: { method: 'GET', params: {productId: 'all'}, isArray: true},
                get: { method: 'GET'},
                save: { method : 'PUT'},
                create: { method : 'POST'},
                destroy: { method : 'DELETE'}
            });
        });
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;With this few lines we have all requests defined for Angular to retrieve and interact with data from server, if you want to know more about Angular resources, there&amp;#8217;s good documentation in &lt;a href='http://docs.angularjs.org/tutorial/step_11'&gt;their site&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;This is too long now so just a little tip, you could create the twig json template just with this line of code&amp;#8230;&lt;/p&gt;
&lt;pre&gt;&lt;code data-language='php'&gt;
    //Resources/.../product.json.twig
    \{\{ products|json_encode|raw \}\}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;If you don&amp;#8217;t use the &lt;code&gt;@Template&lt;/code&gt; annotation is not necessary to create this template, you could just serve a json object using &lt;code&gt;json_encode&lt;/code&gt;, but it&amp;#8217;s necessary with my approach.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Backbone y Flask, primeras impresiones</title>
   <author>javaguirre</author>
   <link href="http://javaguirre.net/2012/09/13/backbone-flask-primeras-impresiones"/>
   <updated>2012-09-13T00:00:00+02:00</updated>
   <id>http://javaguirre.net/2012/09/13/backbone-flask-primeras-impresiones</id>
   <content type="html">&lt;p&gt;Hacía tiempo que quería probar &lt;a href='http://backbonejs.org'&gt;Backbone&lt;/a&gt; y en mi trabajo no había tenido la oportunidad de hacerlo, ahora que tengo tiempo libre he decidido probar y poner en práctica todas estas cosas que creo se han convertido en estándar &lt;em&gt;de facto&lt;/em&gt; y no he tenido la oportunidad por falta de tiempo.&lt;/p&gt;

&lt;p&gt;Hace dos semanas estuve con un proyecto de Android y practiqué los principios básicos de su API, la semana pasada le tocó el turno a Backbone, ya que mi proyecto Android quedó en punto muerto y hay otro proyecto que quiero dejar listo pronto ahora que tengo tiempo para ello.&lt;/p&gt;

&lt;p&gt;Estuve probando el proyecto de to-dos, primer ejemplo básico construido con Backbone y Flask, y de ahí lo adapté a lo que yo necesitaba para &lt;a href='https://github.com/javaguirre/openboe'&gt;OpenBoe&lt;/a&gt;, y estoy muy contento con cómo ha quedado la estructura del frontend y lo fácil que son las cosas con Backbone una vez que le has dedicado un tiempo. Todavía mi código no es muy bueno (llevo pocas horas probando con las herramientas), pero ya hace lo que yo necesitaba, que no es poco, la segunda fase será optimizar el código y hacerlo más agradable.&lt;/p&gt;

&lt;p&gt;Para poner en situación, OpenBOE es un servicio escrito en Flask con una tarea en background que hace scraping sobre la web oficial del BOE y guarda los datos extraídos en una base de datos en Mongo para su posterior ordenación y filtrado en el servicio. La parte del frontend ahora es más dinámica, no teniendo que cargar parte de la pantalla, ya que era innecesario completamente. Ahora sólo se refrescará la lista en función de nuestros parámetros de búsqueda y a correr. :-)&lt;/p&gt;

&lt;p&gt;Con esto quería mostrar un ejemplo sencillo de cómo lo he hecho para los que tengan ganas de empezar con Backbone y les haya dado pereza meterse en la documentación oficial o en algún proyecto ejemplo.&lt;/p&gt;

&lt;p&gt;La parte servidor podría ser:&lt;/p&gt;
&lt;pre&gt;&lt;code data-language='python'&gt;
    @app.route(&quot;/&quot;)
    def index():
        '''
            Cargamos la vista principal, en la que sólo cargaremos
            las secciones y los titulos para poder navegar por ellas
            posteriormente
        '''

        sections = Db().get_col('section')
        feeds = Db().get_col('feed')

        return render_template(&quot;index.html&quot;, sections=sections, feeds=feeds)


    @app.route(&quot;/links/&quot;, methods=['GET', 'POST'])
    def feed():
        '''
            Cargamos los elementos del feed rss
            tomado como parámetro, Esta función servirá
            para cargar todos los datos que necesitemos
            en cualquier sección de la web
        '''

        feed_slug = request.args.get('feed', '')
        feed = Db().find_one('feed', {&quot;slug&quot;: feed_slug})
        if not feed:
            abort(404)

        links = Db().has('link', {&quot;feed_id&quot;: feed['_id']}, sort_field=&quot;date&quot;)

        return  make_json_response(links)

        ...

    def make_json_response(body):
        '''
            Crea una respuesta en JSON para cuando lo solicite
            Backbone.
        '''

        resp = make_response(json.dumps(body, default=json_util.default))
        resp.mimetype = 'application/json'

        return resp
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Ya tenemos todo lo necesario para empezar a jugar con Backbone, una primera vista index que se cargará al inicio, y con los menús que hemos creado en ella iremos navegando por la web, de la navegación se encargará en este caso el frontend, o mejor dicho Backbone.Router.&lt;/p&gt;

&lt;p&gt;El método feed se encargará de dar los datos en JSON en función de en qué sección nos encontremos. Aquí podríamos definir también filtrado de búsqueda para devolver sólo los datos en los que el usuario estuviese interesado.&lt;/p&gt;

&lt;p&gt;Vamos con la parte del frontend con Backbone.&lt;/p&gt;
&lt;pre&gt;&lt;code data-language='javascript'&gt;
    (function() {
        var TEMPLATE_URL = '/static';

        var Link = Backbone.Model.extend({
        });

        var LinkList = Backbone.Collection.extend({

            model: Link,

            url: '/links/',

            initialize: function(options) {
            },

            fetch: function(options) {
                return Backbone.Collection.prototype.fetch.call(this, options);
            }
        });

        var LinkView = Backbone.View.extend({
            tagName:  &quot;div&quot;,

            initialize: function(options) {
            },

            render: function() {
                var self = this;

                $(self.el).template(TEMPLATE_URL + '/templates/item.html', self.model.toJSON(), function() {
                    self.setText();
                });

                return this;
            },

            setText: function() {
                var text = this.model.get('description');
                var title = this.model.get('title');
                var link_link = this.model.get('link');
                var guid = this.model.get('guid');

                this.$('.item-description').text(text);
                this.$('.item-link').text(title);
                this.$('.item-link').attr('href', link_link);
                this.$('.pdf-item-link').attr('href', guid);
            }
        });

        window.LinkApp = Backbone.View.extend({

            events: {
                &quot;click #search-button&quot;: &quot;performSearch&quot;
            },

            initialize: function(options) {
                var self = this,
                    parentElt = options.appendTo || $('.body-container');

                TEMPLATE_URL = options.templateUrl || TEMPLATE_URL;

                parentElt.template(TEMPLATE_URL + '/templates/app.html', {}, function() {
                    self.el = $('#openboeapp');
                    self.delegateEvents();

                    self.links = new LinkList({feed: options.feed,
                                               query: options.query,
                                               params: options.params
                                              });
                    self.links.bind('add',   self.addOne, self);
                    self.links.bind('reset', self.addAll, self);
                    self.links.bind('all',   self.render, self);

                    self.section = options.section;
                    self.feed = options.feed;

                    self.links.fetch({feed: options.feed});
                });
            },

            render: function() {
                var self = this;
                return this;
            },

            addOne: function(link) {
                var view = new LinkView({model: link});
                this.$(&quot;#link-list&quot;).append(view.render().el);
            },

            addAll: function() {
                this.links.each(this.addOne);
            }
        });

        window.MyRouter = Backbone.Router.extend({
            routes: {
                &quot;!/&quot;: &quot;index&quot;,
                &quot;!/:section/:feed&quot;: &quot;feed_items&quot;,
            },

            index: function() {
                console.log(&quot;This is the index!&quot;);
            },

            feed_items: function(section, feed) {
                var myquery = query || &quot;&quot;;
                var view = new LinkApp({
                                        feed: feed,
                                        section: section
                                       });
            }
        });
    }());
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Hay varios elementos en Backbone, yo en este caso he utilizado Model, Collection, Router y View.&lt;/p&gt;

&lt;p&gt;Lo más importante que hay que saber en este caso es que el Collection llamará a nuestro servidor cuando usemos fetch para traerse los datos de tipo Link (Model), y usará la url definida en &lt;strong&gt;url&lt;/strong&gt;. Añadiendo parámetros a esta url en la inicialización del objeto o en fetch, podremos hacer consultas &lt;em&gt;personalizadas&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;La View se encargará de pintar su plantilla o el html asociada a ella donde nosotros le digamos (en este caso en &lt;em&gt;#openboeapp&lt;/em&gt;), y en su initialize podremos llamar al fetch de los objetos que necesitemos para cuando esta vista se inicie así como unir algún evento a funciones de nuestra vista o casi hacer cualquier cosa que queramos.&lt;/p&gt;

&lt;p&gt;En mi caso tengo dos views, una para pintar cada elemento y otra que se encarga de la colección, muy útil si queremos crear eventos de edición eliminación de cada objeto manteniendo limpia la vista padre y haciendo más fácil el testeo de cada parte. En LinkView tenemos un &lt;em&gt;setText&lt;/em&gt;, que se encargará de inyectar nuestras variables en el template definido en esta parte, pero es más limpio pasarle una lista de objetos al propio template y definir en éste donde va cada variable.&lt;/p&gt;

&lt;p&gt;Para darle un poco de sentido y localización a cada vista y los posibles datos en ellas, podemos organizarlo todo en el Router. En él definiremos la ruta y qué método se encargará de la petición entrante por ésta.&lt;/p&gt;

&lt;p&gt;Por ahora poco más, puedes ver el ejemplo completo en el repositorio de &lt;a href='http://github.com/javaguirre/openboe'&gt;OpenBOE&lt;/a&gt; y seguir &lt;a href='https://github.com/larrymyers/backbone-full-stack'&gt;otras referencias&lt;/a&gt; que he comentado en el artículo.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Problems with Mercurial</title>
   <author>javaguirre</author>
   <link href="http://javaguirre.net/2012/09/05/problems-with-mercurial"/>
   <updated>2012-09-05T00:00:00+02:00</updated>
   <id>http://javaguirre.net/2012/09/05/problems-with-mercurial</id>
   <content type="html">&lt;p&gt;It&amp;#8217;s been a while since I had this problem with mercurial in Archlinux, and now was time to fix it.&lt;/p&gt;

&lt;p&gt;Before I started using virtualenv months ago, I did all my experiments in the Archlinux root for Python2.7, it seems it(or I) broke something in a compilation and it affected Mercurial build for my system. I couldn&amp;#8217;t even clone a mercurial repository, it always threw this &lt;em&gt;interesting&lt;/em&gt; error&amp;#8230;&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;    Traceback (most recent call last):
  File &amp;quot;/usr/bin/hg&amp;quot;, line 36, in &amp;lt;module&amp;gt;
    mercurial.util.setbinary(fp)
  File &amp;quot;/usr/lib/python2.7/site-packages/mercurial/demandimport.py&amp;quot;, line 86, in __getattribute__
    self._load()
  File &amp;quot;/usr/lib/python2.7/site-packages/mercurial/demandimport.py&amp;quot;, line 58, in _load
    mod = _origimport(head, globals, locals)
  File &amp;quot;/usr/lib/python2.7/site-packages/mercurial/util.py&amp;quot;, line 202, in &amp;lt;module&amp;gt;
    collections.deque.remove
  File &amp;quot;/usr/lib/python2.7/site-packages/mercurial/demandimport.py&amp;quot;, line 86, in __getattribute__
    self._load()
  File &amp;quot;/usr/lib/python2.7/site-packages/mercurial/demandimport.py&amp;quot;, line 58, in _load
    mod = _origimport(head, globals, locals)
  File &amp;quot;/usr/lib/python2.7/collections.py&amp;quot;, line 9, in &amp;lt;module&amp;gt;
    from operator import itemgetter as _itemgetter
  File &amp;quot;/usr/lib/python2.7/site-packages/mercurial/demandimport.py&amp;quot;, line 114, in _demandimport
    mod = _origimport(name, globals, locals)
ImportError: /usr/lib/python2.7/site-packages/operator.so: undefined symbol: _PyUnicodeUCS2_AsDefaultEncodedString&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;I tried to fix it compiling python with &lt;code&gt;--enable-unicode=ucs4&lt;/code&gt;, but didn&amp;#8217;t work. After an hour trying to fix this in &lt;code&gt;/usr/lib&lt;/code&gt;, I realised I could try to fix it in a virtualenv, it&amp;#8217;s a great way to have everything under control in any of your python projects and I&amp;#8217;ve been using it for every project.&lt;/p&gt;

&lt;p&gt;My final solution was as easy as&amp;#8230;&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ virtualenv2 ~/.virtualenvs/mercurial
$ workon mercurial # Or ~/.virtualenvs/mercurial/bin/activate
$ cd Mercurial-3ee5d3c372fa/ # tarball from http://selenic.com/hg/file/3ee5d3c372fa
$ python setup.py install&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;That&amp;#8217;s it! it runs smoothly now.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;UPDATE&lt;/strong&gt;: Once I could isolate the problem I realised it had to be with some kind of problem with an import for SSL, I moved the operator.so file and installed the Mercurial tarball I downloaded previously in my virtualenv (and worked there), I think the problem is solved now, It seemed a compilation build was done in a wrong place. :-)&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Doc Translator II</title>
   <author>javaguirre</author>
   <link href="http://javaguirre.net/2012/08/24/doc-translator-ii"/>
   <updated>2012-08-24T00:00:00+02:00</updated>
   <id>http://javaguirre.net/2012/08/24/doc-translator-ii</id>
   <content type="html">&lt;p&gt;Well, this week I&amp;#8217;ve been studying how to do the document translator and developing the project for Android, but I didn&amp;#8217;t have good results for the text recognition in images and I don&amp;#8217;t think I will because of the tesseract library, I knew it was old but I wanted to do some tests with it.&lt;/p&gt;

&lt;p&gt;I don&amp;#8217;t think it&amp;#8217;s a solution for my problem by now, so I will keep studying Android but this project will be stopped, I will give a try to some of the applications in Google Play, maybe one of them will suit me. :-)&lt;/p&gt;

&lt;p&gt;Now it&amp;#8217;s time to do more research.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>So much reading!</title>
   <author>javaguirre</author>
   <link href="http://javaguirre.net/2012/08/22/so-much-reading"/>
   <updated>2012-08-22T00:00:00+02:00</updated>
   <id>http://javaguirre.net/2012/08/22/so-much-reading</id>
   <content type="html">&lt;p&gt;When I was in Madrid I didn&amp;#8217;t have enough time to do nothing during the week. I work less hours here and now that I don&amp;#8217;t have a job I spend some hours programming and reading, technical books and literature.&lt;/p&gt;

&lt;p&gt;Our habits have changed here in The Netherlands, now we have more time in the afternoon, we watch less series and we read more. All our books are now digital because when we moved we needed to control the space and weight of our suitcases, we left all our books in Spain and now my girlfriend is happy with her kindle and I read in a TF300 tablet I bought in my last weeks in Madrid.&lt;/p&gt;

&lt;p&gt;I have read Michael Crichton&amp;#8217;s &lt;em&gt;Jurassic Park&lt;/em&gt; and &lt;em&gt;The Lost World&lt;/em&gt; books, &lt;em&gt;Odisea Two&lt;/em&gt; from Arthur C. Clarke, first book of Asimov&amp;#8217;s &lt;em&gt;Lucky Starr&lt;/em&gt; and two books from Matilde Asensi in this five weeks, but I&amp;#8217;m also finishing &lt;em&gt;The Pragmatic Programmer&lt;/em&gt;, in the middle of &lt;em&gt;The Vi and Vim Editors&lt;/em&gt; and starting &lt;em&gt;Android Development&lt;/em&gt;, I&amp;#8217;m quite interested in the last one.&lt;/p&gt;

&lt;p&gt;I need to spend my time in a practical way, reading and programming are some of the most enjoyable ways for doing it for me. :-)&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Doc Translator, First Steps</title>
   <author>javaguirre</author>
   <link href="http://javaguirre.net/2012/08/21/doc-translator-first-steps"/>
   <updated>2012-08-21T00:00:00+02:00</updated>
   <id>http://javaguirre.net/2012/08/21/doc-translator-first-steps</id>
   <content type="html">&lt;p&gt;Today I resume my work in the &lt;a href='https://github.com/javaguirre/android-doctranslator'&gt;Doc Translator project&lt;/a&gt;, its goal is to be capable of getting data from images via OCR (with &lt;strong&gt;tesseract library&lt;/strong&gt;) and then translate it via Google Translator, it&amp;#8217;s also a perfect excuse for me to start developing for android devices. :-)&lt;/p&gt;

&lt;p&gt;A couple of weeks ago a friend told me this functionality is already implemented in Google Goggles, but it&amp;#8217;s not really useful with documents. I have the same problem with Google Translator functionality, good for signs or small sentences, but not good for documents, so I will try to use the tesseract library and we&amp;#8217;ll see if we could make any progress in this field.&lt;/p&gt;

&lt;p&gt;I&amp;#8217;ve been playing around with buttons and the Camera API, nothing serious yet but you can follow the development in &lt;a href='https://github.com/javaguirre/android-doctranslator'&gt;github&lt;/a&gt;.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Web Static Gallery Generator</title>
   <author>javaguirre</author>
   <link href="http://javaguirre.net/2012/08/20/static-gallery-generator"/>
   <updated>2012-08-20T00:00:00+02:00</updated>
   <id>http://javaguirre.net/2012/08/20/static-gallery-generator</id>
   <content type="html">&lt;p&gt;I have time now to develop some projects I left unattended this last three weeks, one of them was the web gallery generator I &lt;a href='http://javaguirre.net/2012/08/12/android-static-gallery-generator/'&gt;talked about before&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Today I have implemented some goodies and now the generator output is easier to configure. We have new options from the command line and the source of the gallery shouldn&amp;#8217;t be the same directory as the destiny. I&amp;#8217;ve also added a simple server to check everything is fine during development and to debug custom templates if someone does it. There&amp;#8217;s also the possibility to reload the gallery, this wasn&amp;#8217;t possible before.&lt;/p&gt;

&lt;p&gt;If you want to use it and change the template of the gallery, you could build your own using &lt;a href='http://address'&gt;jinja syntax&lt;/a&gt;, adding it to the templates directory, and finally selecting it from the command line with the &lt;code&gt;--template-gallery&lt;/code&gt; option.&lt;/p&gt;

&lt;p&gt;This is the help from the command line:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;usage: generator.py [-h] [--template-gallery TEMPLATE_GALLERY]
                [--template-menu TEMPLATE_MENU] [--src SRC] [--dst DST]
                [--server] [--port PORT] [--reload]

Static Gallery Generator Options.

optional arguments:
  -h, --help            show this help message and exit
  --template-gallery TEMPLATE_GALLERY
                        Choose the name of the template for the gallery
  --template-menu TEMPLATE_MENU
                        Choose the template for the menu
  --src SRC             Source directory for the gallery
  --dst DST             Destiny where the web gallery will be generated
  --server              Executes a server
  --port PORT           Choose the port for the server, by default 8000
  --reload              Reload all galleries, even if they exist in the
                        destiny&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The next step could be to create a pip package, I think I don&amp;#8217;t need more features, but we will see. If you are interested you can check/fork the code in &lt;a href='https://github.com/javaguirre/static_gallery_generator'&gt;github&lt;/a&gt; or see an &lt;a href='http://album.javaguirre.net'&gt;example&lt;/a&gt;.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Follow your heart</title>
   <author>javaguirre</author>
   <link href="http://javaguirre.net/2012/08/14/follow-your-heart"/>
   <updated>2012-08-14T00:00:00+02:00</updated>
   <id>http://javaguirre.net/2012/08/14/follow-your-heart</id>
   <content type="html">&lt;p&gt;This week I quitted my actual job. It was my first job in The Netherlands and I was working there for just a month, but I was certain I wasn&amp;#8217;t happy with it. The main reason was I didn&amp;#8217;t want to develop web applications using the GWT stack, this wasn&amp;#8217;t defined when I first accept the job and was a bit dissapointed at first. Anyway I think I need to search something that I could really like, I have the possibility to choose and I thank that.&lt;/p&gt;

&lt;p&gt;People in the company was really great, but you need more than that to be happy. Now it&amp;#8217;s time for me to search for a company where I could really fit, I&amp;#8217;ll try to use this free time to contribute to some cool projects!&lt;/p&gt;

&lt;p&gt;Of course I&amp;#8217;m opened to &lt;em&gt;pythonic&lt;/em&gt; offers. :-)&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Projects, Translator and Static Gallery Generator</title>
   <author>javaguirre</author>
   <link href="http://javaguirre.net/2012/08/12/android-static-gallery-generator"/>
   <updated>2012-08-12T00:00:00+02:00</updated>
   <id>http://javaguirre.net/2012/08/12/android-static-gallery-generator</id>
   <content type="html">&lt;p&gt;I've been busy these last two weeks, just exploring the country I live in. We've also visited other cities such as Rotterdam and Amsterdam so my personal projects are improving slowly now.&lt;/p&gt;

&lt;p&gt;Although I have three new ideas, two of them currently in development, the other come out today, so it's just nothing yet. All of them cover some needs I realised I have. The first was &lt;a href=&quot;https://github.com/javaguirre/static_gallery_generator&quot;&gt;the album gallery&lt;/a&gt;, I wanted to share photos with my family in Spain, I was using Flickr until I reached the 200 photos limit (didn't know Flickr had it). I didn't want to pay for this service because I barely used it in the past and I'm paying two servers for personal use, so I thought the best solution could be having a static gallery generator using my actual directory gallery tree to define navigation, that's what I did finally. I didn't like any of the projects I checked to solve the problem, because they were too big for what I wanted or for other reasons.&lt;/p&gt;

&lt;p&gt;I found something what was &lt;a href=&quot;https://github.com/deckard-fr/Static-Gallery-Generator&quot;&gt;aproximately what I wanted&lt;/a&gt;, but last week I finished &lt;a href=&quot;https://github.com/javaguirre/static_gallery_generator&quot;&gt;rewriting almost everything&lt;/a&gt;(there were a &lt;em&gt;few lines of code&lt;/em&gt;). The project uses now &lt;strong&gt;Jinja2&lt;/strong&gt; to generate everything and doesn't have any framework or standalone server like the project I forked from(It uses Flask).&lt;/p&gt;

&lt;p&gt;The second project I thought I need is a Dutch translator for &lt;em&gt;important&lt;/em&gt; documents, like contracts and this kind of things. &lt;a href=&quot;https://github.com/javaguirre/android-doctranslator&quot;&gt;The application&lt;/a&gt; has two parts, we could take a photo with the device camera and then get the text using &lt;a href=&quot;http://en.wikipedia.org/wiki/Optical_character_recognition&quot;&gt;OCR&lt;/a&gt; technology (in this case &lt;a href=&quot;http://code.google.com/p/tesseract-ocr/&quot;&gt;Google's tesseract library&lt;/a&gt; using &lt;a href=&quot;http://developer.android.com/tools/sdk/ndk/index.html&quot;&gt;NDK&lt;/a&gt; to build a Java Library). The second part is sending the text to Google Translator API (Paid API) and then returning the text translated. This project is really useful for me in the Netherlands but I don't see a commercial exit for it because is completely dependent in Google API. Anyone who wants to use the API has to pay 20$ per 1 million words, something difficult to control and with high risk of getting people frustrated using the app (because most of them couldn't know this issue).&lt;/p&gt;

&lt;p&gt;I will talk about the third project soon, it's related with &lt;strong&gt;OpenStreetMap&lt;/strong&gt;.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Todo en Java</title>
   <author>javaguirre</author>
   <link href="http://javaguirre.net/2012/07/25/todo-en-java"/>
   <updated>2012-07-25T00:00:00+02:00</updated>
   <id>http://javaguirre.net/2012/07/25/todo-en-java</id>
   <content type="html">&lt;p&gt;¡Oh no! Esto es un poco lo que pensé cuando me enteré de que todo el servicio web en la empresa estaba hecho en Java. Ahora lo veo más algo motivante e interesante, realmente estoy disfrutando que me hayan sacado de mis casillas digamos, tener que trabajar en Java y hacerme un poco la puñeta a la hora de necesitar una herramienta de desarrollo que me ayude a entender la arquitectura y me autocomplete un poquito para avanzar rápido, con lo feliz y cómodo que estaba yo usando Vim...&lt;/p&gt;

&lt;p&gt;Me parece muy interesante tener que usar Eclipse(empecé con NetBeans pero las cosas que necesitaba tienen bugs en Arch) y sacarme de mi hábitat aunque eso cueste algún tiempo de adaptación, creo que con algún que otro plugin lo estoy sobrellevando bien (El plugin &lt;strong&gt;Vrapper&lt;/strong&gt; por ejemplo, que funciona perfecto para tener los comandos de Vim en Eclipse). A pesar de tener este plugin es siempre útil aprender alguna tecla rápida más para ahorrar tiempo, siempre bienvenido.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Primeros días en Holanda</title>
   <author>javaguirre</author>
   <link href="http://javaguirre.net/2012/07/25/primeros-dias-holanda"/>
   <updated>2012-07-25T00:00:00+02:00</updated>
   <id>http://javaguirre.net/2012/07/25/primeros-dias-holanda</id>
   <content type="html">&lt;p&gt;Ya llevo aquí unos días, la verdad es que estoy muy contento con ello, ya tengo mi propia bici, el tiempo es buenísimo para comer fuera ahora,  la gente en todas partes a la que vas es muy amable y las personas en el trabajo han estado desde el primer día haciéndome sentir como si (casi) estuviese en casa.&lt;/p&gt;

&lt;p&gt;Java, mi primer acercamiento al lenguaje tras aquella primera versión de Callejero, aquel código era una calamidad y acabamos reescribiendo a Symfony. Ahora en otra empresa tenemos un equipo con experiencia en Java y que saben cómo funcionan las cosas, así que para mí el acercamiento está siendo más sencillo gracias al apoyo del equipo técnico aquí.&lt;/p&gt;

&lt;p&gt;Hasta hoy todavía tenía dudas de por qué el framework, hoy me ha quedado todo claro y estoy más contento por saber dónde me he metido. :-)&lt;/p&gt;

&lt;p&gt;Delft es increíble, una ciudad preciosa para vivir, y ahora en verano cuando no llueve todo es bonito y la gente sale a la calle a hacer barbacoas y a pasear a la orilla del canal con un helado. Me gusta la lluvia así que no creo que sea para mí un problema, me encantaba cuando vivía en Santander y cuando estaba en Irlanda, me encanta esa sensación de estar a resguardo mientras escuchas el sonido de la lluvia. Me gusta poder ver a los enormes patos en el campus cómo van viviendo su vida tranquilamente sin que nadie les moleste, haciendo lo que les da la gana.&lt;/p&gt;

&lt;p&gt;Pensaba que este artículo iba a ser algo más técnico, pero al final no quería volver a hablar de lo mismo de siempre, sólo que estamos usando Google Web Toolkit y tengo que decir que no está tan mal. :-P&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Owncloud y Android</title>
   <author>javaguirre</author>
   <link href="http://javaguirre.net/2012/07/16/owncloud-y-android"/>
   <updated>2012-07-16T00:00:00+02:00</updated>
   <id>http://javaguirre.net/2012/07/16/owncloud-y-android</id>
   <content type="html">&lt;p&gt;La semana pasada tuve un poco de tiempo para dedicarle a cosillas varias, todas centradas en &lt;a href =&quot;http://owncloud.org/&quot;&gt;OwnCloud&lt;/a&gt; y Android. Anteriormente estuve intentando rutear y cambiar el Sistema Operativo de un Samsung Galaxy S2 desde ArchLinux. Root fue facilísimo, pero cuando tuve que cambiar la imagen factoryfs.img con la aplicación &lt;a href=&quot;https://github.com/Benjamin-Dobell/Heimdall&quot;&gt;heimdall&lt;/a&gt;, el proceso falló y la carga de Android se quedaba congelada. Al estar todavía operativo el modo Recovery y el Download, finalmente con la aplicación Odín en Windows pude arreglar el sistema y meter ICS, fue pan comido. :-)&lt;/p&gt;

&lt;p&gt;Tras leer un artículo de mi amigo &lt;a href=&quot;http://blog.edulix.es/&quot;&gt;Edulix sobre sus ideas inspiradas por la Akademy&lt;/a&gt;, conocí &lt;strong&gt;OwnCloud&lt;/strong&gt;, proyecto de la gente de KDE para tener tu propio Dropbox (sincronización de carpetas y WebDAV), además poder reproducir música y algunas golosinas más, hecho en PHP. El proyecto me pareció interesante desde el principio y no costó hacerlo funcionar sobre Nginx y php-fpm, no obstante no me ha convencido, tras estar una semana trasteando con él lo he borrado, tenía algunas cosas que no funcionaban para mí, y la verdad es que me da mucha pereza meterme a parchear código en PHP, ya conozco cómo es y prefiero pelearme con lenguajes que no conozco o que me gustan. No obstante es un servicio que llegará a estar realmente maduro pronto, está creciendo mucho y tienen planeada una release cada tres meses.&lt;/p&gt;

&lt;p&gt;Con respecto a Android ahora que tengo algo de tiempo y me he comprado una &lt;strong&gt;ASUS TF300&lt;/strong&gt; me quiero meter en serio a hacer algo con él, tengo un par de ideas para practicar el desarrollo con Android y meterme un poco con Java. El primer proyecto va sobre traducción de documentos, el segundo un sencillo juego, a ver qué tal sale.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Emigro a Holanda</title>
   <author>javaguirre</author>
   <link href="http://javaguirre.net/2012/07/13/emigro-a-holanda"/>
   <updated>2012-07-13T00:00:00+02:00</updated>
   <id>http://javaguirre.net/2012/07/13/emigro-a-holanda</id>
   <content type="html">&lt;p&gt;Llevaba unos meses barruntando la idea de irme fuera a trabajar. Me da la sensación de que ya no estaba aprendiendo todo lo que podría, y que mis prioridades iban cambiando, decantándome más por tener más tiempo libre para hacer más lo que me gusta y disfrutar más de proyectos personales y contribuciones a proyectos de Software Libre y no depender del propio proyecto en el que trabajo.&lt;/p&gt;

&lt;p&gt;Ha sido esta la mejor etapa profesional sin duda, no sólo porque he trabajado con buenas personas, sino también porque a nivel profesional hay una calidad altísima, una gran experiencia y un cuidado por los detalles y de todos y cada uno de los integrantes del equipo pude aprender algo o mucho en función del trato que pude tener con ellos.&lt;/p&gt;

&lt;p&gt;Sin embargo siempre hay cosas que crees que pueden mejorar, tanto a nivel personal como a nivel de empresa, y eso es lo que busco saliendo fuera de España y buscando la posibilidad de encontrar un trabajo más creativo y en el que tenga la posibilidad de liberar el software. Hay empresas muy interesantes en nuestro país en las que me habría encantado trabajar ahora, pero se me antoja muy atractivo ver cómo se trabaja más allá de los Pirineos. :-)&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://conference-compass.com/&quot;&gt;Conference Compass&lt;/a&gt; es una pequeña empresa de éxito que me ha dado la confianza para cambiar de tercio y aprender nuevas cosas y ganar calidad de vida más allá de Madrid.&lt;/p&gt;

&lt;p&gt;Madrid es una gran ciudad, llena de posibilidades, pero ahora quiero probar otra cosa.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Primera semana de Julio</title>
   <author>javaguirre</author>
   <link href="http://javaguirre.net/2012/07/08/primera-semana-de-julio"/>
   <updated>2012-07-08T00:00:00+02:00</updated>
   <id>http://javaguirre.net/2012/07/08/primera-semana-de-julio</id>
   <content type="html">&lt;p&gt;He pensado que ya que no voy a poder pisar la playa este verano (al menos no mis queridas playas del sur), que el fin de semana me sirva para aprovechar el tiempo.&lt;/p&gt;

&lt;p&gt;Esta semana ha sido divertida, he empezado a usar &lt;a href=&quot;http://tmux.sourceforge.net/&quot;&gt;tmux&lt;/a&gt; en serio, algo que llevaba tiempo queriendo hacer, y gracias a &lt;a href=&quot;https://github.com/aziz/tmuxinator/&quot;&gt;tmuxinator&lt;/a&gt; se han cumplido todas las expectativas que necesitaba (por ahora) para poder utilizarlo. Tuve que parchear un tema en &lt;strong&gt;tmuxinator&lt;/strong&gt;(escrito en Ruby, curiosidad) para que tmux me forzase el uso de 256 colores en vim, por ahí algo estaba reescribiendo alguna variable, y aunque tuviese las variables de entorno correctamente configuradas como mandan los cánones, los colores no querían salir, así que metemos un &lt;em&gt;tmux -2&lt;/em&gt;(forzando los 256 colores desde tmux) y a correr.&lt;/p&gt;

&lt;p&gt;Tenía pensado también sacar una parte (parseador de tecnologías dada una url) de mi proyecto &lt;strong&gt;Sabrosous&lt;/strong&gt;, no obstante habría que reescribirlo y el código era... como decirlo... un truño, así que investigué por ahí tener algo parecido para la consola y no tener que reinventar la rueda, encontré &lt;a href=&quot;https://github.com/skroutz/wappalyzer-ruby&quot;&gt;wappalyzer_rb&lt;/a&gt;. Es un port del plugin de Firefox/Chrome para descubrir las tecnologías de una web y escrito en &lt;strong&gt;Ruby&lt;/strong&gt;, así que me puse manos a la obra, le faltan algunas cosillas, pero por ahora me sirve para continuar. Le envié un parchecillo al chaval para controlar algún error y hacerlo más amable (al programa, al chaval no lo conozco).&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/ccampbell/rainbow&quot;&gt;Rainbow&lt;/a&gt;, llevaba un mes queriendo hacer algo más para Rainbow, el coloreador de sintaxis liviano, y al final le pude dedicar un ratillo y sacar una primera versión que colorea el lenguaje Go (por ejemplo), por esta parte me gustaría añadir tests unitarios para este lenguaje y para el que hice anteriormente para Lua, lo tengo como TODO. :-)&lt;/p&gt;

&lt;p&gt;Estuve investigando un poco cómo está &lt;a href=&quot;https://github.com/tsquillario/MiniSub&quot;&gt;MiniSub&lt;/a&gt;, el cliente de &lt;strong&gt;Subsonic&lt;/strong&gt;, programa de streaming de música, tengo alguna idea apuntada que intentaré hacer en mi pocos ratos libres entre las tardes de esta semana y el finde que viene, entre ellas meter algunos tooltips, hacerlo más &lt;em&gt;usable&lt;/em&gt;, que de eso le falta un poquillo.&lt;/p&gt;

&lt;p&gt;Poco más, estamos organizando la &lt;strong&gt;pycon ES en Madrid&lt;/strong&gt; y sería genial tener algo más de ayuda, de momento todo se está manejando en &lt;a href=&quot;http://groups.google.com/group/python-madrid&quot;&gt;la lista de Python Madrid&lt;/a&gt;, pero se quiere mover a una lista concreta para que todo el mundo pueda contribuir desde un terreno más &lt;em&gt;neutral&lt;/em&gt;. De momento se han concretado algunas cosas, y se está trabajando en otras, entre ellas el &lt;a href=&quot;https://github.com/python-madrid/pycon2012/tree/master/documentos&quot;&gt;dossier de las conferencias&lt;/a&gt;, que aún está bastante verde. Si os interesa más el tema podéis apuntaros a la lista arriba enlazada.&lt;/p&gt;

&lt;p&gt;Esto ha sido la semana, mañana comienza mi última semana en &lt;strong&gt;Gigas&lt;/strong&gt;, y posteriormente moverme a lugares más frescos, a otros proyectos y quehaceres.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Primer día en Holanda</title>
   <author>javaguirre</author>
   <link href="http://javaguirre.net/2012/06/29/primer-dia-holanda"/>
   <updated>2012-06-29T00:00:00+02:00</updated>
   <id>http://javaguirre.net/2012/06/29/primer-dia-holanda</id>
   <content type="html">&lt;p&gt;Todavía es de día en &lt;a href='http://www.panoramio.com/map/#lt=52.009507&amp;amp;ln=4.360515&amp;amp;z=4&amp;amp;k=2&amp;amp;a=1&amp;amp;tab=1&amp;amp;pl=all'&gt;Delft&lt;/a&gt;, dentro de dos semanas mi ciudad de residencia por un año (al menos), y he de decir que ha sido un día perfecto. Estoy realmente contento y feliz de poder venir a esta ciudad tan bonita, agradable y hogareña.&lt;/p&gt;

&lt;p&gt;Nada más llegar hemos conocido a mis futuros (en dos semanas) compañeros de trabajo, y nos han arropado muy amablemente en todo lo que hemos tenido que hacer hoy(incluida visita a Rotterdam de mi novia, que finalmente ha conseguido trabajo en un estudio de esta ciudad).&lt;/p&gt;

&lt;p&gt;El complejo en el que voy a trabajar de aquí a dos semanas es una antigua nave industrial con espacios reconvertidos a salas con sofás ¡e incluso un futbolín!, con vistas al verde que aquí es muy común, y muy cerca de la Universidad Tecnológica de Delft, una especie de jaula de startups.&lt;/p&gt;

&lt;p&gt;El día empezaba nuboso pero finalmente se ha abierto y el centro de Delft era un bullicio de gente de muchas nacionalidades, estudiantes y gente autóctona y de otras culturas que han salido a tomarse una cerveza. Mi impresión de esta ciudad es todo positiva, una ciudad tranquila, alegre y en la que la gente vive a otro ritmo, disfrutando quizás más de las cosas en su día a día, algo que realmente buscaba con este cambio además de otras cosas.&lt;/p&gt;

&lt;p&gt;El domingo vuelvo para Madrid para mis últimas dos semanas de trabajo en &lt;a href='http://gigas.com'&gt;Gigas&lt;/a&gt;, pero si os digo la verdad yo me quedaría ya en esta bonita ciudad de canales. :-)&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>New web changes, github and twitter plugins</title>
   <author>javaguirre</author>
   <link href="http://javaguirre.net/2012/06/22/web-changes"/>
   <updated>2012-06-22T00:00:00+02:00</updated>
   <id>http://javaguirre.net/2012/06/22/web-changes</id>
   <content type="html">&lt;p&gt;Well, they are more code snippets than plugins, but it was easy to integrate it inside my static web blog, using just JSONP calls. I think the Twitter API I'm using could be deprecated soon, but it worked for me by now, so it stays as is for a few time. I will separate the two elements (twitter/github plugins) from the default view just to make easier the copy and tweak of this code in your jekyll projects.&lt;/p&gt;

&lt;p&gt;I'm using basic jQuery in this example, so it shouldn't be difficult to get it working in your service even if you don't have much javascript background.&lt;/p&gt;

&lt;p&gt;For twitter &lt;em&gt;syntax highlighter&lt;/em&gt; I've reused a function I did for Sabrosous and it worked pretty well. :-)&lt;/p&gt;

&lt;p&gt;I've also modified some things from the tag_list page, I think there were too much tags so I've limited the list to tags that has more than a post linked.&lt;/p&gt;

&lt;p&gt;I'm really happy for the change from Wordpress to &lt;strong&gt;Jekyll&lt;/strong&gt;, I love Git and now I manage every part of the content from a Git repository, really cool and easy. :-)&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>From Wordpress To Jekyll</title>
   <author>javaguirre</author>
   <link href="http://javaguirre.net/2012/05/25/from-wordpress-to-jekyll"/>
   <updated>2012-05-25T00:00:00+02:00</updated>
   <id>http://javaguirre.net/2012/05/25/from-wordpress-to-jekyll</id>
   <content type="html">&lt;p&gt;Yesterday I knew about &lt;a href=&quot;https://github.com/mojombo/jekyll&quot;&gt;jekyll&lt;/a&gt;, I have been testing and using &lt;a href=&quot;https://github.com/ametaireau/pelican&quot;&gt;pelican&lt;/a&gt; for a while in development mode
    but some things didn't fit my blog needs. &lt;strong&gt;Jekyll&lt;/strong&gt; is a static pages generator, so you can write your posts in almost any kind of markdown
syntax, and then running jekyll command it builds your web application (in my case, a blog).&lt;/p&gt;

&lt;p&gt;Lucky me, it has a wider community than pelican, so I decided to give it a try. In a few time I had my old blog content migrated thanks to
    the WordpressDotCom plugin contained in the jekyll app, and a great responsive design thanks to the &lt;a href=&quot;https://github.com/plusjade/jekyll-bootstrap&quot;&gt;jekyll-bootstrap project.&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now, I don't have to maintain a database neither worry about security issues concerning wordpress, a &lt;a href=&quot;git://github.com/javaguirre/jekyll-bootstrap.git&quot;&gt;git repository at github&lt;/a&gt; is my database, how nice and secure for me. :-)&lt;/p&gt;

&lt;p&gt;You could also have some plugins to build functionality when you run jekyll. I have used a plugin for related posts using your own tags.&lt;/p&gt;

&lt;p&gt;Jekyll is written in Ruby, language that I like, so I could tweak it to my needs easily if I have to. I also have the deployment solved just adding a new remote repository to my local copy and a bare repo inside my server, it's a win-win. :-)&lt;/p&gt;

&lt;p&gt;To serve the static content I just use &lt;strong&gt;Nginx&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;You have all the documentation needed to get it working in the links above.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Centralised tests with Selenium, Flask, and Bootstrap</title>
   <author>javaguirre</author>
   <link href="http://javaguirre.net/2012/05/22/centralised-tests-with-selenium-flask-and-bootstrap"/>
   <updated>2012-05-22T00:00:00+02:00</updated>
   <id>http://javaguirre.net/2012/05/22/centralised-tests-with-selenium-flask-and-bootstrap</id>
   <content type="html">&lt;p&gt;In &lt;a href=&quot;http://gigas.com&quot;&gt;Gigas&lt;/a&gt;, we started to have tests soon using &lt;a href=&quot;http://seleniumhq.org/&quot;&gt;Selenium&lt;/a&gt;, having spreadsheet files where we put descriptions about tests suites and some html files we use to execute with the great &lt;a href=&quot;http://seleniumhq.org/projects/ide/&quot;&gt;Selenium Firefox Plugin&lt;/a&gt;. Later we write manually the tests results in the spreadsheet file and we share it with the others.&lt;/p&gt;

&lt;p&gt;That's over, We have started a web service using the &lt;a href=&quot;http://flask.pocoo.org/&quot;&gt;Flask framework&lt;/a&gt; and the cool &lt;a href=&quot;http://twitter.github.com/bootstrap/&quot;&gt;Twitter Bootstrap&lt;/a&gt; design with some &lt;a href=&quot;http://glyphicons.com/&quot;&gt;Glyphicons&lt;/a&gt;. It also uses the &lt;a href=&quot;http://pypi.python.org/pypi/Flask-Login&quot;&gt;Flask-Login&lt;/a&gt; extension for authentication and a couple of pickle files to store some persistent data we need.&lt;/p&gt;

The process is the following: We record and write some asserts and verifies commands using the &lt;strong&gt;Firefox Selenium Plugin&lt;/strong&gt;, then we can upload it to this new web service. The service executes in the background the selenium standalone server with the &lt;em&gt;htmlSuite&lt;/em&gt; option using &lt;strong&gt;python subprocess&lt;/strong&gt;. This could be an example of the command:

&lt;pre&gt;&lt;code data-language='bash'&gt;
java -jar /usr/share/selenium-server/selenium-server-standalone.jar -htmlSuite https://dev.gigas.local ./test_suites/04-0002.01-20120507.html results.html
&lt;/code&gt;&lt;/pre&gt;

It stores the result in a html file, we parse it and return the Ajax response in JSON to show them.

To execute Firefox without using the X server, we do it on &lt;a href=&quot;http://en.wikipedia.org/wiki/Xvfb&quot;&gt;Xvfb&lt;/a&gt;, a virtual X server that doesn't show the graphical output.  

This is an example of the first version, I recorded it last thursday. :-)

&lt;iframe width=&quot;560&quot; height=&quot;315&quot; src=&quot;http://www.youtube.com/embed/a9j-bQhCcAQ&quot; frameborder=&quot;0&quot; allowfullscreen&gt;&lt;/iframe&gt;

&lt;h4&gt;References: &lt;/h4&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;http://shotgunsandpenguins.blogspot.com.es/2008/10/how-to-run-selenium-tests-with-hudson.html&quot;&gt;Shotguns and Penguins&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://ivanator.wordpress.com/2009/01/12/montando-un-entorno-integracion-continua-hudson-ant-svn-netbeans/&quot;&gt;Bits y Bytes&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://oshyn.com/_blog/Software_Development/post/Hudson-Selenium-Test-Suite/&quot;&gt;Oshyn&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://seleniumhq.org/docs/05_selenium_rc.html#specifying-the-firefox-profile&quot;&gt;Selenium Web&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</content>
 </entry>
 
 <entry>
   <title>Raequel, scraping en la web de la rae con app engine</title>
   <author>javaguirre</author>
   <link href="http://javaguirre.net/2012/05/14/raequel-scraping-en-la-web-de-la-rae-con-app-engine"/>
   <updated>2012-05-14T00:00:00+02:00</updated>
   <id>http://javaguirre.net/2012/05/14/raequel-scraping-en-la-web-de-la-rae-con-app-engine</id>
   <content type="html">&lt;p&gt;La semana pasada me enteré de que &lt;a href=&quot;http://duckduckgo.com&quot;&gt;DuckDuckGo&lt;/a&gt; te permitía implementar plugins que luego ellos testean e introducen en la plataforma (&lt;a href=&quot;http://duckduckhack.com/&quot;&gt;DuckDuckHack&lt;/a&gt;), me pareció que podía ser muy divertido. :-)&lt;/p&gt;

&lt;p&gt;Tras pensar varias cosas y ver cómo se podía implementar el plugin, estuve investigando por ahí y me pareció buena idea hacer un plugin que buscase en la RAE la palabra buscada y devolviese las acepciones de ésta.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;En Github encontré a una persona que había hecho scraping sobre la web de la RAE&lt;/strong&gt; y con el &lt;a href=&quot;https://developers.google.com/appengine/downloads?hl=es#Google_App_Engine_SDK_for_Python&quot;&gt;SDK de Python para Google App Engine&lt;/a&gt; había creado una API, este fue mi punto de partida. :-)&lt;/p&gt;

&lt;p&gt;Leyendo el código y probándolo me di cuenta de que necesitaba por el momento un par de cosas por implementar, una era que &lt;em&gt;la API debía ser JSONP&lt;/em&gt;, y otra que las peticiones debían responder más rápido.&lt;/p&gt;

&lt;p&gt;La primera solución fue muy sencilla, simplemente añadir un par de cabeceras:&lt;/p&gt;

&lt;pre&gt;&lt;code data-language='python'&gt;
self.response.headers['Access-Control-Allow-Origin'] = '*'
self.response.headers['Access-Control-Allow-Methods'] = 'GET'
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;La segunda también resultó muy sencilla, ya que el &lt;em&gt;SDK de Google App Engine&lt;/em&gt; dispone de una biblioteca para &lt;strong&gt;memcache&lt;/strong&gt;, bastó añadir esa funcionalidad a la petición JSON/JSONP y listo.&lt;/p&gt;

&lt;p&gt;Ahora toca la parte de DuckDuckGo, hará falta tiempo para ello, &lt;a href=&quot;https://github.com/tian2992/raequel&quot;&gt;el proyecto está en Github&lt;/a&gt;.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Using Aspen</title>
   <author>javaguirre</author>
   <link href="http://javaguirre.net/2012/05/10/using-aspen"/>
   <updated>2012-05-10T00:00:00+02:00</updated>
   <id>http://javaguirre.net/2012/05/10/using-aspen</id>
   <content type="html">&lt;p&gt;&lt;a href=&quot;http://aspen.io/&quot;&gt;Aspen is a python web framework based in the filesystem&lt;/a&gt;, mixing controller and view in the same archive, it's called a &lt;em&gt;Simplate&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;We had some static html files in production, but months later we needed to add some server logic to this ones, &lt;strong&gt;without changing any url and having it integrated fast in our actual environment&lt;/strong&gt;. These conditions make us think in this framework, it is perfect for this kind of situation, we hadn't to change our actual filesystem for our html files and we could have easily integrated this new logic inside them. :-)&lt;/p&gt;

&lt;p&gt;Our main problem using aspen is the lack of documentation, in my opinion is really poor and it could explain more and better basic things, such as requests handling. Anyway, I like to explore the code but sometimes you don't want to spend some time in it when you have to get things done.&lt;/p&gt;

&lt;p&gt;I have been using &lt;strong&gt;Django&lt;/strong&gt; and &lt;strong&gt;Flask&lt;/strong&gt; and I could say I found basics less intuitive in aspen than the others. I will try to explain what I meant in a later post when I get deeper in it.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Evolución</title>
   <author>javaguirre</author>
   <link href="http://javaguirre.net/2012/05/08/evolucion"/>
   <updated>2012-05-08T00:00:00+02:00</updated>
   <id>http://javaguirre.net/2012/05/08/evolucion</id>
   <content type="html">&lt;p&gt;En la última reunión de &lt;strong&gt;python-madrid&lt;/strong&gt; argumenté por qué me parecía que el Software libre, o mejor dicho su comunidad es &lt;em&gt;una evolución&lt;/em&gt; en la vida del desarrollador corriente.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;No hablaba de evolución con respecto al software propietario&lt;/strong&gt; sino con respecto a uno mismo, en mi caso hablaba de mi experiencia. Son unos cuantos años los que llevo dedicando a mi pasión, que es el desarrollo de software y es un camino muy fácil pero a a la vez muy complejo.&lt;/p&gt;

&lt;p&gt;¿Por qué? En ocasiones somos los reyes del mundo o Neo en Matrix, creo que siempre que se empieza a ser productivo en el desarrollo te sientes un poco orgulloso, hasta que cada día te das cuenta que hay mucha gente mejor que tú en muchas cosas pero que tu contribución es importante porque somos un equipo, y que la humildad te hace más fuerte.&lt;/p&gt;

&lt;p&gt;He estado intentando sacar proyectos personales, software libre, pero proyectos que al final quedan en la cuneta por la simple cuestión de que no hay comunidad y de que vuelvo a inventar la rueda, sino del todo, sí en gran parte.&lt;/p&gt;

&lt;p&gt;Hace muy poco decidí no centrarme en éstos, sino en los que me interesan, dedicando tiempo a proyectos que habían resuelto alguno de los problemas que yo quería volver a resolver, y comenzar contribuyendo en éstos. Lo sé, sonará a tontería ya que de esto va el &lt;strong&gt;Software Libre&lt;/strong&gt;, pero hasta este momento no había visto la luz y la verdad es que ahora todo es mucho más divertido.&lt;/p&gt;

&lt;p&gt;Ese abrirse más al mundo es para mí el &lt;strong&gt;Software Libre&lt;/strong&gt;, y &lt;strong&gt;Github&lt;/strong&gt; facilita las cosas muchísimo, he decidido pasar a ser un &lt;strong&gt;Doer&lt;/strong&gt;. :-)&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Lua Highlighter for Rainbow</title>
   <author>javaguirre</author>
   <link href="http://javaguirre.net/2012/04/29/lua-highlighter-for-rainbow"/>
   <updated>2012-04-29T00:00:00+02:00</updated>
   <id>http://javaguirre.net/2012/04/29/lua-highlighter-for-rainbow</id>
   <content type="html">&lt;p&gt;I've been studying an &lt;a href=&quot;http://udacity.com&quot;&gt;Udacity course to build your own web browser&lt;/a&gt;(CS262), it's a great way to learn some things quicker and funnier than expected, and time is gold in this world of ours. :-)&lt;/p&gt;

&lt;p&gt;These first chapters were easier, we were practising regexp a lot, so I decided to contribute to &lt;strong&gt;rainbow.js&lt;/strong&gt; project, adding some highlight patterns for &lt;a href=&quot;http://luatut.com/crash_course.html&quot;&gt;lua language&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;You can look for &lt;a href=&quot;http://craig.is/making/rainbows&quot;&gt;this awesome js plugin in its webpage&lt;/a&gt; and &lt;a href=&quot;https://github.com/ccampbell/rainbow&quot;&gt;at github&lt;/a&gt;.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Usando Subsonic y MiniSub</title>
   <author>javaguirre</author>
   <link href="http://javaguirre.net/2012/04/22/usando-subsonic-y-minisub"/>
   <updated>2012-04-22T00:00:00+02:00</updated>
   <id>http://javaguirre.net/2012/04/22/usando-subsonic-y-minisub</id>
   <content type="html">&lt;p&gt;Tras una semana para probar Subsonic tengo que decir que estoy encantado, facilita sobremanera el control de la música en mi casa y pronto desde fuera. :-)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Mi servidor subsonic es un ArchLinux&lt;/strong&gt;, hay un buen tutorial para empezar &lt;a href=&quot;https://wiki.archlinux.org/index.php/Subsonic&quot;&gt;en la wiki de Arch para no lanzar subsonic como root&lt;/a&gt; aunque hay un par de cosas a tener en cuenta para sacar todo de este servidor de música.&lt;/p&gt;

&lt;p&gt;Es necesario instalar lame y ffmpeg, ya que subsonic los usa por debajo.&lt;/p&gt;

&lt;pre&gt;&lt;code data-language='bash'&gt;
pacman -S lame ffmpeg
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Posteriormente necesitamos hacer un enlace simbólico al directorio &lt;strong&gt;/var/subsonic/transcode&lt;/strong&gt; para que subsonic los pille.&lt;/p&gt;

&lt;pre&gt;&lt;code data-language='bash'&gt;
cd /var/subsonic/transcode
ln -s /usr/bin/lame
ln -s /usr/bin/ffmpeg
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;a href=&quot;http://www.subsonic.org/pages/api.jsp&quot;&gt;Subsonic tiene además una API&lt;/a&gt; para construir tu propio cliente, aunque echo de menos a primera vista la posibilidad de gestionar los llamados players.&lt;/p&gt;

&lt;p&gt;Hay algún cliente para Subsonic por ahí en construcción, uno de ellos es &lt;a href=&quot;https://github.com/tsquillario/MiniSub&quot;&gt;MiniSub&lt;/a&gt;, hecho en javascript usando la &lt;a href=&quot;http://www.subsonic.org/pages/api.jsp&quot;&gt;API de subsonic vía JSONP&lt;/a&gt;, le falta un poco de estabilidad y de organización en el código, pero tiene buena pinta.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>M2Crypto from pip in old GNU/Linux OS</title>
   <author>javaguirre</author>
   <link href="http://javaguirre.net/2012/04/19/m2crypto-from-pip-in-old-gnulinux-os"/>
   <updated>2012-04-19T00:00:00+02:00</updated>
   <id>http://javaguirre.net/2012/04/19/m2crypto-from-pip-in-old-gnulinux-os</id>
   <content type="html">&lt;p&gt;We had a problem today with &lt;strong&gt;M2Crypto&lt;/strong&gt; package from pip repository in a CentOS server.&lt;/p&gt;

&lt;pre&gt;&lt;code data-language='bash'&gt;
... Error: Unable to find 'opensslconf-x86_64.h'
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The actual version in pip repositories is 0.21.1, but the setup.py file doesn't search for the correct headers in this version of CentOS 5.5 (It's old, I know :-) ).&lt;/p&gt;

&lt;p&gt;There's an easy workaround to get it working, I &lt;a href=&quot;http://community.zenoss.org/thread/4379&quot;&gt;found it in a Zenoss community thread&lt;/a&gt;, you can just add a new path to search for files to &lt;em&gt;self.swig_opts&lt;/em&gt; list.&lt;/p&gt;

&lt;p&gt;First, we can download it from pip, and modify the &lt;strong&gt;setup.py&lt;/strong&gt; file.&lt;/p&gt;

&lt;pre&gt;&lt;code data-language='python'&gt;
pip install -d . M2Crypto==0.21.1
untar M2Crypto-0.21.1.tar.gz
&lt;/code&gt;&lt;/pre&gt;

BEFORE

&lt;pre&gt;&lt;code data-language='python'&gt;
#LINE 58
self.swig_opts = ['-I%s' % i for i in self.include_dirs + \                                                                                  
                 [opensslIncludeDir]]
self.swig_opts.append('-includeall')
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;AFTER&lt;/p&gt;

&lt;pre&gt;&lt;code data-language='python'&gt;
self.swig_opts = ['-I%s' % i for i in self.include_dirs + \                                                                                  
                 [opensslIncludeDir]]
self.swig_opts.append('-includeall')
self.swig_opts.append('-I/usr/include/openssl')
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Then running &lt;strong&gt;python setup.py install&lt;/strong&gt; might do the trick.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Installing BrowserQuest</title>
   <author>javaguirre</author>
   <link href="http://javaguirre.net/2012/04/18/installing-browserquest"/>
   <updated>2012-04-18T00:00:00+02:00</updated>
   <id>http://javaguirre.net/2012/04/18/installing-browserquest</id>
   <content type="html">It's been a while since &lt;a href=&quot;http://browserquest.mozilla.org/&quot;&gt;Mozilla released BrowserQuest&lt;/a&gt;, a game built on &lt;em&gt;nodejs&lt;/em&gt; with &lt;a href=&quot;http://en.wikipedia.org/wiki/WebSocket&quot;&gt;WebSockets&lt;/a&gt;. I love this retro style given to the game, I've always wanted to do that kind of game and now is a good chance to hack a popular game project and have some fun with it! :-)

&lt;a href=&quot;https://github.com/mozilla/BrowserQuest&quot;&gt;Mozilla released the code in Github&lt;/a&gt;, but there are some cool stuff they couldn't release yet, I hope they do it soon to create some new worlds easily.

I followed this &lt;a href=&quot;http://web3dblog.wordpress.com/&quot;&gt;two excellent&lt;/a&gt; &lt;a href=&quot;https://gist.github.com/2275361&quot;&gt;sources from Dirk Krause&lt;/a&gt; to get it running in local or anywhere, but I think some novice people are still a bit confused about how to do it, so I will try to clarify just a couple things, you will need the instructions from Dirk anyway.

&lt;a href=&quot;https://github.com/mozilla/BrowserQuest&quot;&gt;Getting the code from Github&lt;/a&gt;, the easiest way to get the client running is copying the shared directory inside the client one, executing it with http-server as explained before.

&lt;pre&gt;&lt;code data-language='bash'&gt;
$ cd client
$ cp -r ../shared .
$ http-server
 
Starting up http-server, serving ./ on port: 8080
Hit CTRL-C to stop the server
&lt;/code&gt;&lt;/pre&gt;

Now you can go to &lt;a href=&quot;localhost:8080&quot;&gt;your browser to see it running&lt;/a&gt;.

If you click &lt;strong&gt;play&lt;/strong&gt; nothing happens, we need to start the server.

&lt;pre&gt;&lt;code data-language='bash'&gt;
$ node server/js/main.js

[Wed Apr 18 2012 20:52:46 GMT+0200 (CEST)] INFO Starting BrowserQuest game server...
[Wed Apr 18 2012 20:52:46 GMT+0200 (CEST)] INFO world1 created (capacity: 200 players).
[Wed Apr 18 2012 20:52:46 GMT+0200 (CEST)] INFO Server is listening on port 8000
&lt;/code&gt;&lt;/pre&gt;

You could modify client and server ports in the &lt;em&gt;config_local.json&lt;/em&gt; file, inside both directories (client and server), but using this approach (&lt;em&gt;http-server module&lt;/em&gt;) is not neccessary to change client's port.

Server will search for config in two places:

&lt;pre&gt;&lt;code data-language='javascript'&gt;
var defaultConfigPath = './server/config.json',                                                                                                 
    customConfigPath = './server/config_local.json';
&lt;/code&gt;&lt;/pre&gt;

There is a &lt;em&gt;config.json&lt;/em&gt; by default, binding the server to port 8000, so if you don't care about ports by now there's nothing to worry about.

&lt;strong&gt;That's it, have fun!&lt;/strong&gt;
</content>
 </entry>
 
 <entry>
   <title>From Wordpress to Obtvse, rake task</title>
   <author>javaguirre</author>
   <link href="http://javaguirre.net/2012/04/17/from-wordpress-to-obtvse-rake-task"/>
   <updated>2012-04-17T00:00:00+02:00</updated>
   <id>http://javaguirre.net/2012/04/17/from-wordpress-to-obtvse-rake-task</id>
   <content type="html">&lt;a href=&quot;http://natewienert.com/codename-obtvse&quot;&gt;Obtvse is a minimalist blog&lt;/a&gt;, made simple and built on Rails. I like minimalism, so I wanted to test and do something with it. I worked in a rake task to just &lt;a href=&quot;https://github.com/javaguirre/obtvse/blob/master/lib/tasks/migrate_wordpress.rake&quot;&gt;migrate my actual posts to this new platform&lt;/a&gt;.

To make it work there's only a few steps needed.

In your &lt;strong&gt;Gemfile&lt;/strong&gt; you need to put...

&lt;pre&gt;&lt;code data-language='ruby'&gt;
gem &quot;mysql&quot;
&lt;/code&gt;&lt;/pre&gt;

Then add an environment to your &lt;strong&gt;config/database.yml&lt;/strong&gt;

&lt;pre&gt;&lt;code data-language='ruby'&gt;
wordpress:
  adapter: mysql
  encoding: utf8
  database: obtvse_example
  username: my_user
  password: my_pass
  host: localhost
&lt;/code&gt;&lt;/pre&gt;

Finally you could call it from the command line...

&lt;pre&gt;&lt;code data-language='ruby'&gt;
rake wordpress:migrate_wordpress[source_db, destiny_db]
&lt;/code&gt;&lt;/pre&gt;

Where &lt;em&gt;source_db&lt;/em&gt; is your Wordpress db in the database.yml file, and &lt;em&gt;destiny_db&lt;/em&gt; is the Obtvse one.

The code is not a big deal, just a few lines. I know It could be a better implementation, but is my first rake task, I would like some feedback. :-)

&lt;pre&gt;&lt;code data-language='ruby'&gt;
# -*- coding:utf-8 -*-                                                                                                                              
# Usage rake wordpress:migrate_wordpress[:src, :dst]
# You will need gem &quot;mysql&quot; in your Gemfile
namespace :wordpress do
    task :migrate_wordpress, [:src, :dst] =&gt; :environment do |cmd, args|
        args.with_defaults(:src =&gt; &quot;wordpress&quot;, :dst =&gt; &quot;development&quot;)
        config = Rails.configuration.database_configuration
        src_db = config[args[:src]]
        dst_db = config[args[:dst]]

        conn = ActiveRecord::Base.establish_connection src_db
        posts = conn.connection.execute &quot;SELECT * FROM wp_posts where post_status='draft' or post_status='publish'&quot;

        conn = ActiveRecord::Base.establish_connection dst_db

        posts.each do |post|
            title = post[5].force_encoding 'utf-8'
            content = post[4].force_encoding 'utf-8'
            created_at = post[2]
            updated_at = post[14]
            draft = post[7]

            if draft.end_with? &quot;draft&quot;
                draft_flag = true
            elsif draft.end_with? &quot;publish&quot;
                draft_flag = false
            end

            p = Post.create! :title =&gt; title, :content =&gt; content, :slug =&gt; Post.acts_as_url(:title, :url_attribute =&gt; :slug),
                             :created_at =&gt; created_at, :updated_at =&gt; updated_at, :draft =&gt; draft_flag
        end
    end
end
&lt;/code&gt;&lt;/pre&gt;

More in my &lt;a href=&quot;https://github.com/javaguirre/obtvse&quot;&gt;Obtvse fork&lt;/a&gt;. &lt;a href=&quot;http://obtvse.herokuapp.com/&quot;&gt;Obtvse Demo&lt;/a&gt;.
</content>
 </entry>
 
 <entry>
   <title>Servidor de música con Subsonic</title>
   <author>javaguirre</author>
   <link href="http://javaguirre.net/2012/04/16/servidor-de-musica-con-subsonic"/>
   <updated>2012-04-16T00:00:00+02:00</updated>
   <id>http://javaguirre.net/2012/04/16/servidor-de-musica-con-subsonic</id>
   <content type="html">Un servidor para todo, para tener música en tu Android por streaming, para tener en casa en cualquier portátil, y para poder manejar la música en el servidor remoto como si fuese nuestra &quot;&lt;em&gt;minicadena&lt;/em&gt;&quot; (qué antiguo soy :-P), todo eso lo tenemos con &lt;a href=&quot;http://www.subsonic.org/pages/index.jsp&quot;&gt;Subsonic&lt;/a&gt;, un proyecto de &lt;a href=&quot;http://sourceforge.net/projects/subsonic/&quot;&gt;Software Libre hecho en Java&lt;/a&gt;.

Subsonic nos provee de un servicio web desde el cual podemos gestionar la música de un servidor, gestión de usuarios y distintos players por usuario. Los players son los distintos dispositivos de un usuario, un player podría ser un móvil android, otro podría ser el portátil, y otro podría ser cambiar música remotamente en el propio servidor.

Este fin de semana he estado instalándolo en casa y estoy encantado, a falta de tunear mi router, que me está dando algunos problemas, estoy contento por lo rápido que funciona y todas las posibilidades que te da, entre ellas el poder subir nueva música al servidor muy fácilmente y unas cuantas cosillas más.

También comentar que tiene aplicación &lt;a href=&quot;https://play.google.com/store/apps/details?id=net.sourceforge.subsonic.androidapp&quot;&gt;nativa para Android&lt;/a&gt;, y que funciona muy bien, aunque me falta la posibilidad de conexión a un player remoto, algo que se puede hacer accediendo vía navegador.

En un siguiente artículo explicaré cómo lo monté, aunque creo que es bastante sencillo para cualquiera que estudie un poquito.
</content>
 </entry>
 
 <entry>
   <title>Mejoras en Openboe</title>
   <author>javaguirre</author>
   <link href="http://javaguirre.net/2012/04/01/mejoras-en-openboe"/>
   <updated>2012-04-01T00:00:00+02:00</updated>
   <id>http://javaguirre.net/2012/04/01/mejoras-en-openboe</id>
   <content type="html">&lt;p&gt;Hoy he estado trabajando en &lt;a href=&quot;http://openboe.herokuapp.com&quot;&gt;OpenBOE&lt;/a&gt;, el servicio que pretende dar la información de los RSS del &lt;strong&gt;BOE/Borme&lt;/strong&gt; de una forma sencilla y por la que se pueda filtrar.&lt;/p&gt;

&lt;p&gt;Hasta el momento no había casi nada, era un parseador de RSS que buscaba directamente en los enlaces que proveía ese RSS y daba un resultado según el filtro, todo ha cambiado.&lt;/p&gt;

&lt;p&gt;Actualmente OpenBOE consta de dos scripts que se ejecutan sobre cron. Uno hace scraping sobre la web del boe donde se ubican los rss y los organiza por categorías, guardándolos en una base de datos en &lt;strong&gt;MongoDB&lt;/strong&gt;. El segundo simplemente itera sobre los RSS y cada hora actualiza la lista de publicaciones nuevas en la base de datos.&lt;/p&gt;

&lt;p&gt;Debido a toda esta automatización y al &lt;strong&gt;incluir la base de datos en Mongo&lt;/strong&gt;, los controladores han sido modificados completamente. Quizás sería necesario quitar un par de líneas duplicadas que existen en los controladores y sacarlo a un plano superior del que estas vistas heredasen, por el momento no me lo planteo, quizás para la primera versión de OpenBOE que sacaré en un par de semanas.&lt;/p&gt;

&lt;p&gt;Todo esto va construido sobre &lt;a href=&quot;http://flask.pocoo.org/&quot;&gt;Flask&lt;/a&gt;, un framework al que tenía ganas de meter mano y se ejecuta sobre un &lt;strong&gt;Nginx&lt;/strong&gt; con &lt;strong&gt;uWSGI&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Tenéis el código en &lt;a href=&quot;https://github.com/javaguirre/openboe&quot;&gt;github&lt;/a&gt; tanto si queréis tocarlo, criticarme (constructivamente), para nuevas ideas o para lo que queráis. :-)&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Ducksboard Python module</title>
   <author>javaguirre</author>
   <link href="http://javaguirre.net/2012/04/01/ducksboard-python-module"/>
   <updated>2012-04-01T00:00:00+02:00</updated>
   <id>http://javaguirre.net/2012/04/01/ducksboard-python-module</id>
   <content type="html">&lt;p&gt;I've done a very simple package to wrap &lt;a href=&quot;http://ducksboard.com&quot;&gt;Ducksboard API&lt;/a&gt; and uploaded it to &lt;a href=&quot;http://pypi.python.org/pypi/ducksboard/0.1&quot;&gt;Python Packages&lt;/a&gt;, it's my first Python package there so I'm excited. :-)&lt;/p&gt;

&lt;p&gt;There are some things to improve in it, but it does everything you can do right now with this API.&lt;/p&gt;

&lt;p&gt;Here is an example of code that makes succeeded requests.&lt;/p&gt;

&lt;pre&gt;&lt;code data-language='python'&gt;
#!/usr/bin/python                                                                                                                                    
                                                                                                                                                     
from ducksboard.ducksboard import Ducksboard                                                                                                         
import time                                                                                                                                          
                                                                                                                                                     
                                                                                                                                                     
MYAPIKEY = 'MYAPIKEY'                                                                                                                                        
ENDPOINT = 'gauge1'                                                                                                                                        
                                                                                                                                                     
d = Ducksboard(MYAPIKEY, ENDPOINT)                                                                                                                   

#Updates a Gauge                                                                                                                                                     
d.gauge(0.22)                                                                                                                                        

#Updates the counter                                                                                                                                                     
d.endpoint = 12317                                                                                                                                   
d.counter(22)                                                                                                                                        

#Graph                                                                                                                                                     
d.endpoint = 334                                                                                                                                      
d.graph([{&quot;timestamp&quot;: 1299854684, &quot;value&quot;: 10 },
         {&quot;timestamp&quot;: 1299855600, &quot;value&quot;: 40}])                                                           

                                                                                                                                      
d.endpoint = 1123                                                                                                                                    
d.image(image=&quot;https://dashboard.ducksboard.com/static/img/timeline/red.gif&quot;,
        caption=&quot;content&quot;)                                                                   
                                                                                                                                                     
d.endpoint = 1236                                                                                                                                
d.timeline(title=&quot;Bye&quot;, content=&quot;world&quot;,
           image=&quot;https://dashboard.ducksboard.com/static/img/timeline/red.gif&quot;,
           link=&quot;http://ducksboard.com&quot;)   
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;I have to improve documentation and upload the example with the package, one step at a time. :-)&lt;/p&gt;

&lt;p&gt;If you want to improve the library, found a bug or you just have an idea, you can contact me here or check for the code in &lt;a href=&quot;https://github.com/javaguirre/ducksboard&quot;&gt;Github&lt;/a&gt;.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Play framework in ArchLinux</title>
   <author>javaguirre</author>
   <link href="http://javaguirre.net/2012/03/26/play-framework-in-archlinux"/>
   <updated>2012-03-26T00:00:00+02:00</updated>
   <id>http://javaguirre.net/2012/03/26/play-framework-in-archlinux</id>
   <content type="html">&lt;p&gt;I had a little problem when installing today &lt;a href=&quot;http://www.playframework.org/documentation/2.0/NewApplication&quot;&gt;Play! framework&lt;/a&gt; in ArchLinux.&lt;/p&gt;

&lt;p&gt;Doing a &lt;em&gt;strace&lt;/em&gt; I realized what happened:&lt;/p&gt;

&lt;pre&gt;&lt;code data-language='bash'&gt;
rt_sigaction(SIGINT, {0x438d50, [], SA_RESTORER, 0x7f79584319f0}, {SIG_DFL, [], SA_RESTORER, 0x7f79584319f0}, 8) = 0
wait4(-1, java.io.FileNotFoundException: /opt/play-framework/framework/sbt/boot/sbt.boot.lock (Permission denied)
	at java.io.FileOutputStream.open(Native Method)
	at java.io.FileOutputStream.&lt;init&gt;(FileOutputStream.java:212)
	at java.io.FileOutputStream.&lt;init&gt;(FileOutputStream.java:165)
        ...
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;So You could just give permissions to that file...&lt;/p&gt;

&lt;pre&gt;&lt;code data-language='bash'&gt;
sudo chmod 666 /opt/play-framework/framework/sbt/boot/sbt.boot.lock
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;You could have the same problem when creating the project, the bad solution is using sudo to create it, the good one is giving permissions to play-framework directory to create the project with the correct ones.&lt;/p&gt;

&lt;p&gt;And that's all! Happy coding! :-)&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Codemotion: Impresiones</title>
   <author>javaguirre</author>
   <link href="http://javaguirre.net/2012/03/26/codemotion-impresiones"/>
   <updated>2012-03-26T00:00:00+02:00</updated>
   <id>http://javaguirre.net/2012/03/26/codemotion-impresiones</id>
   <content type="html">&lt;p&gt;Excelente evento, es lo primero que pienso del &lt;a href=&quot;http://codemotion.es&quot;&gt;Codemotion&lt;/a&gt; que tuvo lugar este sábado en Madrid. Ponencias de mucha calidad a las que tuve la posibilidad de asistir con los compañeros de &lt;a href=&quot;http://python-madrid.es&quot;&gt;Python Madrid&lt;/a&gt; y con amigos de la Carlos III, haciendo piña. :-)&lt;/p&gt;

&lt;p&gt;En especial querría reseñar las charlas de &lt;a href=&quot;http://codemotion.es/talks#t89&quot;&gt;Sergio Gil&lt;/a&gt;, &lt;a href=&quot;http://codemotion.es/talks#t248&quot;&gt;Juan Riaza&lt;/a&gt; y &lt;a href=&quot;http://codemotion.es/talks#t23&quot;&gt;JJ Merelo&lt;/a&gt;, las tres de una gran calidad tanto técnica como humana, nos mostraron temas muy interesantes y de una forma amena y divertida, como debe ser. :-)&lt;/p&gt;

&lt;p&gt;La charla de &lt;a href=&quot;http://codemotion.es/talks#t229&quot;&gt;David Bonilla&lt;/a&gt; me pareció inspiradora, pero siendo yo más un animal de código me quedo con las anteriores.&lt;/p&gt;

&lt;p&gt;Con respecto a mi charla salió mejor de lo que esperaba ya que no tuve apenas tiempo para prepararla, así que quedo con ganas de hacer una mejor en la próxima oportunidad que surja.&lt;/p&gt;

&lt;p&gt;Finalmente en el Codemotion pudimos disfrutar de 4 charlas de Python, &lt;a href=&quot;http://codemotion.es/talks#t14&quot;&gt;Openstack&lt;/a&gt;, &lt;a href=&quot;http://codemotion.es/talks#t248&quot;&gt;Web Scraping&lt;/a&gt;, &lt;a href=&quot;http://codemotion.es/talks#t133&quot;&gt;Evolución de python(python3)&lt;/a&gt;, &lt;a href=&quot;http://codemotion.es/talks#t177&quot;&gt;Android con Python&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;También muy contento por encontrarme con compañeros a los que aprecio, y por conocer a mucha gente agradable con la que espero cruzarme de nuevo pronto. :-)&lt;/p&gt;

&lt;p&gt;Muy buen evento y esperando que el año que viene se pueda repetir.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>vundle and plugins for vim</title>
   <author>javaguirre</author>
   <link href="http://javaguirre.net/2012/03/18/vundle-and-plugins-for-vim"/>
   <updated>2012-03-18T00:00:00+01:00</updated>
   <id>http://javaguirre.net/2012/03/18/vundle-and-plugins-for-vim</id>
   <content type="html">&lt;p&gt;Since I've discovered &lt;a href=&quot;https://github.com/gmarik/vundle&quot;&gt;vundle&lt;/a&gt; for vim via my good friend &lt;a href=&quot;http://twitter.com/mgdelacroix&quot;&gt;Miguel&lt;/a&gt; I'm delighted because of its power.&lt;/p&gt;

&lt;p&gt;You install &lt;a href=&quot;https://github.com/gmarik/vundle&quot;&gt;vundle&lt;/a&gt; in your &lt;strong&gt;.vim directory&lt;/strong&gt; and then just have to put lines with this format to install a plugin with &lt;strong&gt;:BundleInstall&lt;/strong&gt;. These lines are git repositories in github or in any other place.&lt;/p&gt;

&lt;pre&gt;&lt;code data-language='vim'&gt;
Bundle 'user/project'
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;or just&lt;/p&gt;

&lt;pre&gt;&lt;code data-language='vim'&gt;
Bundle 'git_url'
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;We've also discovered powerful plugins which improve the power of Vim even more. :-D&lt;/p&gt;

&lt;p&gt;I've just started using &lt;a href=&quot;https://github.com/scrooloose/syntastic&quot;&gt;Syntastic&lt;/a&gt;, a great syntax checker for code, &lt;a href=&quot;https://github.com/altercation/solarized&quot;&gt;solarized&lt;/a&gt; and &lt;a href=&quot;https://github.com/nanotech/jellybeans.vim&quot;&gt;jellybeans&lt;/a&gt;, very good colourschemes, and finally &lt;a href=&quot;https://github.com/Lokaltog/vim-powerline&quot;&gt;powerline&lt;/a&gt;, very intuitive status bar.&lt;/p&gt;

&lt;p&gt;By now I've installed more plugins, &lt;a href=&quot;https://github.com/tpope/vim-fugitive&quot;&gt;fugitive&lt;/a&gt;(for git), &lt;a href=&quot;https://github.com/petdance/ack&quot;&gt;ack&lt;/a&gt; and &lt;a href=&quot;https://github.com/wincent/Command-T&quot;&gt;command-t&lt;/a&gt;, but I have to use them in depth to talk about them.&lt;/p&gt;

&lt;p&gt;If you love vim you should try it! If you know something better or some astonishing plugins please let me know!&lt;/p&gt;

&lt;p&gt;My new part in .vimrc for vundle:&lt;/p&gt;

&lt;pre&gt;&lt;code data-language='vim'&gt;
&quot;vundle
set nocompatible
filetype off

set rtp+=~/.vim/bundle/vundle/
call vundle#rc()

Bundle 'gmarik/vundle'
Bundle 'Lokaltog/vim-powerline'
Bundle 'nanotech/jellybeans.vim'
Bundle 'altercation/vim-colors-solarized'
Bundle 'tpope/vim-fugitive'
Bundle 'mileszs/ack.vim'
Bundle 'scrooloose/syntastic'
Bundle 'git://git.wincent.com/command-t.git'

filetype plugin on
filetype plugin indent on
&lt;/code&gt;&lt;/pre&gt;
</content>
 </entry>
 
 <entry>
   <title>Charla de Git y de Videojuegos en javascript</title>
   <author>javaguirre</author>
   <link href="http://javaguirre.net/2012/03/15/charla-de-git-y-de-videojugos-en-javascript"/>
   <updated>2012-03-15T00:00:00+01:00</updated>
   <id>http://javaguirre.net/2012/03/15/charla-de-git-y-de-videojugos-en-javascript</id>
   <content type="html">&lt;p&gt;He añadido ambas presentaciones a la &lt;a href=&quot;http://slides.javaguirre.net&quot;&gt;zona de charlas&lt;/a&gt;, espero que puedan servir a alguien.&lt;/p&gt;

&lt;p&gt;Como siempre agradecer a la gente del &lt;strong&gt;GUL de la Universidad Carlos III&lt;/strong&gt; la posibilidad de impartir las charlas, lo pasamos muy bien y nos llena de satisfacción que haya podido servir a alguien para aprender algunos conceptos.&lt;/p&gt;

&lt;p&gt;Nota: Faltan algunas imágenes que añadiré pronto.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Git y videojuegos en los cursos del GUL</title>
   <author>javaguirre</author>
   <link href="http://javaguirre.net/2012/03/12/git-y-videojuegos-en-los-cursos-del-gul"/>
   <updated>2012-03-12T00:00:00+01:00</updated>
   <id>http://javaguirre.net/2012/03/12/git-y-videojuegos-en-los-cursos-del-gul</id>
   <content type="html">&lt;p&gt;Mañana volveré a participar en los &lt;a href=&quot;http://cursos.gul.es/index.php/courses/calendar/18&quot;&gt;cursos del Gul&lt;/a&gt;, ya tengo ganas. :-)&lt;/p&gt;

&lt;p&gt;Esta semana han comenzado &lt;strong&gt;los cursos de Marzo&lt;/strong&gt;, unas jornadas para aprender e interesarse por las tecnologías del momento de la mano de gente experimentada e inquieta.&lt;/p&gt;

&lt;p&gt;Hemos preparado dos charlas creo que muy interesantes, la primera será de las 16 a las 18 horas, &lt;strong&gt;Taller de videojuegos en Javascript con Craftyjs&lt;/strong&gt;, la segunda será &lt;strong&gt;Introducción a Git y Github&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;He podido participar en la preparación de ambas presentaciones activamente, desgraciadamente debido a la cantidad de trabajo que tengo últimamente sólo voy a poder participar en la de Git y Github.&lt;/p&gt;

&lt;p&gt;En el taller de videojuegos &lt;a href=&quot;http://twitter.com/gootyfer&quot;&gt;Israel&lt;/a&gt; pasará primero por la teoría que sostiene los videojuegos hoy en día (jerarquías vs. Entidades/componentes) y mostrará todos los componentes de distintos tipos de juego así como muchos ejemplos para empezar a programar nada más salir del taller. :-)&lt;/p&gt;

&lt;p&gt;En la de Git hemos preparado una charla completamente práctica, &lt;a href=&quot;http://twitter.com/mgdelacroix&quot;&gt;Miguel&lt;/a&gt; y yo compartiremos un repositorio en &lt;strong&gt;Github&lt;/strong&gt;, una pequeña aplicación web, e iremos mostrando todos los pasos y comandos del desarrollo en grupo con Git. Acabaremos haciendo el despliegue de la aplicación ejemplo de la charla en la increíble plataforma &lt;a href=&quot;http://heroku.com&quot;&gt;heroku&lt;/a&gt;, con la única ayuda de un paquete (&lt;em&gt;gema de Heroku&lt;/em&gt;) y de nuestro repositorio Git del proyecto.&lt;/p&gt;

&lt;p&gt;Al acabar las presentaciones colgaré éstas en &lt;a href=&quot;http://slides.javaguirre.net&quot;&gt;mi página de presentaciones&lt;/a&gt;.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Magic with Python, getattr and eval</title>
   <author>javaguirre</author>
   <link href="http://javaguirre.net/2012/03/06/magic-with-python-getattr-and-eval"/>
   <updated>2012-03-06T00:00:00+01:00</updated>
   <id>http://javaguirre.net/2012/03/06/magic-with-python-getattr-and-eval</id>
   <content type="html">&lt;p&gt;We have a Django project with the admin module to manage our models, some of them have an action to export &lt;a href=&quot;http://djangosnippets.org/snippets/1697/&quot;&gt;model objects as CSV&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;What if we want to generate a report and attach it to an email to send it once a week? Easy with Python and Django! :-)&lt;/p&gt;

&lt;pre&gt;&lt;code data-language='python'&gt;
from django.core.management import setup_environ
import os
import sys
path = os.path.dirname(__file__).replace(&quot;cron&quot;, &quot;&quot;)
if not path in sys.path:
    sys.path.append(path)
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;In my case the script has to be executed outside django itself, that lines add scripts path (&quot;cron&quot;) into python path and keeps django project environment available to access to its classes.&lt;/p&gt;

&lt;pre&gt;&lt;code data-language='python'&gt;
user = User.objects.all()[0]
report_list = ['Account', 'Order', 'Invoice']
request = HttpRequest()
request.user = user

email = EmailMessage('My report', 'Hi you! heres your report', 'example@example.com',
            ['doe@example.com', 'john@example.com'])

for report in report_list:
    model = eval(report)
    modeladmin = eval(report + &quot;Admin&quot;)

    o = modeladmin(model, &quot;&quot;)
    report_data = getattr(modeladmin, 'export_as_csv')(o, request, model.objects.all())
    email.attach(&quot;%ss.csv&quot; % report.lower(), report_data, 'text/csv')

email.send()
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;I like to follow conventions, if you do you'll be grateful later like me. In this example we have some models ('Account', 'Order', 'Invoice') and its Admin classes ('AccountAdmin', 'OrderAdmin', 'InvoiceAdmin'), inside them an &quot;export_as_csv&quot; method which it's used to generate our report.&lt;/p&gt;

&lt;p&gt;We can also use elements of the list to access models with eval(string), evaluating the string as a Python expression, so we get the class name of the Model and the ModelAdmin.&lt;/p&gt;

&lt;p&gt;Finally we get the corresponding method of different Admin models passing a HttpRequest, and a User object (we need that in our example) to &lt;em&gt;emulate&lt;/em&gt; the original export_as_csv admin method.&lt;/p&gt;

&lt;p&gt;Then we can attach all files to the email and send it. :-)&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Second week in the saas-class</title>
   <author>javaguirre</author>
   <link href="http://javaguirre.net/2012/03/03/second-week-in-the-saas-class"/>
   <updated>2012-03-03T00:00:00+01:00</updated>
   <id>http://javaguirre.net/2012/03/03/second-week-in-the-saas-class</id>
   <content type="html">&lt;p&gt;&lt;a href=&quot;http://saas-class.org&quot;&gt;I've finished the first assignment&lt;/a&gt;! Yesterday I had a score of 82/500, but today having enough time to complete everything I get 500/500. :-)&lt;/p&gt;

&lt;p&gt;The exercises were easy but I took some time to refresh some things like binary trees search with recursion and more stuff. This first assignment was a perfect start with &lt;em&gt;Ruby&lt;/em&gt;, five different exercises that explore different parts of the language.&lt;/p&gt;

&lt;p&gt;I prefer the fifth one, because we entered in the magic of classes in Ruby and that's always fun in all languages! it consists in building an attribute of a class with history that tracks old values of an attribute of that class, we have to write a method inside &lt;em&gt;Class&lt;/em&gt; class to do it.&lt;/p&gt;

&lt;p&gt;Next week we will start with &lt;a href=&quot;http://rubyonrails.org/&quot;&gt;Ruby On Rails&lt;/a&gt;, the &lt;strong&gt;MVC Web Framework&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;I was thinking in some web service that I could need to build it with Ruby on Rails, just to learn and practice for the next week of the course. Could be interesting for me a place to store that code snippets I use, and tag them so I could search for them later, I think I'll do that.&lt;/p&gt;

&lt;p&gt;Next week I'll share the most interesting exercises of the assignment. :-)&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>First week saas-class</title>
   <author>javaguirre</author>
   <link href="http://javaguirre.net/2012/02/26/first-week-saas-class"/>
   <updated>2012-02-26T00:00:00+01:00</updated>
   <id>http://javaguirre.net/2012/02/26/first-week-saas-class</id>
   <content type="html">&lt;p&gt;I've been studying hard this weekend to keep on track with &lt;a href=&quot;https://www.coursera.org/saas/lecture/index&quot;&gt;Video lecture releases of Saas course&lt;/a&gt;. I've also started learning &lt;strong&gt;Ruby&lt;/strong&gt;, and I'm happy for doing it, I'm impressed with the verbosity of the language, if you build good code it's very straight forward to understand. :-)&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://www.coursera.org/saas/assignment/index&quot;&gt;I finished some parts of the first assignment&lt;/a&gt; but some of them need to be refactored to improve conciseness.&lt;/p&gt;

&lt;p&gt;First conclussions of the language comparing with Python, in Ruby everything is a method, and in a function the last statement is what you return, you don't need to use the reserved word &lt;em&gt;return&lt;/em&gt;. I was surprised because zero and empty arrays are true in conditional statements, but I supposed you get used to that processing in a different way that kind of situations.&lt;/p&gt;

&lt;p&gt;You can call a function without parentheses and you can remove more unuseful characters sometimes. Although in Python is different, when you write the name of the function you get a function object, in Ruby you get the result of the execution of that function.&lt;/p&gt;

&lt;p&gt;I'll show you the first part of the assignment to understand my points if you haven't study any ruby code. &lt;/p&gt;

&lt;pre&gt;&lt;code data-language='ruby'&gt;
=begin
    Part1 of the first asignment @javaguirre
=end

def palyndrome?(string)
    string.downcase.gsub(/[^\w+]/, &quot;&quot;) == string.downcase.reverse.gsub(/[^\w+]/, &quot;&quot;)
end

def count_words(string)
    result = {}
    string.downcase.gsub(/[^\w+]/, &quot; &quot;).split(&quot; &quot;).each do |word|

        if result[word].nil?
            result[word] = 1
        else
            result[word] += 1
        end
    end
    puts &quot;count_words #{string} # =&gt; #{result}&quot;
end

puts palyndrome? &quot;A man, a plan, a canal --- Panama&quot;
puts palyndrome? &quot;Madam, I'm Adam!&quot;
puts palyndrome? &quot;Abracadabra&quot;
puts count_words &quot;A man, a plan, a canal --- Panama&quot;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;I will try to post a more detailed article about my Ruby learning and Saas class soon!&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Cursos del GUL en Marzo de 2012</title>
   <author>javaguirre</author>
   <link href="http://javaguirre.net/2012/02/25/cursos-del-gul-en-marzo-de-2012"/>
   <updated>2012-02-25T00:00:00+01:00</updated>
   <id>http://javaguirre.net/2012/02/25/cursos-del-gul-en-marzo-de-2012</id>
   <content type="html">&lt;p&gt;¡Ya está disponible &lt;a href=&quot;http://cursos.gul.es/index.php/courses/calendar/18&quot;&gt;el calendario de las jornadas del GUL de Marzo&lt;/a&gt;! Es la cuarta vez que participo en los cursos y como siempre estoy muy contento de poder contribuir con mi granito de arena.&lt;/p&gt;

&lt;p&gt;Después de que en Noviembre no pudiese hacer charlas muy elaboradas, en esta ocasión hemos decidido hacer un par de charlas por parejas para tener unas presentaciones más completas y esperemos que didácticas.&lt;/p&gt;

&lt;p&gt;Ambas serán el día 13 de Marzo, la primera será un sencillo Taller de videojuegos con una biblioteca en desarrollo llamada &lt;a href=&quot;http://craftyjs.com/&quot;&gt;Crafty&lt;/a&gt;, que permite fácilmente comenzar a hacer juegos web. Realizaremos esta charla conjuntamente &lt;a href=&quot;http://twitter.com/gootyfer&quot;&gt;Israel Gutiérrez&lt;/a&gt; y yo, un placer. :-)&lt;/p&gt;

&lt;p&gt;A partir de las 6 introduciremos Git como Control de versiones y el servicio Github para empezar a subir el código, mi amigo &lt;a href=&quot;http://twitter.com/mgdelacroix&quot;&gt;Miguel&lt;/a&gt;, que me acompañará en esta charla propuso que nos centrásemos en explicar cómo comenzar a trabajar en grupo en Git, un concepto para los que empiezan con control de versiones algo complejo, pero que intentaremos hacer sencillo.&lt;/p&gt;

&lt;p&gt;Espero que podáis pasaros a las charlas de los cursos del &lt;a href=&quot;http://www.gul.es/&quot;&gt;GUL&lt;/a&gt; &lt;a href=&quot;http://cursos.gul.es/index.php/courses/calendar/18&quot;&gt;en la Carlos III, campus de Leganés&lt;/a&gt;, una semana en la que aprender de gente experimentada sobre distintas temáticas técnicas actuales.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Google Apps Script Hackathon en la UPM</title>
   <author>javaguirre</author>
   <link href="http://javaguirre.net/2012/02/22/google-apps-script-hackathon-en-la-upm"/>
   <updated>2012-02-22T00:00:00+01:00</updated>
   <id>http://javaguirre.net/2012/02/22/google-apps-script-hackathon-en-la-upm</id>
   <content type="html">&lt;p&gt;Ayer tuvo lugar la hackathon de &lt;a href=&quot;https://twitter.com/#!/search?q=%23gashack&quot;&gt;Google Apps Script en la UPM&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Un evento bien organizado y en el que tuve la oportunidad de aprender una tecnología de Google desconocida para mí.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://code.google.com/googleapps/appsscript/&quot;&gt;Google Apps Script&lt;/a&gt; podría decirse que es el Visual Basic del scripting en MS Office, solo que en este caso se realiza en Javascript y permite acceder a otros servicios desde Docs, como Calendar, Maps, o hacer peticiones http con la clase &lt;a href=&quot;http://code.google.com/googleapps/appsscript/service_urlfetch.html&quot;&gt;UrlFetch&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Lo veo práctico, pero actualmente al no usar docs no le veo nada que me haga más fácil mi vida diaria.&lt;/p&gt;

&lt;p&gt;Al final del evento los ganadores del hackathon se llevaron un flamante &lt;a href=&quot;http://www.google.es/chromebook/&quot;&gt;Chromebook&lt;/a&gt; cada uno, y los demás fuimos felices con la pizza y la cerveza. :-)&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Curso Online de Software as a Service</title>
   <author>javaguirre</author>
   <link href="http://javaguirre.net/2012/02/19/curso-online-de-software-as-a-service"/>
   <updated>2012-02-19T00:00:00+01:00</updated>
   <id>http://javaguirre.net/2012/02/19/curso-online-de-software-as-a-service</id>
   <content type="html">&lt;p&gt;Mañana comienza oficialmente &lt;a href=&quot;http://saas-class.org&quot;&gt;el curso de Software as a Service&lt;/a&gt;, que se engloba en los cursos online que han preparado diversas universidades estadounidenses de prestigio.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://www.coursera.org/saas/lecture/preview&quot;&gt;Ya han colgado los primeros videos en la web&lt;/a&gt;, y han trabajado en &lt;a href=&quot;http://www.amazon.com/dp/B006WU5G4C&quot;&gt;un libro para el curso&lt;/a&gt; que estoy empezando a leer, creo que dedicarle un tiempo cada día a este curso me aportará cosas interesantes.&lt;/p&gt;

&lt;p&gt;Los ejemplos del curso serán desarrollados en &lt;em&gt;Ruby y Rails&lt;/em&gt;, así que tendré la excusa perfecta para sumergirme en un lenguaje y una tecnología nuevos para mí.&lt;/p&gt;

&lt;p&gt;Animo a todo el que quiera aprender a que se interese por &lt;a href=&quot;http://www.coursera.org/landing/hub.php&quot;&gt;alguno de los cursos que han preparado&lt;/a&gt;, creo que es una oportunidad única de escuchar a estudiosos del sector.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>TornadIO2</title>
   <author>javaguirre</author>
   <link href="http://javaguirre.net/2012/02/13/tornadio2"/>
   <updated>2012-02-13T00:00:00+01:00</updated>
   <id>http://javaguirre.net/2012/02/13/tornadio2</id>
   <content type="html">&lt;p&gt;&lt;a href=&quot;https://github.com/MrJoes/tornadio2&quot;&gt;Un módulo en Python&lt;/a&gt; que implementa la biblioteca &lt;a href=&quot;http://socket.io/&quot;&gt;socket.io&lt;/a&gt; sobre &lt;a href=&quot;http://www.tornadoweb.org&quot;&gt;Tornado&lt;/a&gt; para realizar aplicaciones que se actualicen en tiempo real.&lt;/p&gt;

&lt;p&gt;Funciona en cualquier navegador moderno, incluido Internet Explorer, ya que el módulo se adapta al navegador cliente con el protocolo disponible que mejor funcione para éste.&lt;/p&gt;

&lt;p&gt;Entre los distintos protocolos que implementa &lt;strong&gt;socket.io&lt;/strong&gt; se encuentran &lt;em&gt;Websockets&lt;/em&gt;, &lt;em&gt;flashsocket&lt;/em&gt;, &lt;em&gt;htmlfile&lt;/em&gt; (para explorer), distintas soluciones &lt;em&gt;xhr&lt;/em&gt;, y alguna más que podéis ver en el repositorio de &lt;a href=&quot;https://github.com/MrJoes/tornadio&quot;&gt;Tornadio&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Si alguna vez has usado &lt;em&gt;Tornado&lt;/em&gt; se integra perfectamente en sus Handlers y sus Sockets, así que no tendrás ningún problema en la implementación de esta solución. También gracias a los &lt;a href=&quot;https://github.com/MrJoes/tornadio2/tree/master/examples&quot;&gt;ejemplos en su repositorio&lt;/a&gt;, que dan una idea muy buena de lo que es capaz este módulo con pocas líneas de código. :-)&lt;/p&gt;

&lt;p&gt;Espero tener un ejemplo interesante que mostrar la próxima vez.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Finde productivo</title>
   <author>javaguirre</author>
   <link href="http://javaguirre.net/2012/02/12/finde-productivo"/>
   <updated>2012-02-12T00:00:00+01:00</updated>
   <id>http://javaguirre.net/2012/02/12/finde-productivo</id>
   <content type="html">&lt;p&gt;Este fin de semana me he dedicado a arreglar unos cuantos temas del blog, he añadido tres plugins que mejoran bastante la web, el &lt;a href=&quot;http://wordpress.org/extend/plugins/wp-super-cache/&quot;&gt;WP super cache&lt;/a&gt;, &lt;a href=&quot;http://wordpress.org/extend/plugins/disqus-comment-system/&quot;&gt;Disqus comments&lt;/a&gt; y &lt;a href=&quot;http://wordpress.org/extend/plugins/wordpress-mobile-pack/&quot;&gt;Mobile Pack&lt;/a&gt;, así que ahora será más sencillo verlo desde el móvil. :-)&lt;/p&gt;

&lt;p&gt;Este finde quería dedicarme casi íntegramente a Sabrosous y la verdad es que donde otras veces no consigo arreglar tantas cosas como querría esta vez he conseguido &lt;a href=&quot;https://github.com/javaguirre/sabrosous/commits/master&quot;&gt;muchos progresos en poco tiempo&lt;/a&gt;, aunque aún hay algunas cosillas que mejorar antes de lanzar la &lt;em&gt;beta&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;En otro término de cosas, esta semana ha sido &lt;a href=&quot;http://python-madrid.es/post/resumen-reunion-python-madrid-febrero-2012/&quot;&gt;la reunión mensual de Python Madrid&lt;/a&gt;, con algunos temas muy interesantes y en las oficinas de &lt;em&gt;Tuenti&lt;/em&gt;, a la que nunca había tenido la oportunidad de ir.&lt;/p&gt;

&lt;p&gt;En el trabajo he estado jugando con sockets e hilos en Python, espero poder hacer algún tutorial sobre este tema y alguno sobre Javascript, al que le estoy dedicando mucho tiempo libre. ;-)&lt;/p&gt;

&lt;p&gt;Nota: He encontrado una herramienta de monitorización de servidores muy interesante hecha en &lt;a href=&quot;http://http://amon.cx/&quot;&gt;Python sobre Tornado&lt;/a&gt;, pero aún no he tenido la oportunidad de probarla, a ver si esta semana le dedico algo de tiempo.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Con ganas de Javascript</title>
   <author>javaguirre</author>
   <link href="http://javaguirre.net/2012/02/08/con-ganas-de-javascript"/>
   <updated>2012-02-08T00:00:00+01:00</updated>
   <id>http://javaguirre.net/2012/02/08/con-ganas-de-javascript</id>
   <content type="html">&lt;p&gt;Ocasionalmente he hecho cosas más grandes en Javascript que efectillos con jQuery o llamadas vía AJAX, pero hasta hace poco no tenía tiempo para preguntarme ¿cómo se hace una clase de la manera correcta en este lenguaje? ¿cómo plantear la organización del código de una manera correcta? &lt;/p&gt;

&lt;p&gt;El problema general en Javascript en cliente es que se hace mucho copiar y pegar, y se juega mucho con el &quot;simplemente funciona&quot;.&lt;/p&gt;

&lt;p&gt;Me gusta Javascript por muchas razones, y ahora que dedico algo de mi tiempo libre al desarrollo en este lenguaje me gustaría aprender de verdad un porcentaje alto de éste, es uno de mis propósitos en estos próximos meses.&lt;/p&gt;

&lt;p&gt;Mi primer proyecto Javascript de la nueva era será una pequeña Introducción a Crafty, el framework de videojuegos, algo que me atrae mucho. :-)&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Sabrosous se reinventa en estilos</title>
   <author>javaguirre</author>
   <link href="http://javaguirre.net/2012/02/06/sabrosous-se-reinventa-en-estilos"/>
   <updated>2012-02-06T00:00:00+01:00</updated>
   <id>http://javaguirre.net/2012/02/06/sabrosous-se-reinventa-en-estilos</id>
   <content type="html">&lt;p&gt;&lt;a href=&quot;http://twitter.com/weapp&quot;&gt;Manu&lt;/a&gt; ha trabajado en un nuevo diseño muy interesante, así que hemos decidido cambiar completamente &lt;a href=&quot;https://github.com/javaguirre/sabrosous/tree/unstable&quot;&gt;los estilos de Sabrosous&lt;/a&gt; e implementar alguna cosa más antes de la salida en beta.&lt;/p&gt;

&lt;p&gt;El estilo actual de Sabrosous se había ido quedando anticuado en este último año, estoy seguro de que este diseño es más usable que el anterior.&lt;/p&gt;

&lt;p&gt;Espero que de aquí a un mes tengamos una primera versión usable y en beta para que se pueda ir usando, yo creo que no andamos desencaminados, aunque quizás sean dos meses. &lt;/p&gt;

&lt;p&gt;Aún hay que pensar en las funcionalidades finales para esa beta, pero el camino será mejorar el parseador de html y la usabilidad de las entradas de twitter y rss.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Charlas, nuevo apartado de la web</title>
   <author>javaguirre</author>
   <link href="http://javaguirre.net/2012/02/04/charlas-nuevo-apartado-de-la-web"/>
   <updated>2012-02-04T00:00:00+01:00</updated>
   <id>http://javaguirre.net/2012/02/04/charlas-nuevo-apartado-de-la-web</id>
   <content type="html">&lt;p&gt;He creado un nuevo apartado en la web, &lt;a href=&quot;http://slides.javaguirre.net&quot;&gt;charlas&lt;/a&gt;, donde iré colgando las presentaciones que voy haciendo. Desde que me baso en &lt;a href=&quot;http://code.google.com/p/html5slides/&quot;&gt;la presentación html que tiene colgada la gente de Google&lt;/a&gt; en GoogleCode todo me resulta más sencillo en estos temas (nunca me han gustado las aplicaciones tipo Impress/Powerpoint, no me preguntéis por qué :-P).&lt;/p&gt;

&lt;p&gt;Este apartado nuevo de la web es un &lt;strong&gt;nginx&lt;/strong&gt; con el autoindex activo y alguna pequeña personalización más, cada día me gusta más &lt;strong&gt;nginx&lt;/strong&gt;. :-)&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Cursos GUL en Marzo de 2012</title>
   <author>javaguirre</author>
   <link href="http://javaguirre.net/2012/02/02/cursos-gul-de-marzo-de-2012"/>
   <updated>2012-02-02T00:00:00+01:00</updated>
   <id>http://javaguirre.net/2012/02/02/cursos-gul-de-marzo-de-2012</id>
   <content type="html">&lt;p&gt;Marzo vuelve a estar cerca y con él  vuelve &lt;a href=&quot;http://cursos.gul.es/index.php/courses/view/18&quot;&gt;la semana de cursos del GUL&lt;/a&gt;. :-)&lt;/p&gt;

&lt;p&gt;Esta vez lo he pillado con mucha más antelación así que desde ya estoy empezando a preparar los temas, que luego pasan las semanas y no hay tiempo para nada.&lt;/p&gt;

&lt;p&gt;Siempre he querido aprender a hacer videojuegos, es una de esas cosas que siempre he dejado de lado. Afortunadamente ahora es más sencillo empezar a desarrollar juegos con alguna biblioteca Javascript, y el usuario no necesita instalarse nada extra.&lt;/p&gt;

&lt;p&gt;Así que este Marzo he decidido proponer una charla sobre videojuegos usando la biblioteca en desarrollo &lt;a href=&quot;http://craftyjs.com&quot;&gt;Crafty&lt;/a&gt;. Llevo &lt;a href=&quot;https://github.com/louisstow/Crafty&quot;&gt;siguiendo el repo&lt;/a&gt; escasos días, y lo que he visto ha sido código mejorable y también mucho movimiento de desarrollo.&lt;/p&gt;

&lt;p&gt;Me gusta mucho el paradigma de entidades y componentes que están desarrollando, muy sencillo y te permite hacer cosas complejas en pocas líneas de código, y mucha facilidad para reutilizar código.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;También hemos decidido proponer una charla sobre Git y Github&lt;/strong&gt;. Mi amigo &lt;a href=&quot;http://twitter.com/mgdelacroix&quot;&gt;Miguel&lt;/a&gt; y yo nos hemos animado mutuamente para proponer esta charla que ya en anteriores ediciones se quedó en el tintero.&lt;/p&gt;

&lt;p&gt;A falta de saber qué charlas serán las más votadas seguiremos preparándolas, y aunque no sea esta vez cuando la realicemos, aprender cosas nuevas y profundizar en otras que conocemos bien siempre es divertido. :-)&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Wappalyzer detecta Python y Django</title>
   <author>javaguirre</author>
   <link href="http://javaguirre.net/2012/01/29/wappalyzer-detecta-python-y-django"/>
   <updated>2012-01-29T00:00:00+01:00</updated>
   <id>http://javaguirre.net/2012/01/29/wappalyzer-detecta-python-y-django</id>
   <content type="html">&lt;p&gt;Seguro que más de uno conoce esa maravillosa e interesante herramienta que es &lt;a href=&quot;http://wappalyzer.com/&quot;&gt;Wappalyzer&lt;/a&gt;, un detector de frameworks, servidores y tecnologías en las que está construido un servicio web para Firefox/Chrome, aunque la versión de Firefox está mucho más avanzada.&lt;/p&gt;

&lt;p&gt;La semana pasada introdujeron &lt;a href=&quot;https://github.com/ElbertF/Wappalyzer/commit/c06abc19eb7090ef71c7b348ca64b09f0bb7b05e&quot;&gt;la funcionalidad de detectar Python/Django&lt;/a&gt;, con bastante truco. :-)&lt;/p&gt;

&lt;/p&gt;&lt;a href=&quot;http://javaguirre.net/wp-content/uploads/2012/01/python_wappalyzer.png&quot;&gt;&lt;img src=&quot;http://javaguirre.net/wp-content/uploads/2012/01/python_wappalyzer.png&quot; alt=&quot;&quot; title=&quot;python_wappalyzer&quot; width=&quot;542&quot; height=&quot;54&quot; class=&quot;aligncenter size-full wp-image-626&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;En ambos casos (Python/Django) intenta detectar un script csrf y un Powered by Django en el html, en caso de que exista implicará que es Django, y por tanto Python.&lt;/p&gt;

&lt;p&gt;Una jugada muy buena y una actualización más de esta gran herramienta para el curioso desarrollador. :-)&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Configurando Nginx</title>
   <author>javaguirre</author>
   <link href="http://javaguirre.net/2012/01/29/configurando-nginx"/>
   <updated>2012-01-29T00:00:00+01:00</updated>
   <id>http://javaguirre.net/2012/01/29/configurando-nginx</id>
   <content type="html">&lt;p&gt;Había estado ya bastante tiempo escuchando a la gente que estaba usando &lt;a href=&quot;http://wiki.nginx.org/Main&quot;&gt;Nginx&lt;/a&gt; para sus entornos de producción con Django, y tras leer la semana pasada un poco configuraciones de Nginx, me encantó. :-)&lt;/p&gt;

&lt;p&gt;Me gusta mucho su limpia sintaxis, acostumbrado a la de &lt;em&gt;Apache&lt;/em&gt; la verdad es que ha sido un alivio para mí. No soy mucho de temas de administración de sistemas, en general aprendo lo que necesito, pero en este caso me apetecía meterle caña a Nginx y cambiar mis configuraciones por algo más &lt;em&gt;agradable y que consumiese menos recursos&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;Estoy apenas en el capítulo 3 del libro &lt;a href=&quot;http://www.amazon.com/Nginx-Web-Server-Implementation-Cookbook/dp/1849514968&quot;&gt;Nginx 1 Web Server Implementation Cookbook&lt;/a&gt; pero ya he hecho conseguido cambiar casi toda mi configuración básica, y todo va muy bien. :-)&lt;/p&gt;

&lt;p&gt;No obstante aún me tengo que quitar la espina de aprender &lt;em&gt;el capítulo de rewrite&lt;/em&gt; y de modificar unas reglas para &lt;a href=&quot;http://ereselchef.com&quot;&gt;ereselchef.com&lt;/a&gt;, el servicio web de mi amigo &lt;a href=&quot;https://twitter.com/#!/weapp&quot;&gt;Manu&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Tampoco he conseguido migrar la web del cuslmadrid, un &lt;em&gt;Symfony1.4&lt;/em&gt;, pero todo se andará, no parece tener mucha más historia.&lt;/p&gt;

&lt;p&gt;Tanto &lt;em&gt;Wordpress&lt;/em&gt; con &lt;em&gt;php-fpm&lt;/em&gt; y &lt;em&gt;Django+Gunicorn&lt;/em&gt; funcionan muy bien, y me queda por estudiar cómo hacer la configuración de &lt;em&gt;Flask+uwsgi&lt;/em&gt;, por cambiar un poco.&lt;/p&gt;

&lt;p&gt;Siempre he sido más de la parte de desarrollo, pero todo esto me está divirtiendo mucho y estoy encontrando un nuevo filón para mis tardes. :-)&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Importador de Delicious y más para Sabrosous</title>
   <author>javaguirre</author>
   <link href="http://javaguirre.net/2012/01/22/importador-de-delicious-y-mas-para-sabrosous"/>
   <updated>2012-01-22T00:00:00+01:00</updated>
   <id>http://javaguirre.net/2012/01/22/importador-de-delicious-y-mas-para-sabrosous</id>
   <content type="html">&lt;p&gt;Hoy he podido trabajar un poquito en &lt;a href=&quot;https://github.com/javaguirre/sabrosous&quot;&gt;Sabrosous&lt;/a&gt;, hay pocas novedades. Entre ellas &lt;em&gt;el importador de marcadores de Delicious&lt;/em&gt;, ahora para probar Sabrosous se podrá importar directamente de Delicious fácilmente.&lt;/p&gt;

&lt;p&gt;He arreglado algunos temas de duplicidad de código, para hacerlo más bonito, así como integración con &lt;a href=&quot;http://www.gravatar.com/&quot;&gt;Gravatar&lt;/a&gt; que tendré que probar más a fondo.&lt;/p&gt;

&lt;p&gt;Poco más por ahora. Falta subir todo al repositorio y empezar a dejar entrar a la gente, no obstante la estética de la página cambiará completamente pronto, va a mejorar mucho gracias a &lt;a href=&quot;https://twitter.com/#!/weapp&quot;&gt;@weapp&lt;/a&gt; :-)&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Sabrosous: Cambios en views, ahora son clases</title>
   <author>javaguirre</author>
   <link href="http://javaguirre.net/2012/01/15/sabrosous-cambios-en-views-ahora-son-clases"/>
   <updated>2012-01-15T00:00:00+01:00</updated>
   <id>http://javaguirre.net/2012/01/15/sabrosous-cambios-en-views-ahora-son-clases</id>
   <content type="html">&lt;p&gt;Tras ir a la primera reunión de &lt;strong&gt;Python Madrid&lt;/strong&gt;, y estar hablando un rato con &lt;a href=&quot;https://github.com/niwibe&quot;&gt;Andrei&lt;/a&gt; sobre Django en la segunda, especialmente temas de vistas, decidí hacer una clase genérica para mis vistas de &lt;a href=&quot;https://github.com/javaguirre/sabrosous&quot;&gt;Sabrosous&lt;/a&gt;, ya que me gusta que las peticiones get y post estén bien diferenciadas como en &lt;strong&gt;Flask&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Esta tarde he estado investigando el repo de &lt;a href=&quot;https://github.com/niwibe/niwi-web&quot;&gt;niwi-web&lt;/a&gt; y de &lt;a href=&quot;http://wadobo.com/trac/timebank&quot;&gt;timebank&lt;/a&gt; de mis amigos de &lt;a href=&quot;http://wadobo.com/&quot;&gt;wadobo&lt;/a&gt;, finalmente me he decidido por la versión de &lt;strong&gt;GenericView&lt;/strong&gt; del primero, aunque creo que integraré más cosas en esa vista genérica para quitar de encima código repetido. :-)&lt;/p&gt;

&lt;p&gt;Por lo demás he arreglado un problema tonto que tenía al editar links. Al intentar integrar el &lt;a href=&quot;http://xoxco.com/projects/code/tagsinput/&quot;&gt;Tag Inputs&lt;/a&gt;, me cargué la edición, ya que en el &lt;em&gt;__init__&lt;/em&gt; de la clase LinkForm estaba llamando a super con &lt;strong&gt;ModelForm&lt;/strong&gt;, cuando tenía que hacerlo con &lt;strong&gt;BaseModelForm&lt;/strong&gt;, cosas del directo.&lt;/p&gt;

&lt;p&gt;Sigue habiendo muucho código mejorable y antiguo de cuando empecé con este proyecto, pero vamos simplificando poco a poco.&lt;/p&gt;

&lt;p&gt;Me he acabado el primer libro de &lt;strong&gt;Juego de Tronos&lt;/strong&gt;, ya he empezado el segundo. :-)&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Al codemotion</title>
   <author>javaguirre</author>
   <link href="http://javaguirre.net/2012/01/15/al-codemotion"/>
   <updated>2012-01-15T00:00:00+01:00</updated>
   <id>http://javaguirre.net/2012/01/15/al-codemotion</id>
   <content type="html">&lt;p&gt;Ayer hubo mucho movimiento en la lista de &lt;a href=&quot;http://python-madrid.es/&quot;&gt;Python Madrid&lt;/a&gt;, y pensando que hoy se acababa el plazo para el &lt;strong&gt;Call for papers&lt;/strong&gt; del codemotion, publicamos unas cuantas posibles ponencias.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://codemotion.es/&quot;&gt;Codemotion&lt;/a&gt; es un evento técnico en el que se reunirán todas las comunidades de desarrollo de Madrid y parte de España, teniendo la posibilidad de acceder a charlas de todo tipo.&lt;/p&gt;

&lt;p&gt;Pensándolo durante este par de días y con ayuda del grupo, se me ocurrió que sería interesante impartir estas charlas:&lt;/p&gt;

&lt;p&gt;- &lt;strong&gt;Python en las nubes&lt;/strong&gt;: Una charla sobre frameworks web (&lt;a href=&quot;http://www.djangoproject.com&quot;&gt;Django&lt;/a&gt;, &lt;a href=&quot;http://flask.pocoo.org&quot;&gt;Flask&lt;/a&gt;, etc) y su despliegue en servicios cloud como plataforma (&lt;a href=&quot;http://www.heroku.com/&quot;&gt;Heroku&lt;/a&gt;, &lt;a href=&quot;https://www.dotcloud.com/&quot;&gt;DotCloud&lt;/a&gt;, &lt;a href=&quot;https://www.ep.io/&quot;&gt;Ep.io&lt;/a&gt;, etc). Una charla que seguramente realizaré conjuntamente con &lt;em&gt;Rafael Durán&lt;/em&gt; que hablará sobre &lt;a href=&quot;http://aws.amazon.com/es/&quot;&gt;AWS&lt;/a&gt; y &lt;a href=&quot;http://openstack.org/&quot;&gt;Openstack&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;- &lt;strong&gt;Introducción a Django&lt;/strong&gt;: Iniciación al  framework más avanzado de Python.&lt;/p&gt;
&lt;p&gt;- &lt;strong&gt;Python2 vs Python3&lt;/strong&gt;: Repaso de ambas versiones desde el punto de vista del futuro de Python. Esta charla seguramente la realizaré conjuntamente con &lt;em&gt;Pablo Lobariñas&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;Charlas &lt;em&gt;relámpago&lt;/em&gt;:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href=&quot;http://aspen.io/&quot;&gt;Aspen.io&lt;/a&gt;&lt;/strong&gt;: Un framework orientado a ficheros.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;a href=&quot;http://www.tornadoweb.org/&quot;&gt;Tornado&lt;/a&gt;&lt;/strong&gt;: El servidor web.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Apis en la web - &lt;a href=&quot;http://docs.python-requests.org/en/latest/index.html&quot;&gt;Requests&lt;/a&gt;&lt;/strong&gt;: Mostrar lo fácil que es interaccionar con APIs web en Python.&lt;/p&gt;

&lt;p&gt;De todo esto que he enviado finalmente no se cuántas charlas tendrán hueco, pero creo que hay un par de temas que podrían ser muy atractivos en el evento.&lt;/p&gt;

&lt;p&gt;De momento el call for papers se ha ampliado hasta el 1 de Febrero, con lo que tocará esperar para ver si nuestras charlas finalmente tienen cabida en &lt;em&gt;codemotion&lt;/em&gt;.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Añadido el BOE diario y el Borme a Openboe</title>
   <author>javaguirre</author>
   <link href="http://javaguirre.net/2012/01/10/anadido-el-boe-diario-y-el-borme-a-openboe"/>
   <updated>2012-01-10T00:00:00+01:00</updated>
   <id>http://javaguirre.net/2012/01/10/anadido-el-boe-diario-y-el-borme-a-openboe</id>
   <content type="html">&lt;p&gt;Hasta ahora sólo había añadido los llamados &lt;a href=&quot;http://www.boe.es/rss/&quot;&gt;Canales Temáticos a Openboe&lt;/a&gt;, desde ayer noche también se podrá buscar en todas las secciones del &lt;strong&gt;BOE&lt;/strong&gt; y del &lt;strong&gt;BORME&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/javaguirre/openboe/commit/637560d65e5a95fe1a63145497e97a5fc87eda21&quot;&gt;También he arreglado un pequeño problema con codificaciones&lt;/a&gt; en el buscador, ahora la búsqueda es más cómoda y no hay que meter tildes. :-)&lt;/p&gt;

&lt;p&gt;Ahora mi idea es ir &lt;em&gt;encapsulando&lt;/em&gt; las distintas entradas de los distintos RSS en una base de datos &lt;strong&gt;MongoDB&lt;/strong&gt; para guardar un histórico de las entradas RSS antiguas y las que vayan apareciendo en éstos, para poder ser consultadas en el futuro.&lt;/p&gt;

&lt;p&gt;También &lt;strong&gt;arreglar los títulos de cada lista de canales/boe/borme&lt;/strong&gt;, adecuándolo a lo que pone en la web del boe.&lt;/p&gt;

&lt;p&gt;Tras esto y tras securizar un poco la web tocará &lt;a href=&quot;http://flask.pocoo.org/docs/deploying/&quot;&gt;ponerla en producción&lt;/a&gt;, y empezar a pensar en los pasos siguientes para hacerlo más usable y práctico, por ahora es poco práctico.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Terra Nova no es muy nueva</title>
   <author>javaguirre</author>
   <link href="http://javaguirre.net/2012/01/08/terra-nova-no-es-muy-nueva"/>
   <updated>2012-01-08T00:00:00+01:00</updated>
   <id>http://javaguirre.net/2012/01/08/terra-nova-no-es-muy-nueva</id>
   <content type="html">&lt;p&gt;No, porque parte de simplones guiones que ya han sido repetidos hasta la saciedad, como ocurrió en &lt;a href=&quot;http://www.youtube.com/watch?v=SjroVVhe8G0&quot;&gt;Falling Skies&lt;/a&gt;, una idea que parecía muy buena en un principio muere rápido, aunque se basaba en el argumento de moda que ya vemos en otras series actuales (mundo en colapso por alguna catástrofe). Los primeros dos capítulos muestran un &lt;strong&gt;Parque Jurásico&lt;/strong&gt; mezclado con &lt;strong&gt;Avatar&lt;/strong&gt;, aunque cuando avanza la serie no le queda ni lo mejor de la una ni de la otra me temo.&lt;/p&gt;

&lt;p&gt;Guión monótono. Empieza el día muy bonito, hay un problema extraño, se soluciona y se acabó el capítulo, no se ve trama principal ni fuerza en la historia, que prometía mucho, pero que tras ver el quinto capítulo se ve bastante agotada.&lt;/p&gt;

&lt;p&gt;Una pena, una buena idea que al final no da algo muy bueno, y tras ver la muy buena última temporada de &lt;a href=&quot;http://en.wikipedia.org/wiki/Sons_of_Anarchy&quot;&gt;Sons of Anarchy&lt;/a&gt; necesito algo a la altura, creo que probaré &lt;a href=&quot;http://en.wikipedia.org/wiki/Breaking_Bad&quot;&gt;Breaking Bad&lt;/a&gt;, me la han recomendado mucho. :-)&lt;/p&gt;

&lt;p&gt;Referencia: &lt;a href=&quot;http://en.wikipedia.org/wiki/Terra_Nova_(TV_series)&quot;&gt;Terra Nova&lt;/a&gt;&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Python class decorator for classes</title>
   <author>javaguirre</author>
   <link href="http://javaguirre.net/2012/01/08/python-class-decorator-for-classes"/>
   <updated>2012-01-08T00:00:00+01:00</updated>
   <id>http://javaguirre.net/2012/01/08/python-class-decorator-for-classes</id>
   <content type="html">&lt;p&gt;We've been thinking this week in a good solution to separate credentials logic from our functional modules, and we've realised that &lt;a href=&quot;http://www.python.org/dev/peps/pep-0318/&quot;&gt;decorators&lt;/a&gt; could be it. I came to this idea looking Tornado and Django's solution.&lt;/p&gt;

&lt;p&gt;There are a lot of &lt;a href=&quot;http://blog.ianbicking.org/2008/10/24/decorators-and-descriptors/&quot;&gt;good posts&lt;/a&gt; &lt;a href=&quot;http://stackoverflow.com/questions/306130/python-decorator-makes-function-forget-that-it-belongs-to-a-class&quot;&gt;and discussions&lt;/a&gt; about python decorators, but I needed to look deeper than most of tutorials.&lt;/p&gt;

&lt;p&gt;There are many tutorials describing what a decorator is, so I won't enter in it, anyway there's &lt;a href=&quot;http://revista.python.org.ar/1/html/decorators.html&quot;&gt;a good classification (spanish)&lt;/a&gt; which I will refer to now.&lt;/p&gt;

&lt;p&gt;According to the classification, the implementation approach is a bit different in these cases:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Decorator without parameters&lt;/li&gt;
&lt;li&gt;Decorator with parameters&lt;/li&gt;
&lt;li&gt;Decorator class without parameters&lt;/li&gt;
&lt;li&gt;Decorator class with parameters&lt;/li&gt;
And what I needed...
&lt;li&gt;&lt;strong&gt;Decorator class with parameters for another class methods&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Why a class instead &lt;em&gt;of a simple function&lt;/em&gt;?&lt;/p&gt;

&lt;p&gt;Because I needed to separate initialization from execution. If you know how to use a decorator you will understand my approach easy.&lt;/p&gt;

&lt;p&gt;Finally my class:&lt;/p&gt;

&lt;pre&gt;&lt;code data-language='python'&gt;
class CheckPerm(object):
    '''Check permissions by a type'''
    def __init__(self, type):
        self.type = type

    def __get__(self, obj, type=None):
        ''' We need this to get the class of the function'''
        return self.__class__(self.func.__get__(obj, type))

    def __call__(self, func):
        self.func = func

        def wrap(*args, **kw):
            if self.type == 'one':
                result = self.check_one(args)
            elif self.type == 'two':
                result = self.check_two(args)

            if not result:
                return {&quot;status&quot;: &quot;1&quot;,
                        &quot;error&quot;: &quot;You dont have permissions&quot;}

            return self.func(*args, **kw)
        return wrap

    def check_one(self, args):
        ''' Just for the example'''
        pass

    def check_two(self, args):
        ''' Just for the example'''
        pass
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;In the &lt;strong&gt;__init__&lt;/strong&gt; function I take the decorator parameter (type).&lt;/p&gt;

&lt;p&gt;The &lt;strong&gt;__get__&lt;/strong&gt; function is necessary for not to lose our function class.&lt;/p&gt;

&lt;p&gt;When we &lt;strong&gt;__call__&lt;/strong&gt; the function, we take it in our decorator, we check parameters (with hypothetical &lt;em&gt;check_one&lt;/em&gt; and &lt;em&gt;check_two&lt;/em&gt; functions) and return the execution of the function or our custom error.&lt;/p&gt;

&lt;p&gt;In &lt;strong&gt;__call__&lt;/strong&gt; function we need this wrap to &lt;em&gt;catch&lt;/em&gt; function parameters.&lt;/p&gt;

&lt;p&gt;Now we can call our decorator like...&lt;/p&gt;

&lt;pre&gt;&lt;code data-language='python'&gt;
class myClass():

    @CheckPerm('one')
    def my_function(self, my_arg):
        pass
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;And that's all, hope it helps you understand better a solution for this need. :-)&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Avance en Openboe, estilos y búsqueda por fecha</title>
   <author>javaguirre</author>
   <link href="http://javaguirre.net/2012/01/08/avance-en-openboe-estilos-y-busqueda-por-fecha"/>
   <updated>2012-01-08T00:00:00+01:00</updated>
   <id>http://javaguirre.net/2012/01/08/avance-en-openboe-estilos-y-busqueda-por-fecha</id>
   <content type="html">&lt;p&gt;Hacía tiempo que tenía ganas de continuar mi proyecto &lt;a href=&quot;https://github.com/javaguirre/openboe&quot;&gt;OpenBOE&lt;/a&gt;, un proyecto que intenta crear una manera sencilla de acceder a la información del BOE, a la que &lt;a href=&quot;http://www.boe.es/rss/&quot;&gt;actualmente se puede acceder por RSS&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;No se si ahora ya tiene tanto sentido tras &lt;a href=&quot;http://www.datos.gob.es/datos/&quot;&gt;la apertura de una web por parte del gobierno para abrir los datos&lt;/a&gt; (no he tenido la posibilidad de estudiarla), pero creo que puede seguir cubriendo una necesidad que no está cubierta (proveer &lt;em&gt;datos en bruto&lt;/em&gt; de forma más sencilla).&lt;/p&gt;

&lt;p&gt;El proyecto comenzó siendo desarrollado en &lt;a href=&quot;http://silex.sensiolabs.org/&quot;&gt;Silex&lt;/a&gt;, pero tras mi &lt;em&gt;radicalización&lt;/em&gt; a hacer todo lo que pueda en mi lenguaje favorito, &lt;strong&gt;Python&lt;/strong&gt;, y mi interés por el &lt;a href=&quot;http://flask.pocoo.org/&quot;&gt;framework Flask&lt;/a&gt;, reescribí lo muy poco que tenía a esta tecnología.&lt;/p&gt;

&lt;p&gt;Hoy he empezado además a introducir el &lt;a href=&quot;http://twitter.github.com/bootstrap/&quot;&gt;twitter bootstrap&lt;/a&gt; para los estilos, lo había usado hace tiempo para alguna prueba de concepto y tenía ganas de utilizarlo más en profundidad, una delicia. :-)&lt;/p&gt;

&lt;p&gt;Así que hoy ha tocado introducir los estilos según el &lt;em&gt;bootstrap&lt;/em&gt; y añadir una búsqueda por fechas (desde, hasta) a los feeds RSS del BOE.&lt;/p&gt;

&lt;p&gt;Puedes seguir el proyecto en &lt;a href=&quot;https://github.com/javaguirre/openboe&quot;&gt;github&lt;/a&gt;, si quieres participar también eres bienvenido. :-)&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Hammerfight</title>
   <author>javaguirre</author>
   <link href="http://javaguirre.net/2012/01/03/hammerfight"/>
   <updated>2012-01-03T00:00:00+01:00</updated>
   <id>http://javaguirre.net/2012/01/03/hammerfight</id>
   <content type="html">&lt;p&gt;Si algo ha conseguido &lt;a href=&quot;http://www.humblebundle.com/&quot;&gt;Humble Bundle&lt;/a&gt; es acercar los juegos independientes a un público más amplio, un público que además ha premiado creativos y adictivos juegos hechos con poco presupuesto, así como contribuido a ONGs. &lt;/p&gt;

&lt;p&gt;La pasada semana de vacaciones por Navidad pude disfrutar probando &lt;a href=&quot;http://www.koshutin.com/&quot;&gt;Hammerfight&lt;/a&gt;, un juego de combates muy original. El protagonista lleva una especie de helicóptero que tiene adosada un arma, ya sea un martillo, una espada, etc. Ésta está fija a un eje y se mueve de forma circular con el movimiento de la nave, que se maneja con el ratón. El truco es acertar con el arma a los otros enemigos, que usan la misma técnica para intentar atacarte.&lt;/p&gt;

&lt;p&gt;Me ha gustado mucho el juego, muy original con un modo historia bonito y unos cuantos modos más (arena, tribal, mata bichos, etc), además puedes ir coleccionando armas diferentes e ir equipando la que más nos interese en la armería. A las armas se le pueden engarzar gemas, que tienen propiedades mágicas (regeneración, daño por fuego, etc).&lt;/p&gt;

&lt;p&gt;No obstante la movilidad del jugador es en ocasiones complicada, y a veces no sabes cómo te han matado (por las explosiones) o te bloquean en parte de la pantalla y no puedes escapar. También hay veces que en el modo campaña los malos desaparecen y te dan la misión por ganada, aunque no suele pasar a menudo.&lt;/p&gt;

&lt;p&gt;Ahora que el &lt;a href=&quot;http://www.humblebundle.com&quot;&gt;humble bundle #4&lt;/a&gt; ha acabado, se puede obtener vía Steam.&lt;/p&gt;

&lt;iframe width=&quot;420&quot; height=&quot;315&quot; src=&quot;http://www.youtube.com/embed/tAVYpvWRdoM&quot; frameborder=&quot;0&quot; allowfullscreen&gt;&lt;/iframe&gt;
</content>
 </entry>
 
 <entry>
   <title>Implementando jQuery Tag Inputs en Django, Parte 2</title>
   <author>javaguirre</author>
   <link href="http://javaguirre.net/2012/01/01/implementando-jquery-tag-inputs-en-django-parte-2"/>
   <updated>2012-01-01T00:00:00+01:00</updated>
   <id>http://javaguirre.net/2012/01/01/implementando-jquery-tag-inputs-en-django-parte-2</id>
   <content type="html">&lt;p&gt;Ayer comencé un artículo sobre &lt;a href=&quot;http://javaguirre.net/2011/12/31/implementando-jquery-tag-inputs-en-django/&quot;&gt;cómo implementar en Django el plugin de Jquery Tag Inputs&lt;/a&gt;, usado por &lt;em&gt;Tumblr&lt;/em&gt;, y nos centramos en cómo mostrar las etiquetas que ya tenemos guardadas a la hora de editarlas como campo &lt;strong&gt;ManyToManyField&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Hoy nos centraremos en cómo validar y &lt;em&gt;limpiar&lt;/em&gt; los datos para guardarlos en la base de datos. Para ello lo primero es crear una clase que herede de &lt;strong&gt;ModelMultipleChoiceField&lt;/strong&gt;, ya que hemos cambiado el widget asociado a éste por defecto (hemos puesto un &lt;em&gt;Textarea&lt;/em&gt;), y en el formulario al hacer submit el campo Field para este elemento se va a encontrar con una cadena en vez de con una lista al validar y devolver los datos correctos.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://docs.djangoproject.com/en/dev/ref/forms/validation/&quot;&gt;Este proceso de validación&lt;/a&gt; se lleva a cabo en la función &lt;strong&gt;clean&lt;/strong&gt; dentro de cualquier clase del tipo Field de Django. Como Tag Inputs define separación de comas entre tags y nos devuelve un string, comenzaríamos haciendo un split de los datos obtenidos, para posteriormente y basándonos en el código de &lt;strong&gt;ModelMultipleChoiceField&lt;/strong&gt; original, cambiar la variable &lt;em&gt;value&lt;/em&gt; que se usa en todo el método por nuestra variable (yo la he llamado &lt;em&gt;value_splitted&lt;/em&gt;).&lt;/p&gt;

&lt;p&gt;La clase quedaría de la siguiente manera:&lt;/p&gt;

&lt;pre&gt;&lt;code data-language='python'&gt;
class MyModelMultipleChoiceField(ModelMultipleChoiceField):

    def clean(self, value):
        value_splitted = value.split(&quot;,&quot;)

        if self.required and not value_splitted:
            raise ValidationError(self.error_messages['required'])
        elif not self.required and not value_splitted:
            return []
        if not isinstance(value_splitted, (list, tuple)):
            raise ValidationError(self.error_messages['list'])
        
        key = &quot;slug&quot;
        qs = self.queryset.filter(**{'%s__in' % key: value_splitted})
        # we run custom validators here
        self.run_validators(value_splitted)
        return qs
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;El Field por defecto no te deja elegir una etiqueta que previamente no esté en la base de datos(fallaría la validación), yo necesitaba que todas las etiquetas pasasen el filtro independientemente de que estuviesen en la base de datos, con lo que eliminé esas líneas. También modifiqué el atributo con el que tomar las etiquetas de la bd, &lt;em&gt;uso un campo slug en vez del id&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;Todavía se puede arreglar más el clean (como comprobar si el value es vacío antes de hacer el split), pero nos sirve de ejemplo plenamente funcional. :-)&lt;/p&gt;

&lt;p&gt;Finalmente en nuestra clase Form para el modelo correspondiente cambiamos la clase ModelMultipleChoiceField por nuestra clase.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Implementando jquery tag inputs en Django</title>
   <author>javaguirre</author>
   <link href="http://javaguirre.net/2011/12/31/implementando-jquery-tag-inputs-en-django"/>
   <updated>2011-12-31T00:00:00+01:00</updated>
   <id>http://javaguirre.net/2011/12/31/implementando-jquery-tag-inputs-en-django</id>
   <content type="html">&lt;p&gt;Parecía sencillo, pero finalmente costó lo suyo dar con una solución que le gustase a &lt;strong&gt;Django&lt;/strong&gt; y a &lt;a href=&quot;http://xoxco.com/projects/code/tagsinput/&quot;&gt;jQuery Tag inputs&lt;/a&gt;, un excelente plugin para organizar tags dentro de un textarea que cumplía con todas las necesidades que &lt;a href=&quot;https://github.com/javaguirre/sabrosous&quot;&gt;Sabrosous&lt;/a&gt; necesita.&lt;/p&gt;

&lt;p&gt;la parte más compleja por el momento ha sido al formatear las etiquetas/tags de un enlace que ya estaban en la Base de datos, ya que por defecto Django muestra sólo las claves primarias en los &lt;strong&gt;ManyToManyFields&lt;/strong&gt; al hacer el render del formulario. Lo hace llamando a la función &lt;strong&gt;model_to_dict&lt;/strong&gt; en &lt;a href=&quot;https://github.com/django/django/blob/master/django/forms/models.py&quot;&gt;django.forms&lt;/a&gt;.&lt;/p&gt;

&lt;pre&gt;&lt;code data-language='python'&gt;
if isinstance(f, ManyToManyField):
            # If the object doesn't have a primary key yet, just use an empty
            # list for its m2m fields. Calling f.value_from_object will raise
            # an exception.
            if instance.pk is None:
                data[f.name] = []
            else:
                # MultipleChoiceWidget needs a list of pks, not object instances.
                data[f.name] = [obj.pk for obj in f.value_from_object(instance)]
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Al intentar reescribir la función model_to_dict en mi archivo &lt;a href=&quot;https://github.com/javaguirre/sabrosous/blob/master/sabrosous/links/forms.py&quot;&gt;links/forms.py&lt;/a&gt; me di cuenta que no tomaba esta sobreescritura, así que tuve que reescribir el constructor de mi clase LinkForm, que hereda de &lt;strong&gt;ModelForm&lt;/strong&gt;. Más adelante pensaré en una mejor solución, aunque ésta por el momento me parece bastante decente.&lt;/p&gt;

&lt;p&gt;Así que finalmente modificando una línea en el model_to_dict en el módulo forms conseguimos que al mostrar los tags seleccionados no muestre el id sino el campo que nosotros queramos. Al hacer esto faltará procesar este campo (tags) del formulario para guardarlo correctamente en la base de datos al hacer submit, así que recomiendo mostrar un campo único, en mi caso, un slug.&lt;/p&gt;

&lt;p&gt;Aquí cómo queda el archivo final, las partes importantes son LinkForm y model_to_dict.&lt;/p&gt;

&lt;pre&gt;&lt;code data-language='python'&gt;
from django import forms
from django.forms import ModelForm
from links.models import Link, Tag

from django.forms.util import ErrorList


def model_to_dict(instance, fields=None, exclude=None):
    &quot;&quot;&quot;
    Returns a dict containing the data in ``instance`` suitable for passing as
    a Form's ``initial`` keyword argument.

    ``fields`` is an optional list of field names. If provided, only the named
    fields will be included in the returned dict.

    ``exclude`` is an optional list of field names. If provided, the named
    fields will be excluded from the returned dict, even if they are listed in
    the ``fields`` argument.
    &quot;&quot;&quot;
    # avoid a circular import
    from django.db.models.fields.related import ManyToManyField
    opts = instance._meta
    data = {}
    for f in opts.fields + opts.many_to_many:
        if not f.editable:
            continue
        if fields and not f.name in fields:
            continue
        if exclude and f.name in exclude:
            continue
        if isinstance(f, ManyToManyField):
            # If the object doesn't have a primry key yet, just use an empty
            # list for its m2m fields. Calling f.value_from_object will raise
            # an exception.
            if instance.pk is None:
                data[f.name] = []
            else:
                #mi linea para TAG INPUTS
                data[f.name] = &quot;, &quot;.join([obj.slug for obj in f.value_from_object(instance)])
        else:
            data[f.name] = f.value_from_object(instance)
    return data


class LinkForm(ModelForm):
    tags = forms.ModelMultipleChoiceField(
                                queryset=Tag.objects.all(),
                                widget=forms.Textarea
                              )

    def __init__(self, data=None, files=None, auto_id='id_%s', prefix=None,
                 initial=None, error_class=ErrorList, label_suffix=':',
                 empty_permitted=False, instance=None):
        opts = self._meta
        if instance is None:
            if opts.model is None:
                raise ValueError('ModelForm has no model class specified.')
            # if we didn't get an instance, instantiate a new one
            self.instance = opts.model()
            object_data = {}
        else:
            self.instance = instance
            object_data = model_to_dict(instance, opts.fields, opts.exclude)
        # if initial was provided, it should override the values from instance
        if initial is not None:
            object_data.update(initial)
        # self._validate_unique will be set to True by BaseModelForm.clean().
        # It is False by default so overriding self.clean() and failing to call
        # super will stop validate_unique from being called.
        self._validate_unique = False
        super(ModelForm, self).__init__(data, files, auto_id, prefix, object_data,
                                        error_class, label_suffix, empty_permitted)

    class Meta:
        model = Link
        fields = ('title', 'url', 'description', 'tags')


class UploadFileForm(forms.Form):
    file = forms.FileField()
&lt;/code&gt;&lt;/pre&gt;
</content>
 </entry>
 
 <entry>
   <title>Generar claves ssh desde python sin meter contraseña</title>
   <author>javaguirre</author>
   <link href="http://javaguirre.net/2011/12/31/generar-claves-ssh-desde-python-sin-meter-contrasena"/>
   <updated>2011-12-31T00:00:00+01:00</updated>
   <id>http://javaguirre.net/2011/12/31/generar-claves-ssh-desde-python-sin-meter-contrasena</id>
   <content type="html">&lt;p&gt;Para un proyecto hace un par de semanas estuvimos jugando con la generación de claves &lt;strong&gt;ssh-rsa desde python&lt;/strong&gt;, que para la conexión automática segura entre servidores resulta de lo más cómodo. Buscando algo de información llegamos rápido a varios hilos en &lt;a href=&quot;http://stackoverflow.com/questions/2466401/how-to-generate-ssh-key-pairs-with-python&quot;&gt;Stackoverflow&lt;/a&gt; hablando sobre el tema, aunque finalmente nos tuvimos que meter un poco en código. :-)&lt;/p&gt;
&lt;pre&gt;&lt;code data-language='python'&gt;        from M2Crypto import RSA
        from base64 import b64encode
        import os

        key = RSA.gen_key(1024, 65537)
        raw_key = key.pub()[1]
        b64key = b64encode(raw_key)

        username = os.getlogin()
        hostname = os.uname()[1]
        key.save_key(&quot;/.ssh/%s&quot; % login, callback=lambda v: &quot;&quot;)
        keystring = 'ssh-rsa %s %s@%s' % (b64key, username, hostname)

        #devolvemos la clave pública
        return keystring&lt;/code&gt;&lt;/pre&gt;
    &lt;p&gt;Opté por trabajar con la conocida biblioteca &lt;a href=&quot;http://chandlerproject.org/bin/view/Projects/MeTooCrypto&quot;&gt;M2Crypto&lt;/a&gt;, con la que ya había jugado para temas de SSL, ignorando el certificado para &lt;em&gt;xmlrpc&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;En el ejemplo anterior generamos una clave &lt;strong&gt;RSA de 1024 bits&lt;/strong&gt;, con un exponente &lt;strong&gt;RSA de 65537&lt;/strong&gt;. Tomamos los datos de la parte pública con &lt;em&gt;pub()&lt;/em&gt; y lo desciframos en &lt;em&gt;base64&lt;/em&gt;. usamos los datos de la maquina del usuario y su login para añadirlo a la clave pública final.&lt;/p&gt;

&lt;p&gt;Con &lt;em&gt;save_key&lt;/em&gt; guardamos la clave privada ssh en &lt;a href=&quot;http://en.wikipedia.org/wiki/X.509&quot;&gt;formato PEM&lt;/a&gt; en el directorio que queramos con el nombre que queramos (normalmente en el $HOME/.ssh). Devolvemos la clave pública por si queremos hacer algo con ella (enviarla a una máquina con &lt;a href=&quot;http://docs.python.org/library/subprocess.html&quot;&gt;subprocess&lt;/a&gt; o lo que se nos ocurra :-) )&lt;/p&gt;
&lt;pre&gt;&lt;code data-language='python'&gt;def passphrase_callback(v, prompt1='Enter passphrase:',
                           prompt2='Verify passphrase:'):
    from getpass import getpass
    while 1:
        try:
            p1=getpass(prompt1)
            if v:
                p2=getpass(prompt2)
                if p1==p2:
                    break
            else:
                break
        except KeyboardInterrupt:
            return None
    return p1&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;En este caso, podemos crear una función que se ocupe de introducir la contraseña para generar la clave final privada. En el ejemplo de M2Crypto en util.passphrase_callback se le preguntará al usuario qué contraseña quiere y se comprobará una segunda vez (código de arriba).&lt;/p&gt;

&lt;p&gt;Usando el método ejemplo en util.passphrase_callback lo más sencillo fue finalmente implementarlo de una manera correcta, añadiendo como callback (como vemos en el código de más arriba) la función lambda.&lt;/p&gt;
&lt;pre&gt;&lt;code data-language='python'&gt;...
key.save_key(&quot;/.ssh/%s&quot; % login, callback=lambda v: &quot;&quot;)
...&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Al querer contraseña vacía basta con pasarle como callback una función lambda que recoja el parámetro de la función, devuelva vacío y listo. :-)&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Reunión diciembre de Python Madrid</title>
   <author>javaguirre</author>
   <link href="http://javaguirre.net/2011/12/14/reunion-diciembre-de-python-madrid"/>
   <updated>2011-12-14T00:00:00+01:00</updated>
   <id>http://javaguirre.net/2011/12/14/reunion-diciembre-de-python-madrid</id>
   <content type="html">&lt;p&gt;Ayer tuve la oportunidad de ir por pimera vez a &lt;a href=&quot;http://python-madrid.es/&quot;&gt;la reunión de Python Madrid&lt;/a&gt;, y estoy encantado, genial ambiente y gente con un gran nivel técnico con la que apoyar y aprender cosas del lenguaje que nos apasiona.&lt;/p&gt;

&lt;p&gt;Además tuve la oportunidad de dar &lt;a href=&quot;https://github.com/javaguirre/flask-slides&quot;&gt;una pequeña charla de Flask&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Estoy muy contento porque vamos a poder participar en la &lt;a href=&quot;http://www.codemotion.es/&quot;&gt;codemotion&lt;/a&gt; (ya me siento parte de esta comunidad, intentaré contribuir todo lo que pueda :-) ), que creo que es un evento muy interesante y que englobará a diversas comunidades de Software Libre.&lt;/p&gt;

&lt;p&gt;También descubrí dónde trabaja la gente de &lt;a href=&quot;http://www.kaleidos.net/&quot;&gt;Kaleidos&lt;/a&gt;, una empresa con una filosofía afín a mí y con gente de altísimo nivel. :-)&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Lecturas de semana, Ruiz Zafón y Reverte</title>
   <author>javaguirre</author>
   <link href="http://javaguirre.net/2011/12/08/lecturas-de-semana-ruiz-zafon-y-reverte"/>
   <updated>2011-12-08T00:00:00+01:00</updated>
   <id>http://javaguirre.net/2011/12/08/lecturas-de-semana-ruiz-zafon-y-reverte</id>
   <content type="html">&lt;p&gt;Esta semana me he acabado dos libros, &lt;a href=&quot;http://www.perezreverte.com/libro/66/el-asedio/&quot;&gt;El Asedio de Reverte&lt;/a&gt;, que llevaba leyendo un par de semanas, y el nuevo de &lt;a href=&quot;http://www.carlosruizzafon.com/&quot;&gt;Ruiz Zafón, El Prisionero del Cielo&lt;/a&gt;, que lo he devorado en un par de días.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;El Asedio&lt;/strong&gt;, novela histórica y asesinatos en la Cádiz del asedio francés, interesante por la ambientación, caracterización de personajes, etc. Una pieza para aprender vida y cultura pasadas y de historia marinera, que a mí personalmente me gusta (duelos navales, pasar por la quilla, todo ese tipo de temas ;-) ). Entretenido, y en ocasiones hasta educativo como son algunas obras de Reverte.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;El Prisionero del Cielo&lt;/strong&gt;, para mí el peor o menos bueno de la trilogía, menos psicológico, menos extraño, más basado en los hechos de la época de la posguerra, manido tema por muchas veces repetido. Sigo quedándome con lo siniestro y la paranoia del &lt;strong&gt;Juego Del Ángel&lt;/strong&gt;. No me ha convencido este libro, aunque me ha resultado entretenido como todos los de Ruiz Zafón, le falta chicha, me ha sabido a poco, le ha faltado &lt;em&gt;magia&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;Aún tengo pendientes algunos libros más antes de que acabe el año, entre ellos &lt;a href=&quot;http://www.perezreverte.com/libro/38/corsarios-de-levante/&quot;&gt;la última aventura de Alatriste&lt;/a&gt;, aunque quizás leeré algo entremedias, por eso de cambiar de autor y contextos, quizás algo de &lt;a href=&quot;http://es.wikipedia.org/wiki/Arthur_C._Clarke&quot;&gt;Arthur C Clarke&lt;/a&gt;.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>El Concurso de Software Libre comienza a moverse en serio</title>
   <author>javaguirre</author>
   <link href="http://javaguirre.net/2011/12/08/el-concurso-de-software-libre-comienza-a-moverse-en-serio"/>
   <updated>2011-12-08T00:00:00+01:00</updated>
   <id>http://javaguirre.net/2011/12/08/el-concurso-de-software-libre-comienza-a-moverse-en-serio</id>
   <content type="html">&lt;p&gt;Parece que tras la finalización de la inscripción en el &lt;a href=&quot;http://www.concursosoftwarelibre.org/1112/portada&quot;&gt;Concurso&lt;/a&gt;, &lt;a href=&quot;http://forja.rediris.es/search/?type_of_search=soft&amp;words=cusl6&amp;Search=%09%09%09Buscar&quot;&gt;los participantes empiezan a moverse en la forja de RedIRIS&lt;/a&gt;. Este año la participación está siendo tan activa, como mínimo, como los años anteriores, lo cual es un logro teniendo en cuenta que ésta es ya la sexta edición.&lt;/p&gt;

&lt;p&gt;En su momento me propuse hacer un pequeño seguimiento de vez en cuando a los proyectos del concurso, sobretodo a nivel de código, que es lo que a mí me interesa más de los proyectos.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;En la forja del concurso hay ya unos 25 proyectos registrados&lt;/strong&gt;, de los cuales son menos de diez proyectos los que han hecho alguna actualización en el sistema de control de versiones. Viendo por encima los inicios podemos ver que tres de los proyectos han elegido &lt;em&gt;Python&lt;/em&gt;, dos &lt;em&gt;Java&lt;/em&gt;, &lt;em&gt;PHP&lt;/em&gt;, y uno &lt;em&gt;C++&lt;/em&gt;, curioso que siga teniendo tanto éxito &lt;em&gt;Python&lt;/em&gt; entre los universitarios, y de que ninguno lo haya hecho en &lt;em&gt;Ruby&lt;/em&gt; (al menos ninguno de los que ha empezado), con el éxito que está teniendo &lt;em&gt;Ruby&lt;/em&gt; en los últimos tiempos.&lt;/p&gt;

&lt;p&gt;Entre los que ya han comenzado: &lt;a href=&quot;http://www.concursosoftwarelibre.org/1112/proyectos/30&quot;&gt;Abreforjas&lt;/a&gt;, &lt;a href=&quot;http://www.concursosoftwarelibre.org/1112/proyectos/25&quot;&gt;Bytecode Land Kit&lt;/a&gt;, &lt;a href=&quot;http://www.concursosoftwarelibre.org/1112/proyectos/57&quot;&gt;Helmet Wars&lt;/a&gt;, &lt;a href=&quot;http://www.concursosoftwarelibre.org/1112/proyectos/27&quot;&gt;Workespeis FKP&lt;/a&gt;, &lt;a href=&quot;http://www.concursosoftwarelibre.org/1112/proyectos/6&quot;&gt;SeventhEngine&lt;/a&gt;, &lt;a href=&quot;http://www.concursosoftwarelibre.org/1112/proyectos/74&quot;&gt;daf-collage&lt;/a&gt; o &lt;a href=&quot;http://www.concursosoftwarelibre.org/1112/proyectos/100&quot;&gt;Cormoran&lt;/a&gt;, proyectos muy variados.&lt;/p&gt;

&lt;p&gt;Todavía es muy pronto para ver cosas hechas, pero esperemos poder meternos pronto en el código de los participantes. :-)&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Jugando con Vim</title>
   <author>javaguirre</author>
   <link href="http://javaguirre.net/2011/12/06/jugando-con-vim"/>
   <updated>2011-12-06T00:00:00+01:00</updated>
   <id>http://javaguirre.net/2011/12/06/jugando-con-vim</id>
   <content type="html">&lt;p&gt;Hace mucho tiempo que tenía pendiente aprender a usar el editor &lt;a href=&quot;http://www.vim.org/&quot;&gt;vim&lt;/a&gt;, sobretodo para saber realmente si me iba a servir de ayuda para mejorar productividad y tareas repetitivas del día a día.&lt;/p&gt;

&lt;p&gt;He de decir que tras tres semanas de haberme leído &lt;a href=&quot;http://www.etnassoft.com/biblioteca/a-byte-of-vim/&quot;&gt;A Byte of Vim&lt;/a&gt;, libro que me recomendó mi amigo &lt;a href=&quot;https://twitter.com/#!/mgdelacroix&quot;&gt;mgdelacroix&lt;/a&gt;, estoy muy contento con el resultado, y aunque todavía me falta para sacarle todo el partido que podría, ya soy bastante más productivo que antes usando otros editores.&lt;/p&gt;

&lt;p&gt;Aparte de los comandos típicos de estos casos, preparándolos especialmente para Python en mi caso, como &lt;em&gt;tabstop&lt;/em&gt;, &lt;em&gt;shiftwidth&lt;/em&gt;, &lt;em&gt;expandtab&lt;/em&gt;, &lt;em&gt;smarttab&lt;/em&gt;, otros como &lt;em&gt;showcmd&lt;/em&gt;, &lt;em&gt;number&lt;/em&gt;, &lt;em&gt;syntax&lt;/em&gt;, &lt;em&gt;hlsearch&lt;/em&gt; o &lt;em&gt;incsearch&lt;/em&gt; para temas generales.&lt;/p&gt;

&lt;p&gt;En plugins, &lt;a href=&quot;http://www.vim.org/scripts/script.php?script_id=273&quot;&gt;exuberant ctags&lt;/a&gt;, para ver los métodos y las clases en un archivo, el &lt;a href=&quot;http://www.vim.org/scripts/script.php?script_id=69&quot;&gt;project&lt;/a&gt; para crear proyectos y navegar fácilmente por sus archivos, &lt;a href=&quot;http://www.vim.org/scripts/script.php?script_id=1849&quot;&gt;autoclose&lt;/a&gt;, para que me cierre corchetes y demás, &lt;a href=&quot;http://www.vim.org/scripts/script.php?script_id=159&quot;&gt;minibuffer&lt;/a&gt;, que te muestra los búffers abiertos actualmente, el &lt;a href=&quot;http://www.vim.org/scripts/script.php?script_id=1397&quot;&gt;xml&lt;/a&gt; para cerrar automáticamente las etiquetas html es aproximadamente lo que uso diariamente.&lt;/p&gt;

&lt;p&gt;Como expresiones regulares que &lt;em&gt;iluminen&lt;/em&gt; el código, me he encontrado con una que me muestra los espacios en blanco que he ido dejando por ahí, para así luego poder elmininarlos. Además se deshabilita cuando entramos en modo inserción, para que no moleste. La última línea es por temas de eficiencia.&lt;/p&gt;

&lt;em&gt;
highlight ExtraWhitespace ctermbg=red guibg=red
match ExtraWhitespace /\s\+$/
autocmd BufWinEnter * match ExtraWhitespace /\s\+$/
autocmd InsertEnter * match ExtraWhitespace /\s\+\%#\@&lt;!$/
autocmd InsertLeave * match ExtraWhitespace /\s\+$/
autocmd BufWinLeave * call clearmatches()
&lt;/em&gt;

&lt;p&gt;Estoy lejos de sacarle mucho zumo al vim, pero cada pocos días aprendo cosas y eso me gusta. :-)&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Introducción a Extensiones en Gnome Shell</title>
   <author>javaguirre</author>
   <link href="http://javaguirre.net/2011/11/27/introduccion-a-extensiones-en-gnome-shell"/>
   <updated>2011-11-27T00:00:00+01:00</updated>
   <id>http://javaguirre.net/2011/11/27/introduccion-a-extensiones-en-gnome-shell</id>
   <content type="html">&lt;p&gt;Hace un tiempo que tenía ganas de aprender las posibilidades de Gnome Shell, hoy he empezado a hacerlo. :-)&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://es.wikipedia.org/wiki/GNOME_Shell&quot;&gt;Gnome shell&lt;/a&gt; es la nueva interfaz de usuario en Gnome 3. Me gusta su estilo minimalista y sencillo, soy de los que no les gusta que les interrumpan las notificaciones de escritorio y demás historias, y con Gnome estoy bastante contento en este sentido.&lt;/p&gt;

&lt;p&gt;La parte más interesante de Gnome Shell es que &lt;a href=&quot;http://live.gnome.org/GnomeShell/Development&quot;&gt;su sistema de extensiones&lt;/a&gt; y los componentes de escritorio están escritos en Javascript. Su motor javascript (gjs) está basado en el &lt;a href=&quot;https://developer.mozilla.org/en/SpiderMonkey&quot;&gt;SpiderMonkey&lt;/a&gt; de Mozilla.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://blog.fpmurphy.com/2011/05/more-gnome-shell-customization.html&quot;&gt;Existe un muy buen artículo sobre la arquitectura de Gnome Shell&lt;/a&gt; y para iniciarse en el desarrollo de extensiones y personalización de componentes de éste.&lt;/p&gt;

&lt;p&gt;Mi prueba de concepto está basada completamente en &lt;a href=&quot;http://blog.fpmurphy.com/2011/04/gnome-3-shell-extensions.html&quot;&gt;este artículo&lt;/a&gt;. Con éste y algunas directrices más es muy sencillo empezar a hacer cosas.&lt;/p&gt;

&lt;p&gt;Lo primero que creo hay que saber es que existe una consola JS  (&lt;a href=&quot;http://live.gnome.org/GnomeShell/LookingGlass&quot;&gt;LookingGlass&lt;/a&gt;) para depurar nuestro código, así como para acceder a los componentes que se están utilizando y para ver los métodos de la API.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://javaguirre.net/wp-content/uploads/2011/11/gshell.png&quot;&gt;&lt;img src=&quot;http://javaguirre.net/wp-content/uploads/2011/11/gshell-300x168.png&quot; alt=&quot;&quot; title=&quot;gnome-shell&quot; width=&quot;300&quot; height=&quot;168&quot; class=&quot;aligncenter size-medium wp-image-443&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;La consola consta de las pestañas:&lt;/p&gt;
&lt;ul&gt;
 &lt;li&gt;&lt;strong&gt;Evaluator&lt;/strong&gt;, que es la consola javascript, podemos acceder a todos los datos actuales del escritorio con la variable &lt;strong&gt;global&lt;/strong&gt;.&lt;/li&gt;
 &lt;li&gt;&lt;strong&gt;Windows&lt;/strong&gt;, que son las ventanas que están actualmente en ejecución con su correspondiente instancia de objeto javascript.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Errors&lt;/strong&gt;, para depurar las aplicaciones/extensiones. Podemos enviar mensajes a esta consola con &lt;strong&gt;global.log(string)&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Memory&lt;/strong&gt;, memoria utilizada actualmente.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Extensions&lt;/strong&gt;, extensiones, activas o no, que reconoce gnome-shell.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Gnome-Shell tiene un comando para crear nuevas extensiones, que automáticamente te crea un &lt;strong&gt;metadata.json&lt;/strong&gt;(metadatos de la extensión), un &lt;strong&gt;extension.js&lt;/strong&gt;(Código principal de la extensión), y un &lt;strong&gt;extension.css&lt;/strong&gt; (estilo de la extensión).&lt;/p&gt;

&lt;p&gt;Para activar/desactivar las extensiones podemos usar &lt;strong&gt;gnome-tweak-tool&lt;/strong&gt; o &lt;strong&gt;gsettings&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Para probar los cambios en el código de una extensión/aplicación podemos hacer un &lt;strong&gt;Alt-f2&lt;/strong&gt; y teclear &lt;strong&gt;r&lt;/strong&gt; o &lt;strong&gt;restart&lt;/strong&gt; para reiniciar gnome-shell.&lt;/p&gt;

&lt;p&gt;Para modificar el código propio de Gnome-shell (como el de lookingGlass, o panel, etc), el código se encuentra en &lt;strong&gt;/usr/share/gnome-shell/js&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;En el siguiente artículo hablaré sobre cómo hacer una extensión en Gnome3.2, aunque podéis encontrar bastante información para comenzar en las referencias de más abajo. No obstante algunos métodos/clases en estos artículos no son iguales en Gnome3.2 y tocará hacer un poco de investigación con lookingGlass y el código de gnome-shell. ;-)&lt;/p&gt;

&lt;strong&gt;Referencias:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://live.gnome.org/GnomeShell/Development&quot;&gt;http://live.gnome.org/GnomeShell/Development&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://blog.fpmurphy.com/2011/04/gnome-3-shell-extensions.html&quot;&gt;http://blog.fpmurphy.com/2011/04/gnome-3-shell-extensions.html&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://blog.fpmurphy.com/2011/05/more-gnome-shell-customization.html&quot;&gt;http://blog.fpmurphy.com/2011/05/more-gnome-shell-customization.html&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://blog.fpmurphy.com/2011/03/customizing-the-gnome-3-shell.html&quot;&gt;http://blog.fpmurphy.com/2011/03/customizing-the-gnome-3-shell.html&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</content>
 </entry>
 
 <entry>
   <title>Charla API Javascript HTML5</title>
   <author>javaguirre</author>
   <link href="http://javaguirre.net/2011/11/09/charla-api-javascript-html5"/>
   <updated>2011-11-09T00:00:00+01:00</updated>
   <id>http://javaguirre.net/2011/11/09/charla-api-javascript-html5</id>
   <content type="html">&lt;p&gt;El lunes hice una pequeña introducción a la API Javascript en HTML5 en los &lt;a href=&quot;http://cursos.gul.es/index.php/courses/calendar/17&quot;&gt;cursos del GUL de la Carlos III&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Quizás lo mejor de la charla para mí fue la presentación, fue a lo que le pude dedicar más tiempo el fin de semana, y creo que quedó bastante bien... &lt;/p&gt;

&lt;p&gt;La charla en sí fue algo compleja para mí, ya que estos cambios de temperatura me han afectado y no estuve al 100%, no obstante creo que pude transmitir algunas cosas a las personas interesadas en el tema.&lt;/p&gt;

&lt;p&gt;Para los cursos de Marzo tengo alguna idea que creo puede ser atractiva, y ya que &lt;a href=&quot;http://scholar.google.com/citations?user=vVXHlRMAAAAJ&amp;hl=en&quot;&gt;Israel Gutiérrez&lt;/a&gt; y &lt;a href=&quot;https://twitter.com/#!/mgdelacroix&quot;&gt;Miguel de la Cruz&lt;/a&gt; me han propuesto amablemente hacer algo conjunto para esas fechas, creo que podremos realizar algo que pueda ser más educativo. :-)&lt;/p&gt;

&lt;p&gt;La presentación la podéis &lt;a href=&quot;https://github.com/javaguirre/guluc3m-api-js&quot;&gt;descargar desde github&lt;/a&gt;. Agradecer como siempre al &lt;a href=&quot;http://www.gul.uc3m.es/&quot;&gt;GUL de la Carlos III&lt;/a&gt; su implicación, como siempre un placer.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Adding status update to tasks in Teambox Chrome Notifier extension</title>
   <author>javaguirre</author>
   <link href="http://javaguirre.net/2011/11/09/adding-status-update-to-tasks-in-teambox-chrome-notifier-extension"/>
   <updated>2011-11-09T00:00:00+01:00</updated>
   <id>http://javaguirre.net/2011/11/09/adding-status-update-to-tasks-in-teambox-chrome-notifier-extension</id>
   <content type="html">&lt;p&gt;I've been using the &lt;a href=&quot;https://chrome.google.com/webstore/detail/blfkecebibijeelilkopkpjciolpllka&quot;&gt;Chrome/Chromium Teambox extension &lt;/a&gt; for a while and I thought in some changes that makes it more useful to me.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/adinardi/teambox-chrome-notifier&quot;&gt;The developer of this extension has done a good job&lt;/a&gt; and a good start for adding more features in the future. Actually Teambox Notifier shows your last activity entries such as tasks, conversations, etc.&lt;/p&gt;

&lt;p&gt;I found it useful, but I thought it could be better for my needs with some simple functionality. First I'm thinking about putting a selector in all tasks in the activities list and make a &lt;a href=&quot;https://teambox.com/api/task&quot;&gt;put request&lt;/a&gt; to change the state of a task so you don't have to enter in Teambox site to do it.&lt;/p&gt;

&lt;p&gt;I hadn't enough time to finish it and now I'm having a &lt;strong&gt;500 Internal Server Error&lt;/strong&gt; when doing a PUT request, so I'm waiting for an answer of the Teambox support team. At least I'm improving my javascript skills, the main goal of this improvement. :-)&lt;/p&gt;

&lt;p&gt;You'll be able of following my progress (bad or good) &lt;a href=&quot;https://github.com/javaguirre/teambox-chrome-notifier&quot;&gt;at github.com&lt;/a&gt;. :-)&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Ducksboard hackaton</title>
   <author>javaguirre</author>
   <link href="http://javaguirre.net/2011/11/05/ducksboard-hackaton"/>
   <updated>2011-11-05T00:00:00+01:00</updated>
   <id>http://javaguirre.net/2011/11/05/ducksboard-hackaton</id>
   <content type="html">&lt;p&gt;El jueves cuando volví de Sevilla me enteré de que la gente de &lt;a href=&quot;http://ducksboard.com/&quot;&gt;Ducksboard&lt;/a&gt; iban a organizar una hackatón.&lt;/p&gt;

&lt;p&gt;Ducksboard es un servicio que provee una interfaz como un tablero, en los que añades widgets que toman la información de distintos servicios (Twitter, Zendesk, etc) y en tiempo real te va mostrando las actualizaciones vía WebSockets.&lt;/p&gt;

&lt;p&gt;Esto me parece interesante, pero lo que realmente me gusta de Ducksboard es &lt;a href=&quot;https://support.ducksboard.com/entries/20184523-api-reference&quot;&gt;la API&lt;/a&gt; que permite, añadiendo los llamados &quot;custom widgets&quot;, actualizarlos vía API Rest con los datos que nosotros queramos. Lo mejor para entenderlo es &lt;a href=&quot;https://public.ducksboard.com/OalH3H5ONALM50c_h7p5/&quot;&gt;ver un ejemplo&lt;/a&gt;. :-)&lt;/p&gt;

&lt;p&gt;Había pensado hacer varias cosas, me apetecía &lt;strong&gt;usar varias APIs&lt;/strong&gt;, aunque no tuviese tiempo para profundizar mucho en ellas, y que fuesen datos útiles para alguien como yo. Al final me decidí por hacer unos 5 widgets:&lt;/p&gt;

&lt;ul&gt;
    &lt;li&gt;Github&lt;/li&gt;
    &lt;li&gt;Google Weather&lt;/li&gt;
    &lt;li&gt;Mediante bluetooth comprobar quién se encuentra en la &lt;em&gt;habitación&lt;/em&gt;&lt;/li&gt;
    &lt;li&gt;Datos básicos del servidor (CPU, RAM, disco, red)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Lo he hecho rápido e intentando guardar algo de orden, pero es bastante mejorable, si mañana tengo algo de tiempo intentaré añadirle más cosas.&lt;/p&gt;

&lt;p&gt;Si te interesa puedes ver el ejemplo en &lt;a href=&quot;https://public.ducksboard.com/OalH3H5ONALM50c_h7p5/&quot;&gt;mi tablero público&lt;/a&gt;, &lt;a href=&quot;https://github.com/javaguirre/ducks-hackaton&quot;&gt;el código en Github&lt;/a&gt;, y si quieres ver los proyectos presentados puedes en &lt;a href=&quot;http://hackathon.ducksboard.com/&quot;&gt;la web del Hackatón&lt;/a&gt;.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Openboe en Flask</title>
   <author>javaguirre</author>
   <link href="http://javaguirre.net/2011/11/01/openboe-en-flask"/>
   <updated>2011-11-01T00:00:00+01:00</updated>
   <id>http://javaguirre.net/2011/11/01/openboe-en-flask</id>
   <content type="html">&lt;p&gt;Este puente además de aprovechar para descansar, he estado aprovechando para avanzar algo más en Sabrosous, comenzando a probar algunas de las funcionalidades, aunque aún están algo lejos de ser 100% usables sus características básicas.&lt;/p&gt;

&lt;p&gt;Tenía ganas desde hace tiempo de probar &lt;a target=&quot;blank&quot; href=&quot;http://flask.pocoo.org/&quot;&gt;Flask&lt;/a&gt;, el microframework de Python, que me resultaba tan parecido a &lt;a target=&quot;blank&quot; href=&quot;http://denied.immersedcode.org/&quot;&gt;DENIED&lt;/a&gt;, aunque siendo el primero Software Libre, del segundo no he encontrado el código en ninguna parte. Una noche comencé a jugar con Flask y reescribí lo poco que tenía de mi proyecto &lt;a target=&quot;blank&quot; href=&quot;https://github.com/javaguirre/openboe&quot;&gt;openboe&lt;/a&gt;, una aplicación que de forma amigable quiere interactuar con la información que el &lt;a target=&quot;blank&quot; href=&quot;http://www.boe.es/rss/&quot;&gt;Boletín Oficial del Estado muestra en RSS&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;La aplicación principal de openboe sería la siguiente:&lt;/p&gt;

&lt;pre&gt;&lt;code data-language='python&quot; line=&quot;1'&gt;
# -*- coding: utf-8 -*-
from flask import Flask, render_template, request, abort, redirect, url_for
from app_modules.feed import parse
app = Flask(__name__)

@app.route(&quot;/&quot;)
def index():
    return &quot;Hello World!&quot;
    
@app.route(&quot;/feed/&lt;name&gt;&quot;, methods=['GET', 'POST'])
def feed(name):
    feeds = [&quot;seccionI&quot;, &quot;seccionII&quot;, &quot;seccionIII&quot;, &quot;seccionIV&quot;]
    topics = {
              &quot;becas&quot;: &quot;http://www.boe.es/rss/canal.php?c=becas&quot;,
              &quot;ayudas&quot;: &quot;http://www.boe.es/rss/canal.php?c=ayudas&quot;,
              &quot;estudio&quot;: &quot;http://www.boe.es/rss/canal.php?c=planes&quot;,
              &quot;convenios&quot;: &quot;http://www.boe.es/rss/canal.php?c=ccolectivos&quot;,
              &quot;divisas&quot;: &quot;http://www.boe.es/rss/canal.php?c=cambios&quot;,
              &quot;prestamos&quot;: &quot;http://www.boe.es/rss/canal.php?c=prestamos&quot;,
              &quot;servicios&quot;: &quot;http://www.boe.es/rss/canal.php?c=cartas&quot;, 
              &quot;colaboracion&quot;: &quot;http://www.boe.es/rss/canal.php?c=ccolaboracion&quot;,
              &quot;premios&quot;: &quot;http://www.boe.es/rss/canal.php?c=premios&quot;
              }
    filter_by = &quot;&quot;
    
    if request.method == 'POST':
        #TODO check POST['q']
        filter_by = request.form['q']

    if topics.has_key(name):
        links = parse(topics[name], filter_by)
    else:
        abort(404)
        
    return render_template(&quot;feeds.html&quot;, links=links, query=filter_by)

if __name__ == &quot;__main__&quot;:
    app.debug = True
    app.run()

&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;La aplicación es bastante sencilla. Creamos un objeto app único para toda la aplicación y que se encargará de &quot;hablar&quot; con &lt;a target=&quot;blank&quot; href=&quot;http://code.google.com/p/modwsgi/&quot;&gt;mod_wsgi&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Mediante &lt;strong&gt;@app.route&lt;/strong&gt; definimos la ruta de una vista, definida por la función siguiente a este decorador. En ésta podemos recoger los parámetros que tomamos de la url en app.route.&lt;/p&gt;

&lt;p&gt;En este ejemplo en función del &lt;em&gt;name&lt;/em&gt; pasado por url, miramos en un diccionario que tiene los rss a los distintos contenidos del BOE, si existe el &lt;em&gt;name&lt;/em&gt; en el diccionario, parseamos el RSS, si no existe, devolvemos 404 con la función &lt;strong&gt;abort&lt;/strong&gt; de Flask.&lt;/p&gt;

&lt;p&gt;Finalmente usamos &lt;strong&gt;render_template&lt;/strong&gt; para elegir la plantilla que vamos a utilizar, usando el motor &lt;a target=&quot;blank&quot; href=&quot;http://jinja.pocoo.org/&quot;&gt;Jinja2&lt;/a&gt; para éstas, y tras ello le pasamos todos los parámetros que necesitamos para el template.&lt;/p&gt;

&lt;p&gt;Podéis ver el ejemplo completo &lt;a target=&quot;blank&quot; href=&quot;https://github.com/javaguirre/openboe&quot;&gt;en mi github&lt;/a&gt;. Para ejecutar basta lanzar &lt;strong&gt;python application.py&lt;/strong&gt;&lt;/p&gt;

</content>
 </entry>
 
 <entry>
   <title>Python virtualenv</title>
   <author>javaguirre</author>
   <link href="http://javaguirre.net/2011/10/25/python-virtualenv"/>
   <updated>2011-10-25T00:00:00+02:00</updated>
   <id>http://javaguirre.net/2011/10/25/python-virtualenv</id>
   <content type="html">&lt;p&gt;Tras unas semanas trabajando con &lt;strong&gt;django&lt;/strong&gt; más en serio y día a día y con distintas versiones en local y en nuestro servidor, he decidido usar virtualenv evitando adivinar qué módulos/métodos podía usar y cuáles no del salto de la 1.2 a la 1.3.&lt;/p&gt;

&lt;p&gt;Para este objetivo viene que ni pintado el módulo &lt;a href=&quot;http://pypi.python.org/pypi/virtualenv&quot;&gt;virtualenv para python&lt;/a&gt;, que con mucha sencillez te permite cargar en un entorno distintas versiones de módulos python, haciendo fácil replicar las versiones de módulos usados en un entorno de producción a local.&lt;/p&gt;

&lt;p&gt;Hay un tutorial muy bueno sobre cómo instalarlo y activarlo en &lt;a href=&quot;https://wiki.archlinux.org/index.php/Python_VirtualEnv&quot;&gt;la wiki de Archlinux&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Una vez instalado podemos jugar con &lt;a href=&quot;http://pypi.python.org/pypi&quot;&gt;los repos de pip&lt;/a&gt; y con un sencillo &lt;strong&gt;pip install modulo=version&lt;/strong&gt; instalar la versión que necesitamos sólo para nuestro entorno activo.&lt;/p&gt;

&lt;p&gt;Para volver a la normalidad basta con un &lt;strong&gt;deactivate&lt;/strong&gt;, &lt;a href=&quot;http://wiki.pylonshq.com/display/pylonscookbook/Using+a+Virtualenv+Sandbox&quot;&gt;podéis comprobarlo en otro tutorial de virtualenv&lt;/a&gt;.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>VI Concurso Universitario de Software Libre</title>
   <author>javaguirre</author>
   <link href="http://javaguirre.net/2011/10/18/vi-concurso-universitario-de-software-libre"/>
   <updated>2011-10-18T00:00:00+02:00</updated>
   <id>http://javaguirre.net/2011/10/18/vi-concurso-universitario-de-software-libre</id>
   <content type="html">&lt;p&gt;El &lt;a href=&quot;http://www.concursosoftwarelibre.org/1112/portada&quot;&gt;Concurso Universitario de Software Libre&lt;/a&gt; vuelve un año más, excelente noticia es que año tras año se mantenga esta iniciativa docente por el Soft Libre, aunando en valores como son la &lt;strong&gt;comunidad&lt;/strong&gt;, el &lt;strong&gt;aprendizaje&lt;/strong&gt; y la &lt;strong&gt;cooperación entre alumnos&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Este año no he tenido tiempo para colaborar organizando el &lt;em&gt;Premio Local de Madrid&lt;/em&gt;, me habría gustado poder hacerlo.&lt;/p&gt;

&lt;p&gt;No obstante he tenido una nueva idea. Después de todos estos años en los cuales he podido colaborar en mayor o menor medida en la organización, lo cierto es que no he podido seguir con atención los proyectos a nivel técnico. &lt;/p&gt;

&lt;p&gt;Así que he decidido dedicar un par de horas cada semana o cada 15 días para escribir una crónica personal de cómo van &lt;a href=&quot;http://forja.rediris.es/&quot;&gt;los diversos proyectos del concurso&lt;/a&gt;, creo que puede ser muy divertido.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://www.concursosoftwarelibre.org/1112/inscripcion&quot;&gt;El periodo de inscripción sigue abierto&lt;/a&gt;, también &lt;a href=&quot;http://www.concursosoftwarelibre.org/1112/patrocinadores&quot;&gt;el periodo de patrocinio&lt;/a&gt;, esperemos que siga manteniendo el éxito de las &lt;a href=&quot;http://www.concursosoftwarelibre.org/1011/&quot;&gt;cinco ediciones anteriores&lt;/a&gt;. :-)&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Sabrosous soporta rss de favoritos</title>
   <author>javaguirre</author>
   <link href="http://javaguirre.net/2011/10/16/sabrosous-soporta-rss-de-favoritos"/>
   <updated>2011-10-16T00:00:00+02:00</updated>
   <id>http://javaguirre.net/2011/10/16/sabrosous-soporta-rss-de-favoritos</id>
   <content type="html">&lt;p&gt;Bueno, pues hoy he dedicado un par de horillas a &lt;strong&gt;Sabrosous&lt;/strong&gt;, y he de decir que estoy satisfecho. He vuelto a añadir funcionalidad al &lt;em&gt;robot&lt;/em&gt; de encontrar el &lt;em&gt;twitter&lt;/em&gt; de la página favoriteada, y vía &lt;a href=&quot;en.wikipedia.org/wiki/JSONP&quot;&gt;JSONP&lt;/a&gt; cargar los twits del usuario. &lt;/p&gt;

&lt;p&gt;Además también detecta los &lt;strong&gt;feed RSS de la página&lt;/strong&gt;, y haciendo click en el botón RSS del link favorito podemos, &lt;em&gt;vía Ajax&lt;/em&gt;, acceder a las últimas publicaciones (ésa es la idea :-) ), aunque por ahora carga el título del primer artículo.&lt;/p&gt;

&lt;p&gt;En ambos casos, twitter y Rss, &lt;strong&gt;falta el formateo de los datos de respuesta&lt;/strong&gt;, una tarea quizás algo menos interesante pero necesaria que será lo próximo que realice.&lt;/p&gt;

&lt;p&gt;Además para esta semana que empieza quiero añadir &lt;a href=&quot;http://harvesthq.github.com/chosen/&quot;&gt;el plugin chosen&lt;/a&gt; para la funcionalidad de los tags (añadir, eliminar) y añadir funcionalidad al buscador para encontrar los links vía tags.&lt;/p&gt;

&lt;p&gt;Podéis seguir &lt;a href=&quot;https://github.com/javaguirre/sabrosous&quot;&gt;el transcurso del proyecto en GitHub&lt;/a&gt;. :-)&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Vuelvo a Sabrosous</title>
   <author>javaguirre</author>
   <link href="http://javaguirre.net/2011/10/12/vuelvo-a-sabrosous"/>
   <updated>2011-10-12T00:00:00+02:00</updated>
   <id>http://javaguirre.net/2011/10/12/vuelvo-a-sabrosous</id>
   <content type="html">&lt;p&gt;A veces me pregunto si al blog le sentaría mejor un verde en los links en vez de este rojo...&lt;/p&gt;

&lt;p&gt;Hoy después de unos meses sin tiempo para nada he vuelto a tocar &lt;a href=&quot;https://github.com/javaguirre/sabrosous&quot;&gt;Sabrosous&lt;/a&gt;, uno de esos proyectos que empiezo y nunca acaban, una aplicación que cubre una necesidad que tengo desde hace tiempo, un Delicious en &lt;em&gt;bueno&lt;/em&gt; con más funcionalidades &lt;em&gt;técnicas&lt;/em&gt;, y &lt;strong&gt;Software Libre&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;He mejorado la petición http a la url &lt;em&gt;favorita&lt;/em&gt;, he cambiado el &lt;a href=&quot;http://docs.python.org/library/httplib.html&quot;&gt;httplib.HttpConnection&lt;/a&gt; de Python por &lt;a href=&quot;http://pycurl.sourceforge.net/doc/pycurl.html&quot;&gt;pycurl&lt;/a&gt;, creo que es más cómodo y puedo hacer más cosas.&lt;/p&gt;

&lt;p&gt;También he modificado el parseador HTML, de una librería/biblioteca que no recuerdo a &lt;a href=&quot;http://lxml.de/&quot;&gt;lxml&lt;/a&gt;, mucho más amigable a mi modo de ver.&lt;/p&gt;

&lt;p&gt;Aún queda mucho &lt;em&gt;fine tuning&lt;/em&gt; ya que el código inicial fue de hace meses y he mejorado mucho en conocimientos y &lt;em&gt;limpieza&lt;/em&gt;, pero esa parte del &lt;strong&gt;corazón&lt;/strong&gt; inicial de Sabrosous ya tiene más sentido, aunque no esté reconstruido del todo.&lt;/p&gt;

&lt;p&gt;Espero poder dedicarle algo más de tiempo pronto y meterle mucha más magia en el front, tiene bastantes cosas rotas desde la última vez que lo toqué.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Trauma Game - Crónica</title>
   <author>javaguirre</author>
   <link href="http://javaguirre.net/2011/10/09/trauma-game-cronica"/>
   <updated>2011-10-09T00:00:00+02:00</updated>
   <id>http://javaguirre.net/2011/10/09/trauma-game-cronica</id>
   <content type="html">&lt;p&gt;Vía &lt;a href=&quot;http://www.humblebundle.com/&quot;&gt;Humble Bundle&lt;/a&gt; llegué a un juego esta semana que me pareció bastante atractivo y fuera de lo común. No soy una persona que juegue mucho, de hecho si mi tiempo de juego llega a 3 horas mensuales me sorprendería, pero de vez en cuando me atrae &lt;strong&gt;la atmósfera y las sensaciones&lt;/strong&gt; de este tipo de juegos &lt;em&gt;indies&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;Por unos 5 euros más lo que quieras pagar puede comprar &lt;a href=&quot;http://www.traumagame.com/&quot;&gt;Trauma en su propia web&lt;/a&gt; vía Paypal. Para ejecutarlo en &lt;strong&gt;ArchLinux&lt;/strong&gt; instalé el &lt;a href=&quot;http://aur.archlinux.org/packages.php?ID=38250&quot;&gt;standalone-flashplayer de AUR&lt;/a&gt;, y lo ejecuté vía &lt;em&gt;$ flashplayer trauma.swf&lt;/em&gt;.&lt;/p&gt;

&lt;img src=&quot;http://javaguirre.net/wp-content/uploads/2011/10/Pantallazo-de-2011-10-09-120331-300x197.png&quot; alt=&quot;&quot; title=&quot;Pantallazo de 2011-10-09 12:03:31&quot; width=&quot;300&quot; height=&quot;197&quot; class=&quot;aligncenter size-medium wp-image-373&quot; /&gt;

&lt;p&gt;El juego trata sobre &lt;strong&gt;los extraños sueños de una chica hospitalizada&lt;/strong&gt;, y en ellos vamos descubriendo claves ocultas en una atmósfera misteriosa, caótica y oscura. La música y el entorno nos sumerge en los distintos escenarios, muy logrado. La navegación es a base de diapositivas, y haciendo click a tu alrededor vas moviéndote por el escenario.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;El juego es muy corto&lt;/strong&gt;, eso sí, esperemos que tenga continuación.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Madrid es ruido</title>
   <author>javaguirre</author>
   <link href="http://javaguirre.net/2011/10/07/madrid-es-ruido"/>
   <updated>2011-10-07T00:00:00+02:00</updated>
   <id>http://javaguirre.net/2011/10/07/madrid-es-ruido</id>
   <content type="html">&lt;p&gt;&lt;strong&gt;Madrid es ruido&lt;/strong&gt;, ríos de catenarias que se pierden en barrios interminables de bloques de pisos. Luces de focos en la noche, atardeceres rojizos sobre antenas de áticos antiguos. Frías montañas tras urbanizaciones del extrarradio, señores disfrazados entre el bullicio, tardes de domingo en la Latina o paseando en el Parque del Oeste.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pero sobretodo ruido&lt;/strong&gt;, e historia, arco iris cultural, estrés y prisas entre semana y rumor cultural los fines de semana. Humo de coches en el atasco y miradas cansadas en los pasajeros del autobús, auriculares y libros en el metro, calor en la Puerta del Sol, desahogo bajo las ramas de los árboles del parque. Terrazas animadas y sonido de raíles.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Desorden humano, variedad y oportunidades.&lt;/strong&gt;&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Abierta propuesta Cursos de GUL Noviembre 2011</title>
   <author>javaguirre</author>
   <link href="http://javaguirre.net/2011/10/06/abierta-propuesta-cursos-de-gul-noviembre-2011"/>
   <updated>2011-10-06T00:00:00+02:00</updated>
   <id>http://javaguirre.net/2011/10/06/abierta-propuesta-cursos-de-gul-noviembre-2011</id>
   <content type="html">&lt;p&gt;Me entero hoy de que está &lt;a href=&quot;http://cursos.gul.es/index.php/courses/view/17&quot;&gt;abierta la web para proponer charlas&lt;/a&gt; en los cursos del GUL 2011. :-)&lt;/p&gt;

&lt;p&gt;El año pasado participé en las jornadas &lt;a href=&quot;ftp://ftp.gul.es/pub/gul/cursos&quot;&gt;tanto de Noviembre como de Marzo&lt;/a&gt;, siempre está bien practicar las dotes de presentación delante de personas interesadas en aprender, y sobretodo hablar de software libre con gente simpática.&lt;/p&gt;

&lt;p&gt;He pensado proponer tres temas:&lt;/p&gt;

- &lt;a href=&quot;http://jquery.com/&quot;&gt;jQuery&lt;/a&gt;
- &lt;a href=&quot;http://www.etnassoft.com/biblioteca/dive-into-html5/&quot;&gt;Javascript API HTML5&lt;/a&gt;
- &lt;a href=&quot;http://git-scm.com/&quot;&gt;Git&lt;/a&gt; y &lt;a href=&quot;https://github.com/&quot;&gt;Github&lt;/a&gt;

&lt;p&gt;Animo a todo el mundo a que se pase por los cursos del &lt;a href=&quot;http://www.gul.uc3m.es/&quot;&gt;GUL&lt;/a&gt;.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Probando NodeJS</title>
   <author>javaguirre</author>
   <link href="http://javaguirre.net/2011/09/27/probando-nodejs"/>
   <updated>2011-09-27T00:00:00+02:00</updated>
   <id>http://javaguirre.net/2011/09/27/probando-nodejs</id>
   <content type="html">&lt;p&gt;Mucho revuelo ha habido en los últimos meses alrededor de &lt;a href=&quot;http://nodejs.org/&quot;&gt;NodeJS&lt;/a&gt;, y yo como animal curioso que soy he de decir que tenía ganas de ver el por qué de aquello. &lt;/p&gt;

&lt;p&gt;Suele ocurrir que cuando un tema se comienza a comentar y se hace popular, surge un efecto dominó que hace vaya teniendo más y más repercusión, pero de entre esa gente que le da bola, al menos la mitad no han llegado a la segunda página de lo que es este framework, y mucho menos han desarrollado algo más grande que un &lt;em&gt;Hola Mundo&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;Es por ello recomendable probarlo por uno mismo, no sólo por el placer de aprender algo nuevo, sino porque antes de opinar es esencial tener un criterio sobre lo que se opina (perogrullada).&lt;/p&gt;

&lt;p&gt;Saltando de enlace a enlace leyendo sobre Node, &lt;a href=&quot;http://www.nodebeginner.org/&quot;&gt;llegué a un par de libros interesantes&lt;/a&gt; para comenzar, y por sólo 8 dólares los adquirí.&lt;/p&gt;

&lt;p&gt;Actualmente estoy leyendo el primero de ellos, &lt;strong&gt;Node Beginner de Manuel Kiessling&lt;/strong&gt;. Explicado de forma sencillísima, un libro corto y excelente para empezar en esto de &lt;em&gt;Node&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;También es esencial leerse alguna &lt;a href=&quot;http://debuggable.com/posts/understanding-node-js:4bd98440-45e4-4a9a-8ef7-0f7ecbdd56cb&quot;&gt;entrada de blog&lt;/a&gt; en el que nos ayudan a entender mejor la metodología de desarrollo del framework y cómo funciona.&lt;/p&gt;

&lt;p&gt;La principal diferencia que me he encontrado con respecto a frameworks que uso normalmente es que con Node tú creas un servidor, una capa más por debajo de control, y que en vez de pasar datos, pasas funciones, trabajas con verbos, en vez de con nombres.&lt;/p&gt;

&lt;p&gt;Reseñable es también la &lt;a href=&quot;http://nodeknockout.com/&quot;&gt;gran cantidad de movimiento&lt;/a&gt; que hay en la comunidad de Node, y lo fácil que es integrar los módulos de otros en tu proyecto. &lt;a href=&quot;https://github.com/javaguirre/node-examples&quot; target=&quot;_blank&quot;&gt;Llevo dos días practicando con él&lt;/a&gt;, me está gustando, pero aún tengo cosas que aprender para hacer una introducción interesante.&lt;/p&gt;

&lt;p&gt;A los que les gusta probar, les &lt;strong&gt;recomiendo encarecidamente instalarlo&lt;/strong&gt;.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Conclusiones de mis últimas andanzas</title>
   <author>javaguirre</author>
   <link href="http://javaguirre.net/2011/09/25/conclusiones-de-mis-ultimas-andanzas"/>
   <updated>2011-09-25T00:00:00+02:00</updated>
   <id>http://javaguirre.net/2011/09/25/conclusiones-de-mis-ultimas-andanzas</id>
   <content type="html">&lt;p&gt;Hace ya mucho tiempo que escribí por última vez, y siempre me hago la misma promesa, volveré a escribir con mayor asiduidad, desgraciadamente siempre me engaño.&lt;/p&gt;

&lt;p&gt;En los últimos meses me ofrecieron trabajar con &lt;a href=&quot;http://gigas.com&quot; target=&quot;_blank&quot;&gt;un grupo de personas que han participado en proyectos muy interesantes&lt;/a&gt;, con gran experiencia y ganas de hacer las cosas muy bien, algo que siempre he querido hacer y que por desilusión/decepción en mis anteriores trabajos no he podido. Un proyecto ambicioso y en el que siento aprendo cada día a dar lo mejor de mí, y lo hago encantado.&lt;/p&gt;

&lt;p&gt;Tengo mucho que aprender, y estar al lado de personas con experiencia en hacer las cosas mejor que bien hacen que mi trabajo mejore y que mis conocimientos crezcan mucho más rápido cada día. A un apasionado de mi trabajo/sector como soy yo esto no es más que satisfacción personal y profesional.&lt;/p&gt;

&lt;p&gt;Pero no quería extenderme hablando de estas cosas, quería ser más &lt;em&gt;técnico. &lt;/em&gt;Me he dado cuenta que desde que empecé a investigar en ese gran grupo personal que es &lt;strong&gt;SUGUS (Asociación de Software Libre de la Uni de Sevilla)&lt;/strong&gt;, que yo quería trabajar desarrollando con &lt;strong&gt;Python&lt;/strong&gt;, ahora también aprender a fondo &lt;strong&gt;Javascript/bibliotecas y demás sucedáneos&lt;/strong&gt;, y que en mi tiempo libre/profesional otros lenguajes iban a tener un espacio mucho menor.&lt;/p&gt;

&lt;p&gt;Es en esta época cuando cambio mi experiencia en &lt;strong&gt;Symfony&lt;/strong&gt; por aprender a fondo &lt;strong&gt;Django&lt;/strong&gt; (y otros frameworks Python) en vez de optar por &lt;em&gt;Symfony2&lt;/em&gt;, para así disfrutar más de &lt;em&gt;Python&lt;/em&gt;, aunque siga trabajando día a día también con PHP a nivel servidor. &lt;strong&gt;Jquery&lt;/strong&gt; es mi más leal compañero en el día a día en la magia a nivel navegador.&lt;/p&gt;

&lt;p&gt;Ahora veo que necesito más base y más entender cómo funcionan las cosas, cómo mejorar a nivel estructural, algorítmico, estudiar ciertas cosas que complementen lo que hago día a día para hacerlo de una forma más correcta.&lt;/p&gt;

&lt;p&gt;Lamento que hayais tenido que soportar estas disertaciones tan largas, y prometo ir mucho más al grano en las siguientes publicaciones. :-)&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Google Music Beta para GNU/Linux</title>
   <author>javaguirre</author>
   <link href="http://javaguirre.net/2011/08/10/google-music-beta-para-gnulinux"/>
   <updated>2011-08-10T00:00:00+02:00</updated>
   <id>http://javaguirre.net/2011/08/10/google-music-beta-para-gnulinux</id>
   <content type="html">Tras mi última publicación, he de decir que &lt;em&gt;Google&lt;/em&gt; no ha tardado mucho en sacar una versión para &lt;strong&gt;GNU/Linux&lt;/strong&gt; de su cliente para &lt;a href=&quot;http://www.google.com/url?sa=t&amp;amp;source=web&amp;amp;cd=1&amp;amp;ved=0CCEQFjAA&amp;amp;url=http%3A%2F%2Fmusic.google.com%2F&amp;amp;rct=j&amp;amp;q=google%20music&amp;amp;ei=UGBCTs6LO4rMhAeT3pzDCQ&amp;amp;usg=AFQjCNFRgmMQGrqlhemgRN7r_MpZReuG5w&amp;amp;sig2=aRzUZuynrjd1dNGXsvusIA&amp;amp;cad=rja&quot;&gt;Google Music&lt;/a&gt;, con lo que el momento de probar su tecnología está más cerca.

Sigo siendo fan de &lt;a href=&quot;http://listen.grooveshark.com/#/user/javaguirre/9591875/playlists?src=5&quot;&gt;Grooveshark&lt;/a&gt;, pero habrá que estar atentos a lo que Google puede ofrecer en este aspecto.

¡Más detalles pronto!
</content>
 </entry>
 
 <entry>
   <title>Google Music Beta</title>
   <author>javaguirre</author>
   <link href="http://javaguirre.net/2011/06/29/google-music-beta"/>
   <updated>2011-06-29T00:00:00+02:00</updated>
   <id>http://javaguirre.net/2011/06/29/google-music-beta</id>
   <content type="html">Cuando estuve en la &lt;a href=&quot;http://javaguirre.net/2011/05/14/google-io-impresiones-y-androidhome/&quot;&gt;Google IO Extended 2011 en Madrid&lt;/a&gt;, uno de los productos que más me llamó la atención fue &lt;a href=&quot;http://music.google.com&quot;&gt;&lt;strong&gt;Google Music Beta&lt;/strong&gt;&lt;/a&gt;.

Tras echar un breve vistazo a la aplicación, lo único que puedo decir es que puedes subir canciones descargándote un cliente de escritorio (al menos por ahora), y que éste no existe para &lt;strong&gt;GNU/Linux&lt;/strong&gt;.

Esto es una confirmación a lo que yo pensaba, que seguiré usando &lt;a href=&quot;http://grooveshark.com&quot;&gt;Grooveshark&lt;/a&gt;.

Los colores de la aplicación, no obstante, son muy bonitos.
</content>
 </entry>
 
 <entry>
   <title>ArchLinux mola :-)</title>
   <author>javaguirre</author>
   <link href="http://javaguirre.net/2011/06/21/archlinux-mola"/>
   <updated>2011-06-21T00:00:00+02:00</updated>
   <id>http://javaguirre.net/2011/06/21/archlinux-mola</id>
   <content type="html">&lt;p&gt;He usado diversas distribuciones GNU/Linux a lo largo de estos años, &lt;a href=&quot;http://www.ubuntu.com/&quot;&gt;Ubuntu&lt;/a&gt;, &lt;a href=&quot;www.debian.org&quot;&gt;Debian&lt;/a&gt;, &lt;a href=&quot;www.opensuse.org/&quot;&gt;openSUSE&lt;/a&gt;, &lt;a href=&quot;www.sabayon.org/&quot;&gt;Sabayon&lt;/a&gt;... con ninguna he estado tan satisfecho como con &lt;a href=&quot;www.archlinux.org/&quot;&gt;ArchLinux&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Por muchas razones &lt;strong&gt;ArchLinux&lt;/strong&gt; mola :-)&lt;a rel=&quot;attachment wp-att-305&quot; href=&quot;http://javaguirre.net/2011/06/21/archlinux-mola/archlinux/&quot;&gt;&lt;img class=&quot;alignright size-full wp-image-305&quot; title=&quot;Archlinux&quot; src=&quot;http://javaguirre.net/wp-content/uploads/2011/06/Archlinux.png&quot; alt=&quot;Archlinux Logo wikipedia&quot; width=&quot;240&quot; height=&quot;80&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Configuraciones no mágicas&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;https://wiki.archlinux.org/index.php/Arch_User_Repository&quot;&gt;Arch User Repository&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;https://wiki.archlinux.org/index.php/Main_Page&quot;&gt;Documentación enorme y de mucha calidad&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;https://wiki.archlinux.org/index.php/Pacman&quot;&gt;Gestor de paquetes pacman&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;en.wikipedia.org/wiki/KISS_principle&quot;&gt;Filosofía KISS&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;Ligero&lt;/li&gt;
	&lt;li&gt;Últimas novedades de software&lt;/li&gt;
&lt;/ul&gt;
</content>
 </entry>
 
 <entry>
   <title>Silex y MongoDB para proyecto OpenData</title>
   <author>javaguirre</author>
   <link href="http://javaguirre.net/2011/06/14/silex-y-mongodb-para-proyecto-opendata"/>
   <updated>2011-06-14T00:00:00+02:00</updated>
   <id>http://javaguirre.net/2011/06/14/silex-y-mongodb-para-proyecto-opendata</id>
   <content type="html">&lt;p&gt;¿Qué ocurre cuando el miniframework &lt;a href=&quot;http://silex-project.org/&quot;&gt;Silex&lt;/a&gt; se encuentra con &lt;a href=&quot;http://www.mongodb.org/&quot;&gt;MongoDB&lt;/a&gt; en una iniciativa para hacer más fácil la lectura de datos en la Administración Pública? &lt;em&gt;OpenBOE&lt;/em&gt;. :-P&lt;/p&gt;

&lt;p&gt;Pronto en &lt;a href=&quot;https://github.com/javaguirre&quot;&gt;github&lt;/a&gt;.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Usando DENIED, micro-framework web Python</title>
   <author>javaguirre</author>
   <link href="http://javaguirre.net/2011/06/12/usando-denied-micro-framework-web-python"/>
   <updated>2011-06-12T00:00:00+02:00</updated>
   <id>http://javaguirre.net/2011/06/12/usando-denied-micro-framework-web-python</id>
   <content type="html">&lt;p&gt;&lt;a href=&quot;http://denied.immersedcode.org/&quot;&gt;DENIED es un microframework web hecho en Python&lt;/a&gt;, que facilita el desarrollo rápido de pequeñas aplicaciones web y su posterior reutilización. Podemos en un mismo método aglutinar ruta y funcionalidad (de forma bien diferenciada), gracias a los decoradores de Python, por ejemplo.&lt;/p&gt;

&lt;p&gt;Viene con un servidor para realizar el desarrollo (&lt;em&gt;como unos cuantos frameworks python más&lt;/em&gt;), pero la gracia viene en la manera de desarrollar los módulos, y lo fácil que parece realizar éstos desde cero, su fácil reutilización posterior.&lt;/p&gt;

&lt;p&gt;En el &lt;a href=&quot;http://denied.immersedcode.org/screencast.mp4&quot;&gt;screencast de ejemplo en la web de DENIED&lt;/a&gt;, el desarrollador muestra lo fácil que es hacer un &lt;em&gt;libro de visitas&lt;/em&gt;, cómo tomar los datos POST en el controlador/función y cómo posteriormente guardamos los datos en JSON en un pequeño archivo de texto, olvidándonos de bases de datos SQL.&lt;/p&gt;

&lt;pre&gt;&lt;code data-language='python&quot; line=&quot;1'&gt;
@route('/blog')
def show_posts():
    return render_template(posts=get_all_posts())

@route('/create')
def create_post():
    add_post(request.values['title'],
    request.values['text'])
    return redirect(url_for('show_posts'))
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Parece ser que tienen el proyecto en &lt;a href=&quot;https://github.com/denied/denied&quot;&gt;github&lt;/a&gt;, pero no parece código por ninguna parte, es un pequeño archivo que &lt;em&gt;llama&lt;/em&gt; a los demás recursos, con lo que por ahora no hay mucho código que destripar. También está en éste el proyecto de ejemplo que desarrollan en el screencast.&lt;/p&gt;

&lt;p&gt;Se me ha ocurrido que sería divertido (y fácil) hacer un pequeño módulo python realizando un blog y guardando los datos en una &lt;a href=&quot;http://www.mongodb.org/&quot;&gt;Base de Datos Mongo&lt;/a&gt;, compartiré impresiones pronto, estoy seguro.&lt;/p&gt;

&lt;p&gt;Habrá que seguir con atención el desarrollo del framework, tiene muy buena pinta. :-)&lt;/p&gt;

&lt;p&gt;Update: AL final todo fue una coña del April's Fool Day, no obstante esto derivó en el framework Flask.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>SQLAlchemy sobre Base de datos MySQL existente, migraciones faciles</title>
   <author>javaguirre</author>
   <link href="http://javaguirre.net/2011/05/31/sqlalchemy-sobre-base-de-datos-mysql-existente-migraciones-faciles"/>
   <updated>2011-05-31T00:00:00+02:00</updated>
   <id>http://javaguirre.net/2011/05/31/sqlalchemy-sobre-base-de-datos-mysql-existente-migraciones-faciles</id>
   <content type="html">&lt;p&gt;Si hay algo que considero tedioso son las migraciones de datos cuando hay cambios estructurales de una BD a otra. Normalmente me hacía un script en &lt;strong&gt;Python&lt;/strong&gt;, y con &lt;strong&gt;python-mysql&lt;/strong&gt; me hacía unas cuantas consultas SQL, sacaba los datos y me peleaba con la correspondiente lista de datos producto de la consulta.&lt;/p&gt;

&lt;p&gt;¡Nunca más! Desde que descubrí &lt;a href=&quot;http://www.sqlalchemy.org/&quot;&gt;SQLAlchemy&lt;/a&gt; y &lt;a href=&quot;http://www.sqlalchemy.org/trac/wiki/SqlSoup&quot;&gt;SqlSoup&lt;/a&gt; encontré una manera mucho más bonita y agradable de trabajar con los datos, con clases. Esto no crea nada nuevo... pero si os digo que las clases las crea automáticamente SqlAlchemy a partir de los metadatos de las tablas y que no tenemos que definir ni una sola clase para disfrutar de toda la potencia y facilidad de los objetos, la cosa cambia, y mucho.&lt;/p&gt;

&lt;pre&gt;&lt;code data-language='python&quot; line=&quot;1'&gt;
import sqlalchemy
from sqlalchemy.ext.sqlsoup import SqlSoup
from sqlalchemy import MetaData

def main():
    engine = sqlalchemy.create_engine('mysql://user:password@localhost/bd?charset=utf8')
    db = SqlSoup(MetaData(engine))
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Obviando las líneas de importación, simplemente creamos una conexión mySQL a la BD en cuestión y le pasamos a una instancia de SqlSoup los metadatos de éstos. Posteriormente, para acceder a los datos sólo hay que consultar la variable db y el nombre de la tabla de la siguiente manera:&lt;/p&gt;

&lt;pre&gt;&lt;code data-language='python&quot; line=&quot;1'&gt;
    project_list = db.project.limit(30)
    
    for project in project_list:
        print project.name

        participant_list = db.participant.filter_by(project_id=project.id)

        for participant in participant_list:
            print participant.name
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;En &lt;strong&gt;db.project&lt;/strong&gt; tomaríamos &lt;em&gt;los 30 primeros datos de la tabla project&lt;/em&gt;. Posteriormente iteramos sobre éstos y realizamos una consulta sobre la tabla participant, la cual está &lt;em&gt;relacionada con la tabla project por el project_id&lt;/em&gt;. Conseguimos los datos de participant e iteramos por ellos.&lt;/p&gt;

&lt;p&gt;Como véis para acceder a un campo de la tabla basta con hacer un project.name (nombre_tabla.elemento), así de fácil.&lt;/p&gt;

&lt;p&gt;Si queréis saber más, los enlaces de arriba os serán de ayuda.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Creando una API con Django y django-piston</title>
   <author>javaguirre</author>
   <link href="http://javaguirre.net/2011/05/21/creando-una-api-con-django-y-django-piston"/>
   <updated>2011-05-21T00:00:00+02:00</updated>
   <id>http://javaguirre.net/2011/05/21/creando-una-api-con-django-y-django-piston</id>
   <content type="html">&lt;p&gt;&lt;strong&gt;Django-piston&lt;/strong&gt; es una app de &lt;strong&gt;Django&lt;/strong&gt; para crear &lt;strong&gt;APIs&lt;/strong&gt; para tu web de una manera muy sencilla. &lt;/p&gt;

&lt;p&gt;Actualmente estoy trabajando en un proyecto (&lt;a href=&quot;https://github.com/javaguirre/sabrosous&quot;&gt;Software Libre&lt;/a&gt;) para el que necesito una API y autenticación mediante &lt;a href=&quot;http://oauth.net/documentation/getting-started/&quot;&gt;OAUTH&lt;/a&gt;. Por el momento he estado desarrollando únicamente el &lt;strong&gt;read&lt;/strong&gt;, mostrar la lista de datos. &lt;/p&gt;

&lt;p&gt;Para ello sólo hay que definir dos cosas, un handler, que se ocupará de tomar la url y mostrar los datos que le pidamos, y la url desde la que llamaremos al handler, con menos de diez líneas, podremos mostrar muchas cosas. :-)&lt;/p&gt;

&lt;p&gt;En mi ejemplo, que se puede ver en el repositorio de &lt;a href=&quot;https://github.com/javaguirre/sabrosous&quot;&gt;Sabrosous&lt;/a&gt;, mostraremos los datos de enlaces que tienen todos los usuarios en &quot;favoritos&quot;, así como la lista de enlaces favoritos por usuario, ambas cosas con el mismo handler. El handler lo podríamos poner en una app de nuestro proyecto llamada api, creando el archivo &lt;strong&gt;handlers.py&lt;/strong&gt; con este contenido:&lt;/p&gt;

&lt;pre&gt;&lt;code data-language='python'&gt;

from django.contrib.auth.models import User
from links.models import Link
from piston.handler import BaseHandler
&lt;/code&gt;&lt;/pre&gt;

&lt;pre&gt;&lt;code data-language='python'&gt;

class LinkHandler(BaseHandler):
    allowed_methods = ('GET', 'POST')
    model = Link

    def read(self, request, username=None):

        if username:
            user = User.objects.get(username=username)
        
            return user.link_set.all()
        else:
            return Link.objects.all()

&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;En este handler definimos los métodos a utilizar, el modelo de nuestra base de datos,  y el método read. Si recibimos el nombre del usuario en la url, mostramos los enlaces de éste, si no recibimos nada, mostramos todos los enlaces.&lt;/p&gt;

&lt;p&gt;El archivo &lt;strong&gt;urls.py&lt;/strong&gt; lo ubicaríamos en la misma app &lt;em&gt;api&lt;/em&gt;, y en ésta las siguientes urls:&lt;/p&gt;

&lt;pre&gt;&lt;code data-language='python'&gt;

from django.conf.urls.defaults import *
from piston.resource import Resource
from api.handlers import LinkHandler

link_handler = Resource(LinkHandler)

urlpatterns = patterns('',
    (r'^list/(?P&lt;username&gt;\w+).(?P&lt;emitter_format&gt;.+)$', link_handler),
    (r'^list.(?P&lt;emitter_format&gt;.+)$', link_handler),
)
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Como vemos, importaríamos nuestro nuevo handler, y definiríamos dos urls, una para cuando introducimos usuario, otra para tomar todos los datos. La url tomaría también un valor &lt;emitter_format&gt;, que definiría la forma de mostrar los datos. &lt;/p&gt;

&lt;p&gt;Por &lt;em&gt;defecto&lt;/em&gt; tenemos las opciones json y xml, aunque podemos hacer nuestro propio &lt;em&gt;Emitter&lt;/em&gt; para mostrar los datos de la manera más propicia para nosotros y de una manera fácil.&lt;/p&gt;

&lt;p&gt;Un ejemplo de llamada a la API de usuario:&lt;/p&gt;

&lt;p&gt;http://midominio.com/api/list/usuario.json&lt;/p&gt;

&lt;p&gt;Para ver la lista completa de enlaces:&lt;/p&gt;

http://midominio.com/api/list.json

&lt;p&gt;Para más información, la wiki de &lt;a href=&quot;https://bitbucket.org/jespern/django-piston/wiki/Home&quot;&gt;django-piston&lt;/a&gt;.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Google IO, Impresiones y Android@Home</title>
   <author>javaguirre</author>
   <link href="http://javaguirre.net/2011/05/14/google-io-impresiones-y-androidhome"/>
   <updated>2011-05-14T00:00:00+02:00</updated>
   <id>http://javaguirre.net/2011/05/14/google-io-impresiones-y-androidhome</id>
   <content type="html">&lt;a rel=&quot;attachment wp-att-206&quot; href=&quot;http://javaguirre.net/2011/05/14/google-io-impresiones-y-androidhome/io_logo_google/&quot;&gt;&lt;img class=&quot;alignright size-medium wp-image-206&quot; title=&quot;io_logo_google&quot; src=&quot;http://javaguirre.net/wp-content/uploads/2011/05/io_logo_google-300x155.jpg&quot; alt=&quot;&quot; width=&quot;300&quot; height=&quot;155&quot; /&gt;&lt;/a&gt;El miércoles pasado me invitaron a asistir a la &lt;a href=&quot;http://www.google.com/events/io/2011/index-live.html&quot;&gt;Google IO Extended&lt;/a&gt;, en la oficina de Google de Madrid. Estuvimos reunidos viendo por videoconferencia las novedades que Google traía este año en uno de sus eventos más importantes.

Hubo muchas novedades interesantes, pero para mí la más sorprendente fue &lt;strong&gt;Android@Home&lt;/strong&gt;,  con las funcionalidades de conectar tu Android a cualquier dispositivo electrónico de tu casa (o fuera de ella) con un circuito con una placa &lt;em&gt;Arduino&lt;/em&gt;. Mediante &lt;strong&gt;conexión USB&lt;/strong&gt; podemos llevar a cabo el desarrollo de la aplicación (no deja de ser un Arduino :-)).

Las herramientas para estas posibilidades están &lt;em&gt;compiladas&lt;/em&gt; en lo que se llama el &lt;a href=&quot;http://developer.android.com/guide/topics/usb/adk.html&quot;&gt;Android Open Accessory Development Kit&lt;/a&gt;.

Con respecto a Android, se lanzó la versión &lt;strong&gt;3.1&lt;/strong&gt; del sistema, con algunas mejoras interesantes, como el control mediante movimientos corporales (por webcam) de las aplicaciones..

De las novedades más sonadas no tengo mucho que decir,&lt;strong&gt; Google Music y la posibilidad de descargarte películas desde el Android Market&lt;/strong&gt;, nuevos servicios que no creo que traigan un &lt;em&gt;boom&lt;/em&gt; o una gran sorpresa con ellos, ya hay servicios que aproximadamente cumplen estas necesidades, y por el momento sólo se lanzará como tal en Estados Unidos.

Agradecer igualmente la amabilidad de la gente de Google en Madrid, un trato siempre correcto.
</content>
 </entry>
 
 <entry>
   <title>Modificando Pronamic Google Maps para Wordpress, Caja de busqueda</title>
   <author>javaguirre</author>
   <link href="http://javaguirre.net/2011/03/30/modificando-pronamic-google-maps-para-wordpress-caja-de-busqueda"/>
   <updated>2011-03-30T00:00:00+02:00</updated>
   <id>http://javaguirre.net/2011/03/30/modificando-pronamic-google-maps-para-wordpress-caja-de-busqueda</id>
   <content type="html">&lt;a href=&quot;http://javaguirre.net/2011/03/30/modificando-pronamic-google-maps-para-wordpress-caja-de-busqueda/pronamic-google-map/&quot; rel=&quot;attachment wp-att-175&quot;&gt;&lt;img src=&quot;http://javaguirre.net/wp-content/uploads/2011/03/pronamic-google-map-300x231.png&quot; alt=&quot;&quot; title=&quot;pronamic-google-map&quot; width=&quot;300&quot; height=&quot;231&quot; class=&quot;alignright size-medium wp-image-175&quot; /&gt;&lt;/a&gt;Para un proyecto personal sobre restaurantes vegetarianos, &lt;a href=&quot;http://comandolechuga.com&quot;&gt;Comando Lechuga&lt;/a&gt; necesitábamos un localizador de publicaciones y, posteriormente, &lt;strong&gt;un mapa que nos localizase todas las publicaciones que previamente habíamos escrito&lt;/strong&gt;. 

Decidí usar el plugin &lt;a href=&quot;http://wordpress.org/extend/plugins/pronamic-google-maps/&quot;&gt;Pronamic Google Maps&lt;/a&gt; y me encontré con la necesidad de &lt;strong&gt;buscar en el mapa&lt;/strong&gt;, ya que veía necesario que un usuario tuviese la posibilidad de buscar los restaurantes de su municipio fácilmente.

Para ello realicé &lt;strong&gt;un par de modificaciones en dos archivos del plugin&lt;/strong&gt;, de los que hablo ahora.

&lt;h2&gt;Cambio en el archivo &lt;em&gt;classes/Pronamic_Google_Maps_Mashup.php&lt;/em&gt;&lt;/h2&gt;
&lt;br /&gt;
&lt;em&gt;Después de la línea actual en el archivo...&lt;/em&gt;

&lt;pre&gt;&lt;code data-language='php'&gt;&lt;br /&gt;
$content .= sprintf('&lt;input type=&quot;hidden&quot; name=&quot;pgmm-info&quot; value=&quot;%s&quot; /&gt;', 
                  esc_attr(json_encode($options)));
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;
&lt;em&gt;podríamos añadir...&lt;/em&gt;
&lt;/p&gt;
&lt;pre&gt;&lt;code data-language='php'&gt;&lt;br /&gt;
$content .= '&lt;div class=&quot;map-search&quot;&gt;
		     &lt;input id=&quot;map-text&quot; type=&quot;text&quot;/&gt;
		     &lt;input id=&quot;map-button&quot; type=&quot;button&quot; value=&quot;search&quot;/&gt;
		   &lt;/div&gt;&lt;br/&gt;';
&lt;/code&gt;&lt;/pre&gt;

Simplemente añadimos un div con una caja de texto y un botón que al pulsarlo llamará al javascript que mostramos ahora.

&lt;h2&gt;Cambio en el archivo &lt;em&gt;js/site.js&lt;/em&gt;&lt;/h2&gt;
&lt;br /&gt;
Podemos introducir estas líneas dentro de la función &lt;strong&gt;buildMashup&lt;/strong&gt;. Con el selector jquery tomamos el botón al lado de la caja de texto y llamamos a la &lt;a href=&quot;http://code.google.com/apis/maps/documentation/javascript/&quot;&gt;clase geocode de Google Maps&lt;/a&gt;, que nos geolocaliza, nos devuelve las coordenadas de Longitud y Latitud en función de la cadena de texto que le pasamos como parámetro. En este caso el valor de &lt;em&gt;#map-text&lt;/em&gt;. Posteriormente le damos un zoom razonable y centramos el mapa en la posición deseada.

&lt;pre&gt;&lt;code data-language='javascript'&gt;
jQuery(&quot;#map-button&quot;).click(function(){
				geocoder = new google.maps.Geocoder();
				geocoder.geocode( { 'address': jQuery(&quot;#map-text&quot;).val()}, function(results, status) {
					if (status == google.maps.GeocoderStatus.OK) {
						map.setCenter(results[0].geometry.location);
						map.setZoom(13);
					}
					else
					{
						alert(&quot;Geocode was not successful for the following reason: &quot; + status);
					}
				});
			});
&lt;/code&gt;&lt;/pre&gt;

Bastante fácil ¿no? :-)
</content>
 </entry>
 
 <entry>
   <title>Charla de Django en los Cursos de Marzo del GUL</title>
   <author>javaguirre</author>
   <link href="http://javaguirre.net/2011/03/20/charla-de-django-en-los-cursos-de-marzo-del-gul"/>
   <updated>2011-03-20T00:00:00+01:00</updated>
   <id>http://javaguirre.net/2011/03/20/charla-de-django-en-los-cursos-de-marzo-del-gul</id>
   <content type="html">&lt;p&gt;Añado también la &lt;strong&gt;charla de Django&lt;/strong&gt; que realicé en el campus de Leganés el miércoles 16 de Marzo de 2011.&lt;/p&gt;

&lt;a href=&quot;ftp://ftp.gul.es/pub/gul/cursos/2011/marzo/desarrollo_web_con_django/&quot;&gt;Video de presentación.&lt;/a&gt;

&lt;a href=&quot;http://javaguirre.net/wp-content/uploads/charla_django.rar&quot;&gt;Material de la charla.&lt;/a&gt;
</content>
 </entry>
 
 <entry>
   <title>Consultas SQL con Propel en Symfony 1.4</title>
   <author>javaguirre</author>
   <link href="http://javaguirre.net/2011/03/18/consultas-sql-con-propel-en-symfony-1-4"/>
   <updated>2011-03-18T00:00:00+01:00</updated>
   <id>http://javaguirre.net/2011/03/18/consultas-sql-con-propel-en-symfony-1-4</id>
   <content type="html">Me ha llevado un tiempo encontrarlo, pero muchas veces la culpa de no encontrar es que no has preguntado convenientemente. Hacer consultas SQL personalizadas cuando los Peer no son suficientes en &lt;em&gt;Symfony con Propel&lt;/em&gt; es tan fácil como...

&lt;pre&gt;&lt;code data-language='php'&gt;
$connection = Propel::getConnection();
$sql = &quot;YOUR SQL QUERY&quot;;
$statement = $connection-&amp;gt;prepare($sql);
$statement-&amp;gt;execute(); 

while($result = $statement-&gt;;fetch(PDO::FETCH_ASSOC))
{
    echo var_dump($result);
}
&lt;/code&gt;&lt;/pre&gt;
&lt;em&gt;Fuente:&lt;/em&gt; &lt;a href=&quot;http://joaquinnunez.cl/blog/2010/07/01/custom-sql-queries-in-symfony-1-4-with-propel/&quot;&gt;http://joaquinnunez.cl/blog/2010/07/01/custom-sql-queries-in-symfony-1-4-with-propel/&lt;/a&gt;

Pronto explicaré cómo hacer un mapa con svg y &lt;a href=&quot;http://raphaeljs.com/&quot;&gt;RaphaelJS&lt;/a&gt;, lo tengo pendiente. :-)
</content>
 </entry>
 
 <entry>
   <title>Introduccion a Arduino</title>
   <author>javaguirre</author>
   <link href="http://javaguirre.net/2011/03/17/introduccion-a-arduino"/>
   <updated>2011-03-17T00:00:00+01:00</updated>
   <id>http://javaguirre.net/2011/03/17/introduccion-a-arduino</id>
   <content type="html">&lt;p&gt;El &lt;a href=&quot;http://www.gul.uc3m.es/&quot;&gt;Grupo de usuarios de Linux&lt;/a&gt; (&lt;strong&gt;GUL&lt;/strong&gt;)de la &lt;em&gt;Universidad Carlos III&lt;/em&gt; hace todos los años por estas fechas una &lt;a href=&quot;http://cursos.gul.es/index.php/courses/calendar/16&quot;&gt;semana de cursos&lt;/a&gt; para todo el que se quiera acercar al edificio de Informática de Leganés, donde ellos tienen sede. Ya en noviembre me acerqué para dar una charla sobre &lt;strong&gt;Symfony&lt;/strong&gt;, y ayer impartí dos, una sobre Arduino y otra sobre Django.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;En líneas generales estoy satisfecho con las charlas&lt;/strong&gt;, aunque me salió mucho mejor la de Arduino. No obstante creo que lo pasamos muy bien, que es parte importante de los cursos y de conseguir que a la gente le llegue algunos de tus conocimientos.&lt;/p&gt;

&lt;p&gt;Voy a colgar el material de la charla de &lt;strong&gt;Arduino&lt;/strong&gt; en este artículo (también hay video que enlazo a continuación), y se lo facilitaré a la gente del GUL para que lo tengan en el mismo lugar que todo el material de estos cursos. En un artículo posterior añadiré el enlace al material de &lt;strong&gt;Django&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Podeéis acceder al material de todas las charlas en el &lt;a href=&quot;ftp://ftp.gul.es/pub/gul/cursos/2011/marzo&quot;&gt;ftp del GUL&lt;/a&gt;.&lt;/p&gt;

&lt;a href=&quot;http://javaguirre.net/wp-content/uploads/charla_arduino.rar&quot;&gt;Presentación y código ejemplo&lt;/a&gt;

&lt;a href=&quot;ftp://ftp.gul.es/pub/gul/cursos/2011/marzo/introduccion_arduino/introduccion_arduino.avi&quot;&gt;Video de la presentación&lt;/a&gt;.

&lt;p&gt;&lt;strong&gt;Agradezco mucho al GUL&lt;/strong&gt; que me haya dado la oportunidad de realizar estas charlas. :-)&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Repositorio de código con Git y Gitolite en Debian</title>
   <author>javaguirre</author>
   <link href="http://javaguirre.net/2011/02/10/repositorio-de-codigo-con-git-y-gitolite-en-debian"/>
   <updated>2011-02-10T00:00:00+01:00</updated>
   <id>http://javaguirre.net/2011/02/10/repositorio-de-codigo-con-git-y-gitolite-en-debian</id>
   <content type="html">&lt;p&gt;Desde que &lt;strong&gt;Linus Torvalds&lt;/strong&gt;, creador del &lt;em&gt;Kernel Linux&lt;/em&gt;, desarrolló el sistema de control de versiones &lt;a href=&quot;http://es.wikipedia.org/wiki/Git&quot;&gt;Git&lt;/a&gt;, ha ido comiendo terreno su implantación en la comunidad del Software Libre, hasta el punto de que ya son pocos los proyectos importantes que no usan éste como sistema control de versiones.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/sitaramc/gitolite&quot;&gt;Gitolite&lt;/a&gt; &lt;em&gt;te permite crear un servidor git&lt;/em&gt; centralizado con mucha facilidad, pudiendo controlar muy fácilmente los usuarios, los repositorios y los grupos de desarrolladores así como sus relaciones.&lt;/p&gt;

&lt;p&gt;Ya había tenido experiencia con &lt;a href=&quot;http://scie.nti.st/2007/11/14/hosting-git-repositories-the-easy-and-secure-way&quot;&gt;Gitosis&lt;/a&gt;, y aunque lo estamos usando en otros proyectos en un servidor personal, no me había convencido del todo. Para un grupo de investigación de la &lt;a href=&quot;http://lemi.uc3m.es/&quot;&gt;Universidad Carlos III&lt;/a&gt; en el que actualmente estoy trabajando decidí estudiar alternativas, y surgió &lt;a href=&quot;http://cactus.enreda.coop/migramos-git-git-gitolite-gitweb-gitdaemon&quot;&gt;gitolite&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Hay &lt;a href=&quot;http://blog.tampakrap.gr/gitolite-installation-with-gitweb-and-anongit-in-gentoo-and-debian/ &quot;&gt;algunos tutoriales&lt;/a&gt; en Internet sobre cómo configurar tu servidor con gitolite, pero &lt;em&gt;ninguno me convenció al 100%&lt;/em&gt; y me encontré con algún problema que no estaba bien explicado, por lo que para mí era necesaria una aclaración, de ahí esta entrada. :-)&lt;/p&gt;

&lt;p&gt;Para este tutorial se tendría que tener conocimientos básicos de bash.&lt;/p&gt;

&lt;p&gt;Para cualquier duda, podéis consultarme por los comentarios. :-)&lt;/p&gt;
&lt;h2&gt;&lt;span style=&quot;text-decoration: underline;&quot;&gt;Tutorial de Gitolite&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;Primero de todo añadimos el repositorio de lenny-backports (si no está ya en el archivo) a /etc/apt/sources.list&lt;/p&gt;

&lt;p&gt;(# significa hacer estas acciones como root, $ como usuario normal)&lt;/p&gt;

&lt;strong&gt; # nano /etc/apt/sources.list&lt;/strong&gt;

&lt;p&gt;Introducimos la siguiente línea en el archivo:&lt;/p&gt;

&lt;strong&gt;deb http://www.backports.org/debian lenny-backports main&lt;/strong&gt;

&lt;p&gt;Una vez hecho esto &lt;em&gt;instalamos git y gitolite&lt;/em&gt; en la máquina.&lt;/p&gt;

&lt;strong&gt;# apt-get -t lenny-backports install gitweb git-daemon-run gitolite&lt;/strong&gt;

&lt;p&gt;Instalados los paquetes, añadimos nuestra clave pública ssh (Si no tenemos una nos hacemos una con el comando &lt;a href=&quot;http://trucolinux.com/node/15&quot;&gt;ssh-keygen&lt;/a&gt;). Ésta suele estar guardada en...&lt;/p&gt;

&lt;strong&gt;~/.ssh/id_rsa.pub&lt;/strong&gt;

&lt;p&gt;La subimos al servidor en &lt;em&gt;/tmp&lt;/em&gt; (este comando lo ejecutamos desde nuestra máquina, no en el servidor):&lt;/p&gt;

&lt;strong&gt;$ scp ~/.ssh/id_rsa.pub root@servidor:/tmp&lt;/strong&gt;

&lt;p&gt;Ahora volvemos a entrar al servidor por SSH, y ejecutamos lo siguiente:&lt;/p&gt;

&lt;strong&gt;# cd /var/lib/gitolite
# gl-setup /tmp/id_rsa.pub&lt;/strong&gt;

&lt;p&gt;Esto añade a gitolite la clave ssh para poder descargarnos el repositorio de administración de gitolite, poder crear nuevos repositorios en la máquina y nuevos usuarios que trabajen en ellos.&lt;/p&gt;

&lt;p&gt;Llega el momento de crear nuevos proyectos y dar acceso a usuarios a su proyecto. &lt;em&gt;Descargamos el repositorio de admin de gitolite,
        &lt;strong&gt; gitolite-admin&lt;/strong&gt;&lt;/em&gt;, en nuestra máquina donde generamos la clave ssh (usuario):&lt;/p&gt;

&lt;strong&gt;$ git clone gitolite@servidor:gitolite-admin.git&lt;/strong&gt;

&lt;p&gt;Tenemos dos directorios, &lt;strong&gt;conf&lt;/strong&gt;, &lt;em&gt;donde creamos los nuevos proyectos&lt;/em&gt; y los permisos de los usuarios, y &lt;strong&gt;keydir&lt;/strong&gt;, donde pondremos las &lt;strong&gt;claves públicas ssh de los nuevos trabajadores&lt;/strong&gt; de nuestros proyectos. Vamos a añadir un proyecto &lt;em&gt;example&lt;/em&gt; con un usuario juan que &lt;em&gt;lo controla (permisos lectura/escritura)&lt;/em&gt;, y dos personas, javier y luis, que &lt;em&gt;sólo lo leen&lt;/em&gt; para descargarse los datos pero no pueden escribir en el proyecto.&lt;/p&gt;

&lt;p&gt;Editamos el archivo &lt;em&gt;conf/gitolite.conf&lt;/em&gt; dentro de &lt;strong&gt;gitolite-admin&lt;/strong&gt; y al final añadimos lo siguiente:&lt;/p&gt;

&lt;strong&gt;repo example:
RW+ = juan
R = javier luis&lt;/strong&gt;

&lt;p&gt;Una vez hecho esto añadimos las claves públicas SSH de los usuarios juan, luis, y javier en la carpeta keydir. &lt;strong&gt;Recordamos que las claves ssh se generan con el comando ssh-keygen&lt;/strong&gt;, y que se encuentran en &lt;em&gt;/home/usuario/.ssh/id_rsa.pub&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Los metemos en el &lt;em&gt;directorio keydir&lt;/em&gt;, &lt;strong&gt;renombrando el id_rsa.pub con el nombre de usuario.pub&lt;/strong&gt;, en nuestro caso la carpeta keydir tendría los siguientes archivos, con las claves ssh de nuestros compañeros:&lt;/p&gt;

&lt;strong&gt;keydir/
luis.pub
javier.pub
juan.pub&lt;/strong&gt;

&lt;p&gt;Ya tenemos todo para descargarnos el repositorio example y trabajar con él, falta subir estos cambios a gitolite, para que nos cree el repositorio, los permisos y todo lo que necesitamos.&lt;/p&gt;

&lt;p&gt;En la carpeta &lt;strong&gt;gitolite-admin&lt;/strong&gt; que descargamos y en la que hemos estado trabajando:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;$ git add . &lt;/strong&gt;&lt;strong&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;(Añadimos todos los cambios del proyecto, lo que hemos hecho en la carpeta &lt;em&gt;conf&lt;/em&gt; y en &lt;em&gt;keydir&lt;/em&gt;)&lt;/span&gt;
$ git commit -m 'Añadido repositorio example'
$ git push origin master &lt;/strong&gt;(Subimos los cambios al servidor)&lt;/p&gt;

¡Ya podemos trabajar con nuestro proyecto &lt;em&gt;example&lt;/em&gt;!

&lt;p&gt;En nuestra máquina podremos hacer...&lt;/p&gt;

&lt;strong&gt;$ git clone gitolite@server:example.git&lt;/strong&gt;

&lt;p&gt;Espero que esté un poco claro. :-)&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Concurso Universitario de Software Libre</title>
   <author>javaguirre</author>
   <link href="http://javaguirre.net/2011/01/27/concurso-universitario-de-software-libre"/>
   <updated>2011-01-27T00:00:00+01:00</updated>
   <id>http://javaguirre.net/2011/01/27/concurso-universitario-de-software-libre</id>
   <content type="html">&lt;p&gt;Quería hoy escribir sobre una pequeña modificación que hice esta semana &lt;strong&gt;en un widget de Symfony&lt;/strong&gt; que mejora ligeramente la usabilidad de éste, pero me apetececía hablar de algo más personal.&lt;/p&gt;

&lt;p&gt;&lt;a rel=&quot;attachment wp-att-109&quot; href=&quot;http://javaguirre.net/2011/01/27/concurso-universitario-de-software-libre/logomadrid-2/&quot;&gt;&lt;img class=&quot;alignright size-full wp-image-109&quot; title=&quot;logomadrid&quot; src=&quot;http://javaguirre.net/wp-content/uploads/2011/01/logomadrid1.png&quot; alt=&quot;&quot; width=&quot;300&quot; height=&quot;207&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Quizás el &lt;a href=&quot;http://concursosoftwarelibre.org/&quot;&gt;Concurso Universitario de Software Libre&lt;/a&gt; fuese hace tres años lo que me empezó a posicionar en el lugar dentro del ámbito de la informática en el que quería estar, en el desarrollo de Software, Software Libre siempre que pudiese ser posible, y en ese sentido y en muchos otros estoy muy contento por haber participado en aquel evento.&lt;/p&gt;

&lt;p&gt;Debido a &lt;strong&gt;mi fuerte vinculación con el Concurso&lt;/strong&gt; y a que el &lt;a href=&quot;http://cuslmadrid.org&quot;&gt;Concurso de Software Libre de Madrid&lt;/a&gt; no podía seguir contando con sus grandes valedores del año anterior por no tener suficiente tiempo para pelearse con estamentos administrativos, valoré, allá por Septiembre, si era posible poner la semilla para un &lt;strong&gt;Concurso Universitario que pudiese ser duradero en Madrid&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Con la inestimable e imprescindible ayuda de algunos profesores conseguimos sacarlo adelante&lt;/strong&gt;. Hubo momentos en los que pensé que a lo mejor no le iba a importar a nadie el lanzamiento del Concurso en Madrid, o que una persona nueva en Madrid que no tenía nada que ofrecer mas que trabajo y buenas intenciones y sin apoyo no podía conseguir nada.&lt;/p&gt;

&lt;p&gt;Evidentemente no me equivocaba, pero los días que no tenía respuestas ni apoyos fueron superados y la perseverancia que en muchas otras ocasiones había sido un punto débil en mi vida, esta vez me ayudó a perseguir el objetivo.&lt;/p&gt;

&lt;p&gt;Es totalmente cierto que si yo no hubiese ayudado o contribuido a organizar el concurso, lo habrían hecho otros, y posiblemente igual o mejor que yo, no obstante creo que la idea de no emparejarlo con una sola universidad para que todos lo alumnos que quisiesen participar pudiesen hacerlo fuesen de la universidad que fuesen era algo que nos parecía muy importante.&lt;/p&gt;

&lt;p&gt;Sólo puedo concluir &lt;strong&gt;lo agradecido que estoy a esta iniciativa&lt;/strong&gt;, y mi orgullo por poder decir que pasen los años que pasen el Concurso ha permanecido fiel a su idea inicial, ser un trampolín para aprender con el Software Libre, contribuir en él como comunidad en la docencia y no dejarse vender.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Todo el tiempo que dedicamos al Software Libre merece la pena porque estas ideas permanecen intactas&lt;/strong&gt;, y es este agradecimiento el que me hace dedicar todo el tiempo que puedo al &lt;em&gt;CUSL&lt;/em&gt;. :-)&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Mod_auth y apache2, poniendo password a tu sitio web</title>
   <author>javaguirre</author>
   <link href="http://javaguirre.net/2011/01/05/mod_auth-y-apache2-poniendo-password-a-tu-sitio-web"/>
   <updated>2011-01-05T00:00:00+01:00</updated>
   <id>http://javaguirre.net/2011/01/05/mod_auth-y-apache2-poniendo-password-a-tu-sitio-web</id>
   <content type="html">&lt;p&gt;En ocasiones estamos desarrollando un proyecto y queremos tenerlo online o empezar a probarlo en nuestros servidores, pero sin que el gran público pueda acceder hasta que el sitio no esté completamente preparado.&lt;/p&gt;

&lt;p&gt;Para requerir &lt;strong&gt;autenticación&lt;/strong&gt; nos sirve el módulo del servidor &lt;a href=&quot;http://httpd.apache.org/docs/2.0/mod/mod_auth.html&quot;&gt;Apache Mod_auth&lt;/a&gt;, que viene instalado y activado por defecto en todas las distribuciones GNU/Linux populares una vez hemos instalado &lt;strong&gt;Apache&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;¿Cómo podríamos fácilmente poner contraseña a nuestro sitio web en construcción&lt;/strong&gt;? Muy sencillo, aquí va una de las posible maneras.&lt;/p&gt;

&lt;p&gt;Primero deberemos ver si el módulo &lt;strong&gt;mod_auth&lt;/strong&gt; está habilitado. En &lt;strong&gt;Debian&lt;/strong&gt; podemos cerciorarnos de este detalle si se encuentra &lt;strong&gt;mod_auth&lt;/strong&gt;, &lt;strong&gt;auth_basic&lt;/strong&gt;, o algún archivo de nombre parecido en &lt;strong&gt;/etc/apache2/mods-enabled&lt;/strong&gt; (el directorio en otras versiones o en otras distros GNU/Linux podría ser &lt;strong&gt;modules.d&lt;/strong&gt;).&lt;/p&gt;

&lt;p&gt;En caso afirmativo, crearíamos un archivo &lt;strong&gt;.htaccess&lt;/strong&gt; en el directorio del sitio que queremos &lt;em&gt;cerrar&lt;/em&gt; (&lt;em&gt;/srv/www/midominio.com&lt;/em&gt;) con contraseña con el siguiente contenido:&lt;/p&gt;

&lt;p&gt;&lt;!-- p, li { white-space: pre-wrap; } --&gt;&lt;strong&gt;AuthType Basic&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;AuthName &quot;Authentication required&quot;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;AuthUserFile /srv/www/midominio.com/.password&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Require valid-user&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Creo que las líneas son &lt;em&gt;autoexplicativas&lt;/em&gt;. Tras esto bastaría con crear el archivo &lt;strong&gt;.password&lt;/strong&gt; donde le hayamos dicho en la ruta anterior e introducir en este las &lt;em&gt;tuplas&lt;/em&gt; del nombre de usuario y contraseña de la siguiente forma:&lt;/p&gt;

&lt;p&gt;usuario1:$1$HmwZG55x$bC4F2/JUfEyl30K7.0ikl.&lt;/p&gt;

&lt;p&gt;usuario2:$1$nZ1vx3dy$7D8r0fWEiynBbCUBsuJqs1&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;La contraseña va tras el nombre de usuario, y ambos están separados por dos puntos&lt;/strong&gt;. La contraseña se puede generar fácilmente por consola con este comando (teniendo los paquetes para md5 de tu distribución instalados):&lt;/p&gt;

&lt;p&gt;&lt;!-- p, li { white-space: pre-wrap; } --&gt;&lt;strong&gt;md5pass palabra&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Donde palabra sería tu clave o password. Copiamos la salida del comando en el archivo .password al lado del nombre de usuario como he comentado anteriormente y listo. :-)&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>La carta esférica, la película</title>
   <author>javaguirre</author>
   <link href="http://javaguirre.net/2010/12/30/la-carta-esferica-la-pelicula"/>
   <updated>2010-12-30T00:00:00+01:00</updated>
   <id>http://javaguirre.net/2010/12/30/la-carta-esferica-la-pelicula</id>
   <content type="html">&lt;p&gt;&lt;a href=&quot;http://javaguirre.net/wp-content/uploads/2010/12/la-carta-esferica.jpg&quot;&gt;&lt;img class=&quot;alignright size-medium wp-image-60&quot; title=&quot;la-carta-esferica&quot; src=&quot;http://javaguirre.net/wp-content/uploads/2010/12/la-carta-esferica-213x300.jpg&quot; alt=&quot;&quot; width=&quot;213&quot; height=&quot;300&quot; /&gt;&lt;/a&gt;Nunca me gusta ver una película basada en un libro o &lt;em&gt;generada&lt;/em&gt; a partir de éste sin antes haberlo leído, me parece como una &lt;em&gt;pequeña traición a mi imaginación, &lt;/em&gt;que siempre me da tanto&lt;em&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://www.filmaffinity.com/es/film235723.html&quot;&gt;La carta esférica&lt;/a&gt; es una película&lt;em&gt; &lt;/em&gt;basada en la novela homónima de &lt;strong&gt;Pérez Reverte&lt;/strong&gt;. Habla de tesoros en barcos hundidos, ambiciones y obsesiones marineras e históricas en el siglo XX.&lt;/p&gt;

Los personajes principales, &lt;em&gt;una enigmática y calculadora Aitana Sánchez Gijón&lt;/em&gt; en el papel de historiadora del Museo Naval de Madrid, un &lt;em&gt;Carmelo Gómez marinero, visceral e impulsivo&lt;/em&gt; y un conjunto de misteriosos y en ocasiones perseverantes enemigos completan el ciclo de personajes de la película.

&lt;strong&gt;Película entretenida, con todo lo malo y bueno que este adjetivo conlleva&lt;/strong&gt;. Quizás lo que más me gustó fueron las escenas marítimas, el velero en busca de aventura, y el contraste del bullicio que trasmite la ciudad con respecto a los pequeños pueblos pesqueros, que siempre tanto me han atraído. También es reseñable el papel de Aitana en alguna de esas escenas a las que nos acostumbran las películas españolas.

Para una tarde de invierno no está nada mal.
</content>
 </entry>
 
 <entry>
   <title>Mailman y Gitosis</title>
   <author>javaguirre</author>
   <link href="http://javaguirre.net/2010/12/26/mailman-y-gitosis"/>
   <updated>2010-12-26T00:00:00+01:00</updated>
   <id>http://javaguirre.net/2010/12/26/mailman-y-gitosis</id>
   <content type="html">&lt;p&gt;Hoy está siendo un día completito. Tras estar instalando y configurando &lt;strong&gt;mailman &lt;/strong&gt;(listas de correo) por petición de los participantes del &lt;a href=&quot;http://www.cuslmadrid.org&quot;&gt;Concurso Universitario de Software Libre de Madrid&lt;/a&gt;, me he puesto a configurar &lt;strong&gt;gitosis&lt;/strong&gt; para la gestión de mis/nuestros proyectos en un servidor &lt;strong&gt;Debian&lt;/strong&gt; que he adquirido recientemente.&lt;/p&gt;

&lt;p&gt;Me ha dado algún que otro disgusto, pero después de un par de horillas ya está todo configurado. :-)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fuentes: &lt;a href=&quot;http://kalendas.net/docs/mailman.html&quot;&gt;http://kalendas.net/docs/mailman.html&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt; &lt;a href=&quot;http://ymbra.com/es/blog/ramon/gestion-de-repositorios-git-con-gitosis&quot;&gt;http://ymbra.com/es/blog/ramon/gestion-de-repositorios-git-con-gitosis&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Humble Bundle, juegos indie por el dinero que quieras</title>
   <author>javaguirre</author>
   <link href="http://javaguirre.net/2010/12/25/humble-bundle-juegos-indie-por-el-dinero-que-quieras"/>
   <updated>2010-12-25T00:00:00+01:00</updated>
   <id>http://javaguirre.net/2010/12/25/humble-bundle-juegos-indie-por-el-dinero-que-quieras</id>
   <content type="html">&lt;p&gt;Una propuesta de lo más interesante, &lt;a href=&quot;http://www.humblebundle.com/&quot;&gt;Humble Bundle&lt;/a&gt;, un conjunto de &lt;strong&gt;juegos indie&lt;/strong&gt; que durante un periodo de tiempo puedes comprar por el dinero que quieras. Una iniciativa que bajo mi opinión hay que apoyar, aunque sea por poco dinero, merece la pena, sobretodo para los linuxeros, que casi nunca podemos disfrutar de buenos juegos para &lt;strong&gt;GNU/Linux&lt;/strong&gt;, ésta es una gran opción.&lt;/p&gt;

&lt;p&gt;Algunos de los juegos son de una gran calidad, como el premiado &lt;a href=&quot;http://www.worldofgoo.com/&quot;&gt;World of Goo&lt;/a&gt; de la edición &lt;strong&gt;Humble Bundle&lt;/strong&gt; del año pasado (la de este año es la segunda edición).&lt;/p&gt;

Me han gustado mucho algunos de los juegos de esta segunda edición, como &lt;a href=&quot;http://machinarium.net/demo/&quot;&gt;Machinarium&lt;/a&gt;, aunque aún no he podido hacer que me funcione muy bien, tiene una pinta genial. También el &lt;a href=&quot;http://braid-game.com/&quot;&gt;Braid&lt;/a&gt;, o el &lt;a href=&quot;http://www.puppygames.net/revenge-of-the-titans/&quot;&gt;Revenge of The Titans&lt;/a&gt;, intentaré dar una opinión cuando los pruebe, por ahora de algunos sólo he visto el video.

También disponible como regalo, una buena oportunidad de comprar software de calidad y contribuir directamente con los desarrolladores de videojuegos y con algunas organizaciones no lucrativas, como &lt;a href=&quot;http://www.childsplaycharity.org/&quot;&gt;Child's Play&lt;/a&gt;.

En el video a continuación podréis ver una intro de los juegos.

&lt;object classid=&quot;clsid:d27cdb6e-ae6d-11cf-96b8-444553540000&quot; width=&quot;640&quot; height=&quot;390&quot; codebase=&quot;http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0&quot;&gt;&lt;param name=&quot;allowFullScreen&quot; value=&quot;true&quot; /&gt;&lt;param name=&quot;allowScriptAccess&quot; value=&quot;always&quot; /&gt;&lt;param name=&quot;src&quot; value=&quot;http://www.youtube.com/v/orzQ2J-oDpc&amp;amp;rel=0&amp;amp;hl=en_US&amp;amp;feature=player_embedded&amp;amp;version=3&quot; /&gt;&lt;param name=&quot;allowfullscreen&quot; value=&quot;true&quot; /&gt;&lt;embed type=&quot;application/x-shockwave-flash&quot; width=&quot;640&quot; height=&quot;390&quot; src=&quot;http://www.youtube.com/v/orzQ2J-oDpc&amp;amp;rel=0&amp;amp;hl=en_US&amp;amp;feature=player_embedded&amp;amp;version=3&quot; allowscriptaccess=&quot;always&quot; allowfullscreen=&quot;true&quot;&gt;&lt;/embed&gt;&lt;/object&gt;

&lt;strong&gt;¡Feliz Navidad!&lt;/strong&gt; :-)
</content>
 </entry>
 
 <entry>
   <title>Garry Kasparov, Como la vida imita al ajedrez</title>
   <author>javaguirre</author>
   <link href="http://javaguirre.net/2010/12/22/garry-kasparov-como-la-vida-imita-al-ajedrez"/>
   <updated>2010-12-22T00:00:00+01:00</updated>
   <id>http://javaguirre.net/2010/12/22/garry-kasparov-como-la-vida-imita-al-ajedrez</id>
   <content type="html">&lt;p&gt;&lt;a href=&quot;http://javaguirre.net/wp-content/uploads/2010/12/kasparov_libro.jpg&quot;&gt;&lt;img class=&quot;alignright size-medium wp-image-40&quot; title=&quot;kasparov_libro&quot; src=&quot;http://javaguirre.net/wp-content/uploads/2010/12/kasparov_libro-195x300.jpg&quot; alt=&quot;&quot; width=&quot;195&quot; height=&quot;300&quot; /&gt;&lt;/a&gt;Ya hace mucho tiempo que &lt;strong&gt;mi abuelo me enseñó&lt;/strong&gt; este &lt;em&gt;juego&lt;/em&gt;, pero hace apenas dos meses que me apasiona de verdad, y me sirve como alivio y diversión casi diaria. A través del ajedrez he adquirido nuevos puntos de vista y creo que he aprendido a ser más calculador y a limitar algunos de mis defectos.&lt;/p&gt;

&lt;p&gt;Puede parecer sorprendente, hablo como si de la panacea se tratase, pero lo cierto es que &lt;strong&gt;aparte de un juego y un arte, el ajedrez puede llegar a ser una interpolación de la realidad&lt;/strong&gt;, como muestra el campeón del mundo de ajedrez &lt;a href=&quot;http://en.wikipedia.org/wiki/Garry_Kasparov&quot;&gt;Garry Kasparov&lt;/a&gt; en su libro &lt;strong&gt;Cómo la vida imita al ajedrez&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Desde el punto de vista del ajedrez, y basándose tanto en su carrera ajedrecística como en su introducción en la política, nos cuenta cómo desde el punto de vista del juego, dibuja un entorno de la realidad, e igual que saca conclusiones delante del tablero muestra su punto de vista como si la vida  (y sobretodo los negocios) se tratase de una partida de ajedrez.&lt;/p&gt;

&lt;p&gt;También tiene tiempo para repasar su carrera y hablar de una colección de libros que está desarrollando sobre los grandes maestros del ajedrez, un mundo que personalmente me resulta fascinante, ya que cada uno de los grandes campeones, como en todo, eran excelentes jugadores, pero poniendo su personalidad y su sello a sus partidas y a su juego.&lt;/p&gt;

&lt;p&gt;Tengo que decir que esperaba con ansia leerme el libro una vez descubierto, y que me ha ayudado a tener un punto de vista diferente de las cosas, muy influenciado por mi reciente pasión por &lt;em&gt;el juego o arte del ajedrez&lt;/em&gt;.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Jugando con Websockets</title>
   <author>javaguirre</author>
   <link href="http://javaguirre.net/2010/12/18/jugando-con-websockets"/>
   <updated>2010-12-18T00:00:00+01:00</updated>
   <id>http://javaguirre.net/2010/12/18/jugando-con-websockets</id>
   <content type="html">&lt;p&gt;Los viernes son los días de &lt;strong&gt;Software Libre&lt;/strong&gt; en mi &lt;a href=&quot;http://ufocoders.com/&quot;&gt;actual&lt;/a&gt; &lt;a href=&quot;http://www.interdominios.com/&quot;&gt;empresa&lt;/a&gt;,  y llevaba un tiempo queriendo hacer algo más interesante y/o complejo.  El jueves que viene vamos a dar un conjunto de charlas y decidí realizar una sobre &lt;a href=&quot;http://es.wikipedia.org/wiki/WebSockets&quot;&gt;Websockets&lt;/a&gt;, una tecnología de &lt;a href=&quot;http://dev.w3.org/html5/websockets/&quot;&gt;HTML5&lt;/a&gt; para abrir conexiones persistentes &lt;strong&gt;bidireccionales&lt;/strong&gt; y &lt;strong&gt;full-dúplex&lt;/strong&gt; sobre un mismo socket TCP.&lt;/p&gt;

&lt;p&gt;Tras unos cuantos ensayos y errores conseguí hacer esto (&lt;a href=&quot;http://javaguirre.net/wp-content/uploads/2010/12/websockets.png&quot;&gt;imagen&lt;/a&gt; y &lt;a href=&quot;http://gitorious.org/mrcards&quot;&gt;código&lt;/a&gt;), y de paso ayudar a continuar(o comenzar) un proyecto de un amigo con el que siempre comparto mis &lt;em&gt;ideas, locas o no.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;a href=&quot;http://javaguirre.net/wp-content/uploads/2010/12/websockets.png&quot;&gt;&lt;img class=&quot;alignnone size-medium wp-image-31&quot; title=&quot;websockets&quot; src=&quot;http://javaguirre.net/wp-content/uploads/2010/12/websockets-300x135.png&quot; alt=&quot;&quot; width=&quot;300&quot; height=&quot;135&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/em&gt;

&lt;p&gt;La aplicación conecta a dos usuarios mediante un &lt;strong&gt;websocket&lt;/strong&gt;(habrá que meter &lt;em&gt;un websocket por usuario&lt;/em&gt; en un futuro) a un servidor, que muestra las cartas que van eligiendo sobre un grupo de cartas que aleatoriamente les han tocado.&lt;/p&gt;

&lt;p&gt;El código de la aplicación está en &lt;a href=&quot;http://gitorious.org/mrcards&quot;&gt;gitorious&lt;/a&gt;, es fácil de instalar &lt;a href=&quot;http://gitorious.org/mrcards/mrcards/blobs/master/README.txt&quot;&gt;&lt;strong&gt;leyendo el README&lt;/strong&gt;&lt;/a&gt;, se puede probar en &lt;strong&gt;Google Chrome&lt;/strong&gt;(también en Firefox, pero como aún no están implementados los &lt;em&gt;websockets&lt;/em&gt; en la versión 3,  en ésta no los usa).&lt;/p&gt;

&lt;p&gt;Al ser la primera versión y no tener tiempo (ni ganas) de refactorizar ayer para dejarlo más bonito, así se quedó, no esperéis un código bonito, aún. :-)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fuente&lt;/strong&gt;:  &lt;a href=&quot;http://maddemcode.com/web/websockets-and-pywebsocket-quick-dirty-playground/&quot;&gt;maddemcode.com&lt;/a&gt;&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Arcade Fire</title>
   <author>javaguirre</author>
   <link href="http://javaguirre.net/2010/12/16/arcade-fire"/>
   <updated>2010-12-16T00:00:00+01:00</updated>
   <id>http://javaguirre.net/2010/12/16/arcade-fire</id>
   <content type="html">&lt;p&gt;Recuerdo perfectamente que la primera vez que supe de &lt;a href=&quot;es.wikipedia.org/wiki/Arcade_Fire&quot;&gt;Arcade Fire&lt;/a&gt; aún me refugiaba en el &lt;em&gt;Harbour Bar&lt;/em&gt;, en la bahía de aquel pequeño pueblo a 40 minutos en tren de &lt;strong&gt;Dublín&lt;/strong&gt;, &lt;a href=&quot;en.wikipedia.org/wiki/Bray&quot;&gt;Bray&lt;/a&gt;. Las noches entre semana &lt;em&gt;enchufaban&lt;/em&gt; a la pantalla grande Youtube y ponían videos de grupos, y el nombre &lt;strong&gt;Arcade Fire&lt;/strong&gt; salía con asiduidad, sin embargo la acústica no era suficiente para que me quedase con ninguna de sus canciones ni para que entrasen en mi cabeza.&lt;/p&gt;

&lt;p&gt;Meses después, ya en Madrid, &lt;em&gt;de una u otra manera volvió a cruzarse en mi camino&lt;/em&gt;, y algún día de curro di una oportunidad a sus discos. Alguna de sus canciones recordaba haberlas escuchado en algún lugar, posiblemente en &lt;strong&gt;Irlanda&lt;/strong&gt;, donde estos grupos tienen más cabida y no se confunden tanto con la basura musical de los anuncios con los que las grandes marcas comerciales nos deleitan.&lt;/p&gt;

&lt;p&gt;No sabría calificar bien la múscia de Arcade Fire, en ocasiones es rock, en otras algo pausado que no logro reconocer entre mi escaso conocimiento de los géneros/movimientos musicales. Me empezó a gustar.&lt;/p&gt;

Canciones como &lt;em&gt;Intervention&lt;/em&gt;, &lt;em&gt;No Cars Go&lt;/em&gt;,  &lt;em&gt;Rebellion(Lies)&lt;/em&gt;, menos conocidas como &lt;em&gt;The Well and the Lighthouse&lt;/em&gt;, o &lt;em&gt;Black Wave-Bad Vibrations&lt;/em&gt;, con &lt;strong&gt;letras elaboradas&lt;/strong&gt;, cambios de ritmo sorprendentes y en mi opinión geniales en algunas de sus pistas, y un directo &lt;em&gt;artesanal y ruidoso&lt;/em&gt; que desgraciadamente me perdí en su visita a Madrid son algunas de esas características que me han hecho distraerme con su buena música.

Arcade Fire - Rebellion (Lies)

&lt;object classid=&quot;clsid:d27cdb6e-ae6d-11cf-96b8-444553540000&quot; width=&quot;640&quot; height=&quot;385&quot; codebase=&quot;http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0&quot;&gt;&lt;param name=&quot;allowFullScreen&quot; value=&quot;true&quot; /&gt;&lt;param name=&quot;allowscriptaccess&quot; value=&quot;always&quot; /&gt;&lt;param name=&quot;src&quot; value=&quot;http://www.youtube.com/v/v7GjucHCQ5Y?fs=1&amp;amp;hl=es_ES&quot; /&gt;&lt;param name=&quot;allowfullscreen&quot; value=&quot;true&quot; /&gt;&lt;embed type=&quot;application/x-shockwave-flash&quot; width=&quot;640&quot; height=&quot;385&quot; src=&quot;http://www.youtube.com/v/v7GjucHCQ5Y?fs=1&amp;amp;hl=es_ES&quot; allowscriptaccess=&quot;always&quot; allowfullscreen=&quot;true&quot;&gt;&lt;/embed&gt;&lt;/object&gt;
</content>
 </entry>
 
 <entry>
   <title>Barney Stinson juega un Angry Birds muy real</title>
   <author>javaguirre</author>
   <link href="http://javaguirre.net/2010/12/14/barney-stinson-juega-un-angry-birds-muy-real"/>
   <updated>2010-12-14T00:00:00+01:00</updated>
   <id>http://javaguirre.net/2010/12/14/barney-stinson-juega-un-angry-birds-muy-real</id>
   <content type="html">&lt;p&gt;Hoy me he encontrado con la noticia de que el videojuego &lt;a href=&quot;http://www.eurogamer.es/articles/2010-12-14-50-millones-de-descargas-para-angry-birds&quot;&gt;Angry Birds ha llegado a los 50 millones de descargas&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Mientras tanto, en los video &lt;strong&gt;Games Awards 2010&lt;/strong&gt;, el actor Neil Patrick Harris (&lt;em&gt;Barney Stinson en &lt;strong&gt;How I Met Your Mother&lt;/strong&gt;&lt;/em&gt;), jugaba una divertida partida de Angry Birds, &lt;em&gt;con cerdos y pollos de verdad&lt;/em&gt;, para no perdérselo. :-)&lt;/p&gt;

&lt;object classid=&quot;clsid:d27cdb6e-ae6d-11cf-96b8-444553540000&quot; width=&quot;640&quot; height=&quot;385&quot; codebase=&quot;http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0&quot;&gt;&lt;param name=&quot;allowFullScreen&quot; value=&quot;true&quot; /&gt;&lt;param name=&quot;allowscriptaccess&quot; value=&quot;always&quot; /&gt;&lt;param name=&quot;src&quot; value=&quot;http://www.youtube.com/v/qnQ2iwWicf8?fs=1&amp;amp;hl=es_ES&quot; /&gt;&lt;param name=&quot;allowfullscreen&quot; value=&quot;true&quot; /&gt;&lt;embed type=&quot;application/x-shockwave-flash&quot; width=&quot;640&quot; height=&quot;385&quot; src=&quot;http://www.youtube.com/v/qnQ2iwWicf8?fs=1&amp;amp;hl=es_ES&quot; allowscriptaccess=&quot;always&quot; allowfullscreen=&quot;true&quot;&gt;&lt;/embed&gt;&lt;/object&gt;
</content>
 </entry>
 
 <entry>
   <title>Discurso Mario Vargas Llosa, Nobel de Literatura 2010</title>
   <author>javaguirre</author>
   <link href="http://javaguirre.net/2010/12/13/discurso-mario-vargas-llosa-nobel-de-literatura-2010"/>
   <updated>2010-12-13T00:00:00+01:00</updated>
   <id>http://javaguirre.net/2010/12/13/discurso-mario-vargas-llosa-nobel-de-literatura-2010</id>
   <content type="html">&lt;p&gt;Hoy he tenido la oportunida de leer el &lt;a title=&quot;discuro vargas llosa&quot; href=&quot;http://www.milenio.com/node/595405&quot;&gt;discurso de Mario Vargas Llosa&lt;/a&gt; durante la entrega del &lt;strong&gt;Nobel de Literatura&lt;/strong&gt;. He de decir que no he podido parar de leerlo hasta el final, una lectura recomendable para aquéllos que amamos la buena literatura.&lt;/p&gt;

&lt;p&gt;En el discurso habla de sueños, de literatura, de influencias, de política, colorea todo el discurso con su punta de vista y finalmente expresa el amor que, desde pequeño, ha tenido a la literatura,  un todo con su suprema calidad narrativa.&lt;/p&gt;

&lt;p&gt;Nunca había tenido interés o no había llegado a tener conocimiento sobre estos discursos (los del &lt;em&gt;Nobel&lt;/em&gt;), y francamente ha sido para mí la lectura del día.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Primera entrada</title>
   <author>javaguirre</author>
   <link href="http://javaguirre.net/2010/12/12/primera-entrada"/>
   <updated>2010-12-12T00:00:00+01:00</updated>
   <id>http://javaguirre.net/2010/12/12/primera-entrada</id>
   <content type="html">Primera entrada del blog.
</content>
 </entry>
 
 
</feed>
