Jan 14, 2008  –  Hoorah for XSLT!
It would be handy to have a report of all the unexpected exceptions that get thrown.

I've lost count of the number of times I've heard that. I've even said it myself a few times.

It seemed like it would be pretty easy to do using the dashboard.xml feature of AgitarOne, so I decided to give it a try.

  more »
Jan  3, 2008  –  JUnit Factory is a Jolt Award Finalist!

First we generate over a million free JUnit tests and then we get nominated for a Jolt Award.

What a great end to the first year of JUnit Factory!

Oct 15, 2007  –  qu’ils mangent de la brioche

It is a curious fact that, if you say

Let them eat cake!

at an international gathering, the French-speaking people will have no idea what you are talking about. Even if you say it in French.

Oct 13, 2007  –  In Praise of Abstraction

A History of Build Systems

In my younger days, before I knew any better, many projects I worked on compiled and published their software manually. You'd type cc and then copy these bits over there and then zip that directory and post it to there. Eventually, we figured out we could write little scripts to automate all the tedious bits and make it less fragile and more repeatable.

One day, I discovered the discipline of daily builds and tools like make and my life got a whole lot better. Make gave us, in Elizabeth's handy phrase "a place to put things".

  more »
 –  The Commitment Principle

Elizabeth Hendrickson is a tremendous facilitator and a canny manipulator.


In Influence: The Psychology of Persuasion, Robert Cialdini describes various techniques for making people do things that, if they were thinking clearly, they would otherwise not do because of lethargy, laziness, or because it would offend their better judgment.

One of those techniques is The Commitment Principle which was used on American POWs to great effect by the Chinese during the Korean War.

  more »
May  7, 2007  –  Scorecard for Bowling Scorer

JUnit Factory has a new feature - project dashboards - and I thought I'd try it out on my bowling code.

  more »
Apr  6, 2007  –  What Color Are My Tests?

I came across a nice quote from Ron Jeffries in answer to the eternal question about the color of the tests that result from TDD.

  more »
 –  Triangular Honey from Triangular Bees

I hosted a JUnit Factory presentation a few days ago (you can watch it online if you missed it first time around) and spent a fair amount of time talking about the Triangle sample in the JUnit Factory demo.

  more »
Apr  5, 2007  –  Web Technology Cheat Sheets

There are a handful of web technologies that I use a lot. It's handy to have a cheat sheet around for when I can't remember whether it's switch-case or choose-when or if-test-else.

Here are a few that I use all the time:

Any more I should know about?

Mar 22, 2007  –  Coding in Public

I can code passably well and I am comfortable with public speaking - but there is something about combining the two that makes my brain just completely shut down.

  more »
Mar 20, 2007  –  Characterization Test Failures

For completeness, I run the characterization tests one last time. As you might expect, there are failures because the behavior of getSecondBall() and needsMoreBalls changed.

  more »
 –  Spare!

I am impatient to be done now, so I'll try to get through the code for spares quite quickly so that I can review my findings.

  more »
 –  How Are Those Characterization Tests?

Someone asked me how the characterization tests fared after such an extensive change. After all, I added new methods, new behavior to existing methods and I refactored extensively.

  more »
 –  How Are Those Acceptance Tests?

With the code for strikes written, it's time to run the acceptance tests to see if they agree that we are done.

  more »
 –  Strike!

According to the rules:

2.1.3 A strike is made when a full setup of pins is knocked down with the first delivery in a frame.
  more »
Mar 19, 2007  –  Characterization Tests Revisited

After I completed the first story, I generated some characterization tests with JUnit Factory.

Before I move on to the next story, I want to revisit those tests and make sure we have not introduced any regressions.

  more »
 –  How does the Score Sheet Look?

Before I move on to spares and strikes, it would be nice to see how the score sheet looks. In an earlier post, I claimed that one of the reasons for integrating the UI early is to make sure the domain model will satisfy the requirements of the user interface. Let's see if it does.

  more »
Mar 16, 2007  –  Are We There Yet?

My last post ended with this bold assertion:

If I am not mistaken, I have written enough code to pass the acceptance tests for this story.
  more »
Mar 15, 2007  –  First Design Your Data Structure

It's at about this stage of the bowling example that people usually leap into a discussion about the appropriate data structure to store the rolls and the APIs for exposing the results.

  more »
 –  In which we design the score card

In the previous installment, I wrote the code that implements rule 2.1.1. For rule 2.1.2, I finally start to add up some scores and show them in the score card.

  more »
