Jan 26, 2007  –  Mocks Aren't Stubs by Fowler

Mocks Aren't Stubs by Martin Fowler, is a very comprehensive look at two pairs of issues in testing: state-based verification vs behavior verification, and classical TDD vs Mockist TDD.

  more »
Jan 25, 2007  –  Floyd's Turing Lecture on Paradigms in Software

In light of the recent conversations about the adoption of developer testing on the junit list and Artima, this Turing Award lecture by Robert Floyd seems particularly appropriate. There's a particularly good quote where he is discussing a quote from Thomas Kuhn in "The Structure of Scientific Revolutions."

"Again from Kuhn:
"The older schools gradually disappear. In part their disappearance is caused by their members’ conversion to the new paradigm. But there are always some men who cling to one or another of the older views, and they are simply read out of the profession, which thereafter ignores their work."
In computing, there is no mechanism for reading such men out of the profession. I suspect they mainly become managers of software development. "
I suspect a large number of the adoption problems for developer testing are in organizations where the old boy at the helm is clinging to an outmoded paradigm of software development. Perhaps those guys would listen to Floyd -- (Robert, not Pink.)
Aug 21, 2006  –  Webinar: Test-Driven Development in J2EE, with J.B. Rainsberger

In early August J.B. Rainsberger gave a webinar on TDD for J2EE:

Test-Driven Development is often introduced through simple examples, but many developers would rather dive into the deep end. This free webinar is for those people. J. B. Rainsberger, author of "JUnit Recipes," will show you architecture and design strategies to make it easier to "test-drive" J2EE components. You'll learn how to build a J2EE application while following the cardinal rule of Test-Driven Development: Never write a line of production code unless somewhere, a test has failed.

The recorded webinar is up on the Agitar website linked from this page. Registration is required but if you'd rather not register try out bugmenot.com.

Jul 21, 2006  –  Dos Equis Driven Design is Not About Beer

It is critical to remember that Dos Equis Driven Design (XXD) is not about the beer. (I'm not saying there was no beer involved, but that isn't the point...)

Apr 30, 2006  –  Mocking a Singleton Over on the TDD mailing list there is a thread about mocking a singleton. There are a few good suggestions given but the best answer (imho) is that provided by Michael Hill:
Mocking a singleton is relatively easy.

To begin with, singleton's are all alone in the world; don't be afraid to point this out. Also, most singletons are created, get this, not even in a factory, but merely in a factory method. Finally there is the point that they are little more than dressed-up globals, and IME experience cause more heartache than they're worth. You can point to the many nasty screeds about singletons there are out on the net. All in all, mocking it shouldn't be too hard. A word: if your singleton has unusually large body parts, stoop to insulting that. Sometimes, to be kind, you have to be cruel.
Apr  1, 2006  –  Refrigerator Code or Girl Code or ...

It doesn't matter if you call it Refrigerator Code or Girl Code or Beautiful Code or simply Clean Code, the meme is out there that is isn't enough to say the code works and then leave it at that. Even if you find yourself unmoved by Kathy's aesthetic arguments you should weigh Uncle Bob's assertion that "keeping your code clean is not just cost effective; it’s a matter of professional survival."

Mar 31, 2006  –  ...The Simplest Thing That Could Possibly Work Is An Object

If you ever feel yourself drawn toward writing a static method, obey Kevin's Maxim: "in an object-oriented language the simplest thing that could possibly work is an object."

Dec  1, 2005  –  Utility Functions as a Code Smell

Keith Ray says utility functions are a code smell and I wholeheartedly agree.

BTW I often use the Adapter Pattern to wrap a class that seems to need utils until eventually the Adapter grows into a whole new class of its own. I have done this to add utility functions for parsing and xpath querying to org.w3c.Document for example.

Nov 17, 2005  –  New Goal: Refigerator Code Dennis van der Stelt lead me to this article by Bob Koss where he defined Refigerator Code:
What’s that? It’s code that you’re so proud of that you want to take it home and hang it on the refrigerator, right alongside of your children’s drawings.
Oct 19, 2005  –  TDD is about Testing? Alan Francis makes the bizare claim that TDD is about testing:
...one major advantage of TDD is the ability to answer the question "how will I know I am done?". We can aswer that question because we have a test that will fail if we are not done and pass if we are.
Of course this is exactly what I was on about when I wrote about why I like the Continuous Testing plug-in so much. (Thanks to Jason Yip for the pointer.)
Sep  2, 2005  –  Test Driven Life Test Driven Development isn't just for software anymore. It's for hacking your life.

I noticed recently that I tend to live my life outside of software development test-first. The idea originally came to me from a friend, Russ Rufer, founder of the Silicon Valley Patterns Group. I forget the circumstance, but nonetheless the practice stuck.   more »