Rare Uses of a “ControlFlowException”

Control flows are a "relict" from imperative programming, which has leaked into various other programming paradigms, including Java's object oriented paradigm. Apart from the useful and ubiquitous branch and loop structures, there are also primitives (e.g. GOTO) and non-locals (e.g. exceptions). Let's have a closer look at these controversial control flow techniques. GOTO goto is … Continue reading Rare Uses of a “ControlFlowException”

jOOQ as a “PL/Java” language

Some people who get in touch with PL/SQL, PL/pgSQL, T-SQL, or any other proprietary procedural language for SQL interaction are probably missing out on a couple of language integration features in the Java world. Most Java APIs see SQL as an external domain-specific language that is "best" dealt with using string concatenation. Such APIs include: … Continue reading jOOQ as a “PL/Java” language

On Java 8’s introduction of Optional

I had recently discovered the JDK 8's addition of the Optional type. The Optional type is a way to avoid NullPointerException, as API consumers that get Optional return values from methods are "forced" to perform "presence" checks in order to consume their actual return value. More details can be seen in the Javadoc. A very … Continue reading On Java 8’s introduction of Optional

A Great Counter-Rant

Now, this is a great counter-rant, replying to one of my more popular articles: https://blog.jooq.org/the-golden-rules-of-code-documentation/ The counter-rant is given here: http://javax0.wordpress.com/2013/04/07/to-comment-or-not-to-comment-that-is-the-question The writer went through the trouble of actually implementing my fictional (but not unrealistic) example, which he's publicly displaying on GitHub: https://github.com/verhas/commentOrNotToComment (my fork, if the former was deleted) The code still doesn't communicate … Continue reading A Great Counter-Rant

The Lame Side of Java’s Backwards-Compatibility

Java is a very backwards-compatible language. Very as in very very very. It is so backwards compatible, we still have tons of deprecated code that was deprecated in the JDK 1.1. For example, most of the java.util.Date and java.util.Calendar API. Some may argue that it would've been easier to deprecate the classes altogether... But things … Continue reading The Lame Side of Java’s Backwards-Compatibility

A jOOX First-Time Experience Article

Here's some nice first-time user experience about jOOX, my lesser-known product: http://www.kubrynski.com/2013/03/as-developer-i-want-to-use-xml.html As a reminder, here's what jOOX is all about: jOOX stands for Java Object Oriented XML. It is a simple wrapper for the org.w3c.dom package, to allow for fluent XML document creation and manipulation where DOM is required but too verbose. jOOX only … Continue reading A jOOX First-Time Experience Article