![]() |
||||||||||||||||||||||
The Black Art of Programming |
Object-Oriented ZenOn Friday, we had a discussion on how to report lost billing data. The object that is responsible for reporting billing activity gets its data from looking at billing records. How do we deal with the situation where we report on the number of billing records that were lost (by type, of course) by looking at the billing records that were never created? Object-Oriented Zen (OOZ) provides the answer. Under the OOZ paradigm, the Zen Master subclass, which has no methods and no instance variables, is subclass to all existing classes, singly and in all combinations, as well as a subclass of nothing at all. (The Zen Master thus needs no methods or data, because it already has access to everything it needs.) The Zen Master is also an unreferenced and unreferenceable parameter on all calls. In this way, OOZ provides a framework for comprehensive error handling of a large class of programming errors (errors of omission). As an omnipresent subclass and parameter, the Zen Master is in an ideal position to mediate between the existence of an omission, and the non-existence of the missing item. Western minds may be more inclined to use a Zen Manager, but this will not work! A Zen Manager is a self-negating concept, as Zen does not manage, and Managers abhor inactivity, nothingness, incompleteness, and all other concepts of Zen (among other things). Further, while Zen is adept at comprehending the absence of things, it was never intended to deal with the absence of itself. Thus a Zen Manager could never be created, or at best would vanish the first time it is needed.
(This cannot be sung to the tune, "There's no business like show business like no business I know." Only a Zen Master can do this. Proof is left as an exercise for the reader.) |
|||||||||||||||||||||
|
Copyright © 1995, 2001 by Diane Wilson. All rights reserved. |
|||||||||||||||||||||