Thursday, December 24, 2009

Reflections towards an ethic for software development

I find it very valuable to think about the philosophical implications of what we do. Even though I would not define myself primarily as a software developer, I have been working as one for quite some time now. Recently, I started thinking about the implications that the moral teachings of Kant would have on software development.
The next posts will summarize the main aspects that interest me about the subject of ethics in software development. My main questions are:
1. What is the moral (ethical) implication of design? Does it make a difference whether one designs well or not (provided the end-result is, in both cases, a working system)? What, if any, is the moral or ethical worth of design?
2. Are we free when we are working for a corporation? Is there a possibility of freedom within the contraints of the enterprise?
3. What does it mean to design well? Ethically, what can be considered 'good design'?
Since these are philosophical questions, I can only promise to attempt to provide my position, but, of course, no definitive answers. I will sacrifice some academic rigour in favor of publishing my ideas somewhat faster. I don't claim to own the truth, I'll just make my attempt at writing my version of it :-)

Monday, December 21, 2009

Passacaglia

En el fondo, saber que algo de eso es mio, que en verdad me pertenece, es quizas lo mas importante.

Los guardianes defienden algo asi como un castillo, pero no entendamos su acepcion un poco estilizada, sino mas bien como una defensa absoluta, completamente infranqueable, pero a su vez clasica

para llegar al centro, tan sutil de una belleza que ni siquiera hubiera podido ser sospechada, de una paz, una paz absoluta, insinua ese tema, tal vez el tema al final lo fastidia, tal vez lo hace infeliz, pero en ese momento lo logra interpretar como si fuera el canto de angeles, disculpen la cursileria y mira, y ve nevar por la ventana

desata su fuerza contra todos aquellos que no sirven para nada. Tambien es cierto que sus posibilidades de ataque pueden parecer risibles, pero, si tenes oidos, si tenes alma, pone atencion a como te esta liquidando, que despues de esto no queda nada de vos, pero cuando digo nada me refiero a nada.

Liquidame, eliminame, pero que sea con estos acordes

Perdon. Perdon. Perdon.

Wednesday, December 16, 2009

Is performance the main concern when choosing an ORM tool?

After yet another discussion in the office about ORM, and why it is a waste of time doing DALs manually, I was assigned the task of benchmarking Hibernate’s performance against using stored procedures (SP) and prepared statements. While I was looking for data out there, as well as trying to imagine what test case I could implement that would be representative, I did some reading and thinking about the assignment itself. If you think about what Hibernate has to offer, it is clear that measuring its performance advantages requires real-world problems and situations that are hard to invent just for benchmarking. Features such as lazy loading, caching, etc., are really hard to simulate in a lab experiment, as many variables must be taken into account (of course not the least of them is how the system will actually be used).

The question then arised: how important is performance when choosing an ORM tool?

Let me first state that I have experience with Hibernate, and that in this case the decision would be whether to use an ORM tool (NHibernate) or just do everything manually. It is not about choosing among ORM tools.

I like to take decisions based on data. Having worked (and still working frecuently) as a Business Analyst I think the data is fundamental to decide whether some feature is worth it or not. But when it comes to ORM tools, are numbers really that defining a factor?

What has happened to design? If I was to choose just one thing that I liked about Hibernate it would certainly be how naturally it is incorporated into the programming language. I think they call it idiomatic persistence. Being able to design your business domain using only one idiomatic paradigm, namely object-oriented design, is a great thing. It greatly reduces the effort to keep everything up-to-date as well as the time you need in order to have your application working.

I have always thought that, if you design something right, then you will have at least decent performance to start with. Another important aspect about performance: let the bottlenecks show themselves before fixing them! I’d rather have a stable and functioning system at the end of a development sprint with passable performance, that an incomplete system with very efficient algorithms that doesn’t work from the end-users’s perspective.

But coming back to Hibernate and performance: there are many optimizations that Hibernate performs “out of the box” which are not trivial to implement. I recommend that you read the Hibernate's Performance Q&A, but let me quote the highlights:

  • Caching objects.
  • Executing SQL statements later, when needed.
  • Never updating unmodified objects.
  • Efficient Collection Handling.
  • Rolling two updates into one.
  • Updating only the modified columns.
  • Outer join fetching.
  • Lazy collection initialization.
  • Lazy object initialization.

