Home » Author Archives: Lukas Eder (page 4)

Author Archives: Lukas Eder

Lukas is a Java and SQL enthusiast developer. He created the Data Geekery GmbH. He is the creator of jOOQ, a comprehensive SQL library for Java, and he is blogging mostly about these three topics: Java, SQL and jOOQ.

Yak Shaving is a Good Way to Improve an API

software-development-2-logo

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 descriptions of most refactoring jobs. ...

Read More »

Integrating jOOQ with Grails Featuring the UWS-jOOQ Plugin

jooq-2-logo

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 UWS-jOOQ Grails-plugin is to integrate ...

Read More »

The Java Legacy is Constantly Growing

java-logo

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 ...

Read More »

Avoid Recursion in ConcurrentHashMap.computeIfAbsent()

java-logo

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 ...

Read More »

How to use SQL PIVOT to Compare Two Tables in Your Database

software-development-2-logo

This can happen ever so easily. You adapt a table by adding a new column:                     ALTER TABLE payments ADD code NUMBER(3); You go on, implementing your business logic – absolutely no problem. But then, later on (perhaps in production), some batch job fails because it makes some strong assumptions about ...

Read More »

How to Extract a Date Part in SQL

software-development-2-logo

The Modern SQL Twitter account (by Markus Winand) published a hint about how to extract a date part in SQL:                     The right way to get a part of a date/time is: EXTRACT(YEAR FROM CURRENT_DATE) = 2015 http://t.co/UNLyUoQdVb Retweet to spread the word! — Modern SQL (@ModernSQL) February 24, 2015 Is it true? Yes ...

Read More »

jOOQ vs. Slick – Pros and Cons of Each Approach

jooq-2-logo

Every framework introduces a new compromise. A compromise that is introduced because the framework makes some assumptions about how you’d like to interact with your software infrastructure. An example of where this compromise has struck users recently is the discussion “Are Slick queries generally isomorphic to the SQL queries?“. And, of course, the answer is: No. What appears to be ...

Read More »

Thou Shalt Not Name Thy Method “Equals”

java-logo

(unless you really override Object.equals(), of course). I’ve stumbled upon a rather curious Stack Overflow question by user Frank: Why does Java’s Area#equals method not override Object#equals? Interestingly, there is a Area.equals(Area) method which really takes an Area argument, instead of a Object argument as declared in Object.equals(). This leads to rather nasty behaviour, as discovered by Frank:   @org.junit.Test ...

Read More »

“NoSQL Injection” – What 40000 Unsecured MongoDB Databases Mean for our Industry

mongodb-logo

The news is all over reddit… Major security alert as 40,000 MongoDB databases left unsecured on the internet Security is a feature that is often neglected until it’s too late. And when it’s too late, it is often hard to bake it into a well-established architecture without major refactoring efforts. Every system and thus also every database is always vulnerable. ...

Read More »

10 SQL Articles Everyone Must Read

software-development-2-logo

We’ve been blogging about Java and SQL for a while now, on the jOOQ blog. Over the years, while researching interesting blog topics, we’ve discovered a lot of SQL gems in the blogosphere that have inspired our work and our passion for SQL. Today, we’re presenting to you a list of 10 articles that we think you should absolutely read. ...

Read More »
Do you want to know how to develop your skillset and become a ...

Subscribe to our newsletter to start Rocking right now!

To get you started we give you our best selling eBooks for FREE!
Get ready to Rock!
To download the books, please verify your email address by following the instructions found on the email we just sent you.

THANK YOU!

Close