So yeah, about Clojure's syntax...

January 6, 2018

For many experienced programmers, the first encounter with Clojure's syntax ranges from slightly disturbing to downright shocking.

Why on Earth would you put the function inside the parens? That's just weird!

Continue reading →

Using PostgreSQL temporary views for expressing business logic

November 5, 2017

I recently worked on a project which consisted of merging related data exports from a variety of sources and extracting accounting information from them. Because the problem was inherently very relational, I was naturally led to use an SQL database in the project (in this case PostgreSQL).

I ended up expressing much more of the business logic than I thought using pure SQL - more precisely, temporary SQL Views - so I thought I'd share my findings here.

Continue reading →

What makes a good REPL?

August 20, 2017

Dear Reader: although this post mentions Clojure as an example, it is not specifically about Clojure; please do not make it part of a language war. If you know other configurations which allow for a productive REPL experience, please describe them in the comments!

Continue reading →

Datomic: this is not the history you're looking for

July 8, 2017

In this post, I'll describe some common pitfalls regarding the use of the 'time-travel' features of Datomic (db.asOf(), db.history(), :db/txInstant).

We'll see that, unlike what many people think when they start using Datomic, these historical features of Datomic are not so useful for implementing custom time-travel features in the business logic of applications - rather for generic database-related tasks.

Continue reading →

Using Datomic in your app: a practical guide

July 24, 2016

Schema rigidity, N+1 problem, impedance mismatch, remote querying, consistency... Datomic eliminates many of the biggest problems of traditional databases. That's how I like to pick technologies: to solve the hard problems for me and leave me the easy ones. I have been using Datomic professionally for over 8 months now, and I can testify that it's given me a tremendous boost in productivity and quality, even for ordinary web development tasks.

However, because Datomic is so different from other databases, and because its young ecosystem still lacks convention, it's taken me some time and thought (at least a week) to come up with an architecture that is practical and lets me leverage its special powers. My hope is that by reading this post, you'll be able to get started more quickly.

Continue reading →