Tuesday, September 30, 2008

API-based queries

I'm a big fan of API-based queries. Even though I really appreciate query languages (e.g. SQL), the impedance mismatch of using them inside your favorite programming language is too high, even more when you're dealing with dynamically generated queries. So much string manipulation is really error-prone.

So I really like approaches such as Lucene's or Hibernate Criteria API. However, API-based approaches are normally low-priority (above all when dealing with SQL), so standards like JPA doesn't even have such an API and in Hibernate it is far more limiting than HQL, and issues like this are real showstoppers.

Update: typo

Sunday, September 7, 2008

Types and Programming Languages

Putting my money where my mouth is, in my last order to amazon (dollar is still cheap) I got Pierce's Types and Programming Languages, after having it in my wish list for a long time.

I expect it to be a long read, as it is pretty long and dense. In any case, even though it is quite academical, I'm sure it'll be eye-opening. Stay tuned.

Refactoring lucis...

These days I've been spending a little time refactoring lucis. In these early stages of development, the public API is being continuosly changing, as I look for better ways to provide the intended service.

Through this process, I've faced what I think is one of the most difficult problems in computer science: naming things.

In this case, there are some classes that deserve names already used by Lucene (Query, Searcher, etc.), and many source files (from users of lucis) may reference both Lucene's and Lucis' classes. Even though this is not a problem, I don't like fully-qualified names, so I've had some thesaurus time :)