Hack up a Simple JDBC ResultSet Cache Using jOOQ’s MockDataProvider

Some queries shouldn't hit the database all the time. When you query for master data (such as system settings, languages, translations, etc.), for instance, you may want to avoid sending the same silly query (and the results) over the wire all the time. For example: SELECT * FROM languages Most databases maintain buffer caches to … Continue reading Hack up a Simple JDBC ResultSet Cache Using jOOQ’s MockDataProvider

jOOQ vs. Hibernate: When to Choose Which

Hibernate has become a de-facto standard in the Java ecosystem, and after the fact, also an actual JavaEE standard implementation if standards matter to you, and if you put the JCP on the same level with ISO, ANSI, IEEE, etc. This article does not intended to discuss standards, but visions. Hibernate shares JPA's vision of … Continue reading jOOQ vs. Hibernate: When to Choose Which

One Year After Java 8’s Release, IDEs and Compilers are not Fully Ready Yet

One year ago, on March 18, 2014, Java SE 8 was released, and with it, the bliss of functional programming through lambda expressions and the streams API. These were great news for all of our Java ecosystem, and many people have already upgraded to Java 8. Stack Overflow already yields almost 2500 questions about Java … Continue reading One Year After Java 8’s Release, IDEs and Compilers are not Fully Ready Yet

The 10 Things Everyone does Wrong when Committing Pull Requests

So, you've found a nice Open Source project that has added great value to your own work and you want to give back. Before we move on, let me stress that this isn't anything personal. This article doesn't criticise anyone particular, and the ranty tone is just for your reading entertainment. I do not want … Continue reading The 10 Things Everyone does Wrong when Committing Pull Requests

10 Java Articles Everyone Must Read

One month ago, we've published a list of 10 SQL Articles Everyone Must Read. A list of articles that we believe would add exceptional value to our readers on the jOOQ blog. The jOOQ blog is a blog focusing on both Java and SQL, so it is only natural that today, one month later, we're … Continue reading 10 Java Articles Everyone Must Read

3 Reasons why It’s Okay to Stick with SQL

The past decade has been an extremely exciting one in all matters related to data. We have had: An ever increasing amount of data produced by social media (once called “Web 2.0”) An ever increasing amount of data produced by devices (a.k.a. the Internet of Things) An ever increasing amount of database vendors that explore … Continue reading 3 Reasons why It’s Okay to Stick with SQL

Integrating jOOQ with Grails Featuring the UWS-jOOQ Plugin

Introduction Grails is a web framework aimed to boost development productivity. One of the main features is domain centric database schema generation. Applications built with Grails are able to update existing schema just before they start. To do this, Grails is using built-in domain mappers or migrations in more advanced cases. The goal of the … Continue reading Integrating jOOQ with Grails Featuring the UWS-jOOQ Plugin

Yak Shaving is a Good Way to Improve an API

Yak Shaving (uncountable): (idiomatic) Any apparently useless activity which, by allowing you to overcome intermediate difficulties, allows you to solve a larger problem. (idiomatic) A less useful activity done to consciously or unconsciously procrastinate about a larger but more useful task. Both interpretations of the term Yak Shaving as explained by Wiktionary are absolutely accurate … Continue reading Yak Shaving is a Good Way to Improve an API

The Java Legacy is Constantly Growing

I've recently stumbled upon a very interesting caveat of the JDK APIs, the Class.getConstructors() method. Its method signature is this: Constructor<?>[] getConstructors() The interesting thing here is that Class.getConstructor(Class...) returns a Constructor<T>, with <T> being maintained: Constructor<T> getConstructor(Class<?>... parameterTypes) Why is there a difference, i.e. why doesn't the first method return Constructor<T>[]? Let's consider the … Continue reading The Java Legacy is Constantly Growing

Avoid Recursion in ConcurrentHashMap.computeIfAbsent()

Sometimes we give terrible advice. Like in that article about how to use Java 8 for a cached, functional approach to calculating fibonacci numbers. As Matthias, one of our readers, noticed in the comments, the proposed algorithm may just never halt. Consider the following program: public class Test { static Map<Integer, Integer> cache = new … Continue reading Avoid Recursion in ConcurrentHashMap.computeIfAbsent()