Syndicate this site: (RSS)

Once and Only Once

The easy part of OAOO is removing duplication. The hard part is getting all of the ideas in once. It's very easy to elide ideas because - in the problem you are solving right now - two or three things are almost indistinguishable.

Brian Marick is close to discovering this in his thoughts on But Syd.

One of the key advantages in TestFirst programming is that it immediately introduces a second client into the design of your software (the other pieces of the production code are the first client, of course). The second client makes it easier to recognize distinctions between behaviors that might otherwise be too subtle to pick up.

A second user interface serves much the same purpose. When you write two UIs, you discover a third piece that describes the shared behavior. That layer really existed all along, but you hadn't discovered it (or perhaps you just didn't know how to discriminate it). In other words, what you are discovering is a piece of the software that you haven't yet written Once.

"You ain't gonna need it" proscribes implementing behaviors from the future; but I believe it permits gazing into the crystal ball to examine future behaviors, identify those ideas that the future has in common with the current code, then isolating and labeling those ideas in the present code.

Once and Only Once means At Least Once and Only Once.

April 11, 2003 2:01 PM | TrackBack

Comments
Post a comment




Who are you?