Of course, one could argue, we need numbers to prove that these optimizations are worth something. But it is difficult –if not impossible- to prove how much of a performance gain you would get e.g. by caching objects in a non-productive setting. It is much easier to understand it when you have the application running, and then you switch to using caching on your actual workload. Optimizations are generally very specific to the environment that you are writing your software for, meaning that benchmark data may not always apply to your situation. Quoting from the same QA mentioned above:

The first category of benchmarks are trivial micro benchmarks. Hibernate of course will have an overhead in simple scenarios (loading 50.000 objects and doing nothing else is considered trivial) compared to JDBC. (…) these numbers are meaningless for real application performance and scalability.

I have to agree with that statement. What good is it to prove that Hibernate is slower than SPs retrieving objects from the database in a trivial scenario? This kind of performance is not the one I am looking for when designing a DAL, as the development cost of manually assembling all objects, relationships, etc. generally speaking exceeds the small performance penalty that you incur by using an ORM tool.

The services that Hibernate provides go way beyond loading and storing objects in the database. It is not just what you do (since in the end of course a lot of CRUD operations will, of course, occur) but how it is accomplished. I’d like to see a benchmark about development effort, using Hibernate and doing the DAL manually. That would be interesting. Or benchmarking design, code readability, and maintainability. Those seemingly intangible things that, in the end, actually make the software work rightly.

The reason to choose an ORM tool over manually implementing the DAL is not primary performance, but design. The ability to write clearer code and make it more understandable, and resembling more closely the business domain can out weight small performance penalties. Hibernate does offers important optimizations out-of-the-box and generally performs very well, if used correctly.

Monday, November 16, 2009

Recuerdos de lo que nunca pasó

Ya pasó, eso es definitivo. Es inalcanzable, un lugar que nunca existió, pero que ya pasó al mismo tiempo. Y ahelarlo, sensación exasperante de impotencia.

Ahora lo sé, que cuando lo pienso existe. Que cuando escucho esta música y lo siento en realidad está pasando.

Sobre todo: que si me voy anhelaré volver porque estaba más cerca y que si me quedo desearé haberme ido porque lo olvido.

¿Y todo con tal de no saber del presente? Porque a veces pienso que tal vez en 1980... A veces pienso que tal vez en otro ambiente.

Entonces puede ocurrir que me acerco. Y lo odio. Y aún así, de afuera, todo parece tan deseable siempre.

The grass is always greener on the other side.

Y tal vez, con el paso del tiempo, he hecho mi propia historia, mis propia vida parecida a mis recuerdos de lo que nunca pasó. Llevo años escuchando Caifanes, su música vive en mi cuando la escucho y aún así yo no soy quien sueño en esas fantasías de lo que nunca pasó.

Aunque creo que sí pasó.

Me duele tanto sentirme así. No puedo hacer mucho ahora, pero me duele mucho. Y aún así es el dolor que me gusta. El que me hace vivir.

¿En el pasado que nunca ocurrió?

No. En la promesa. En la promesa de vibrar así. Tan solo otra vez más. Porque nunca es suficiente. La promesa de amar de nuevo bajo ese cielo, de descubrirla de nuevo, encarnada en otra, claro, pero ella, la mítica, que siempre se me escapa.

Igual que la vida que quiero tener.

Y esa promesa, de amar así, de contemplarte, desnuda, en la cama, de conocer tu cuarto, de descubrir esa candela que te regalé en tu mesa de noche, de no cesar de encontrar esos pequeños detalles que te hacen mía. De esos lugares. De esa forma tan inocente de enamorarse. Y sí, de que seas tan bella también. Sí, es esto lo que me hará regresar aquí, no importa cuanto tiempo pase ni donde esté.

Wednesday, September 2, 2009

Microrrelato: Ida y vuelta

Recorría los mismos lugares, día tras día. Conocía la combinación perfecta de techos de zinc herrumbrados, lluvia, y esa música que imaginaba que le daban la sensación de profunda felicidad juvenil. Y claro, pensar en ella. Mandarle un mensaje. Anticipar su respuesta. Y esperar el tren.

