How to Design a Good, Regular API

People have strong opinions on how to design a good API. Consequently, there are lots of pages and books in the web, explaining how to do it. This article will focus on a particular aspect of good APIs: Regularity. Regularity is what happens when you follow the "Principle of Least Astonishment". This principle holds true … Continue reading How to Design a Good, Regular API

Inadvertent Recursion Protection with Java ThreadLocals

Now here's a little trick for those of you hacking around with third-party tools, trying to extend them without fully understanding them (yet!). Assume the following situation: You want to extend a library that exposes a hierarchical data model (let's assume you want to extend Apache Jackrabbit) That library internally checks access rights before accessing … Continue reading Inadvertent Recursion Protection with Java ThreadLocals

Java Streams Preview vs .Net LINQ

I've started following this very promising blog by the "Geeks From Paradise". Apart from the fact that I'm a bit envious of geeks living in Costa Rica, this comparison of the upcoming Java 8 Streams API with various of .NET's LINQ API capabilities is a very interesting read. A preview of what you'll find there … Continue reading Java Streams Preview vs .Net LINQ

Will Java add LINQ to EL 3.0 in JSR-341?

This fact has somehow slipped by me unnoticed so far: As the JSR-341 websites claim, Java is going to add full .NET-Style LINQ support to its expression language 3.0! While the JSR-341 website doesn't explicitly mention these feature additions to the expression language, a lot of details can be seen here: This is very … Continue reading Will Java add LINQ to EL 3.0 in JSR-341?

Java Collections API Quirks

So we tend to think we've seen it all, when it comes to the Java Collections API. We know our ways around Lists, Sets, Maps, Iterables, Iterators. We're ready for Java 8's Collections API enhancements. But then, every once in a while, we stumble upon one of these weird quirks that originate from the depths … Continue reading Java Collections API Quirks

Hibernate, and Querying 50k Records. Too Much?

An interesting read, showing that Hibernate can quickly get to its limits when it comes to querying 50k records - a relatively small number of records for a sophisticated database: Of course, Hibernate can generally deal with such situations, but you have to start tuning Hibernate, digging into its more advanced features. Makes one … Continue reading Hibernate, and Querying 50k Records. Too Much?

JUnit’s Evolving Structure

This is an interesting read: It's an analysis about how JUnit gradually and organically evolved into a heavily entangled set of inter-dependent modules

How to Behave on Mailing Lists

I recently stumbled upon the following document: It's a useful list of rules, ideas about how to behave on open source mailing lists. Of course, these rules include both committers and users ;-)