Mar 12, 2007  –  Testing Around the Edges

It's an interesting word, 'test'. It can mean so many things. Before XP came along it used to mean

find out whether something works correctly
  more »
 –  A game of tenpins consists of ten frames

In my previous blog entry, I posted a set of acceptance tests for the first few stories. It's time to start writing the code to pass those tests. I prefer to discover the design through TDD rather than code directly to the customer-facing tests.

  more »
Mar  9, 2007  –  Acceptance Test for Bowling Scorer

I have often written acceptance tests for code that has not yet been written (in fact, I wrote an article about it) but I have never written tests that will work with any number of implementations, each with their own architecture. I don't even know how to go about it, but that never stopped me before...

  more »
 –  Bowling for Objects

"scoring a game of bowling" is probably the most common application used when demoing TDD. It's so commonly known among the JUnit crowd that I chose one of Bob Martin's efforts as a demo for JUnit Factory.

The topic comes up about once a year on the TDD mailing list and it just came up again. By an odd coincidence, we just celebrated the completion of a new release of AgitarOne with a trip to Homestead Lanes, so I am all fired up about bowling despite my dismal performance (there was beer involved).

  more »
Dec 12, 2006  –  Do Not Read This!

We are working on an early version of JUnit Factory and we learned some very alarming lessons about web usability this week.

The main lesson: no one reads anything.

  more »
Nov  1, 2006  –  In the path of Pagan Raiders

Brian Marick is a funny guy

Those in the Agile world all know of resistance to Agile from those middle managers who see it as a threat to their power to command and control. Telling such a person that her sabotage endangers the company's ROI is like an abbot standing in the path of Christian raiders and threatening them with loss of their immortal souls: sometimes it works, but nowhere near often enough. And it never works with the worshippers of Odin.

Aug 24, 2006  –  Build Failures Policy

I just wrote a page on our internal wiki with our policy for dealing with build failures. We thought others might find it interesting so I am sharing it here (the links will be broken for obvious reasons).

Executive Summary

If the build fails, fix it.

  more »
Aug 11, 2006  –  Failing tests shouldn't always break the build

There are many reasons why you might not want to fix a failing test right away. Maybe it's an acceptance test for a feature that you haven't written yet. Maybe it's a regression that it's just not practical to fix right now.

But what to do with that failing test?

  more »
 –  Failing tests shouldn't always break the build

There are many reasons why you might not want to fix a failing test right away. Maybe it's an acceptance test for a feature that you haven't written yet. Maybe it's a regression that it's just not practical to fix right now.

But what to do with that failing test?

  more »
 –  Old metrics never die

If a little bit of feedback is good, a lot would be even better, right?

Is there such a thing as too much feedback?

XP doctrine says that you should stop tracking metrics once they have served their purpose. You should only have 3 or four "Things To Focus On". There's a reason for that.

  more »
Jul 14, 2006  –  Put Your CC config in Version Control

I got fed up with updating the 20 step instructions on our wiki for configuring a new cruise control machine so I wrote a script and checked it in to CVS. Obvious really.

  more »
Apr 13, 2006  –  Test vs Spec or ForAll vs ThereExists

Brian Marick says that tests are not specifications but I believe there is a more fundamental distinction.

  more »
Feb 22, 2006  –  A Recipe For Making Developers Write Tests

This is the only thing that has ever worked for me.

1. Test your own code as well as you can
2. Next time someone checks in a slap-your-forehead bug, show them the test that would have caught the bug if only they had run the tests.
3. Show them how to run the tests themselves

It won't be long until everyone will want to have tests.

Most developers will not make the investment until they have seen proven returns. The management challenge is to find the early adopter with the courage and vision to take that first step.

Dec 18, 2005  –  Humane Interface or Minimal Interface ?

Bruce Eckel weaves together the two hot topics in blogland this week. One is the Humane Interface vs Minimal Interface discussion which pits Java's List API against Ruby's. The other is the "Death of Java" topic.

  more »
Dec  1, 2005  –  Shameless Plugs

Unlike Jeff, you won't catch me shamelessly plugging my EclipseCon talk on The Humble Plugin.

 –  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 18, 2005  –  Influence of Other Languages on Design

The Pragmatic Programmers recommend learning a new language every year. Not because you need to know a whole bunch of languages, but because other languages use idioms that you might not think of using in your everyday language.

  more »
 –  What's the Use of Coverage

