Archive for the ‘coding’ Category

My machine learning talk from the Clojure Conj 2012 is now online:

Enjoy!

Advertisements

“The first rule of macro club is: Don’t write macros”

I wrote this originally as an answer to a StackOverflow question. But the question got closed by some trigger-happy mods before I clicked post. How unfriendly!

Anyway, in case it is useful to people wondering when they should and shouldn’t use macros, I thought I would post it here instead….

(more…)

“There are only two hard things in Computer Science: cache invalidation and naming things (and off-by-one errors)”

Clojure is a great language, and one of the few things I dislike about coding in Clojure are namespaces.

It is not because namespaces are fundamentally a bad idea – in fact namespaces are a great feature and I believe they are fundamentally important if you are trying to manage a code base effectively.

But they are particularly fiddly to get right in Clojure. They cause a lot of unnecessary grief. They are not Simple. This is the story of my battle with the namespace demons to construct a decent namespace for Clisk live-coding.

(more…)

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.

(more…)

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.

(more…)

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.

(more…)