September 2008

You are currently browsing the monthly archive for September 2008.

Tú eras quien me miraba cuando yo te miraba,
a escondidas.

Túe eras quien me escuchaba cuando tú me hablabas,
coincidíamos.

Todo por los suelos por las prisas.

Espero que algún día me perdones.

Suena bien lo que es real.

La empatía es lo único que me hace sentirme diferente de un animal.
Sentir lo que tú sientes, no puedo aspirar a más.

Unos van y otros vienen,
cada idea tiene su turno,
su oportunidad;
aprovecha ahora que está sola,
qué tienes tú de especial,
sin chispa, sin sal, todo igual.

¿Cuántas veces dije nunca?

Tags: ,

Last week I started a project using Relational Databases for Zassh.com.

At first, I tried to construct the SQL queries myself using string joins, tuples and so but soon I realized the problems using this method:

  • It’s error-prone.
  • Highly vulnerable to SQL injection attacks.
  • Computers write SQL better than humans.
  • It made me remember my suffering PHP days.

So I decided to try a library I heard a lot of good things about. SQLAlchemy is a pythonic high-performance SQL toolkit and Object Relational Mapper (ORM).

The result couldn’t be better. Instead of fighting against query-strings and tuples, it lets you write SQL magic directly in Python. I discovered I can do calculations using SQL queries I’ve never have thought before, like counting the number of goals a team has scored through two simultaneous joins and a bunch of filters.

If you have to work with Python and SQL, I definitely recommend you to use SQLAlchemy and forget about old error-prone methods. I’m sure you won’t be disappointed.

Tags: , ,