Pasos perdidos, sabía. Regresaba de una jornada de más de lo mismo. No va a ninguna parte. No cambia. Tampoco tiene sentido. Pero en la corporación todo parece justificado de alguna forma.

Es cierto, no le faltaba nada. Pero se sentía completamente carente de una energía vital, de algo que le hiciera vibrar. Sí, esos techos. Sí, esa lluvia. El sueño de tenerla a ella. El sueño de estar en otro lugar, también con techos herrumbrados, pero donde esa música que le gustaba sonaba todo el día.

¿A quién podía pedirle de regreso todos esos días? ¿Todas esas jornadas cuando solo esperaba que fuera la hora de salir? Entendía su situación privilegiada: no le tocaba vivir bajo esos techos. Aún así, reclamaba fieramente todo este tiempo, energía, toda esta vida que se le había arrancado.

Tal vez sino supiera que moriría… que el tiempo perdido nunca regresa.

Se enojaba más cuanto más pensaba que todo era su decisión. Una decisión camuflada de obligación, de deber, inclusive, de mérito.

Al final del día sólo podía alegrarse de no vivir él bajo un techo de zinc herrumbrado también, a la vera de la vía del tren. Aún así amaba profundamente esos techos, esas lluvias, esas chicas despreocupadas sentadas en las casitas. Así como amaba imaginarlas en sus brazos. En ese instante, y solo por un momento, vivía. Aunque él estuviera en el tren y toda la vida, aufera, mojándose con la lluvia, como los techos herrumbrados.

zapatos a tu zapatero

...entonces pensé, desde el abismo del aburrimiento profundo, que tal vez eran mis zapatos quienes llevaban la peor parte del día? Andar, andar, andar, siempre dejando un poco de sí en cada paso, y ni siquiera poder decidir ni cuánto de sí dejan atrás ni si ese desgaste tiene sentido. Se me ocurre como una triste metáfora de mi propio andar, cada día, a lugares inútiles que toman demasiado de mi y me devuelven tan poco. Y aunque que sé que lo decido, todo está estructurado de modo que parece una obligación, qué dios nos ayude, parece incluso algo meritorio.

Al menos mis zapatos podrían tener la ilusión de que, si no caminaran, si se quedaran en casa, si los metieran en una cámara cerrada, vivirían para siempre. Yo no. Para mi el tiempo pasa, no importa qué, y nunca puedo volver atrás. Para mi desgracia y para mi dicha.

¿A quién le reclaman mis zapatos tantos pasos perdidos, llegando a ninguna parte? ¿Y a quién le reclamo yo todos estos meses, sí, quizás, años, de andar y andar, ir y volver y no llegar nunca... a tus brazos?

Sunday, August 30, 2009

reto a (la) muerte

...y todavía a esta hora, poder escribir, pensar, volver sobre lo mismo, planear y decidir sobre ese futuro como si fuera cierto. Definitivamente me encuentro frente a un reto, no a, sino a la muerte... me vencerás, pero por hoy y tal vez por mañana tampoco, no me importa...

bueno, y si tiene que constar, entonces ella es más importante. Sí, más importante que todo, porque me hace sentir en la playa en SJ así que no me importa que logre o no, siempre y cuando pueda probar la dulzura de su mirada tan solo una vez más...

Friday, July 10, 2009

1980 B&W

Si viajo es para dejarme cambiar. Rindiéndose a la experiencia se hace vida... Y luego uno ve atrás. Y sí, se ve un poco como 1980...

Monday, March 30, 2009

Triste destino

El destino más triste del ser humano es dejar de ser animal, domeñando lo que entonces se llamaría pulsión y dejando atrás el instinto, únicamente para volver en su contra los resultados de aplicar su recién ganada "voluntad". En otras palabras: dejar de ser animal sólo para ser infeliz.

Wednesday, March 11, 2009

Españoles en París

Me siento a comer algo en un café, en el aeropuerto. Lucho con el francés para darme a entender de alguna manera. Aún así, me estafan.

Veo entrar una pareja. La mesera los recibe diciendo "Bonjour", y ellos, sin dejarla terminar, responden a viva voz: "Somos españoles y hablamos español."

