Wednesday, September 17, 2008

Confesiones poco significantes

Abro con este post un modesto capítulo que contiene confesiones de las que no estoy tan estoy orgulloso de estar orgulloso, pequeños detalles que podrían pasar por vergonzosos, si no fuera por lo adorables que son (?).

Sin más preámbulo, se va la primera: "Nombres de negocios palermianos"

Cuando digo palermianos no me refiero exclusivamente a la ubicación geográfica sino también a cierta creatividad, a veces un tanto falsa, que se asocia con los negocios nuevos que crecen por la zona de Palermo Soho.

Me resultan simpáticos y agradables los nombres de establecimientos como:

  • Cómo te extraño Clara.

  • Cómo quieres que te quiera?

  • De ti me gusta todo.

  • Froilán.


Claro que, después de ver varios parecidos pierde un poco la gracia, pero los sigo bancando igual. No sé me parecen más copados que muchos otros nombres que no me vienen a la mente ahora.

Eso.

Tuesday, September 16, 2008

Decisiones complejas y reflexión

Voy a ver si me sale plasmar acá un monólogo recurrente, que sale de tanto en tanto en mi vida, así que prepárense para algo largo y tedioso, and mates, remember to go to the loo.

Todo comienza, en general, con una visita al médico. Aquellos que me conocen saben que no soy de ir muy asíduamente, y siempre que voy se me plantea una misma duda existencial:

(I wish I had latex here...)
1) Existe A, tal que A pertencece a nuestra sociedad Y A es boludo.
2) Existe B, tal que B pertenece a nuestra sociedad Y B es médico.
Como verán, en el conjunto de permutaciones posibles y dado que no se forman conjuntos disjuntos, tenemos que A y B pueden ser iguales en muchos casos.

Entonces, llegás al médico y te encontrás con un tipo que no hace bien su trabajo, como uno no es médico no tiene herramientas para juzgarlo a priori, así que todo el conocimiento que podemos tener es siempre a posteriori. De todas maneras esto no tiene nada que ver con que no me guste ir al médico.

A qué viene todo esto? a que en la ecuación falta un gris que está dado justamente por la monotonía de las decisiones complejas.

Exhibit A:

Ayer tuve un día malo y las cosas no venían demasiado bien tampoco, así que luego del trabajo en vez de irme directo a casa me fui a dar unas vueltas en bici por ahí (nótese que voy a trabajar en bici). En total hice alredeor de 35 km. bastante intensivos, mucha velocidad, saltos y maniobras. Alrededor de la mitad del entrenamiento me comienza a molestar la rodilla derecha. Cuando llego a casa y se me enfrían las piernas el dolor en la rodilla se hace más intenso y la siento "rara", como que si no hiciera mucha fuerza con los músculos para mantenerla en su lugar, se iría para cualquier lado, efecto "flancito". Hoy me siguió molestando y decidí ir a que me saquen una radiografía porque ya me había pasado antes con la rodilla izquierda y resultó estar esguinzada, con el ligamento casi roto. Después del trabajo fui hasta el Sanatorio Mater Dei (amén) donde *no* me pude atender porque no encontré lugar para estacionar. Tenía que ir a Renault Minuto para cambiar el filtro de aire del auto así que después me crucé enfrente donde está el Sanatorio Güemes, maaaaaala decisión, es un pésimo lugar. Omitiendo el mal rato que me hicieron pasar los muchachos de seguridad por estar entrando una laptop al edificio, me atiende un traumatólogo que me dice "Qué te pasa?" con cara de pocos amigos, y se da la siguiente conversación muy poco amena:
Traumatólogo: Qué te pasa?
Juan: Me duele la rodilla, ayer hice un mal movimiento y ... (historia de lo sucedido con la bicicleta)
T: No debe ser nada.
J: Pero me duele, me podés sacar una placa?
T: No, la radiografía no te dice nada.
J: Ehm, sí dice, al menos así supieron qué tenía cuando me esguincé la rodilla izquierda.
T: A ver, sentate en la camilla. Ahí te duele?
J: No
T: Ahí te duele?
J: Si!!!
...
J: Sacame una placa.
T: No.
J: Firmame en algún lado que está todo bien.
T: Ok, te lo cargo en la ficha "Rodilla estable". Tomate un analgésico y listo.
J: Portazo.


