Showing posts with label User Stories. Show all posts
Showing posts with label User Stories. Show all posts

Saturday, October 17, 2009

OOP Semaphores
Byline: Smoke signals from one developer to another.

I would like to point out the very obvious, that too often gets lost in the shuffle.  The code choices we make when designing components act as a series of “signals” that we send to the next developer working on the library or to the developer who is applying and implementing the objects we have created.  When we are crafting our code, our choices of class and parameter names, member protection levels, and constructors act as the primary method of disseminating the indented usage of our code.

If an organizations code base is the most inclusive repository of business process knowledge of an organization, then our code libraries supply the nouns, verbs, and adjectives of the business process.

Name for global business understanding
Most business processes have a generally accepted internal name.  This is the name that the stakeholder community will call something when telling their business story.  Using a different name, as in the statement, “to me blank is this,” when your user community has consolidated on a defined designation, is obfuscation, and to me, smacks of hubris.

Sometimes, you must rename, for elucidation, like when swapping out an acronym or abbreviation for a “Plain English” term that more fully explains the intended usage.  But this means you will have to disseminate the new term and usage throughout the hierarchy you are involved in.

One of the best reasons I can think of to develop documentation artifacts before the creation of a code base, is so that you have a more complete set of thoughts on the business processes, so that the names you choose will be indicative of the actual use of your objects in the wild.

Code the meaning of your Intended Usage into your implementations
So lets talk about the following code:
  
 Fig.1  
    interface iAnimal
    {
        string Name { get; set; }
        object Vocalize(object SpeechType);
    }



The Plain English meaning of this code is that all objects that implement iAnimal will have at least one string type property called Name, and a method called Vocalize that takes a parameter of type object and returns an object.  By creating an interface (a code pattern that set a base contract of what will be contained in an object) the architect of the code, signals to other human beings implementing his work, that this is the minimal acceptable level of code to implement this functionality.  If you implement from this interface, the assembler will only compile your object, if your code object contains all the members specified in the interface. Those the contextual meaning of the code is “you must have all these pieces.”

Fig.2
    public class Animal : iAnimal
    {
 private object _vocalization;       
 private string _name;

        public string Name
        {
            get { return _name; }
            set { _name = value; }
        }
       
        public object Vocalize()
        {
            return _vocalization;
        }

    }


Figure 2 shows the terms of the code contract being met in full. So we have a cycle of intention and usage, playing out into fulfillment, Contract spelled out by the interface, and then Contractual Obligations met in full by the implementing class.

“What I would like to stress here, is this is not just a series of assembly instructions, this has inherent intended meaning from one human being to another”
So how about when a developer sets up a class as abstract, the Plain English meaning is that the object must be inherited to be used. The compiler will not build if you try to call new on the abstract object.  But the contextual meaning that the code’s architect is attempting to send to the implementing developer is that the architect’s intended usage of this code is as a base class that is meant to be inherited.

Sunday, June 15, 2008

Memes = Knowledge Units

In business, knowledge units are routinely passed from person to person as people shift and change positions. Many people in an organization have knowledge about the functions that a person performs in a position, from the specific to the general. Most often position specific information is passed from position occupant to position occupant. During the 1970’s the study of the actions of a group of business people was called “System’s Analysis.” Today much of a IT group’s understanding of a business knowledge is gained through “Use Cases" or "User Stories."

The User Stories are have more to do with the desired solution, then with what is currently happening, so that the shape of “System’s Analysis,” which was the documentation of current procedures has changed somewhat over time. As now we collaborate more on what we want to happen, then on what happens.

A partial understanding of what is currently happening could be gained using the sociological tools of memetics. Memetics is the study of transmittable pieces of knowledge replicated primarily through imitation. Lots of work flow analysis may benefit from capturing the information that is transmitted from position holder to position holder as natural turnover happens in the enterprise.

A meme is a unit of knowledge that can be transferred between people, usually through imitation. Transfer of knowledge units happens with replication and propagation. Knowledge transfer through an organization has a transformation vector. Knowledge vectors have a tendency to cluster and happen together or "herd", this is memetic association.

A knowledge unit can morph between propagations, not unlike a game of telephone, this is reflected in memetic drift or the meme's copying-fidelity. A meme is thought to have memetic inertia if its characteristics are manifested in the same manner, regardless of who receives or transmits the meme.

A knowledge unit may not always be health and helpful, this is reflected in the Meme's Fitness. A knowledge unit that does not allow another specfic meme to exist is an Allomeme, a mutually exclusive cultural trait.

A meme's rate of replication and therefore its spread is the meme's fecundity. The longer any instance of the replicating pattern survives, the more copies can be made of it, this is the Meme's longevity.

A cluster of meme's is known as a memeplex. A collection of memeplexes is know as a Deme.

As a software developer a portion of my job is to capture the processes in an organization. There are most likely great tools out there to do this, I just don't know about them. So I spend time wondering about how knowledge is transferred around the office, so that I can take my butterfly net and capture it for study so that I can turn it into "machine Instructions."

User Stories are great, but they don't get deep enough sometimes in the processes of knowledge. So I use "User Stories" but think about the propagation of knowledge in the enterprise.