TDD and Refactoring
From: Harry Erwin (herwin_at_theworld.com)
Date: 12/24/03
- Next message: Dave Harris: "Re: Terminology"
- Previous message: Daniel T.: "Re: The Sort Excercise"
- Next in thread: Phlip: "Re: TDD and Refactoring"
- Reply: Phlip: "Re: TDD and Refactoring"
- Reply: Ron Jeffries: "Re: TDD and Refactoring"
- Reply: JXStern: "Re: TDD and Refactoring"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 24 Dec 2003 09:12:28 +0000
I'm running an experiment with test-driven-development and refactoring
as the development methodology for a program that makes use of the swing
GUI and does a lot of complex mathematical modeling with many special
cases in the business logic. Lessons learned so far:
1. "Duplicate observed data" took some work but simplified the design
markedly once I implemented it.
2. "Extract method" was the most common refactoring used to clean up the
GUI.
3. The class instances that are displayed in the GUI needed to hang
around, so many of the polymorphism strategies had to be implemented
using State/Strategy patterns. This produced an inheritance hierarchy
explosion.
4. Unit testing the math turned into a serious headache, especially with
all the special cases. The business logic test case suite looks like
it's headed for 100+ individual test cases. This is for a single use
case.
5. Replacing temps with queries produced method explosions in the key
classes of the business logic.
6. I was hoping careful refactoring would reveal some different ways of
organizing the design. The complexity explosions made it very difficult
to see the forest for the trees.
-- Harry Erwin <http://www.theworld.com/~herwin/>
- Next message: Dave Harris: "Re: Terminology"
- Previous message: Daniel T.: "Re: The Sort Excercise"
- Next in thread: Phlip: "Re: TDD and Refactoring"
- Reply: Phlip: "Re: TDD and Refactoring"
- Reply: Ron Jeffries: "Re: TDD and Refactoring"
- Reply: JXStern: "Re: TDD and Refactoring"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|