Detect JDBC API Misusage with JDBCLint

I've recently seen an advertisement for JDBCLint on the H2 User Group. JDBCLint is an Apache licensed JDBC proxy implementation that does some plausibility checks on the lifecycles of your JDBC objects. For instance, it Checks if a ResultSet is closed twice Checks if a ResultSet is not closed at all (in the finalizer) Checks … Continue reading Detect JDBC API Misusage with JDBCLint

Using jOOQ with JAX-RS to Build a Simple License Server

In some use-cases, having a lean, single-tier server-side architecture is desireable. Typically, such architectures expose a RESTful API implementing client code and the UI using something like AngularJS. In Java, the standard API for RESTful applications is JAX-RS, which is part of JEE 7, along with a standard JSON implementation. But you can use JAX-RS … Continue reading Using jOOQ with JAX-RS to Build a Simple License Server

A Lesser-Known Java 8 Feature: Generalized Target-Type Inference

Going through the list of Java 8 features, Generalized Target-Type Inference struck me as a particularly interesting, lesser-known gem. It looks as though the Java language designers will ease some of the pain that we've been having with generics in the past (Java 5-7). Let's have a look at their example: class List<E> { static … Continue reading A Lesser-Known Java 8 Feature: Generalized Target-Type Inference

Using jOOQ With Groovy

Some people may be using jOOQ with Groovy for easy scripting. As with the existing jOOQ / Scala integration, some Groovy language features can be leveraged. Take the following example, for instance: package org.jooq.groovy import static org.jooq.impl.DSL.* import static org.jooq.groovy.example.h2.Tables.* import groovy.sql.Sql import org.jooq.* import org.jooq.impl.DSL sql = Sql.newInstance( 'jdbc:h2:~/scala-test', 'sa', '', 'org.h2.Driver') a = … Continue reading Using jOOQ With Groovy

Deep Stack Traces Can be a Sign for Good Code Quality

The term "leaky abstractions" has been around for a while. Coining it is most often attributed to Joel Spolsky, who wrote this often-cited article about it. I've now stumbled upon another interpretation of a leaky abstraction, measured by the depth of a stack trace: So, long stack traces are bad according to Geek & Poke. … Continue reading Deep Stack Traces Can be a Sign for Good Code Quality

On Friday Dec 13th 2013, Things *WILL* go Wrong

We're writing for @JavaAdvent, on Friday Dec, 13th 2013. Superstitious? We are and we'll give some fun and scary insights! Stay tuned and follow @JavaAdvent to be ready for an interesting, geeky Holidays season! See also posts from 2012.

How to Create a Range From 1 to 10 in SQL

How do you create a range from 1 to 10 in SQL? Have you ever thought about it? This is such an easy problem to solve in any imperative language, it's ridiculous. Take Java (or C, whatever) for instance: for (int i = 1; i <= 10; i++) System.out.println(i); This was easy, right? Things even … Continue reading How to Create a Range From 1 to 10 in SQL

Faster SQL Pagination with Keysets, Continued

A while ago, I have blogged about how to perform keyset pagination (some also call this the "seek method"). Keyset pagination is a very powerful technique to perform constant-time pagination also on very large result sets, where "classic" OFFSET pagination will inevitably get slow on large page numbers. Keyset pagination is most useful for lazy … Continue reading Faster SQL Pagination with Keysets, Continued

Where’s the Self-Confidence when Advertising Java 8, Oracle?

I have often wondered, why the team around Brian Goetz has been heading towards a “decent compromise” so strongly from the beginning, both from a marketing AND technical point of view, instead of adding more boldness to how Java 8 is advertised. At Devoxx Belgium 2013, Brian Goetz seems to have really sold his accomplishments … Continue reading Where’s the Self-Confidence when Advertising Java 8, Oracle?

The Spam Manifesto: Reactive Spamming, Big Spam, Spam Reduce

Dear Spammers, When blogging and interacting with our users on forums, dealing with your spam is part of our every day work. Our WordPress blog luckily uses Akismet, a comment spam prevention tool, which removes lots and lots of spam, such that our moderation efforts stay very low. Google Groups, on the other hand, uses Google's … Continue reading The Spam Manifesto: Reactive Spamming, Big Spam, Spam Reduce