Clojure: decision fatigue

As someone who uses Clojure mostly for solo projects I often find myself in a situation when a decision on what libraries to use is hard. Clojure and its community seems to follow “There Is More Than One Way To Do It” path. Possibly often unintentiallally, because the core team is too small to ship some features before the community comes up with the missing parts. According to State of Clojure 2023 survey, Clojure is mostly used in smaller teams (of, presumably, experienced developers), which is probably the reason, why Clojure ecosystem also lacks opinionated tools that may save you some mental energy. All in all, these result in a decision fatigue when deciding on third-party libraries and tools.

Possible decisions

Enriched version of clojure-toolbox.com

When the quality of the popular search engines seems to be declining, a hand-picked collection may be a good solution. For Clojure, clojure-toolbox.com is a high quality categorised directory of libraries and tools for the language. And it seems to be well maintained. It has a few drawbacks though:

  1. Projects are not rated
  2. No hints on projects maintenance status
  3. Projects description is hidden in tooltips

These are hard things. Not only it’s hard to compare dependencies that differ in their feature sets even under the same category. But also there could be no single source of statistics about number of downloads (Maven Central, Clojars, GitHub), the last release date, etc. Let alone the popularity isn’t necessary a sign of quality and the recent last release timestamp isn’t necessary a sign of good maintenance in a community with the strong commitment to backwards compatibility. Yet something simple would still be a huge relief to decision fatigue:

  1. Number of stars on GitHub is a project uses it for hosting
  2. The timestamp of the last commit on GitHub
  3. Showing project’s description openly

It turned out, that 970 out of 1001 projects at the moment of writing had GitHub repo URL as a project link. That makes the approach mentioned above good enough!

Here’s how I enrich clojure-toolbox.com’s data with the GitHub stats:

  • Pull down clojure-toolbox.com DB (a YAML file stored in GitHub repo)
  • If a project has a GitHub link, get information about number of stargazers and the last commit push timestamp via GitHub API
  • Use clojure.core.async and GitHub access token to run operations in bulk
  • Format results in Markdown

Here’s an example code. And this is how the enriched catalogue looks like. Much more informative!

The same could possibly be done for The Babashka toolbox as it’s derived from the The Clojure Toolbox source code.

Clojurians Slack

Clojurians Slack is another great source of knowledge. Not only you can ask questions to some experienced Clojure programmers, but also search the Slack’s history.