Wednesday, November 12, 2008


Hay dos o tres situaciones que siempre me asustaron. No sé si puedo nombrarlas una a una, pero sí al menos a la primera.

Algo a lo que siempre tuve una especie de miedo y respeto es una de esas cosas que pasan muy de vez en cuando. 

Sólo se siente en la tranquilidad del anochecer, cuando todavía hay claridad pese a que ya se haya puesto el sol. 

Es cuando en los oidos se percibe el perturbante y adormecedor sonido del silencio, y se escucha a la brisa revolviendo los dos mechoncitos de pelo tras los oidos.

Y los dedos de las manos, apenas arqueados, descansando.

Es ver a esa misma brisa formar mareas verdes en el suelo, creando olas de hierbas sacudidas por el viento

Es todo eso.

Pero en realidad es mucho más.

Supongo que ese mucho más es lo que un poco asusta pero también lo que lo hace interesante.

Supongo que ese mucho más hace que cada verano me desespere por volver a asustarme.

Será por eso mismo que cada vera vuelvo a las montañas buscando ese silencio.
(A la foto la saqué de acá)

Tuesday, November 04, 2008

Se nos murió un manzano en las manos

Hace más de un año con la Juli compramos un terreno en Villa Rivera Indarte, lugar que elegimos para vivir. Estaba lleno de árboles frutales en la parte de adelante. Disfrutamos de sus manzanas, peras, ciruelas y duraznos. Las naranjas y mandarinas son muy secas o chiquititas como para decir que las disfrutamos, pero igual hicimos mermeladas.

Estamos prontos a empezar la obra de construcción de nuestra casita y la verdad es que siempre supimos que tendríamos que sacar varios de estos árboles. Pero una cosa es saberlo, y otra cosa es efectivamente hacerlo.

Empecé por un duraznito chiquito, apenas un poco más alto que una silla. Hice un pozo grande, un metro de diámetro más o menos, y fue saliendo. Después, lo llevé tranquilo al fondo donde lo esperaba un pozo recién hecho. Lo plantamos y regamos.

Y después le tocó al manzano. Este era más grande, un tronco de más o menos 20 centímetros en la base, y como 4 metros de alto. Por alguna estúpida razón siempre creí que podríamos transplantarlo. Por más estúpidas aún razones nunca hicimos todas las averiguaciones pertinentes para saber cuándo y cómo hacerlo de la mejor forma posible. Y así fue que llegamos a tener que empezar a preparar el terreno para la obra, y encontrarnos con el lindo manzano ahí.

Estúpido aún, seguía pensando que era cuestión de hacer un pozo grande para sacarlo.

Muy grande fue el pozo, tan grande como la decepción al ver que las raíces principales eran en su mayoría horizontales, y que no habría pozo capaz de sacarlas enteras. Después de varias horas de trabajo terminó saliendo, mal herido, sin raíces, desangrando savia y tierra por sus pies.
Recién entonces me di cuenta de que me había estado mintiendo.

Y con el árbol acostado sobre el piso, me senté, y acaricié su tronco ya en el suelo, y mientras le pedía perdón con una mano, lloré agarrando a la Juli con la otra. Acaricié su tronco, suave y gris. Recorrí las heridas en su piel, pasadas y curadas y miré las que acababa de provocar. No me quedó más que volver a pedirle disculpas.

Me pregunto cuantos tendrémos que plantar para olvidarme de este.

Que bueno, ahora después de escribir este post soy un tipo sensible, en vez del reverendo hijo de p*** que mató a tan lindo árbol.
Que bueno, después de la ironía sobre el lavado de culpas, ya me siento más libre
Que bueno, etc, etc, etc.

Monday, August 18, 2008 0.1 release

That's right, I tagged the work done so far in what we can name the first release of this nice product.

In case you are interested on it, here it is:

End of Summer

Don't scare, your summer is not ending yet. Don't scare, my winter here neither. The thing is that the Google Summer of Code period is finishing in about 10 hs, and last 2 weeks I worked hard adding and cleaning things.

