The good API design

I've stumbled upon a nice checklist wrapping up API design guidelines. An extract: Favor placing API and implementation into separate packages Favor placing APIs into high-level packages and implementation into lower-level packages Consider breaking up large APIs into several packages Consider putting API and implementation packages into separate Java archives Avoid (minimize) internal dependencies on … Continue reading The good API design

Let’s revise the SQL FROM clause

Intuitive SQL SQL is extremely simple and yet at times, tricky. Most SQL developers have an intuitive (as opposed to formal) understanding of how the language works, for two reasons: It is designed "intuitively", like a natural language. Maybe that keeps us from studying it more formally The formal language specification is not really freely … Continue reading Let’s revise the SQL FROM clause

The Java Fluent API Designer Crash Course

Ever since Martin Fowler's talks about fluent interfaces, people have started chaining methods all over the place, creating fluent API's (or DSLs) for every possible use case. In principle, almost every type of DSL can be mapped to Java. Let's have a look at how this can be done DSL rules DSLs (Domain Specific Languages) … Continue reading The Java Fluent API Designer Crash Course

Cut down 90% on RDBMS costs switching from Oracle to EnterpriseDB

Now that's an interesting story. Most Oracle users and customers will know that Oracle is not one of the most supportive suppliers when you don't have the money. And by "the money", I mean lots of money. It is a huge, and feature-rich database after all, but so is Postgres. There is a lot of … Continue reading Cut down 90% on RDBMS costs switching from Oracle to EnterpriseDB

A neater way to use reflection in Java

Reflection in Java really feels awkward. The java.lang.reflect API is very powerful and complete, and in that sense also very verbose. Unlike in most scripting languages, there is no convenient way to access methods and fields dynamically using reflection. By convenient, I mean things like this // PHP $method = 'my_method'; $field = 'my_field'; // … Continue reading A neater way to use reflection in Java

A Brief, Incomplete, and Mostly Wrong History of Programming Languages

Found a fun read on the net, recently ;-) http://james-iry.blogspot.com/2009/05/brief-incomplete-and-mostly-wrong.html

SQL in Scala, where jOOQ could go

I have recently blogged about how simple it is to integrate jOOQ into Scala. See the full blog post here: https://blog.jooq.org/the-ultimate-sql-dsl-jooq-in-scala/ I'm more and more thrilled by that option, as Scala is one of the fastest emerging JVM languages nowadays. The plain integration of a Java library in Scala leaves some open questions. jOOQ knows … Continue reading SQL in Scala, where jOOQ could go

Java 8 virtual extension methods

I've been following the evolution of the Java 8 Lambda expressions project for a while now, and I'm really thrilled by its current state of progress. The latest "easy-to-understand" presentation I've found is this one: http://blogs.oracle.com/briangoetz/resource/devoxx-lang-lib-vm-co-evol.pdf Now, as an API designer, I'm particularly interested in the concept of virtual extension methods and I was wondering … Continue reading Java 8 virtual extension methods

The ultimate SQL-DSL: jOOQ in Scala

I've recently come across some advertising for the new upcoming version of Scala IDE for Eclipse, which made me remember my college programming lessons at the EPFL Laboratoire des Méthodes de Programmation (LAMP), the origin of the Scala language. Back then, Scala appeared quite freaky. Very elegant, a bit inefficient, somewhat dogmatic. It was much … Continue reading The ultimate SQL-DSL: jOOQ in Scala

Subtle SQL differences: Constraint names

The various SQL product vendors implement subtle differences in the way they interpret SQL. In this case, I've been examining the reuse of constraint names within a schema / database (which is yet another story: what's a schema, what's a database?). Here's the summary: Constraint names are unique within a schema Derby H2 HSQLDB Ingres … Continue reading Subtle SQL differences: Constraint names