Life itself in "Redemption song"

The power it has, it's just astonishing. A single voice, backed up by a guitar; one would never suspect that it could be so mighty. In a way, it is as mighty as the higher man being praised by the music. Or is it praising life itself?

One should not fall into the temptation of excessive exegesis.

"Redemption song", as performed by Bob Marley & The Wailers (BMW) at the Stanley Theater in Pittsburgh, PA on 09/23/80: it is an epitome of the year 1980. It is the most mature BMW possible, showing what would be the latest of their musical styles.

The Pittsburgh show was, in my view, an appendix to the Uprising tour. It couldn't be the same because the group had to face a harsh reality: Bob' life was in danger. In a way that is very difficult to imagine with a different outcome than death.

Musically, there are elements in the style of the lead guitars as well as the rhythm sections (the newly introduced electronic drums) that had been present since the beginning of the American leg of the tour. But I think it is far more pronounced in the Madison Square Gardens and Pittsburgh shows. I imagine it like being kind of a forced evolution: it would probably be your last chance to play new stuff.

I wonder in how far the interpretation of "Forever loving Jah" in NYC in 1980 was influeced by that factor.

Back to the song, in its latest interpretation it had three very clear phases. During the first one Bob sings while playing on his acoustic guitar. This performance is given with such candor, it is very impressing. The voice seems more powerful than ever, with a very different and hard-to-define energy (1). Seeco would join him later on, with a brotherly accompainement.

The second phase is when Bob is singing along the drums. This is the best performance of that second phase. His strength is amazing, so many feelings can be passed on by this music! This time he goes into the third phase (when the band enters) on tune (2).

This second phase is probably the most spiritual one. Bob is shouting his message on the one song he probably liked the most (3).

The last phase, with the band entering, is no less interesting than the previous ones. First of all, Bob is perfectly on tune when this parts starts. It really shows the evolution of the Wailers' sound of what would have probably been the style for the next album (4), and would have had probably influenced (although at a less rapid pace) the rest of the American tour that year. More American? I think so. But not for that less roots.

"Redemption song" summarizes important aspects about the band at that time. It also shows an evolution forced by Bob's diagnose with cancer. It is, without a doubt, the most interesting song of the Pittsburgh show.

---------------------------------------------------------------------------------------------------------
(1) For an example where he lacks of energy, you can listen to the Desside 1980 "Redemption song". He seems very tired there.
(2) An opposite example of this would be the "Redemption song" in Dortmund, 1980.
(3) Given that he played it many times at the interviews in the Essex House hotel. It is to be noted that it was absent from the MSG shows in NYC.
(4) Listen to the "Confrontation demos". The drumbox style goes heavily in that '80-like vibe.

Probabilidades

A veces uno se pregunta ya no, si existe una vida después de la muerte, sino más bien por las probabilidades. ¿Qué sería más probable? ¿Que nuestras vidas tengan un sentido último, y éste, por acción de fuerzas innombrables, se transmitiera más allá de nuestra existencia? ¿O será, más bien, que es nuestro contacto con los otros, de cualquier manera, que los impulsa a seguir con aquello que defendimos? En una forma u otra, se entiende, o si no la vida sería una inútil replicación de cromosomas sin posibilidad de mutaciones.

Es más probable que esa fuerza innombrable seamos nosotros. En ese caso, es una suerte tenernos. Por mientras vivamos... y más allá.

Wednesday, January 28, 2009

Reader's guide

...or what the hell is this all about?

Nothing in particular. I just think that there could be some things that other people might be interested in, so I decided to start this blog. If you're expecting a focused one-topic blog, you'll be very disappointed. I will write about very different topics that have only one thing in common: they make up my life.

For starters, I expect to be writing a lot about Bob Marley. This, of course, does not mean that you won't find posts about software development, or music, or haute cuisine or psychoanalysis. There is just so much to say sometimes!

I appreciate your taking the time to read any of my posts. Please feel free to stop by and comment or contact me. Above all, I hope that you enjoy reading through this blog!

Fred

Bob Marley at the Madison Square Garden '80

You will hear me talk about Bob Marley's shows at the MSG in 1980 a lot. And this is because I think these shows hold quite some relevance within the context of the Uprising tour.

