Zen and the Art of Software Maintenance

On the relationship between software quality, KPIs and leadership

Quality cannot be defined. If we do define it we are defining something less than Quality itself.*

When trying to produce Quality Software, we first need to have a better understanding of what we mean when we say “Quality”. The problem is “Quality” is something that can't actually be defined. Still, in a corporate context we are left with no choice but to deconstruct what we mean by “Quality” while remaining aware that by so doing we lose something of the very meaning we are looking for.

For example, we can look at the following attributes of the ever-elusive “Quality”:

What I mean … by the word ‘quality’ cannot be broken down into subjects and predicates. This is not because Quality is so mysterious but because Quality is so simple, immediate and direct.*

Having all the above attributes (no matter how many we end up defining) does not guarantee that the software we produce is Quality Software, but it's still a pretty good start. Thus, we start working towards these attributes.

Now the question becomes: “How do we know that we are making progress”? How can we tell whether our actions are actually making our software more stable, secure, performant etc.?

The usual answer would be that we need to further break down the attributes we are aiming for, while remaining aware that every time we do so we lose something of their meaning. After enough steps of “deconstructing” we end up with a set of measurements that serve as proxies of proxies – they approximate the attributes that approximate Quality. Things like defect counts, Cyclomatic Complexity, defects/LoC, uptime, user survey results etc...

If we want to be buzzword-compliant we may refer to these proxies-of-proxies as KPIs.

Given these KPIs it should be fairly straightforward to come up with goals and processes that should move them in the right direction, thereby guaranteeing we progress towards quality. Except that seems to rarely happen. There are several reasons why KPIs don't necessarily result in Quality Software – some of them may be:

A dilemma, which is Greek for “two premises,” has been likened to the front end of an angry and charging bull.*

We are faced with a conundrum – We need KPIs, because without them we don't know where we're going and how close we are to getting there. But we must also deal with Implicit KPIs, People focusing on numbers instead of intent and the tendency towards lack of long-term planning.

A more general way to phrase this dilemma is “how can we get people to do what's right instead of what's convenient”?

In our personal lives, the answer to this question is fairly obvious – culture, identity and values. I submit that the same answer holds in our working lives.

“Is it hard?” “Not if you have the right attitudes. It’s having the right attitudes that’s hard.”*

Happily, changing the culture, identity and values just so happens to be the main role of leaders (as opposed to “resource managers”). Thus, the best way for a leader to improve the quality of the software their team produces is to create a culture, identity and values that are congruent with producing Quality Software. The usual process for doing so is to define a vision that clearly states what the leader wants the organization to be. From this vision, a mission statement and a set of values can be derived.

Now all that's left is to change the current culture into the one the leader defined. As anyone who ever tried to drive culture changes in organizations knows, this is a matter of some difficulty.

Peace of mind produces right values; right values produce right thoughts. Right thoughts produce right actions and right actions produce work which will be a material reflection for others to see of the serenity at the center of it all.*

Following Boyd's OODA Loop model, the first step towards changing the culture is examining the current culture. As we just mentioned, in our context “culture” is synonymous with Implicit KPIs, which manifest through the current set of incentives and actions that prevail in the organization. John Cutler's table can be a great start in identifying the current culture.

Once the current incentives are identified, the next step (“Orient”) is to recognize the ones that conflict with the desired values – that is, to recognize cases where the Implicit KPIs contradict (to whatever degree) the explicit ones that we intend to set. We then need to formulate a plan on how to either protect the team from such contradictory incentives, or co-opt the incentives to our purposes (“Analyze”).

Finally, the plan needs to be put into action. At this point we announce the new set of values along with the corresponding set of incentives and then prove our sincerity by following the plan to countermand conflicting Implicit KPIs. This will likely require some level of conflict with superiors and colleagues. “Si vis pacem...”.

Once we have the right incentives in place, they should influence the team members into adopting the right values, which should manifest in actions that drive towards the quality attributes we defined, which would bring the team closer to producing Quality Software. This is also known as “leadership”.