Jay Fields Thoughts

Clojure: Check For nil In a List


6 months ago by noreply@blogger.com (jaycfields) on Jay Fields Thoughts.
The every? function in Clojure is very helpful for determining if every element of a list passes a predicate. From the docs:Usage: (every? pred coll) Returns...

Clojure: partition-by, split-with, group-by, and juxt


6 months ago by noreply@blogger.com (jaycfields) on Jay Fields Thoughts.
Today I ran into a common situation: I needed to split a list into 2 sublists - elements that passed a predicate and elements that failed a predicate. I...

Clojure: partition-by, split-with, group-by, and juxt


6 months ago by jaycfields on Jay Fields Thoughts.
Today I ran into a common situation: I needed to split a list into 2 sublists - elements that passed a predicate and elements that failed a predicate. I...

Clojure: Apply a Function To Each Value of a Map


6 months ago by noreply@blogger.com (jaycfields) on Jay Fields Thoughts.
I recently needed to update all of the values of map, and couldn't find an individual function in clojure.core that did the trick. Luckily, implementing...

Clojure: memfn


6 months ago by noreply@blogger.com (jaycfields) on Jay Fields Thoughts.
The other day I stumbled upon Clojure's memfn macro.The memfn macro expands into code that creates a fn that expects to be passed an object and any args...

The High-Level Test Whisperer


7 months ago by noreply@blogger.com (jaycfields) on Jay Fields Thoughts.
Most teams have High-Level Tests in what they call Functional Tests, Integration Tests, End-to-End Tests, Smoke Tests, User Tests, or something similar...

Individuals Over People


7 months ago by noreply@blogger.com (jaycfields) on Jay Fields Thoughts.
I've been pondering a few different ideas lately that all center around a common theme: to be maximally effective you need to identify and allow people...

Undervalued Start and Restart Related Questions


7 months ago by blogger@jayfields.com (Jay Fields) on Jay Fields Thoughts.
How long does it take to start or restart your application? Start-up time tends to be a concern that's often overlooked by programmers who write unit tests...

Clojure: Get All Nested Map Values (N levels deep)


9 months ago by blogger@jayfields.com (Jay Fields) on Jay Fields Thoughts.
I recently needed to pull all the values from a nested map. The map I was working with was designed to give easy access to data like so (formatted):user...

Clojure: Converting a Java Object to a Clojure Map


9 months ago by blogger@jayfields.com (Jay Fields) on Jay Fields Thoughts.
Clojure has a great library that helps facilitate most things you'd want to do, but it's also easy to roll your own solution if you need something more...