A dependency injection pattern in Clojure

Patterns and dependency injection – I’m partying like it’s 2006! Say you have some Clojure functions that look like this: (defn foo [config queue db-conn arg1] ...use config, queue, db-conn... ) (defn bar [config queue db-conn arg1 arg2] ...use config, queue, db-conn... ) Bindings Seeing all those config options and system resources on every function just looks gross... [Read more]


State of Clojure, problem areas

Following up on my last post about the results of the 2013 State of Clojure & ClojureScript survey, I was very interested in digging into the responses to the question “What do you think is Clojure’s most glaring weakness / blind spot / problem?”. I’ve spent some time categorizing the answers, trying to tease out the trends. Similar to the last category, about half the people... [Read more]


State of Clojure language features

I found the results of the 2013 State of Clojure & ClojureScript survey to be very interesting. Tonight I dug in a little deeper to the answers to the specific question “Name *one* language feature you would like to see added to Clojure.” There were 610 answers to this question (of 1061 survey responses). Many did not actually seem like language features but I’ll take all the... [Read more]


Clojure and testing

Occasionally I hear someone say that the Clojure community is against testing. I understand the sources of this – Rich Hickey (creator of Clojure) has spoken about testing in a number of talks and I think some of those comments have been misconstrued based on pithy tweet versions of more interesting longer thoughts. I’d like to give my own opinions on testing, what I think Rich has said,... [Read more]


Rock Paper Scissors with core.async

Just for fun I implemented Rock Paper Scissors with core.async. Each player is modeled as a go process that generates moves on a channel. A judge is modeled as a go process that takes moves from each player via their channel and reports the match results on its own channel. To start, let’s pull in core.async: (require 'clojure.core.async :refer :all) and define some helpful definitions: (def... [Read more]


Moving to Relevance

Today I am thrilled to announce that I have joined Relevance, Inc. People have been paying me to write code for a couple of decades now and I’ve been very fortunate to have great opportunities. I felt very lucky in this transition to have had time to figure out what I wanted and where I could make the biggest impact. I found some great options (thank you if you’re reading), particularly... [Read more]


A few of my favorite tech talks by women

A very happy Ada Lovelace day to you all! In honor of the day I thought I would post a few of my favorite tech talks given by women. Sarah Allen – Teaching Code Literacy When I first invited Sarah to speak at Strange Loop 2011 about her efforts at creating a tool for teaching programming (Pie), I had doubts whether it would be a topic that would draw interest at Strange Loop. I don’t get... [Read more]


Do we even want Jigsaw?

Recently it was announced that the Java modularity Project Jigsaw would be pushed out of Java 8. Jigsaw and its older brethren JSR 294 and JSR 277 have a tortured history from years of fighting during Java 7. That fighting is not just internally on political and design issues but externally vs other modularity systems, namely OSGi. InfoQ has a decent round-up of opinions on the matter. They say: Good... [Read more]