Friday, November 10, 2006

Howth Castle and Environs

The issue of big-daddy refactorings, if there are such things, versus the baby-step refactorings, like missing the wood for the trees, is one that expresses in the context of software design the ever-present tension between forces.

A friend an colleague of mine said, "I would love to hear a suggestion for one small concrete refactoring solving a demonstrable problem in the code (which does certainly have problems and will never be perfect). And after that refactoring has been made current and tested overnight I'd love to hear about another one."

My reply was to quote straight out of Richard Helm via James O. Coplien in the Forward to Pattern Hatching by John Vlissides:

"You also have to get the macro-architecture right; layering, distribution, functional isolation,...; and the nano-architecture right as Cope says: encapsulation, Liskov...."

Somewhere along the way we need to step up from nano-architecture and into macro architecture. This in my personal perspective as Daniel the guy who prefers to refactor early than get bitten later. My primary tools are collaboration and approaching design from a patterns perspective.

To pick a nano-level problem, the Liskov problem is a likely candidate. We should get the basic principles of object-oriented design right first. There is not a obvious and trivial refactoring for this problem which can be applied overnight. Not to me, anyway.

I would be looking for a design proposal followed by some work on a prototype to see the detailed design emerge, followed by a design review before the code is inspected prior to being made current.

To return to the beginning (*), if there is a problem it should be fixed in the pattern implementation.

(*) James Joyce's birthday was not so long ago. What is the pertinent literary allusion?

0 Comments:

Post a Comment

<< Home