Technical Debt: What It Is and Why You Should Care

larry apke, technical debt, sd times

larry apke, technical debt, sd times

I was recently invited to write an article about technical debt for Software Development Times (SD Times).

My personal experience is that technical debt is rarely understood, especially by our business partners, and is a symptom of the continual misapplication of project-centric thinking in software development.

– Larry Apke

How Would You Rate Your Organization?

larry apke, devops, cultural shift, agile doctor, software development

larry apke, devops, cultural shift, agile doctor, software development

While browsing the 2014 State of DevOps Report, the authors referred to a study by a Professor Westrum of Eastern Michigan University called A Typology of Organizational Cultures. In this article, Westrum studied the flow of safety information within hospitals, how that flow could be classified into an organizational typology and what effect that typology had on organizational safety. His conclusion was that:

“Because information flow is both influential and also indicative of other aspects of culture, it can be used to predict how organizations or parts of them will behave when signs of trouble arise. From case studies and some systematic research it appears that information culture is indeed associated with error reporting and with performance, including safety.”

The table below summarizes Westrums types:

Pathological

Bureaucratic

Generative

Power Oriented

Rule Oriented

Performance Oriented

Low cooperation

Modest cooperation

High cooperation

Messengers shot

Messengers neglected

Messengers trained

Responsibilities shirked

Narrow responsibilities

Risks are shared

Bridging discouraged

Bridging tolerated

Bridging encouraged

Failure leads to scapegoating

Failure leads to justice

Failure leads to inquiry

Novelty crushed

Novelty leads to problems

Novelty implemented

In the DevOps Report, they tracked the ability to be successful with DevOps to the three organizational types Westrum mentions: Pathological, Bureaucratic and Generative.

They found, unsurprisingly I might add, that the ability to successfully transition to a DevOps culture was tied to the organizational culture, with the most success seen by Generative organizations.

 “DevOps” is now the new buzzword, but the 2014 State of DevOps Report (and Westrum’s typology) reinforce that DevOps is clearly a cultural shift and that large organizations, which tend to be pathological as a rule (with some of the more noble ones merely bureaucratic) will only implement “DevOps” in name only or as a repackaging of the existing operational silo.

While the authors of the DevOps Report tied Westrum’s typology to DevOps implementation, the relationship between culture and a larger organizational adoption of Agile are crystal (pun intended) clear. I would go so far to say that in my extensive experience with organizational transitions to Agile that until the issues of culture are addressed by upper management (by a C-Level Executive – perhaps a CAO) then even attempting to make an Agile transition is not only destined to fail, but more than likely, fail in spectacular fashion.

At issue is not whether you can get some short term gains at the team level, but that without cultural support, whatever gains made will be unsustainable.

In my experience there are a few things likely to happen:

  • First, you will optimize the team at the expense of the system. There is little benefit to creating code faster if it cannot be deployed (hence the new DevOps push).
  • Second, you will optimize team speed at the expense of quality. In Pathological and Bureaucratic organizations the shift to quality is unlikely to be embraced so creating features faster only increases technical debt faster.
  • Third, as the novelty of the Agile implementation fades (think Hawthorne effect), what you are left with is a group of individuals who are increasingly disgruntled by the consistent failure of the larger organization and upper management to remove even the most fundamental impediments. What’s the point of showing people a better way to create software and then not allowing those people to actually do it? It is at best incompetent and at worst borderline criminal.

I suspect that a great deal of the backlash Agile has received of late is directly tied to Pathological and Bureaucratic late adopters flailing at a transition to Agile.

My advice? Ask yourself, or, better yet, ask your employees to honestly rate your organization with regards to Westrum’s typology

If you are identified as Pathological or Bureaucratic, address your culture issues first before embarking on Agile transformation.

Agile coaches can help if they are allowed to work directly with upper management to help them to change the culture, but having them work directly with teams (without addressing culture) is like sowing seeds on a footpath.

“Are You Crazy?!” – Project vs Product Focus

eco-data, larry apke, agile doctor, product focus

eco-data, larry apke, agile doctor, product focus

When You Have A Project Focus

Coach: If we take some time to learn and adopt excellent software development practices like BDD/TDD, CI and refactor some our code to remove some technical debt, we will be able to development higher quality software and deliver it to our customers faster.

