Академический Документы
Профессиональный Документы
Культура Документы
Michael Feathers on
Technical Debt, Process,
and Culture
Michael Feathers offers advice on creating an
organizational process and culture that can enhance
software development in a way that reduces technical
debt.
Managing
Technical Debt
Technical Debt is widely regarded as a bad
thing that should be paid back as soon as
possible, however it can be a strategy that
helps balance short-term wins and long-
term productivity. This article describes
different ways that a project could pay
back Technical Debt and what factors must
be considered when deciding if you should
repay, convert debt or just pay the interest.
FOLLOW US CONTACT US
GENERAL FEEDBACK feedback@infoq.com
ADVERTISING sales@infoq.com
EDITORIAL editors@infoq.com
facebook.com @InfoQ google.com linkedin.com
/InfoQ /+InfoQ company/infoq
NEW YORK
Jun 8-12, 2015
Conference for Professional Software Developers
qconnewyork.com
Fraud Detection and Hack Prevention - Optimizing Yourself - Maximizing your im-
Businesses are built around trust in systems pact as an engineer, as a leader, and as a per-
and data. Securing systems and fighting fraud son
throughout the data in them.
SHANE is an agile coach, trainer and consultant working for SoftEd in Australia,
New Zealand and around the world. He is the lead editor for Process
HASTIE and Practice on InfoQ.com and blogs on the SoftEd blog.
Robert C. Martin (Uncle Bob) has been a software professional since 1970 and an international
software consultant since 1990. He is founder and president of Object Mentor Inc., a team of
experienced consultants who mentor their clients worldwide in the fields of C++, Java, OO,
Patterns, UML, Agile Methodologies, and Extreme Programming.
In his keynote at QCon London 2010, Robert C. Martin tried to figure out why
developers write so much bad code.
He opened his talk with an example of truly bad code: Is it the pressure of time schedules that makes us do the
two classes from a product that were massive and thing that slows us down? I will leave you to deal with
had very large methods. He described the nature of the oxymoronic consequences of that one. We must
the code and then asked how many in the audience make a mess because (it is) the only way for us to go
have been significantly impeded by bad code. fast. So, we accept the fact that it will slow us down
Almost everyone in the audience responded forever so that we can make a mess today and save 5
that bad code had impeded work. Martin challenged milliseconds. Obviously, that is probably not the right
them: trade-off to make. Is it just sheer laziness? I do not
Why did you write it? You know, of course, that it is think that the developers who wrote that thing were
going to impede you. You know, of course, that this lazy. You have got to work hard on a mess like that.
code will slow you down. What in the world would It takes real effort to keep that thing in such horrible
motivate you to do the thing that you know it is going situation. Maybe it was boredom, maybe these guys
to significantly impede you and everyone else on your just did not care anymore, maybe they were just going
team? Why in the world would someone write that in every single day and slinging code and collecting
code? their paycheck and going home saying Who the hell
He presented some potential excuses for why cares? Maybe that was it. I do not know. Or maybe
bad code could be written: they were benefiting themselves: Try to fire us. See if
Michael Feathers on
Technical Debt, Process, and Culture
Michael C. Feathers is a member of the technical staff at Groupon. Prior to joining Groupon,
Michael was the chief scientist of Obtiva and a senior consultant with Object Mentor
International. Over the years, Michael has spent a great deal of time helping teams alter design
over time in code bases. Michael is also the author of Working Effectively with Legacy Code
(Prentice Hall, 2004).
At the IEEE Software Experts Summit in 2012, Michael Feathers gave a talk
titled Technical Debt, Process, and Culture in which he presented his ideas on
creating an organizational culture and processes that can enhance software
development and reduce technical debt.
He reminded the audience how Ward Cunningham Quite often now, technical debt is used as a generic
oined the term technical debt to describe a specific term for the type of entropy that we see in software
strategy he had used in decisions about building a development systems. You work on something, and
software product. Feathers explained it as follows: maybe you havent done exactly the best thing you
We have some short-term goal that we need to meet, could and as a result you end up having something
and (we are) basically going to do it in a rather quick which is a little bit sour over time maybe earlier
and dirty way. And once we do this, we are going to technical decisions impede (you) as you are trying
say we have accumulated this particular amount of to add technical features later on, and we see that as
technical debt and thats fine as long as we go back being the result of technical debt.
later and clean this up. He maintains that the definition of technical
Cunningham described this as a specific debt that is most prevalent today is generalized
approach, with emphasis on going back and cleaning entropy in software systems as a result of personal
it up. decision making when we are designing things.
Feathers said that the way the term was treated He proposed taking another view of technical
in 2012 is quite different than Cunninghams original debt as the effect of unavoidable growth and
intent: remnants of inertia inside software systems.
Figure 3
Sven Johannis working as a software developer for Trifork Amsterdam. Sven is an avid user of
XP practices like pair programming, TDD, and small releases. Currently, hes developing online
assessment software for schools in Switzerland and the Netherlands based on Triforks QTI
engine.
Eberhard Wolffis working as architecture and technology manager for adesso AG in Germany.
His focus is on Java, cloud, and software architecture. He is a regular contributor at international
conferences and author of several books and articles.
Developers can choose to implement new features with a messy solution delivers the same functionality
in two ways. They can do it quickly and messily, and costs less? Why should they spend money on
which will make future changes very hard. The other automated test coverage? Tests are not features and
way is a clean and smart solution that takes longer therefore dont deliver business value!
to implement but makes future changes easier (see Although messy code or code without tests
the thoughts of Martin Fowler). But why should the works perfectly for customers if it delivers the desired
sponsors of a project accept higher costs for a clean business value, this will lead to an uncontrollable
implementation of a feature that if implemented codebase, extremely specialised developers,
Jeremy Jarrellis a professional software developer and agile coach specializing in commercial
application development for the private sector.He is heavily involved in the local developer
community, both as a highly rated speaker throughout the East Coast of the United States as
well as a syndicated author whose articles and videos have appeared on sites such asSimple-
Talk, DZone,Pluralsight, andScrum Alliance. Jeremy loves to discuss all topics related to software
development or agile methodologies and can be reached through Twitter at@jeremyjarrellor
athis website.
Many teams struggle with technical debt but few teams devise a plan to get
out from under it. To better understand how we can escape the debt, we first
have to understand exactly what it is.
Technical debt is incurred by a team that knowingly This means that many things we
makes a less-than-optimal technical decision in commonly attribute to technical
return for a short-term gain in their project. For debt are not actually debt at all.
example, team members may decide to forego For example, normal bit rot that
writing automated tests as in-depth as they occurs as a system ages under a
normally would for a tricky section of code in order team that fails to keep up with
to get a product to market sooner. Or they may coding best practices is not debt. A technical decision
decide to build a project on an aging, soon-to-be- that a team willingly made and implemented that
deprecated framework rather than investing in the later turned out to be incorrect is not technical
purchase of an upgraded, better-supported version debt. In neither case did the team knowingly enter
of that framework. Whatever the decision is, the into a less-than-optimal long-term decision in favor
key to recognizing true technical debt is that the of a short-term gain. This distinction is important
team knowingly (and not accidentally) decides to because only after weve agreed on what exactly
incur long-term debt in favor of a short-term gain. constitutes technical debt can we best decide how
to eliminate it.
A repayment plan
Like financial debt, when taking on technical debt, add test coverage to those areas while deferring the
we need to establish how and when it will be repaid. simpler areas for later. Or they may decide that simpler
but lower value types of automated testing such as unit
How well repay it tests can be added immediately while setting aside
Lets take the case of the foregone automated tests more difficult automated tests such as automated
mentioned above. If our team has willingly decided user-acceptance tests for a future sprint. Whatever the
to forego writing automated tests for a tricky piece decision, the team and stakeholders would likely not
of code in order to get a feature into production have arrived at it had the discussion of technical debt
sooner, then we need to establish how well correct not occurred in the first place.
that piece of debt. In this case, we simply need to
state that well return to this piece of code at some When well repay it
point in the future and add the tests then. In addition to howwell repay the debt, well also want
However, simply stating well add tests later specify whenwell repay it. Often, the sooner the debt
doesnt do this problem justice. To help stakeholders is repaid, the better. For this reason, its best to schedule
fully appreciate the weight of our decision to incur
technical debt, well need to specify, to the best of
our abilities, exactly what the impact of waiting to
add automated tests until later will be. For example,
well want to specify the sections of code for which
we will need to add tests. Well also need to point
out that retrofitting automated tests on an already-
existing piece of code is always more difficult and
expensive than simply adding the tests at the time
of creation. This last point is important because it
highlights that in deferring this work to the future,
well actually need to spend more money to do the
work then than if we had we done it today. To put it
another way, our debt accrues interest.
After discussing the options for repayment,
both a team and its stakeholders will likely realize
that this problem goes deeper than simply whether
or not they should write automated tests at the time
the code is written. In fact, they may find that they
have several options between the two extremes
that suit the overall project better. For example, they
may decide that it makes the most sense to identify
the most complex pieces of the new feature with a
metric like cyclomatic complexityand immediately
byShane Hastie
James Grenning, founder of Wingman Software, trains, coaches, and consults worldwide.
With more than 30 years of software development experience, both technical and managerial,
James brings a wealth of knowledge, skill, and creativity to software development teams and
their management. As his professional roots are in embedded software, he is leading the way to
introduce agile development practices to that challenging world. See James articles for applying
Agile to embedded software development. Areas of interest are software process improvement,
object-oriented design, programming, embedded systems, project management, extreme
programming, test-driven development, test automation, and agile software development.
James knows his way around Scrum, with ScrumMaster and Product Owner certifications.
25
Next Generation HTML5
and JavaScript
24
Technology and Already a
Commodity?
26 QCon London
2015 Report
This eMag discusses some familiar and some not too
familiar development approaches and hopefully will
give you a helping hand while defining the technology
stack for your next mobile application.
23
This eMag provides a round-up of what we and some of our DevOps Toolchain
attendees felt were the most important sessions from QCon For Beginners
London 2015 including Microservices, Containers, Conways
Law, and properly implementing agile practises.