Archive for September, 2012

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.



Code Golf in Clojure

Posted: September 21, 2012 in Uncategorized
Tags: , ,

Recently enjoyed doing a bit of code golf – in particular solving the FizzBuzz test, which I managed to get down to 80 characters in Clojure (let me know if you can do better!)

(map #(let[t(mod% 3)z{0"Fizz"}]({0(str(z t)'Buzz)}(mod% 5)(z t%)))(range 1 101))

The experience inspired me to write down and share a few tips and tricks….


Warnings are deferrable errors

Posted: September 8, 2012 in coding
Tags: , ,

I’m a zero-tolerance person when it comes to defects. I like all my tests green. If anything comes up red (either in a test or a as compile error) then it is my No.1 priority to fix the defect.


Something I still love about Java

Posted: September 6, 2012 in coding
Tags: ,

Clojure is certainly my language of choice nowadays.

But recently I spent a day working on an old ~35k LOC Java code base, and it reminded me what I still love about Java.


Over the weekend I did some work to get Ironclad running with Clojure 1.4 and uploaded it to Github as an open source project. I though that this would be a good milestone to reflect upon the work so far – and in particular¬†I thought I’d share some of the learnings / interesting aspects of developing the game.

Clojure enthusiasts may find it interesting since it is a semi-complete game written in Clojure in a (mostly) functional style.