I came across some weird behavior today when running PostgreSQL queries with dates. Specifically when using
BETWEEN to search for records that are within some date range. It turns out, the
BETWEEN comparison predicate behaves differently for the
date type as it does for the
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.
When optimizing datomic queries, it’s best to put the most restrictive clauses first. Doing so, the datomic query engine can perform better.
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.
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.
Importing and requiring Clojure protocols has its tricks. There are some edge cases you must be aware of when using them from separate namespaces.
Protocols are Clojure’s way of defining Java interfaces. Here, I will show how to define protocols and how to implement them.
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.
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! I’m going to assume this is the standard first post for anyone starting a blog.