Today there was great news in the JVM ecosystem. Pivotal, the company who is committed to OSS has become a bit less committed: The reaction in the community were largely summarised by the hashtag #jesuisgroovy: https://twitter.com/jbaruch/status/557129532931469314 The interesting part in Pivotal's announcement is this one: The decision to conclude its sponsorship of Groovy and Grails … Continue reading Suis-je Groovy? No! What Pivotal’s Decision Means for Open Source Software
Using Java 8 to Prevent Excessively Wide Logs
Some logs are there to be consumed by machines and kept forever. Other logs are there just to debug and to be consumed by humans. In the latter case, you often want to make sure that you don't produce too much logs, especially not too wide logs, as many editors and other tools have problems … Continue reading Using Java 8 to Prevent Excessively Wide Logs
Infinite Loops. Or: Anything that Can Possibly Go Wrong, Does.
A wise man once said: Anything that can possibly go wrong, does -- Murphy Some programmers are wise men, thus a wise programmer once said: A good programmer is someone who looks both ways before crossing a one-way street. -- Doug Linder In a perfect world, things work as expected and you may think that … Continue reading Infinite Loops. Or: Anything that Can Possibly Go Wrong, Does.
Transform Your SQL Data into Charts Using jOOQ and JavaFX
In the recent past, we've shown how Java 8 and functional programming will bring a new perspective to Java developers when it comes to functional data transformation of SQL data using jOOQ and Java 8 lambdas and Streams. Today, we take this a step further and transform the data into JavaFX XYChart.Series to produce nice-looking … Continue reading Transform Your SQL Data into Charts Using jOOQ and JavaFX
How to Emulate the MEDIAN() Aggregate Function Using Inverse Distribution Functions
Some databases are awesome enough to implement the MEDIAN() aggregate function. Remember that the MEDIAN() is sligthly different from (and often more useful than) the MEAN() or AVG() (average). While the average is calculated as the SUM(exp) / COUNT(exp), the MEDIAN() tells you that 50% of all values in the sample are higher than the … Continue reading How to Emulate the MEDIAN() Aggregate Function Using Inverse Distribution Functions
The Awesome PostgreSQL 9.4 / SQL:2003 FILTER Clause for Aggregate Functions
Sometimes when aggregating data with SQL, we'd love to add some additional filters. For instance, consider the following world bank data: GDP per capita (current US$) 2009 2010 2011 2012 CA 40,764 47,465 51,791 52,409 DE 40,270 40,408 44,355 42,598 FR 40,488 39,448 42,578 39,759 GB 35,455 36,573 38,927 38,649 IT 35,724 34,673 36,988 33,814 … Continue reading The Awesome PostgreSQL 9.4 / SQL:2003 FILTER Clause for Aggregate Functions
Leaky Abstractions, or How to Bind Oracle DATE Correctly with Hibernate
We've recently published an article about how to bind the Oracle DATE type correctly in SQL / JDBC, and jOOQ. This article got a bit of traction on reddit with an interesting remark by Vlad Mihalcea, who is frequently blogging about Hibernate, JPA, transaction management and connection pooling on his blog. Vlad pointed out that … Continue reading Leaky Abstractions, or How to Bind Oracle DATE Correctly with Hibernate
Are You Binding Your Oracle DATEs Correctly? I Bet You Aren’t
We all know that Oracle's DATE is not really a date as in the SQL standard, or as in all the other databases, or as in java.sql.Date. Oracle's DATE type is really a TIMESTAMP(0), i.e. a timestamp with a fractional second precision of zero. Most legacy databases actually use DATE precisely for that, to store … Continue reading Are You Binding Your Oracle DATEs Correctly? I Bet You Aren’t
A True SQL Gem You Didn’t Know Yet: The EVERY() Aggregate Function
We've just added support for the EVERY() aggregate function (#1391) to jOOQ, and would like to take the opportunity of letting you know of this true SQL gem that can come in handy EVERY(now and then) (pun intended). Let's assume we have four books in our table: INSERT INTO book VALUES (1, 1, '1984'); INSERT … Continue reading A True SQL Gem You Didn’t Know Yet: The EVERY() Aggregate Function
jOOQ Tuesdays: Yalım Gerger brings Git to Oracle
We're excited to launch a new series on our blog: the jOOQ Tuesdays. In this series, we'll publish an article on the third Tuesday every month where we interview someone we find exciting in our industry from a jOOQ perspective. This includes people who work with SQL, Java, Open Source, and a variety of other … Continue reading jOOQ Tuesdays: Yalım Gerger brings Git to Oracle
