|
September 8, 2007 8:42 pm
My friend Anup sent me this link. It’s an interesting case study on Kerala, the state in India where I was fortunate to be born and brought up.
An excerpt:
Kerala does not tell us precisely how to remake the world. But it does shake up our sense of what’s obvious, and it offers a pair of messages to the First World. One is that sharing works. Redistribution has made Kerala a decent place to live, even without much economic growth. The second and even more important lesson is that some of our fears about simpler living are unjustified. It is not a choice between suburban America and dying at 35, between agribusiness and starvation, between 150 channels of television and ignorance. It is a subversive reality, that stagnant/stable economy that serves its people well, and in some ways it is a scary one. Kerala implies that there is a point where rich and poor might meet and share a decent life, and surely it offers new data for a critical question of our age: How much is enough?
Categories: Economics, Kerala
No Comments »
I’m now in Charleston, South Carolina. Charleston is a beautiful city with a lot of historical attractions. Generally pre-civil war era buildings are rare in the Southern United States. I assume it was because of the punitive march by the winning Union Army – Atlanta was burned to the ground by Gen. Sherman; but somehow Charleston and Savannah were spared.
The climate is a bit hot and humid this time of the year because of the proximity to the ocean. The old architecture, outdoor cafés and the cobblestoned streets give Charleston the look and feel of a European city. Strongly recommended especially if you’re in the southern U.S.

Francis Marion Hotel – Downtown Charleston (I stayed there.)

A horse-drawn carriage along Meeting Street


Historic homes in Charleston – the above one looks very similar to the houses you usually see in San Francisco.

The last building is interesting – it was damaged in the earthquake of 1886 and was salvaged using long iron rods for reinforcement. The iron rods were run through walls and anchored with an iron plate which is the black colored circular disks you see just above the window.
Categories: Travel, USA
1 Comment »
Went to Boston this weekend. We went to this farm for blueberry picking.



The fruits of my labor.
Categories: Travel, USA
1 Comment »
I’ve been using Google Bookmarks for a while and was missing a few features which were important to me – sharing, public feeds etc to name a few. I wanted to move my bookmarks to del.cio.us, so I wrote this Python script to do the job.
It’s a command-line program you can run from your desktop. It will grab your Google bookmarks as an RSS feed, which is parsed and posted to del.icio.us through their REST interface.
The code lives here.
Categories: Hacks, Python
3 Comments »
Of late I’ve been playing with iBATIS persistence framework. iBATIS is a query mapper – it lets you map SQL queries to POJOs (Plain Old Java Objects). The SQL queries and mappings are externalized in XML files.
This is my initial evaluation of the framework. Most of the points are not specific to the framework – it’s more of a comparison between a full-blown O/R mapping and query mapping.
The Good
- Simpler – Smaller learning curve when compared to full-blown O/R mappers.
- Unlike O/R mapping, your data model does not have to match the object model because there is an additional layer of indirection (that is the SQL) between the classes and the tables. You can manipulate the query to match the object model without changing the underlying table structure.
- Full power of SQL is in your hands. This means you can introduce multiple tables or results from stored procedures easily. (which is pretty cool.) Also since you’re writing the SQL by hand, there is more scope for optimization because you can use your DBMS-specific features like query hints, hierarchical queries etc.
The Bad
- You still have to write the SQL. (But then you already knew that.)
- Has no notion of parent-child relationship. One of the great things about Hibernate is the automagic updation/deletion of child records during changes to the parent record. For instance, if you’re deleting an Order record, you may want to delete all the order items. In iBATIS, you will have to manage the relationship yourselves.
- Unit testing will be harder. Automated unit tests should be self-contained – they should not be dependent on external databases or application containers. This is where HSQLDB comes handy. I heavily use HSQLDB and Hibernate’s schema-generation tool for unit testing the persistence layer. With iBATIS, this will not be possible unless you ensure that the SQL you write is not specific to an RDBMS. This could be very hard.
When not to use a SQL Mapper
- When you have full control over data model and object model – it may be a better idea to go for a full blown O/R M like Hibernate.
- When the application needs a lot of dynamic queries – it may be better to stick with JDBC or write your own framework.
Categories: Java
No Comments »
I just now installed Emacs 22 in my new laptop. There are many new cool features I am excited about.
Emacs 22 is still under development, so I expected a few stability issues. But I’ve been running it continuously over the weekend with a few dozen buffers and so far it has not crashed on me.
I’m yet to try my 2000 line-long .emacs (and a ton of elisp libraries it is dependent on) on Emacs 22. Hope all goes well.
Update: Almost everything worked out of the box except JDEE. Problem solved by upgrading to the latest JDEE version.
Categories: Programming, Tools
No Comments »
|
|