Friday, June 19, 2009

Shifting Levels of Abstraction Disingenuously


I've been reading Steve McConnell's Code Complete 2nd edition. This is a book that I've had on my shelf for at least 13 years (1st edition). I should have read it in detail a long time ago.  In chapter 6 he talks about designing classes.  He explains the value to effective programming of having the class's interface present a consistent [level of ] abstraction.

He summarizes with this checklist:
Abstraction

    * Does the class have a central purpose?
    * Is the class well named, and does its name describe its central purpose?
    * Does the class's interface present a consistent abstraction?
    * Does the class's interface make obvious how you should use the class?
    * Is the class's interface abstract enough that you don't have to think about how its services are implemented? Can you treat the class as a black box?
    * Are the class's services complete enough that other classes don't have to meddle with its internal data?
    * Has unrelated information been moved out of the class?
    * Have you thought about subdividing the class into component classes, and have you subdivided it as much as you can?
    * Are you preserving the integrity of the class's interface as you modify the class?

This concept of class design has parallels in design of organizations, and in the structure of a conversation or document meant to educate or persuade.

The profound personal insight that came to me from pondering the larger implications of class design, keeping in mind the principles of Objectivist Epistemology, was how I deliberately shift level of abstraction in a conversation by asking about details that appear to contradict the principles that the speaker is talking about.  My ostensible purpose is to give the speaker a chance to anchor their concepts in reality, in sensation, but many times I pick an example that I know can't be explained by the principles I'm hearing discussed.

The result is to confuse the speaker and derail the conversation.

Example: I ask what is more valuable (to whom!); the individual or the collective (society)?
I hear the reply "Well that depends on the situation. What if the individual breaks a law that was passed because we (society) just says so?"

This is a sudden drop in the level of abstraction, introducing undefined terms, that cloud the discussion: What is the purpose of law? Is it an objective law? Is it just? What is the definition of justice?  Is "...we just say so..." really a reason for anything? These terms are derivative from the concepts of individuality, and the conditions for life. If they are used as floating abstractions, logically broken from their conceptual derivation then they have no meaning. They fog the discussion. We need to take a detour to define them properly.