When talking about the Uprising tour -Bob's last tour- one cannot separate the music from Bob's illness. During this tour, Bob's deteriorating health is more apparent with each show. This is not to mean that the shows have a lower quality because of this. In fact, the Uprising tour -and album- are by far my favorite work by Bob Marley and the Wailers. The music reaches a stage of maturity that is amazing. And it is quite different from the albums that were published in the previous years.

During the European leg of the Uprising tour, Bob's health was declining rapidly. Understanding this evolution is also understanding an important part of his work -not lastly because of the sacrifice he is offering by performing despite his condition. This sacrifice can be seen as martyrdom, as an act performed for the sake of him delivering his message. It gives a strong background to the values that Bob was singing about: he means it, because he offered his own life for his cause. "I like suffering, if it is for the right cause", he once said in an interview. In this regard, Bob Marley presents himself as a savior and a sufferer, not too different from Jesus Christ.

To understand more about Bob's health decline and how he dealt with it during 1980 is as important as understanding his final months in Germany at Issels clinic. Why? Because his decision to go ahead with the tour and try to ignore his condition is materialized in those shows. Look at the Dortmund video, for instance, to see him struggling with his own pain and keep on singing. The Uprising tour is his personal sacrifice, and a sacrifice that must not have been without a conflict: While he was under strong pain and disconfort, he had to deal with new plans and an exciting future. For instance, only shortly before collapsing in Central Park, he said in an interview that they would be touring until December that year. Plans were set for a tour with Inner Circle in 1981. Quite a contrast, if you think about it.

What fascinates me about the Madison Square Garden '80 shows is the fact that they are such a strong turning point. Both, musically and personally for Bob, these shows mark the end of the Uprising tour.

It has been proposed by Freud and others that an illness often has an unconscious background. In other words, it is a way through which unconscious feelings, otherwise repressed, return in the form of a physical symptom. Even if the unconscious is not the cause for an illness, the physical symptoms quite often have an unconscious background.

Having said that, why would Bob Marley collapse after the second night at the Madison Square Garden? And I don't mean why he would collapse, because that is clear. I mean why exactly then? After months touring Europe in exhaustingly tight schedules, why would this happen until September?

I want to propose that not only the physical aspect played a role in this. Contrary to denying the importance of having a brain tumor, I want to add another aspect to the equation: Bob's desire to go on until (at least) this point. Let's take a look at some clues about this.

It is well known that when Bob was singing, he would seem to improvise lyrics that had an actual "private" meaning. One famous example happens during "Jamming" in the "One love" peace concert in 1978. After a guitar solo, Bob shouts "watch what you're doing", words that were actually addressing the guitar player who had just hit the wrong note.

Now, in the second night at the MSG in 1980, at the end of "Crazy baldheads", Bob sings (almost whispering)
Don't feel it

Gotta feel good now
These sad words give us some hardly gained insight into what Bob was feeling at the time. It seems to me like he is resisting, during the whole European leg of the tour. Resisting through the first dates of the US leg of the tour. See the interview he gives together with Tyrone Downie the night of the Boston show, Bob seems devastated. But he resists, until the MSG shows are over. And then he collapses in Central Park.

The point I want to make is, that given his health condition this could have probably happened way before. The fact that it didn't demonstrates that these shows were very important for Bob, because he chose to give them.

Musically, these shows also mark a departure from the European leg of the tour. The electronic drums used in Jamming and Exodus were introduced in this show. The sound was getting more and more americanized. Also: they played "Forever loving Jah" during the first night at the MSG, a song never played during another show of tour (at least that we would know about ;-P ).

Did Bob know what was about to happen? Nobody will ever know. I think that he did not imagine the extend that it would have. Having survived an assassination attempt, and the operation of his melanoma in 1977, his illness was probably something he thought he would be able to survive.

The MSG shows are Bob's last Uprising tour shows and the Pittsburgh show is an epilogue. After the cancer diagnosis there was a reality that had to be faced with however means he had for that. Before that it was just the tour. Within the tour these shows have a great importance, shown by the fact that Bob gave those even in his critical condition. This has a great impact on the music and also in the significance that these shows have.