Sometimes you find an elegant solution for a problem that doesn't exist. So, what do you do then? In my case, I just forgot about it for a while.

About five or six years ago, I was invited to a testing summit. There were plenty of testing gurus in attendance: Cem Kaner, Brian Marick, Bret Pettichord, and James Bach were all there. I was there along with a few other developers to talk about TDD, refactoring and some of the more agile development techniques. We all sat together and worked on tests and testing approaches for an application that Pragmatic Dave Thomas had written. It was a blog publication system written in Ruby.

We sat, coded, and discussed things into the wee hours of the night. And, like, most geeks, we didn't really go outside much. When we had breaks, we huddled around our computers and read the web to see if the world had changed outside.

During one of these breaks, I started playing with an idea that was inspired by the method_missing method in Ruby.

What if we had a class like this:

class Pebble
  def method_missing(meth, *args)
    puts meth
    return self
  end
end

We could find some arbitrary method in an application that we don't understand, and just drop a Pebble into it.

  controller = BasicController.new
  controller.accept_renderer(Pebble.new)

Then we'd see a trace of all of the calls to that object, and we'd see traces to calls to all of the returned objects as well. It would be kind of like dropping a pebble into a cave. You drop it, and listen to it on the way down. As you listen you can tell how deep the cave is, and get a sense of its layout. Hokey? Yes, but give us a break. It was late.

We sat and played with this idea a bit. I forget who the other developers were but Jeremy Stell-Smith was there. The code, unfortunately, is long gone. And, it's a shame. We ran into some interesting cases when the pebbles bottomed out at operator calls and primitives in Ruby.

We had pebbles generate other pebbles, and we built up a list of calls with appropriate indentation. And, although we didn't have time to code it, we thought about bringing up a GUI with the source and allowing people to type in the return values of various calls as a pebble dropped.

Unfortunately, we didn't see much practical use to the idea but it still seemed kind of neat. It's just a shame that it was a solution to a problem that didn't exist.