Common Clojure Smells: A Field Guide
Code smells in other languages like Java are well understood and documented but what about Clojure? Does the language make all these problems and smells go away? For many of us starting to write our first production Lisp, the territory is unfamiliar and smells are not immediately apparent. In this talk, I explain why we should start to think about Clojure smells and describe some of the patterns that might make the list. (Warning: may contain depictions of unsightly code and offensive parentheses.)
The goal of this talk is to start to start the discussion off about what kinds of smells and anti-patterns could show up in Clojure code, what to do about them and what they may tell you about underlying issues. I don’t intend to create a full catalogue, more to make a start and see what other anti-patterns other people have noticed.
References: Martin Fowler on Code Smells: https://martinfowler.com/bliki/CodeSmell.html (also the book chapter authored with Kent Beck in Refactoring https://www.amazon.com/Refactoring-Improving-Design-Existing-Code/dp/0201485672)