Debugging Clojure Code
summary
Shows four concrete Clojure-first techniques: tagging values with metadata to record origin and cache timestamps, wrapping functions so logs as data collect results, exceptions and timings into atoms for querying and replay, and delta-debugging to minimize failing inputs or code. Demonstrates collapsing client and server into one JVM, replacing DB with an atom, and using clojure.data/diff to find the state divergence that reproduced a three-client sync bug and produced a unit test and fix. Performance and observer-effects are acknowledged but the methods work and speed diagnosis.
AI-written summary · about
chapters (20)
- 0:00Introduction
- 3:53Definitions
- 4:49The problem
- 6:40Why programs fail
- 7:50The plan
- 8:07Function
- 9:54Logging
- 10:07Logging in wrong format
- 11:24Logging approach
- 12:34Logging drawbacks
- 13:57Querying logs
- 14:52Replaying logs
- 16:35Simplifying inputs
- 16:51Simplifying by hand
- 17:18Simplifying by dummy
- 18:09Simplifying algorithms
- 19:37Delta debugging
- 22:43Question
- 23:56Solution
- 29:17Closing
related talks
40mProgramming Clojure, Smalltalk-Style
55mTransforming Enterprise Development With Clojure
32mGetting Superpowers with Clojure and ClojureScript
39mTransforming Software Evolution: Lessons from 10 Years of Clojure in Production
38mBeyond Code: Repository Mining with Clojure
15mLive Programming a Live Programming Environment: An Experience Report
25mUnleash the Power of the REPL
41mIntroducing a lightweight, data first Clojure interpreter for tracing code
