Today I Learned: Using BETWEEN with SQL Dates

I came across some weird behavior today when running PostgreSQL queries with dates. Specifically when using BETWEEN to search for rows that are within some date range. It turns out, the BETWEEN comparison predicate behaves differently for the date type as it does for the timestamp type.


Understanding Clojure: cond and condp

This is the first part of a multi-part series I want to start titled “Understanding Clojure”. Often times I come across Clojure code that can be refactored a bit better or even there’s an existing function to do X. Hopefully I can shine some light on some aspects of Clojure you didn’t know existed.


Datomic Performance with Clause Ordering

When optimizing datomic queries, it’s best to put the most restrictive clauses first. Doing so, the datomic query engine can perform better.


The Avocado Project: Day 1

I was inspired to try growing an avocado tree after some new friends mentioned theirs. As I was about to cut open my daily avocado this morning for breakfast, I figured I would give it a shot. I mean, we do have four empty planters on our deck we need to fill.


Setting Null Values in Datomic

Datomic does not allow the storage of null values. We must reconcile which values were edited and which values were emptied. The emptied values must be a retracted to set to null.


Clojure Protocol Namespaces

Importing and requiring Clojure protocols has its tricks. There are some edge cases you must be aware of when using them from separate namespaces.


Mixpanel Mock

Mixpanel is great for tracking and analyzing user behavior within your application. Here, I will show how to mock out the JavaScript agent to keep from sending events during local development.


Implementing Clojure Protocols

Protocols are Clojure’s way of defining Java interfaces. Here, I will show how to define protocols and how to implement them.


Null Object in Groovy

When writing tight unit tests, you should use the Null Object Pattern in order to isolate the method under test. Here is a helper class I would use when writing unit tests in Groovy.


When to Extract Constants

Often times I see programmers get a little “Extract Constant” happy. Here, I will discuss some of the scenarios in which I believe it is okay to use constants and when it is not okay to use constants.


Hello World!

Hello world! I’m going to assume this is the standard first post for anyone starting a blog.