Analicemos el caso, como bien dijimos antes el tipo puede ser un boludo, en cuyo caso encontramos la solución. Otra solución trivial posible es que el boludo sea yo, pidiendo algo que no tiene sentido, pero dado que ya me había pasado lo mismo antes, algo se sentido tiene.

Entonces? qué pasó? El médico tuvo que tomar una decisión compleja pero monótona, en la mayoría de los casos no pasa nada y la decisión tomada es buena. Si me tomo un analgésico y me quedo tranqui va a estar todo bien; aunque hay un par de variables que parecen habérsele escapado al muchacho, a saber:

1) Soy chueco y mi rodilla tiende a irse de lado a lado estirando los ligamentos en un movimiento antinatural.
2) Estaba pensando en volver a entrenar Kung Fu en el corto plazo.

Por lo tanto si mañana voy a un entrenamiento y a la mitad de la clase, con los músculos cansados tengo que hacer un salto, digamos, cayendo desde una altura de 30 cm (seamos buenos) con unos 80 kg acelerados a 10m/s2, todo sobre los ligamentos de mi pobre rodilla derecha, no cabe ninguna duda de que se rome feo.

Ahí el muchacho estaría en problemas, tal vez no tan graves debido a la justicia Argentina, pero problemas al fin.

Por qué no me sacó la placa? tal vez por política del sanatorio, recordemos que estuvo en quiebra hace algunos años y jamás logró recuperarse. Ahora, el tipo este arriesga su ética profesional por una placa de rayos X?

Como ejercicio, siempre extrapolo estos casos a mi vida, como para ver qué se siente. Si en mi trabajo cometo un error así pueden pasar dos cosas, que un colega lo note antes de que sea demasiado tarde o que alguien termine perdiendo plata. En el primer caso mi calidad como profesional se ve afectada, en el segundo no sólo eso sino que alguien va a estar muy enojado dependiendo la cantidad de dinero en juego. De este razonamiento sale mi conocida frase de frustación: "Pero flaco, te das cuenta de lo que estás haciendo?? A mi por menos que esto me despiden en mi trabajo!"

Dónde quedan la ética profesional, los valores y el amor propio cuando empezamos a descuidar decisiones complejas por el hecho mínimo de que sean monótonas?. Bueno, en general en el mismo lugar, por la falta de reflexión. Si uno no reflexiona la calidad de lo que uno hace baja sin notarlo. En el caso de los médicos esto se ve muy bien por el tremendo impacto de sus decisiones sobre la vida de la gente, ya que las necesidades que tratan son bastante básicas.

Cuando hago una entrevista de trabajo siempre valoro mucho la capacidad reflexiva, opinar sobre uno mismo, sus acciones y reacciones, una frase típica es "Contame algo que hayas hecho y te haya salido muy mal, cómo te diste cuenta, cómo lo arreglaste y por qué no te pasa más o te sigue pasando".

El boludo carece de capacidad reflexiva, aunque el recíproco no es verdadero. Muchas veces, y este es el gris que me preocupa, la gente pierde interés (o nunca lo tuvo) en lo que hace y eso no está bueno a nivel personal ni social.

Así que este post termina siendo un llamado al ejercicio de la reflexión diaria, sobre decisiones importantes, para nosotros y para otros. A mirar el mundo con otras lentes, pensar escenarios donde estamos en lo correcto y donde nos equivocamos y tratar de asociar esas simulaciones a lo que termina sucediendo en la realidad más objetiva que podamos conseguir.

Nadie es perfecto, y eso es genial porque significa que siempre podemos mejorar, pero no hay que ser un freak de la perfección para mantener siempre un nivel decente de calidad y ser felices con ello.

Seguiría un rato largo, pero me tengo que ir, se salvaron, por ahora.

Monday, September 8, 2008

More on theoretical physics coolness

Safari kicks ass, again