Project Manager: Are you crazy?! We are already behind schedule! We cannot take on anymore work. This would increase our risk of delivering desired functionality!

Coach: But fixing some of these issues will allow the team to create better code and reduce the cost of delivering in the future.

Project Manager: Future. I am concerned with the delivery next quarter. After this project is completed, we transfer the code to the maintenance team. Let them do this work, I don’t want it charged to my project. Besides, the development team on this project will be disbanded at the end of the project.

Coach: Are you crazy?! Disbanding the team? All the progress we have made as a team is lost as soon as you disband the team. You cannot build a quality product when you keep shuffling teams! Keep them together and bring the work to them.

Project Manager: How much are we paying you? We need to save some money.

When You Have A Product Focus

Coach: If we take some time to learn and adopt excellent software development practices like BDD/TDD, CI and refactor some our code to remove some technical debt, we will be able to development higher quality software and deliver it to our customers faster.

Product Owner: That sounds awesome! I will work together with the team to understand the long term return on investment of doing these things, we will create some stories to handle this work and prioritize appropriately.

See what I mean?

Larry Apke

Technical Debt in the Real World

technical debt, larry apke, agile

technical debt, larry apke, agile

I came across a video the other day that compares the relative devastation caused by two similar earthquakes – a recent 6.0 magnitude earthquake in August 2014 in Northern California and a 6.1 magnitude one in that same month in Yunnan Province, China. The differences are astounding. I created a simple table below to show the particulars.

California

China

Deaths

0 619

Homes Destroyed

4

25,800

To what do we attribute the differences in outcomes in response to similar events? The difference is one of quality. Homes in China are built quickly with only cursory inspections while those in the United States, especially those in earthquake prone areas, are built to exacting standards.

Being a huge proponent of software quality, I could not help but think of the connection between this and code quality and technical debt. In my mind, this is an example of the dangers of technical debt personified. Yes, they build habitable homes in China, but they are not built with the requisite quality necessary to withstand an earthquake. In this case, the corresponding loss is horrific in loss of life and loss of quality of life.

We can see the same things in software development. In our rush to complete our features, we take shortcuts in quality, building, as it were, houses that will not be able to withstand earthquakes.  In the case of software it is rare that the technical debt created has cost of human life, but it certainly can manifest itself in a cost to the quality of life. And much like the house that cannot withstand an earthquake, poor quality code may look fine from the outside, hiding the cost that will be paid at a later date.

Not a day goes by where we do not see some of the “earthquakes” in the world of software – the recent hacks into Apple, Target, JP Morgan Chase et al ad nauseum should provide some adequate examples. And these are just the flashy incidences that we hear about in the media.

Please don’t think I am making light of the devastation in China. My heart goes out those affected by this terrible tragedy. I take this very seriously, as I take the concept of technical debt very seriously. My hope is that us folks who make software for a living can see the similarity and leverage it to continue the fight for high quality software development. Let’s not continue making brittle houses – figuratively and literally.

Larry Apke

One More Big Reason for Adopting BDD

picjumbo, larry apke, joel software, larry apke bdd, bdd adoption, agile, agile scrum

picjumbo, larry apke, joel software, larry apke bdd, bdd adoption, agile, agile scrum

I have always considered Joel on Software as one of the best bloggers on software development that exists.

I absolutely love his approach to software development and should he ever open an office west of the Mississippi I would be the first to send my resume!

While doing research on another blog topic, I came across his famous blog on the Netscape rewrite. As happens from time to time, a universal truth crashes into our consciousness causing a virtual cascade of neural connections to fire, providing in the instant the “Aha!” moment. It came to me as I read the profound truth that is “It’s harder to read code than to write it..”

I was blown away because while my post, 10 Reasons Why BDD Changes Everything, has some great reasons to adopt BDD, after reading Joel’s blog again (which I had done before and did not explicitly make the connection), I think I might have missed perhaps the most important reason for BDD.

So here’s one more reason, inspired by Joel, for adopting BDD, namely: If it is harder to read code than to write it, BDD provides a simple and concise method for making the code that we write frighteningly easy to read (especially when compared with how most code is currently written).

