Optimising hibernate queries with tuples

The Java Persistence API (JPA) is a wonderful way of bridging the gap between SQL databases and object-oriented programming.

My preferred implementation of choice is Hibernate, but often Hibernate will generate long and complex SQL statements, that can cause slow queries to occur quickly. Developers will often “solve” this problem by writing native SQL statements, but it turns out that there is an alternative approach.

Leading by examples: using nested hamcrest matchers

I often refer to Marc Philipp’s excellent Hamcrest Quick Reference guide when choosing which hamcrest matchers to use when writing my unit and integration tests.

I use nested hamcrest matchers all the time, often without even releasing, so I thought I would put together some example uses of nested matchers.

Setting up Spring and CORS using hostnames

The Spring framework has a number of ways in which adding CORS to your application can be achieved. I usually implement a Web Filter, rather than using Spring’s configuration, as I often find myself having to implement some logic around which hostnames are accepted by the application’s CORS policy (rather than Origins). Rather than use a Web Filter, I wanted to see if it can be done using Spring Config.

Upgrading an End-of-Life Ubuntu Server

I was recently tasked with updating a handful of Ubuntu 15.04 “Vivid” servers to Ubuntu 16.04 LTS “Xenial”. At first this seemed pretty easy, but I quickly realised that Ubuntu 15.04 reached it’s end of life in February 2016… and I was attempting to perform this upgrade in January 2020. Let the fun times roll!

A New Decade. A New Pledge.

I originally setup this blog in 2015, with the aim of the showcasing some of my ideas and thoughts, along with being able to highlight some of my personal projects. How many blog posts did I publish between 2015 and 2019 I hear you ask? Well… just the one!