A Few Quick Notes About babashka/fs

Recently I've used babashka/fs a little bit, here are some quick notes for it: Path vs File. Use Path whenever possible, according to this SO answer to "Java: Path vs File". This is actually Java related. It's ok to use a path as a key for a clojure map. At my first try, I somehow came to the conclusion that it's not ok, while I was refactoring the live reload for clay. [Read More]

Doing Unit test in Clojure Is Easy

While refactoring the live reload feature of Clay, I realized I'd better break long functions into smaller and functional ones (as many as I can), which is also a common practice in the clojure community. Small pure functions not only are easy to verify on the development process (using a REPL), but also are easy to test. And unit tests are easy to write in clojure, just use deftest from clojure. [Read More]

clj-async-profiler Rocks

While developing the live reload feature for Clay, a minimalistic Clojure tool for data visualization and literate programming, I found that it constantly takes ~1 minute for beholder to watch a directory. After some code inspect, I was still having no idea why it happened. So I decided to use a profiler to find out what's going one under the hood, and Google immediately took me to clj-async-profiler. It's easy to set up following its basic usage docs: [Read More]