David Vujic has a nice post on interactive programming—what he calls “REPL driven development”—and the huge difference it’s made to his development workflow. His post, Test Driven Development Deluxe, recounts his frustration with having to switch context from the code in his editor to the terminal so he could run a test. By the time he got back to the code, he’d lost a lot of the context he’d built up while coding.
Vujic is writing in Clojure so he has the power of the REPL at his command. His editor is Emacs so it’s a simple matter to test an individual form or a whole function right in the editor. He loves the instant feedback he gets from that and how easy it is to wrap his test commands into a test function in support of his TDD workflow.
The ability to use interactive programming is one of the main reasons that I try to do most of my programming in some sort of Lisp (Elisp, Scheme, Common Lisp). I still haven’t tried Clojure, though. Maybe after taxes and the rest of the Yak Shaving gets done.