Earlier this year, I wrote a piece for the Cognitect blog: Developing the Language of the Domain (blog.cognitect.com) In it, I describe the process of building a domain-driven application using Clojure, ClojureScript, EDN, Datomic, clojure.spec, Pedestal, and Om.
Quick link: Stuart’s ns Style Guide Everyone has their own personal quirks when it comes to syntax. No matter how hard you try to lock it down with code review, IDEs, scripts, or check-in hooks, individual differences will emerge.
I am responsible — for better or for worse — for the library which eventually became clojure.test. It has remained largely the same since it was first added to the language distribution back in the pre-1.0 days. While there are many things about clojure.test which I would do differently now — dynamic binding, var metadata,… Continue reading Fixtures as Caches
Cast your mind back to the halcyon days of the late ’90s. Windows 95/98. Internet Explorer 4. Before you laugh, consider that IE4 included some pretty cutting-edge technology for the time: Dynamic HTML, TLS 1.0, single sign-on, streaming media, and “Channels” before RSS. IE4 even pioneered — unsuccessfully — the idea of “web browser as… Continue reading Open-source Bundling
This is a guide on naming Clojure functions. There are exceptions to every rule. When you’re defining something based on natural language, there are more exceptions than rules. I break these rules more often than I follow them. This guide is just a starting point for thinking about how to name things.
Another year, another year-in-review post. To be honest, I feel like any attempt I make to summarize what happened in the Clojure world this year is largely moot. Clojure has gotten so big, so — dare I say it? — mainstream that I can’t even begin to keep up with all the interesting things that… Continue reading Clojure 2015 Year in Review
Why write a book about open-source software? (Not for the money. Trust me.) I’ve seen far too many “technical books” that merely regurgitate the documentation of a bunch of open source libraries. I’m happy to say that Clojure Applied, by my friends and colleagues Alex Miller and Ben Vandgrift, is not in this category. They… Continue reading An Opinionated Review of Clojure Applied
This is probably my number one Clojure Don’t. Laziness is often useful. It allows you to express “infinite” computations, and only pay for as much of the computation as you need. Laziness also allows you to express computations without specifying when they should happen. And that’s a problem when you add side-effects. By definition, a… Continue reading Clojure Don’ts: Lazy Effects
Today’s Clojure Don’t is the opposite side of the coin to the heisenparameter. If you have an operation on a single object, you don’t need to define another version just to operate on a collection of those objects.
A short Clojure don’t for today. This one is my style preference. You have a single expression which should run if a condition is true, otherwise return nil.