OOPSLA'04: Mock Object Presentation and jMock Demo
I'm currently at OOPSLA in Vancouver. Steve Freeman and myself gave a presentation on using Mock Objects to guide the design of good object-oriented code and a demo of jMock.
The presentation did not go that well. We only had 20 minutes to
talk and with that little time could not really show anything in
action. Instead we gave a hand-wavy presentation with a made up
example application based on a tea shop. I think the example was
too artificial and the talk too high level to really show the
techniques in action. Joe and
I had the same problem with our example when we gave a mock objects
demo at OT2004. The format of the presentation was
uncomfortable for me too: I was stuck behind a fixed mike but I
much prefer to walk around the stage and gesticulate like a
loon engage the audience.
The demo went much better. We fired up the IDE and ran a few TDD iterations using mock objects to explore the design of some objects in our tea shop example. I think showing the library in action when coding really helped get some of our ideas about the larger process across to the audience. Also, I had a clip on mike and the audience was smaller, so I could adopt a more dynamic style and interact directly with the audience. It was great to meet some happy jMock users after the demo and chat with them about their experience with the library. However, the tea shop example was not perfect and served to confuse the message a little.
Duncan Pierce has had a lot of success using video games as example domains when teaching programming and design techniques. I always write a video game whenever I learn a new language or platform because a reasonably entertaining game exercises a lot of different features: event handling, graphics, distribution, file I/O, timing, etc. etc. Perhaps a video game would work much better as a demo for jMock. After all, it was a commercial video game project that drove me to write the forerunner of jMock and experience on that project, among others, informed the design of the current jMock API.