Archive for the ‘design’ Category

Matrices and vectors are the fundamental building blocks of many of the areas of programming I find most interesting: machine learning, simulations, statistical analysis, 3D games, computer-generated art etc.

Unfortunately, using matrices presents some problems in the Clojure world. There are actually a number of really good libraries available, but they are all incompatible and designed / optimised for different use cases. Choosing the right one is hard, and a lot of effort gets wasted converting between them and duplicating code.

This post is about how we might fix this in the Clojure world


People always seem to want to make IT / Enterprise / Software architecture much more complex than it actually is. There are a plethora of frameworks, tools, approaches, methodologies etc. that all claim to offer the solution. I’m sure you’ve seen them. Maybe you might find of them are useful, but in general they distract from the point that architecture is actually really simple.

It is dependency management. No more. No less.


The SOLID principles are recognised for encapsulating (pun intended) many important aspects of OOP design.

I have recently been exploring some similar principles for designing software components in the form of functional DSLs in Clojure. I’m provisionally calling these the VAPOR principles.


If you’ve ever worked in a Ruby environment, and especially if you work with the excellent Ruby on Rails framework, then you will probably have seen the emphasis put on convention over configuration.

This philosophy has worked wonders in the Ruby world, but I’m going to argue that it is hitting the limits of it’s usefulness as we engineer more sophisticated applications that need to span across multiple frameworks and tools.

I believe that there is a more important principle that we should adopt. Rather than letting a framework handle everything for us by convention, we should be using higher order techniques from functional programming to explicitly compose our solutions from pluggable building blocks. Let’s call this principle composition over convention.