Stupid Human Programming
Talk on software development.








Subscribe to "Stupid Human Programming" in Radio UserLand.

Click to see the XML version of this web page.

Click here to send an email to the editor of this weblog.


Sunday, August 21, 2005
 

The Value of Adapter Philosophies for Iterative Change

One saying i really like is: Only Say Things That Can be Heard

What this means is that everyone and every organization is in a different place in their lives. If you show up at a company and tell them everything they do stinks then you won't be heard. You will just make enemies and nothing will get done as everyone sharpens their fangs for the next fight. You get the same result when "talking" with your family too :-) Somehow you must find a way to talk to someone in a way that makes sense to them.

I must admit this is a hard bit of wisdom for me to take out in the real world. I tend to be too direct at times. I remember one particular meeting where I realized just how destructive the direct only the facts matter approach can be. In this meeting from hell this one particular ubergeek was coming hard and fast. He was questioning everything. He was disagreeing with everything. He was saying everything I wanted to do wasn't going to work because it didn't work when he did it at company X. He wasn't giving an inch on anything. And he was doing it all with that infuriating "I am just trying to understand" attitude. In short, it was like looking at me at my worst.

Now I don't much like looking in the mirror anyway, but when that's what I see staring back I want to banish all mirrors, just like they did in the movie The Skeleton Key.

At that time I made a solid pledge to change may ways and try to Only Say Things That Can be Heard. Am I 100% successful? Unfortunately, no. But I am much better now. Through my career I have consistently witnessed this same movie replayed, only with different actors and a new sound track. Software is only partly technical. Building software is mostly social.

I was reminded of this again when an issue came up on the scrum emailing list about trying to make the Capability Maturity Model for Software (CMM) more agile. A team from Microsoft had done a lot of good work on trying to make CMM more agile. CMM is very popular, especially at large organizations, and is decidedly anti-agile in practice. If a way could be found to make CMM more agile, then that would be a good thing, or would it? Someone asked why it mattered. Let agile people go on their own way. Sure, these companies would be better off if they were more agile, but since they've chosen to use CMM they'll get what they deserve. Who cares?

This reminded me of
Only Say Things That Can be Heard.

In software design there's a pattern called the adapter pattern. The adapter pattern converts the interface of one class into another interface clients expect. It brings unlike things together through an intermediate wrapper.

One good example is the WindowAdapter class in the Java API. WindowAdapter implements the Windowlistener interface, which has seven methods. When you inherit from Windowlistener, you have to implement all seven methods, even if you only want to use one of them. That's where the WindowAdapter class comes in. It implements all the methods with a default behaviour so you only have to implement the methods you need.
public interface Windowlistener {
public void windowClosed(WindowEvent e);
public void windowOpened(WindowEvent e);
public void windowIconified(WindowEvent e);
public void windowDeiconified(WindowEvent e);
public void windowActivated(WindowEvent e);
public void windowDeactivated(WindowEvent e);
public void windowClosing(WindowEvent e);
}
public class WindowAdapter implements WindowListner{
public void windowClosed(WindowEvent e){}
public void windowOpened(WindowEvent e){}
public void windowIconified(WindowEvent e){}
public void windowDeiconified(WindowEvent e){}
public void windowActivated(WindowEvent e){}
public void windowDeactivated(WindowEvent e){}
public void windowClosing(WindowEvent e){}
}
WindowAdapter can be used anywhere Windowlistener can be used, but 
you only have to pay attention to the parts you need to "hear" at the
time. It makes listener classes easier and more convenient to create.
It makes the original listener class acceptable to a broader audience.

You may think the WindownAdapter class is silly and useless, but it
helps people accept the more complicated Windowlistener interface.
Later, when they are ready, maybe they'll need the more complete
interface. Or maybe they never will.
We don't just have adapter classes, we also have adapter philosophies.
What the team at Microsoft is doing is creating an adapter philosophy
that makes the ideas of agile acceptable within CMM. Without this
effort there would never be a change. People don't change when you
attack them or give them something completely and totally alien
to their experience.

We see adapter philosophies in history too. One interesting example
is the spread of buddhism from india to china.
Buddhism, which started in india, found it very difficult to spread into china because traditional chinese thought was so different. Buddhism believes in reincarnation, for example, while traditional chinese beliefs emphasize ancestor worship. There are many other similar examples.

Then how did buddhism spread into china? What happened was taoism became an adapter philosophy between the two sides. Taoism is rooted in the oldest belief systems of china, so it was well known and well accepted by the chinese. Because buddhism could be partially understood using taoist ideas, buddhism got the toe hold it needed. Eventually the buddhist ideas could be accepted and understood on their own without the taoist wrapper, but it took time. Radical change on a mass scale was unlikely to happen, especially given the non-violent ethos of buddhists. Through the use of an adapter philosophy it was possible to change iteratively, one small step at a time.

The opposite happened in japan. Shinto, which was once the state religion of japan, was well aligned with the chang buddhism that made its way into japan. Chang buddhism found a ready audience for what later became zen.

Interestingly, the chinese strains of buddhism remained characteristically chinese. The same in japan, nepal, and thailand, and everywhere else ideas spread. Adoption is rarely total, it's more a process of mutual adaptation, like breaking in a new shoe. Both your feet and the shoes give a little. If the shoes never become comfortable, you end up finding a new pair.

It just might be that the combination of CMM and agile might be better for many solution spaces than either
alone would be.


If you are interested in agile ways spreading, it may be a good idea to encourage adapter philosophies. People often need a partial metaphor which supports their working simultaneously in their old world and their new world. Not everyone makes the jump directly into becoming
a true believer, nor would you want them to.

The fact that most buddhists were later purged from china should not be a concern :-)

comment[]

3:48:47 PM    



Click here to visit the Radio UserLand website. © Copyright 2006 todd hoff.
Last update: 7/11/2006; 12:43:19 PM.
August 2005
Sun Mon Tue Wed Thu Fri Sat
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31      
Jul   Sep