Recent Posts

Loading test data with ScalaTest + Play

Loading test data with ScalaTest + Play

The ScalaTest + Play library provides a couple of useful traits for when your ScalaTest Play Framework functional tests need a running application for context. The OneAppPerSuite trait will share the same Application instance across all tests in a class whereas the OneAppPerTest trait gives each test its own […]

A systemd unit file for Play Framework

A systemd unit file for Play Framework

New for Ubuntu 16.04 (Xenial Xerus) is systemd which replaces Upstart as the default init system. systemd basics The basic object that systemd manages is the unit which can be of different types but when it comes to running our Play app we will need […]

Rich Interfaces In Java

Rich Interfaces In Java

One of the new features added to Java 8 is default methods. In previous versions of Java, adding a new method to an interface would break existing implementations. This made it very hard to evolve your public API without disrupting your clients. Java 8 now […]

Filtering with flatMap

Filtering with flatMap

Checked exceptions are annoying. They are especially annoying when they may be thrown inside a lambda where they can really interrupt the flow. What if you wanted to map a function over a list to collect values but a checked exception might get thrown in the […]

Rules for dates and times

Rules for dates and times

Dates and times, like character encoding, are tricky to get right. In real life the concept of time is not something we usually think about much (except when we skipped breakfast this morning and it’s still only 10:30) but once you start storing and manipulating dates and times with […]

Java 8 Date & Time API Cheat Sheet

Java 8 Date & Time API Cheat Sheet

A short list of some common date/time tasks using the new Java 8 Date & Time API.