Archive for April 10th, 2006

Verbal Inflation Costs Real Money

It is easy to tell stories to ourselves and to others that exaggerate, bend, or even outright break the truth. Especially when we are under stress, especially when we are in a hurry, especially when we feel let down.

“They always drag their heels on things like this” is not the same as “They try very hard to make sure that everything goes through a review loop.” But both are stories told to me about the exact same event.

Lately I’ve caught myself telling the first story by emotional reflex rather than thinking my way through to the second, and because we are all under a lot of pressure recently, I’ve seen others doing the same thing.

Luckily enough, an article about this showed up on my desk the very day I needed it

Really? Is That True?
We’re all well acquainted with financial inflation: a fall in the value of money over time. But there’s another type of inflation that’s far less understood, much more common and infinitely more harmful. It’s verbal inflation: people’s tendency to use speech that exaggerates the size—or impact, frequency, or emotional nature—of situations and events, making them far sound worse than they are. And it’s another situation where slowing down usually provides the answer.

Python Database Projects Arise!

I just saw a post on bringing SQLAlchemy and Zope Transaction Manager together, now that’s good stuff.

I’m looking forward to having time to look into both of these projects soon. It seems like projects at work and TurboGears in general could certainly benefit from the combination of a good general purpose Transaction Manager, and a good ORM based on the Data Mapper pattern.

All this got me thinking about Python’s Database connectivity story. Yes, SQLObject and the Active Record pattern is easier to use than SQLAlchemy and the Data Mapper pattern. But, it is also true that Active Record is just a subset of Data Mapper where there is a 1 to 1 mapping between objects and table rows. So it should be fairly easy to implement an active record type interface on top of a good Data Mapper.

Then you get all the ease of use of Active Record, and only a small step up in complexity gives you all the power of Data Mapper. You can use both patterns in the same application, and choose the level of abstraction you need.

There are two projects working on this, Active Mapper, and Pocoo’s DatabaseApi. This is one place where Python is on the edge of greatness. SQLAlchemy is way easier to use and than Hibernate, and is already almost as powerful. Moreover, I don’t know of anything like it in Perl, Ruby, or even Smalltalk.

Stay tuned. The revolution will be televised.