Over the last three plus years I have coached adoption of BDD at all of the companies I have consulted and have constantly asserted that a team (and the larger organization) cannot be agile over time (anyone can be agile over a short period) without adoption of some form of ATDD (my choice being BDD) and continuous integration / delivery.

I challenge anyone to change my mind with solid proof. So far only one inexperienced scrum master has even tried!

Conversely, the more I read from software development professionals whom I admire and trust (like Joel) the more I become convinced that my position is correct.

Tell me your thoughts.

Larry Apke

Why Agile is the Answer for Healthcare.gov

larry apke agile doctor

Healthcare.gov - www.agile-doctor.com

I have purposely tried to not comment about the Healthcare.gov website and it’s issues, but the landslide of wrong-headed information written on the subject has prodded me into adding my small voice on the upside that someone reading my this post will learn from this software development fiasco that we all have paid so dearly for.

Most unfortunate for those trying to learn from this is that the issue is so politically charged that to discuss it objectively is nearly impossible. The desire to place blame is too deeply ingrained in the human psyche to not point fingers – and this, for anyone capable of laying politics aside is the second lesson – the lesson that assigning blame is a human instinct that is not always productive in solving problems. Root cause analysis is essential to fixing systemic issues and may tangentially point to individual failings, but placing blame should not be primary.

And this leads to the first problem – the fact that this issue can rarely be discussed without politics. Once we have chosen sides, not only do we move from objective root cause analysis to finger pointing, but we begin to be tainted with confirmation bias in that everything we hear, read, experience is pulled through this lens. Therefore, this means that anything contrary to our preconceived political leanings are completely ignored or logically forced into their respective procrustean bed.

In my agile world the cautionary tale is about how office politics can certainly derail our best efforts to be agile. It is only in an apolitical atmosphere where true organizational change can occur. Where facts are not valued and the truth depends on the individual posting it, then the frank, brutally honest conversations (borrowing from Jim Collins’s saying in his book Good to Great)  that are necessary to effect real change are never had. In some cases the only people capable of such brutal honesty are consultants with no vested interest or employees so fed up with the politics that they no longer fear losing their job.

One other political struggle that this instance has exposed is the continual struggle between the agile and waterfall camps. Each side has cherry picked their arguments in attempt to bolster their claims and for me to weigh in on one side or the other does little to further understanding. Of course, I come down on the agile side and believe that this project’s failures can be tracked fundamentally to the fact that the project was in no discernible way agile. This argument is not even vaguely interesting to me.

The most interesting point I have heard (and agree wholeheartedly with) is that there are a number of individuals, myself included, who feel, given the proper non-political circumstances could accomplish this work for a small fraction of the cost with a much smaller team. The reason for our confidence is that most of us already have. interestingly not a single soul who has accomplished something of this magnitude has done so using anything other than agile methodologies.

While the political right claim it is big government’s fault, this argument is somewhat disingenuous because the entities that failed are precisely the private sector companies that are supposedly our economic white knights. The real problem, when all the red herrings are swept away, is the procurement process itself that only allows for the largest, bureaucratic and bloated from the private sector to win contracts. Those companies who, by the very necessity of being small, are nimble will never get these contracts so failure is to actually be expected at the same rate (or worse) identified over the years by The Chaos Report.

A long time ago, government misinterpreted Winston Royce’s “waterfall paper” and all contracts are written to favor waterfall development which has been shown to be a poor methodology in delivering complex software. Again and again we run into the core issue that the nature of software development is fundamentally misunderstood as being merely complicated so that throwing money and bodies at a problem (and these bodies can reside anywhere, with any company like interchangeable widgets) will lead to success. Because software development is complex it works best under agile which emphasizes feedback and communication. Simply the fact that so many vendors were working this project shows the complete lack of knowledge and gross incompetence of people who are paid well to supposedly understand software development. In fact, if people in charge actually understood software development then they would have known the job would have been done much better with a small band of government workers and not the disaffected armies of “private” companies.

The reason I and my agile friends know we could have done the work for much less and with infinitely better quality is because we know what software development is and we would have used smaller teams, fewer teams and co-located teams. We would have increased feedback and communication. We would have completed the most critical scope first and phased in improvements. We would have used test driven development and continuous integration and testing to ensure performance all along the way. In other words, we would have operated in a completely egalitarian, non-political manner and achieved success.

What are your thoughts?

Larry Apke