Author Archives: Stuart
Speaking at ÜberConf Denver in July
I’ll be speaking at Über Conf 2011 In Denver, CO July 12th to 15th. I’m doing three (gulp!) sessions: two on Clojure, and one on my work with AltLaw.org.
Clojure in Philadelphia, April 27-28
I’ll be talking about Clojure at Emerging Technologies for the Enterprise in Phidelphia, April 27-28, 2011. My talk is tentatively titled Clojure: Lisp for the Real World, and it will be a high-level overview of how Clojure’s unique features can … Continue reading
Edit Quotient
Remember Levenshtein Distance: the number of changes to turn one string into another? Here’s a naïve implementation in Clojure: (defn levenshtein [s t] (let [m (count s) n (count t) d (make-array Integer/TYPE (inc m) (inc n))] (dotimes [i m] (aset-int … Continue reading
Single Abstract Method Macro
John Rose’s article, Scheme in One Class, introduced me to the notion of Single Abstract Method, or SAM, classes. One of the proposed APIs for JSR-292 allows a MethodHandle (the Java version of a closure) to be cast to any … Continue reading
The Expression Problem in Clojure
My article for IBM developerWorks has been published: “Solving the Expression Problem with Clojure 1.2″
Hair Color
An antisocial experiment to answer that age-old question: who really has more fun? On Google, “blondes” get the most attention with 147 million hits. ”Brunettes” get 78.6 million and “redheads,” 12.8 million. However, of the three, only “redheads” start off … Continue reading
Beware Choosing the Most Complex Tool for the Job
I once saw a TV show about competing groups of archeologists trying to demonstrate how the ancient Egyptians raised stone obelisks weighing hundreds of tons. One group of archeologists built a complex apparatus involving a wooden frame and lots of … Continue reading
Assertions and Invariants
I’ve been thinking a lot about testing frameworks over the past six months, and I’m not the only Stuart doing that. Stuart Halloway, who spent some time on his own Clojure testing framework, Circumspec, recently wrote about his experiences refactoring … Continue reading
Slightly Less Typed Assertions
A couple of weeks ago I wrote about typed assertions for Lazytest. Like so many things, it seemed like a good idea at the time. Define typed objects for each kind of assertion (e.g., equality, instanceof). When a test fails, … Continue reading
Lazytest Churn
One of my stated goals with Lazytest was to enforce a clean separation between test assertions and code that runs before/around the assertions. The Spock framework for Java/Groovy calls these the stimulus and response, identified by the keywords when and … Continue reading