Sometimes, while at home, I really miss working so I bring work to home . So, this time was the turn of a cross-browser JavaScript madness, the problem manifests like this:

There's a grid, big one, in which each cell has 3 image/buttons, each image has 2 states and they are exclusive, as in Low, Med, Hi, get the picture? Well, when the grid gets big (my HTML file right now has about 20.000 lines) performance goes down a lot, that means that when a user clicks a button the state change takes a noticeable second to happen, in IE 6 and 7.


I didn't code that so I had no idea of what was causing the problem so I asked the guys working in that project to email me a static version of the page so that I had something to fill my evening with .

Besides the JavaScript in that page is painfully awful (I'm sorry guys, I had to say it) I managed to isolate the piece of code that was causing trouble. Many of you geeks might already be blaming some obscure for(;;) over every single element, or a diabolic recursion; well my friends this is not the case, or at least the for(;;) is not where you think it is, read on.

The offending code was merely a dozen of document.getElementById() calls. But wait, think about it, getElementById in 20.000 lines worth of elements, that's something we should handle more efficiently, well yes and no. Yes, you should narrow your element "universe" and work with subsets as much as you can, and also use CSS selectors to get your target. And No because the browser's engine could do us the favor of optimising it, can't it? That seems to be the case for Safari, whose performance is not affected *at all* by this experiment, and remains as snappy as always. Next in the podium is Firefox, whose performance degrades slightly, regarding the button state change, but fails terribly at the very beginning when it almost hangs up while loading the page. At the bottom of the podium (if any) there's IE6 which fails in every single aspect, and degrades much more with a much lesser number of elements.

Very well then, what have we learned with this? You have to code well, don't trust the browser's engine too much, Firefox is really good but it still has some issues and that IE6 sucks at rendering web pages and executing javascript code.

I just wanted to share my findings on this noble area of knowledge. Your comments are more than welcome.

Oh god, I really need a pint right now, make it a brown ale please.

Particle physics is getting cooler

If your senses have detected a sudden explosion of nerd activity, this might be the cause. The LHC is getting even closer to its operational status.

From the engineering point of view, all the magnets and most circuits must reach a superconducting state only possible at extremely low temperatures -2 kelvin and lower-. So that's the big news, the LHC is cold and almost ready for the first experiments which are expected to take place on 10th Sept., yay!

Why is this cool? Because it's the biggest and most important experiment(s) in the history of mankind, period.

If you've never heard about the LHC before I invite you to browse their fine website.

Saturday, September 6, 2008

1 carry-on item + 1 personal item + mum's scrambled eggs

Reading this post took me back in time a year and a half ago when I had to spend some time working in Glasgow, Scotland (aye mate, wundrful plaice).

I like to think of myself as an "easy traveler" because I kind of tend to get used to different cultures and usually enjoy the process, so when I read the above post my first thought was: "Well, some people just miss home sweet home, and some don't", but after a while I realised that is not the case at all, exhibit no. 1:

After a couple of weeks of living as a proper McPereyra in a flat in front of the Glasgow Park, every morning I tried to have a proper british breakfast, that is, if there was enough time: eggs, bacon, sausage and even some haggis, however, if I was running late -as was often the case, some habits will live with us forever- I used to buy a couple of donuts buns, or a scottish pie when I was feeling a bit more suicidal. Anyway, this might sound like a bit too much, or something you can't get used to but I did somehow. Most argentinians can't live without decent meat, mate and dulce de leche for long periods of time.

However, I went on vacation and my first destination was Paris, it was there where it happened: I actually got emotional when I got served for breakfast: (Proper)Coffee with milk, croissants, toasts, butter and marmalade, 'twas just like being at home.


So, even when I wasn't actually missing anything I really liked to have a little something from back home, in this case breakfast and ham and cheese sandwiches where tokens from home while being far, far away.

Coca-Cola® OpenSource

Coca-Cola® -or Coke® for some of you- has for long time been one of the most popular soft drinks out there and many have fantasised about beholding its might formula. Well, now you can at least have a glance at Coca-Cola's GPL version here. I found this while reading through my subscriptions so credit for the fine findings must go to this guy.

I'll probably continue buying my coke at the local market, or not buying it at all, but it's nice to know that you can go opensource with it too :D.

Thursday, September 4, 2008

Good boy, good boy...

Well, - as expected - Google came to its senses and retracted from their crazy EULA, that's it, here's the full story.

Wednesday, September 3, 2008

Don't cry you nerdy baby!

About my post about Chrome's license, don't cry! this is anything but new! that license applies to most Google applications, such as Gmail, GDocs and so on... so they've already done stuff to you and you liked it!

Chrome crappy license terms

Well, I'm almost forced to blog about this, it has been hitting hard every major geek source of news and every geek distribution list I know, Chrome's license agreement is pure crap, bullshit, crappy bullshit, that is.
 11. Content license from you

    11.1 You retain copyright and any other rights you already hold in Content which you submit, post or display on or through, the Services. By submitting, posting or displaying the content you give Google a perpetual, irrevocable, worldwide, royalty-free, and non-exclusive license to reproduce, adapt, modify, translate, publish, publicly perform, publicly display and distribute any Content which you submit, post or display on or through, the Services. This license is for the sole purpose of enabling Google to display, distribute and promote the Services and may be revoked for certain Services as defined in the Additional Terms of those Services.

    11.2 You agree that this license includes a right for Google to make such Content available to other companies, organizations or individuals with whom Google has relationships for the provision of syndicated services, and to use such Content in connection with the provision of those services.

    11.3 You understand that Google, in performing the required technical steps to provide the Services to our users, may (a) transmit or distribute your Content over various public networks and in various media; and (b) make such changes to your Content as are necessary to conform and adapt that Content to the technical requirements of connecting networks, devices, services or media. You agree that this license shall permit Google to take these actions.

    11.4 You confirm and warrant to Google that you have all the rights, power and authority necessary to grant the above license.


Another important thing to take into account is that, at least for me, Chrome - in its current shape doesn't mean anything, it is yet another browser in the sky so I don't give much about it; MAYBE in the future I'll have to eat my own words but, and this is the reason why I didn't write about this earlier, I don't see a need for Chrome right now.
The discussion on the license terms, if it's fair or not to ask for what they ask, can go on forever but it is certainly not illegal (some claim that it is).

Farewell EcmaScript 4, Adobe are you in deep pain?

According to this email from Brendan Eich the discussions on EcmaScript 4 are over, finalized, ended, dead, buried - you get the picture. Everyone will have to move on and continue to work on EcmaScript 3.1.

For those of you who haven't been following this soap opera here's a quick review: version 4 of the standard was mainly backed by Adobe who wanted to have a proper standard behind its product ActionScript, remember that the language is the main workhorse behind Flash, Flex and threrefore a wealth of derived products. 

But who cares about standards anyway? mostly everyone. Picture a world where TCP is not backed by RFC 793 and to browse the web you don't use HTTP but a protocol developed by, say, AT&T that might be open, well documented and whatever else, but there will never be an official consensus about its use. 

You might say, well there is no standard behind MS Word .doc file format for instance and you would be right, but here we are talking about mindblowingly massive stuff, and that's what Adobe was aiming for, remember the latest addition to the family, AIR that takes ActionScript programming out of the browser cage and into the world of desktop programming.

So now Adobe ended up with a language that's a bit compliant with EcmaScript 3, with some extensions - so it _does no comply_ - after all the effort...

Aaaaanyway, this was supposed to be merely an informative post, much more info about the background of the issue can be found in this blog.


Cuadradito, puntito, rayita, cuadradito, cuadradito

Están apareciendo en Buenos Aires carteles en blanco y negro con esta forma:



Pero se "olvidaron" de enseñarle a la gente cómo se usa. Claro, me van a decir que seguramente es una estrategia de marketing ya que apuntan a un mercado que conoce lo último en tecnología, etc, bla, bla. Para mi la pifiaron, es algo que _puede llegar_ a ser muy útil o puede denigrarse tanto como "mandá un sms al 666 con la palabra PONERLA y te mandamos una lista de chicas en tu zona después de responder una trivia de 223 preguntas".

Acá pueden ver un video promocional de ScanLife que más o menos te da una idea de qué se trata:



Para los más geekitos acá les va una implementación en J2ME http://sebastien-arbogast.com/2008/07/06/mobimap-10-rc2/

Tuesday, September 2, 2008

Cómo está tu mente?

La mia quemada, agotada, entrevistar me cansa más de lo normal y esto es un triatlón. Casualmente me crucé con un post que había leido hace mucho escrito por el director de la escuela de Kung Fu a la que solía ir. No es algo brillante ni extraordinario, pero que conviene tener en cuenta.

Me pasa mucho que después de algunas semanas de laburo muy intenso pierdo el scope de un montón de cosas y eso sólo se recupera con meditación. También pasa que tenés que tomar decisiones difíciles o resolver problemas complejos, pero antes uno no se plantea en qué estado tiene la cabeza, sería como correr una maratón de 42 km sin entrenar o estando exhausto.

Hay que evitar los "cierres mentales", hay que aprender a conocerse lo suficiente como para detectarlos y tomar acciones correctivas. Meditar no es fácil, de hecho es en general difícil, pero la meditación explícita no es la única forma de cuidar nuestra mente; muchos practican deportes, van a la iglesia, miran una peli, etc. Lo bueno es ser consciente de estas situaciones, de uno mismo y de los elementos que nos mueven.

Certified Blablabla

Como sabrán (o no) estoy corriendo el 42K de entrevistas en Córdoba y me encontré con algo curioso, hay mucha gente certificada. Todos los candidatos menos uno rindieron al menos una de las certificaciones que ofrece SUN para tecnologías relacionadas con Java(tm). Uno diría "qué bueno, grosos los cordobeses", uno me dijo que era porque tienen un centro de certificación acá, pero en BA también hay y relativamente muy pocos van. Otra cosa que uno podría inferir como causa es la competencia por conseguir trabajo, siendo que hay poca oferta, aunque dudo que ese sea el caso, hay tres empresas que podrían considerarse importantes: Motorola, EDS, Intel y en mucho menor medida Gameloft (ahora sumemos Globant). La oferta laborar el buena en general y las empresas compiten bastante por la gente. En fin, todavía no llegué a ninguna conclusión que me termine de cerrar, voy a seguir investigando las raíces de este certification madness.

Hack me babe! I implement Hackeable

Recién tuve que escupir un mail tratando de convencer a alguien de que _no use_ EJB, acá va:

Hi guys,

I'd like to take the conversation one step further and give you my opinion on "why I think we should go REST". Exchanging information online among apps is all about exchanging bits over a socket. The ways I've done this before are EJB, some sort of RPC implementation (i.e. spring rpc), WebServices (Axis) and simple custom HTTP calls. With the advent of "Web 2.0" completely different websites (apps) need to communicate with each other, besides screen scraping (for non-cooperative external apps), simple HTTP calls are great. Why should I have to implement a whole set of things just to get simple info from another app? As happens with EJB and WebServices (to a lesser extent), and that what happens with *ClientName* apps most of the time. Also, as we are using Javascript and JSON extensively we can leverage that knowledge to use JSON as a transport and not XML, which is waaaay better for these matters.

For the particular case Sofía mentions, a couple of cooperative servlets in each app would do for now. In the big picture, IHMO we should think in terms of exporting all the functionalities in, say *AppA*, as simple REST services that any other app can use with simple HTTP calls. We've already done this in a way with *AppB*, you can go an talk JSON to it through the Jabsorb bridge.

Well, this is a long email, we can discuss the topic further over the phone if you want.

Cheers,
Juan 


La idea que quiero transmitir en realidad, más allá de si se implementa REST, RPC o whatever, es la de hacer una aplicación hackeable o hacker friendly. Cuando estás codeando esa fina capa de aplicación/servicios está bueno pensar en cómo vas a proveer esos servicios a todo el resto del mundo, que nadie piense siquiera en hacerte screen scraping, un buen ejemplo son los WebServices de Amazon. La sigo en otro post porque ahí viene el próximo entrevistado.