Spring and JPA: use custom value types inside entities with a custom converter

If you want secure code, or code with fewer bugs, you want to track the kind of data you’re passing around. In your code, do not pass around strings or any other built-in built-in primitive type. Those are for the edges: we have to accept strings as input, we have to write VARCHAR to the … Read moreSpring and JPA: use custom value types inside entities with a custom converter

I turned on Spring Security and my POSTs don’t work anymore

^ that’s what I googled, so that’s the title of the blog post that solves it. When I added spring-boot-starter-security to my dependencies, I expected my whole app to suddenly be behind a login screen. But I expected it to work after logging in. Instead, it failed at the first form submission. And it failed … Read moreI turned on Spring Security and my POSTs don’t work anymore

Run Alloy on Windows in Docker

TL;DR: install docker and X410; docker run jessitron/alloy:5.1 The essential work in software development is forming a model in our heads of the system we want. The code is one expression of this model. The code can’t be stronger than this model. So I want a strong model: consistent, complete enough, and expressive. I decided … Read moreRun Alloy on Windows in Docker

Talk: Concurrency Options on the JVM

or, “Everything You Never Wanted to Know About java.util.concurrent.ExecutorService But Needed To” from StrangeLoop, 18 Sep 2014 Abstract: A careful design lets you write a concurrent application without thinking about deadlock or synchronization. Getting to that design takes a lot of thinking. This session delivers the background you need to make good decisions about concurrency … Read moreTalk: Concurrency Options on the JVM

Declarative style in Java

The other day at work, we had this problem: Sort a sequence of rows, based on an input list of columns, where each column might be sorted ascending or descending, and each column might require a transformation first to get to something comparable. The function interface looks like this: Here is a concrete example where … Read moreDeclarative style in Java