A summary of the work done in the last 2 weeks can be summarized with the change log comments, which are:

  • Added, fixed and improved tests and documentation.
  • Minor imports fixes (and dependences changes) for working with 0.5
  • BeautifulSoup dependence added, for making functional tests easier.
  • Fixed bug in editor: if unmarking object checkbox, now is excluded from the process (wasn't happening this).
  • utilities (datetimes functions and makeBatchEditableField) added to
  • Fixed ATValidation error class for displaying the message of the archetype validation error.
  • BatchDataManager added, which adapts content and IBatchField fields. This cleans the code of the BatchEditor adapter.
  • Dummy Lines field created, for handling different situations with archetypes Lines fields. So far, is only a Text field.
  • Reference field added, which uses first version of AccessibleWidget.
  • Accessible widget added: multiselect widget with javascript improvements, but also functional for non javascript browsers.
  • Images and Files now can be uploaded with batch editor.
  • In AT2Z3Field, removing dependences, preparating the ground for making it a separated package.
  • AT2Z3Field tries to grab a vocabulary for the z3field from the objects that is trying to adapt.
  • Added TitledVocabulary (taken from PloneGetPaid), for easy creation of titled vocabularies.

refresh.txt now is plone.reload

Note: they are not the same thing, It's just the title of my post.

About 3 years ago, when I started to develope with plone/zope there was a nasty trick for speeding up development that consisted on putting an empty file named exactly "refresh.txt" in the root of your product. That way, each time you modified the code of your product, you were not pushed to restart your zope instance: you had to navigate thru an intricated path until you reach your product, and from there clicking on a magic refresh button saved us, reloading our code.

Sometimes, the code in your product was importing another modules, and then refresh were not able to reload things entirely, and there were some other oddities that I don't remember right now.

Anyway, that process worked fine for a while. But later things started to be more and more complex, until at some point the refresh thing ended been completely obsolete and non useful at all.

With the advent of Five and zcml configuration files, and probably many other new pieces on zope, refresh was wounded death.

Mourning and grief... I wored black clothes for a couple of weeks, but, slowly, I started back my normal life.

There I was when last week Anthony, who abandoned Plone development for a couple of years, asked me about our old friend refresh.txt... I started to carefully choose the words, trying to not hurt him with the terrible news, when I though "Hey, there must be some replacement out there".

I was doing a fruitless search when Matthew Wilkes introduced me the newest kid on the block: plone.reload. It simply works, and there is no need to explicitly tell it what to reload, and it is also able to reload zcml configurations!. What a joy.

Unfortunately, there are some issues on the product yet, but it's actively developed, and regardless those things, it's very useful.

- What issues did you find?

- Only this one: Does not work if you touch code in a class method that calls super. The thing is simple: the module is reloaded, so, when calling super, an internal isinstance call fail.

Accessible Multi Select Widget

While using plone.z3cform (a plone wrapper for z3c.form lib) I felt a bit frustrated when I could not find a multi select widget that were functional for a non javascript browser.

Yes, I know what you may want to say, that in the current century we web developers should not worry any more for non javascript browsers, but I think we do have to.

According to this stats (w3schools, and the counter) is about 5% of the users, and although this number is decreasing, I think that is still a considerably portion.

So, what I did is a widget that consist of a set of 3 html select fields. The actual
one (the one with the name that the form action will use) is the one that is viewed by default in a non javascript browser, and is something like in the first screen shoot.

If you have javascript enabled, the widget append a function to the onload event of the window, and then the default basic view is hidden, and shown a nicer one instead, like the one in the second shot. And each time the user do things on the nicer widget, that selection/de-selection action is reflected in the actual hidden select input.

Where is the code of the widget? So far, is inside my product, but if anyone thinks may be useful we can incorporate it on a more generic package.

On this same aspect, I would like to do similar kind of things with other widgets, and I open to hear suggestions.


Are you a sports fan but you have to work instead of been watching the olympic games?

Would you like to be notified each time someone earns a medal, without needing to have a browser opened?

Well, more or less that was my situation, and that's why I dediced to create Olim.pyc. Unfortunately, during these days I was finishing (or at least working hard on it) my GSoC project, so I made a very rough version of what could be a much nicer program.

What does Olim.pyc do? This is an screen-shot of it:

It consults the official Olympic games site and refresh it's internal database. Each time some country increase it's medals counter, you will be warned. If you want to consult how the medals ranking is, just clicking on the Olim.pyc systray icon will open a summary like this one:

Wanna make a try? You'll need a linux box, with BeautifulSoup and libnotify installed. It's done in Python, of course, but there is no decent linux on earth without a Python installed.

You can download an alpha release here (don't expect a real release never).

Disclaimer: I could not make libnotify to use a certain font, and the formatting options it provides are too small for creating a decent table, so don't be surprised if you find yourself having an ugly layout.
I'll be glad of you want to help me to improve my fast and nasty code.

Of course, it's GPL.

Thursday, July 31, 2008


Last week I had unexpected complications trying to polish translations. Some things like content type names were almost a battle. I finished having to write my own widgets for displaying translated content type names using portal_types.getTypeInfo.

I preferred my own widgets for multi-selects also cause I did not find any of the default ones not needing javascript to function properly. Did I miss something?

Later I realized that the set up form I made about a month ago was not based on plone.z3cform but in formlib, so my new widget wasn't able to work there. I could create another widget (a formlib one) but instead I preferred to unify the code, and use plone.z3cform only, so I re wrote that form.
In that re-writting I seriously improved the way that data is managed, using an IDataManager provider instead of silly formlib handlers. I'm happy with that. Things looks much more clear now :)
Surprises not ended there. The template I had for the setup page wasn't working with a plone.z3cform.

For the selector page I also had to create a textwidget for Content types names translated.

With all those changes, I created a complete spanish translation that is now in the code.

I'm a little ashamed, but the work mentioned above consumed most of the last days work time. Anyways, I feel that the quality of the things re-done is higher. I'm feeling more comfortable every day with how development is going.

The other tiny thing I did was a more serious testing of the functionalities with 3rd party content types.

Warning: I made some tiny changes in the installation profile. Re install or you will find some broken links.

Take a look how is working with Martin Aspeli Optilux Cinema content types:

The last thing I have to tell you is that I'm preparing a talk for showing development inside the Google Summer of Code program for 8th Jornadas Regionales de Software Libre. Is one of the biggest (if not the biggest) south American free software event, and this year will be in Buenos Aires, Argentina. I hope to be giving the talk with the GSoC t-shirt :). Wish me luck.

Tuesday, July 22, 2008

Spanish Translation

Last week wasn't the most productive on the SoC, but I produced some new stuff.
Anyway, I'm doing 2-3 night hrs sessions this week days for recovering lost time.

What new things I have to report:
  • Started Spanish translation. Not finished because the code and templates are still changing, but most of the work was in the setup things for allowing translations, than in the translation it self. I can use any other language translation help: Portuguese, French, Italian, Dutch, etc, etc, etc. Contact me in case you can.
  • batch search form simplification again, taking off the ugly template based previous one, creating a plone.z3cform one.
  • Tested the product to see how it behaves with non default Content Types. I played with Martin Aspeli optilude.cinemacontent contents. Working fine so far.
In case you are checking out new stuff, you will have to wait until next post, because I did not check in last work yet.

Here, how it looks like in spanish, and as you can see there are several details that need to be translated yet (like Content type' names)

Monday, July 14, 2008

Batch error handling

I enjoyed last weekend in my father's cottage in Los Reartes, coding, and coding. I didn't have internet connection in the town, but I enjoyed the productivity.

I submitted my survey Wednesday, had a short except morning work from home, and took the bus to the hills.

I worked basically on improving the validation and error handling of batch editions.
The work was put on:
  • at2z3field adapter: now behaves more close to the ATField it's adapting: Datetime, Int, Float, Decimal, Bool, Object, Text zope schema field used when appropiate, Textline otherwise.
  • Archetype fields validation run when validating the field for batch-editing.
  • When some error on validation occured, a form only displaying errors is presented to user, letting him know that the other objects will be also edited when fixing the errors.
Sounds like a short thing, but took me lot of hours, mainly the first one, given and I could not find which interface Archetype fields are providing.

Monday, July 07, 2008

Reaching the first half

So, we arrived to the end of the first code period, and I think that more or less we have a good job done. During this week my mentor and I have to complete some forms and surveys... bureaucratic stuff that is part of the summer of code program. I do not enjoy doing that kind of things, but I understand why are those needed, so I'll do that without complaining :).

About what happened last week, I couldn't put the amount of hours I was wanting to, but anyways I could solve a couple of things.

First, I created some installation instructions for making easier to have people with time and energy testing Here the instructions are!

Second, we had the first issue created :). Thanks Matthew Wilkes for issuing it. I think I already fixed it, so I committed the patch and added it as resolved.

Third, I finally added a good more real set of tests to the product.

Fourth, I started to work on the error handling as we talked last week with Alex.
I have now the back-end behaving as we decided (i.e: if any error, no change is made). Now I have to work on the user interface Alex suggested. Shouldn't be hard, I just have to sit down and do some functional tests and templates work.

Fifth, Alex and I started the talk last Friday about what things expect to have implemented for the first version of, and what things postpone. We could not finish that talk, but we are on that. I own him an email yet.

I feel that I can't make a weekly post without including some screen shot, so, here it is: