Category Archives: Programming

Two Steps Forward, One Step Back

Following my last post I integrated typed assertions into the master branch of Lazytest. This makes some changes to the API. Test examples in the it macro can no longer simply return true or false. Instead, they must call the … Continue reading

Posted in Programming | Tagged , | 3 Comments

Typed Assertions Tell You What Hurts

One thing clojure.test did reasonably well was tell you why an assertion failed. Currently, Lazytest fails in this regard. The problem with requiring test functions to return true/false to indicate pass/fail is that they can’t attach any additional information to … Continue reading

Posted in Programming | Tagged , , | 7 Comments

A Journey of a Thousand Lines Begins with a Single Test

I have a curious obsession with testing frameworks. The first thing I do with any new programming language is try to write a test framework in it. It’s a useful exercise for exploring the metaprogramming facilities provided by any language. … Continue reading

Posted in Programming | Tagged , | 5 Comments

Spread Thin

With the profusion of “community” web sites around today, it’s getting hard to keep track of where your “community” is. For example, the “Clojure community” exists in 7 places: clojure.org (main documentation) Github (source code) Assembla (bug tracking) Wikibooks (more … Continue reading

Posted in Programming | Tagged | 8 Comments

Keyword Arguments in Clojure, the Right Way

Update Feb. 10, 2010: I was wrong. Recent discussions indicate that placing optional arguments in-line, as in my first example, is preferred. In the future, Clojure may have destructuring support for this style. For now, this post remains a useful … Continue reading

Posted in Programming | Tagged | 5 Comments

Clojure-Hadoop 1.0.0

At long last, I have made a formal release of my clojure-hadoop library. Downloads and more information here. The 1.0.0 release is documented, but not in exhaustive detail. Other people have used this successfully, but it may not support all … Continue reading

Posted in Programming | Tagged , | Leave a comment

Agents of Swing

The title of this post would make a good name for a band. Anyway, today I’m going to talk about Swing and concurrency and Clojure. The Swing framework is not thread-safe. That may sound strange at first, but there’s actually … Continue reading

Posted in Programming | Tagged , | 9 Comments

Heating Up Clojure & Swing

Most Swing examples don’t translate well into Clojure because they are so thoroughly embedded in the object-oriented paradigm. A typical Swing example has a main class that extends a container class and implements some *Listener interface.  Clojure beginners who try … Continue reading

Posted in Programming | Tagged , | 5 Comments

Taming the GridBagLayout

GUI layout is hard. You’d be crazy to do it without a GUI designer like Netbeans. Well, I’m pretty crazy. So I’m going to do some GUI layout in Clojure. And I’m going to use the most intimidating of Java’s … Continue reading

Posted in Programming | Tagged , | 7 Comments

doto Swing with Clojure

One of the great things about Clojure is how it can make Java programming easier and less verbose. Take Swing.  It takes a ton of code to render even a simple GUI.  Most tutorials don’t even tackle it without an … Continue reading

Posted in Programming | Tagged , | 5 Comments