9.19.2011

End of the holiday

Yesterday was the last day of the long September weekend. I had a really good time with my family. I visited my grandparents, too. Me and my girlfriend celebrated our third year together. I feel very happy.

Moreover, I enjoyed reading the first chapter of Lovász's, et al "Discrete Mathematics". I'm almost done with the first chapter and I think I have understood and learned a lot of things. It is surprising the way they explain counting and how each thing connects beautifully with the next; starting with a simple story of a geek party and, 20 pages later, ending with properties of the binomial coefficients. I can tell there's no way to avoid learning something and being amused as well. I can't wait to start with the second chapter but first I'll finish the complementary exercises of this one. 

I had good rest, too. I slept really well this four days. I needed a short vacation like this and I'll need a lot of energy tomorrow. There are a lot of things to do: finish the spec review, prepare some slides about how we are addressing the challenges with the libraries we are using, and start with the database seminar. I think I'll need to use the Pomodoro Technique so I can have more control of my time. I'll need every minute I have.

Good night.

9.16.2011

Some years later

The last post I wrote here was two years ago. Some things have changed since but almost everything stays the same. I still wear long hair and a beard. I'm still overweight (a lot more, damn it!). I still love rock music. I'm still addicted to video games (damn, you Fallout!). I still love black clothes (but I don't use them that much in the steamy hot weather of Guadalajara). I still lack good social skills and tend to be quiet all day long just listening to music with my headphones.

But what changed or happened in these two years? Let's start: I graduated from ITESM CEM with a major in Computer Engineering and a (lame ass) minor in Software Engineering. I live now in Guadalajara with my girlfriend Gaby and work for the world's biggest database company. I write Java, Perl, and Flex code for a living. I am now learning to play the bass and trying not to injure my fingers.

There are two thing I want to do with the same effort and passion as before, though: Learning and trying. Between the last semester of college and my first year of graduation I stopped caring about myself for a little. Depression? I don't know, I am no psychologist. Maybe that's why I gained more weight, too. Whatever the reason, I am ready to push harder and start again. I feel much more certain of what I need to do and what I can accomplish. I just need to be more disciplined. 

I enjoy learning. A lot. In less than two weeks I read the first chapter of Patterson-Hennessy's "Computer Organization and Design", and had a lot of fun with the first two chapters of "Gödel, Escher, Bach". I also started reading a Probability Theory book. I am also planning to start a weekly seminar on database implementation at the office. There are a lot of things that I want to do and I'd like to find the time, energy, and patience necessary. 

Let's see how things go. I wish myself good luck!

5.24.2009

Dándole a Lisp

Bueno... últimamente, y después de programar un rato en Haskell, retomé los dialectos basados en Lisp y me dí cuenta que Lisp puede ser mejorado. En concreto, la característica que más me gustó de Haskell es la forma en que manipula las funciones. Si bien en ambos lenguajes son objetos de primera clase, Haskell desde mi perspectiva lo hace mejor. El uso intensivo de funciones de orden mayor como map y fold en lugar de escoger iteración o recursión, la composición de funciones, aplicación parcial implícita de funciones (o curried functions en inglés), etc., son las características que más puedo resaltar.

En particular, intento incluír en mi estilo de programación en Lisp a map y fold así como la aplicación parcial implícita; ésta última dándome más problemas dado que ningún dialecto principal de Lisp la maneja automáticamente. Si bien hay algunas macros que ayudan a realizar algo parecido, el tener un dialecto que las maneje desde el principio sin que el programador tenga que modificar algo en su Lisp, sería muy cómodo.

Lo anterior me estimuló a pensar cómo incluír dichas facilidades en el dialecto que programé hace tiempo. Necesitaré un poco más de tiempo para encontrar cómo hacerlo pero estoy seguro que es posible. Mientras tanto... estaré repasando (y haciendo por fin los ejercicios) de los varios libros de Lisp que he querido leer y no he terminado: On Lisp y Practical Common Lisp.

11.26.2008

Desde el día de hoy soy "orgullosamente" SCJP 6.0

10.29.2008

¡Oh, la humanidad!

Por ahí dicen que P != NP. ¿Será eso cierto?

10.16.2008

Cerraduras

No, accidental lector, este post no tiene nada que ver con aquellos dispositivos mecánicos que sirven para cerrar puertas o similares. No. Para variar esto tiene que ver con temas de programación. Advertido está usted. Siga leyendo si la curiosidad lo corroe.

Estudiando para el examen de SCJP he llegado al tema de Clases Internas. Haré a un lado mis típicos comentarios de cuánto y por qué pienso que Java es un lenguaje muy mal diseñado y sólo comentaré que la existencia de las cerraduras léxicas me ha hecho la vida muy fácil en los distintos lenguajes que las tienen y he utilizado (Lisp, Erlang, Haskell) y que la inexistencia de las mismas en Java me hará la vida muy difícil.

Como soy un programador funcional creí que la existencia de las clases internas en Java era para tener "cierto tipo" de cerradura léxica. Pues bien, creí mal. Hasta la versión 1.6 no existen y no parece que las vayan a tener pronto o que, para variar, las implementen de una manera limpia (lo cual se me hace cómico y trágico al mismo tiempo ya que las cerraduras ayudan a crear código más limpio). Las clases internas no sirven para emular cerraduras. Punto. Memorízalo, Iván.

Me pregunto por qué es que los desarrolladores de Java no las logran implementar aún. Cuando yo programé mi intérprete de SALSA! (un lenguaje estilo Scheme) me costó trabajo tener cerraduras verdaderas, ya que las que tenía parecían ser cerraduras pero lo único que hacían era buscar el símbolo en el siguiente scope. Al final logré implementarlas haciendo varios cambios a las tablas de símbolos y la forma en la que éstas funcionaban pero lo logré. ¿Qué impide a los desarrolladores de Java tener cerraduras? No creo que sea algo como "un simple bug" como el que mi intérprete tenía, deben ser cosas más profundas que de seguro tocan puntos medulares en el diseño del lenguaje. Al menos esa es mi idea ya que ha pasado mucho tiempo como para que no las tengan.

Por ahí escuché que C# tiene una forma de cerraduras que hacen llamar delegates (amo esa consistencia en Microsoft de inventar términos para llamar a cosas que pretenden ser otras que no llegan a serlo). Si es que los delegates están bien programados o si al menos mantienen en cierta forma el poder de las cerraduras reales, harán a C# un lenguaje digno de ser aprendido y hasta, tal vez, usado.

Me pregunto si los demás lenguajes de ultima generación que no son funcionales y más o menos conozco (Python, PHP, Ruby) las tendrán implementadas y cómo. Empecé a buscar en Google los términos "python closures" y "ruby closures" (aún falta que busque para PHP) y encontré algunas ligas que estaré revisando y tal vez haga un post acerca de las mismas.

Ligas para Ruby:
http://www.artima.com/intv/ruby.html
http://www.artima.com/intv/tuesday.html
http://www.artima.com/intv/closures.html

Ligas para Python:
http://mail.python.org/pipermail/python-list/2004-July/270951.html
http://ivan.truemesh.com/archives/000392.html

Liga para Java:
http://gafter.blogspot.com/2007/01/definition-of-closures.html

10.07.2008

Interesante...

Una era de avances en una sola liga