The Most Important Idea in Computer Science

August 28, 2015
Computer Science has ideas that are important to the broader world. The most important is the Universal Turing Machine. From one perspective, Lisp embodies the idea at its core. To really understand how, I ask you to implement your own Lisp interpreter.

Let's TDD clojure.core/reduce

August 17, 2015
`clojure.core/reduce` is a powerful function, yet the code for it is so simple. It's four lines! We TDD our own implementation.

A reduce Example Explained

August 10, 2015
A deep-dive into a single reduce example shows how much can happen in a short bit of code.

Let's TDD clojure.core/map

August 04, 2015
Learning to write map is a good lesson because it has recursion, list building, and higher order functions. It's everything that makes Lisp great.

Annotated map

July 29, 2015
map is one of the staples of functional programming. It's totally useful and also surprisingly simple. Let's look at some examples and annotated code.

Some Annotated clojure.core/reduce Examples

July 21, 2015
reduce is a very useful function. You can use it for many calculations over a collection. Code annotations are useful, as are physical metaphors.

Reduce Complexity with Variants

July 08, 2015
The structure of our data should match the relevant structures in the real world. And to ensure that our data is structured well, we should reduce the potential for incorrect structure. Variants provide a great solution for it.

Avoid Naming at All Costs

July 05, 2015
If naming is one of the two hardest things in programming, it follows that every other possible solution (except those few involving cache invalidation) should be attempted before naming something. As a corrolary, bad names are a code smell.

Mastering ClojureScript Routing with Secretary and goog.History

June 24, 2015
The Google Closure Library provides a nice interface to the HTML5 History API. Coupling it with Secretary is very easy. But not all browsers support HTML5 History. In this post I'll talk about one way to make sure you have client-side routing in all browsers.

How I made my Clojure database tests 5x faster

June 17, 2015
Setting up and tearing down a test database can be slow. Use a rolled back transaction to quickly reset the database to a known state. You can do that in an `:each` fixture to run each test in isolation.