So, you've been working with Java since the very beginning? Remember the days when it was called "Oak", when OO was still a hot topic, when C++ folks thought that Java had no chance, when Applets were still a thing? I bet that you didn't know at least half of the following things. Let's start … Continue reading 10 Things You Didn’t Know About Java
At Data Geekery, we love Java. And as we're really into jOOQ's fluent API and query DSL, we're absolutely thrilled about what Java 8 will bring to our ecosystem. Java 8 Friday Every Friday, we're showing you a couple of nice new tutorial-style Java 8 features, which take advantage of lambda expressions, extension methods, and … Continue reading Java 8 Friday: API Designers, be Careful
Java 7 has eased some pain in the area of exception handling when the new try-with-resources and multi-catch syntaxes were introduced. The latter is very interesting from a syntax perspective because it is the only place in Java where formal union types are allowed, similar to what Ceylon offers. Remember, a union type A | … Continue reading Feature Request for the JLS: Auto-Rethrow
What does one do when Hibernate is "finished" and feature complete and one needs new challenges? Right. One creates a new JVM language called Ceylon. On November 12, 2013, Ceylon 1.0.0 was finally released and we congratulate the whole team at Red Hat for their achievements in what looks like a very promising new JVM … Continue reading Top 10 Ceylon Language Features I Wish We Had In Java
What do you think that the following code snippet will print? Object o = true ? new Integer(1) : new Double(2.0); System.out.println(o); Yes! It will print: 1.0 What? 1.0? But I have assigned an Integer to my o variable. Why does it print 1.0? It turns out that there is a subtle little specification section … Continue reading Java Auto-Unboxing Gotcha. Beware!
Overloading methods is a strong concept in API design, especially when your API is a fluent API or DSL (Domain Specific Language). This is the case for jOOQ, where you often want to use the exact same method name for various means of interaction with the library. Example: jOOQ Conditions package org.jooq; public interface Condition … Continue reading Overload API methods with care