practice
Doi: 10.1145/2160718.2160733
Article development led by
queue.acm.org
Shortcuts that save money and time
today can cost you down the road.
By eRiC ALLmAN
managing
technical
Debt
IN 1992, WArD CUNNINGHAM published a report
at OOPSLA2 in which he proposed the concept of
technical debt. He defines it in terms of immature
code: “Shipping first-time code is like going into
debt.” Technical debt is not limited to first-time code,
however. There are many ways and reasons (not all
bad) to take on technical debt.
Technical debt often results from the tension
between engineering “best practices” and other factors
(ship date, cost of tools, and the skills of engineers
that are available, among others). Roughly speaking,
technical debt is acquired when engineers take
shortcuts that fall short of best practices. This includes
sneaking around an abstraction because it is too hard
(or impossible) to figure how to “do it right,” skipping
or scrimping on documentation (both in the code
and external documentation), using an obscure or
incomplete error message because it is just too hard to
create something more informative, implementing
code using a simple but slow algorithm
even though they know that a better algorithm will be needed in production,
using void* when you really should
have created an appropriate union*,
using build tools that do not quite
work for the system at hand, skimping
on good security practices, not writing
unit tests, and so forth. Admit it—you
have all done one or more (or maybe
all) of these things at some point or
another in your career. (Technical debt
may also be taken on intentionally as
a strategy to save time or money; more
about that later.)
Not all debt (whether technical or
financial) is bad. Few of us can afford
to pay cash for a house, and going into
debt to buy one is not financially irresponsible, provided that we know how
to pay it back. In contrast, charging up
luxury items on a credit card, knowing very well that your paycheck will
not cover them, is usually a recipe for
disaster. Using a simple but slow algorithm in a prototype can be exactly the
correct path, as long as you have a plan
for how you are going to update the
code before it ships. That means allowing time in the schedule, making sure
the issue is tracked so it does not get
lost in the shuffle, knowing when you
implement the code that a good algorithm actually does exist that will work
in this instance, and trusting that management will support you.
Understanding, communicating,
and managing technical debt can make
a huge difference in both the short- and
long-term success of a system. (Note
that although this article focuses on
technical debt in software engineering,
many of these principles can be applied
to other technical disciplines.)
Comparison with financial Debt
Going into financial debt usually has
three important properties. First, the
person making the loan wants it to be
repaid eventually. Second, you usually
have to pay it back with interest—that
is, you pay back more money than you
got in the first place. Third, if it turns
out you cannot pay it back, there is a