There is a discussion on the JUnit list about whether coverage tools are valuable.

I ran a coverage tool on a project of mine last night and found that almost all the coverage gaps were in boilerplate code. An interface required me to return false in a whole bunch of classes.

The duplication was already bothering me. The duplication plus coverage gaps bothered me enough to extract a common base class. Coverage was back up to almost 100% and I liked the new design better.

Go figure.

Nov  2, 2005  –  Wacky Design Ideas

Every now again, I hear of a wacky design idea or a challenge to a deeply held opinion on design.

  more »
Oct  5, 2005  –  Interviews in a Blink

Malcolm Gladwell, in Blink, tells a story about how some students were asked to evaluate their teacher after a semester.

  more »
 –  Cheat Sheet for Interview Candidates

Just to make it easy for any potential candidates out there, here's my whole interview question for the J2EE position.

I want you to build a Hello World application in J2EE. I want you to do the simplest thing that can possibly work.

  more »
 –  Tips for being a good interviewee

1. If you are interviewing for a company that makes tools for developer testing you should probably know something about developer testing.

  more »
Aug 24, 2005  –  Grow Your Harness Naturally

I wrote this article for the March 2005 issue of Better Software. Now available for the first time online... enjoy!

I have worked with many testing common organizations where a common pattern is repeated over and over. It goes something like this — we realize there is more manual testing to do than time available, we decide to automate the testing, and we begin working on a test harness. Several weeks later, we have the start of a harness, but it’s barely useful and we still have not written any tests. At this point, we’re behind — so we abandon the harness and revert to manual testing.

Full article [PDF]

Jun  8, 2005  –  Creating a Value Type for Validation (epilog) Here's another good reason for using a type (Creating a Value Type for Validation) even for something as simple and unlikely to change as a class name ...   more »
Apr 11, 2005  –  The Monty Hall Problem The Monty Hall problem comes up every now and again - it's currently being discussed on the XP mailing list. It's a great problem. The description of the problem is well discussed on the web, so I won't repeat it here.   more »
Feb 18, 2005  –  Is it Wise To Aim for 100% NTF ? 10 steps on the journey to the perfect metric.  more »
Feb 17, 2005  –  Rude Applications

Things I hate :

Applications that pop themselves to the front.

(are you listening, IntelliJ ?)

  more »
Jan 13, 2005  –  What is Agile Testing ? A conversation on the agile-testing list made me think some more about the two types of testing that I blogged about in TDD and Agitationmore »
Dec  9, 2004  –  TDD and Agitation I have been doing Test Driven Development (TDD) for about four years now and agitating for a little less (it's my second anniversary as an agitator today) and I have thought a lot about how to marry the two testing styles. A discussion on the TDD mailing list today (http://groups.yahoo.com/group/testdrivendevelopment/) finally gave me a name for what I have been doing for a while. The discussion centered around the relative merits of TDD versus Design by Contract (DbC) and a surprising - surprising to me anyway - number of people said that two are complementary and that they do both. That's exactly what I have been doing without realizing it.  more »
Sep 13, 2004  –  Creating a Value Type for Validation (revisited) Earlier in the year I wrote about introducing a wrapper type to encapsulate the validation of a value that is essentially just a string (see Fight Complexity with Complexity). I just ran into the flip-side of this - the anti-pattern if you like - and I felt compelled to rant about it.  more »
Jul 16, 2004  –  Testing HTML Pages I started this article intending to talk about a technique we developed for testing Velocity templates but realized that there was enough background material for a separate article on testing html. So, this entry describes how we developed a harness for checking the output from the Management Dashboard. A second entry will talk about how we adapted the harness for testing Velocity templates.  more »
Apr 16, 2004  –  Measuring Quality Laurent Bossavit has some interesting thoughts on measuring software quality at bossavit.commore »
Mar  8, 2004  –  Fight Complexity with Complexity We were using method and class and package names as keys to the various data structures that store test results and coverage data. Agitator told us that if you pass the string "123%%^*abc" to a method that expects a class name, it throws an IllegalArgumentException. "Well, duh!" we said and marked it expected. We added a factory to generate a variety of good and bad class names and got on with the task at hand.  more »
Jan 16, 2004  –  Why Is Software So Hard To Test? Start a conversation with any developer about unit testing and, before long, he'll tell you that automated testing is a fine thing in principle but that his code is too hard to test because ....  more »