Technical Pollution

Insights from the Lorax

Who are we?

Who are you?

Great Smog of '52

  1. What were the symptoms?

    illness, transit problems from low visibility

  2. What were the causes?

    "things that make smoke"

  3. What policies can mitigate the issue?

    1956 Clean Air Act:

    • use clean energy
    • increase height of chimneys
    • implement "smoke free zones"

Overview

  1. What is technical debt?
  2. What causes technical pollution?
  3. How do you deal with technical pollution?

What is
technical debt?

"Shipping first time code is like going into debt. A little debt speeds development so long as it is paid back promptly with a rewrite." (Ward Cunningham)
"The danger occurs when the debt is not repaid. Every minute spent on not-quite-right code counts as interest on that debt." (Ward Cunningham)
Technical debt is Prudent vs Reckless and Deliberate vs Inadvertent Source: Fowler, M. 2009. Technical debt quadrant, Blog post at: http://martinfowler.com/bliki/TechnicalDebtQuadrant.html.
As time increases, productivity declines
Colour of a backlog are feature (green), architecture (blue), bug (red), and tech debt (yellow)

The monetary analogy
communicates the wrong idea.

  • Single metric? No.
  • Easy to measure? No.
  • Constant and deterministic impact? No.

The pollution analogy
communicates the right idea.

  • Multi metric? Yes.
  • Difficult to measure? Yes.
  • Variable and probabilistic impact? Yes.
Managing your code is more like a garden
than your bank account.

What causes
technical pollution?

And, for your information, you Lorax, I'm figgering on biggering
and BIGGERING
and BIGGERING
and BIGGERING,
turning MORE Truffula Trees into Thneeds
which everyone, EVERYONE, EVERYONE needs!

Schedule Pressures

Business Pressure

Changing Requirements

Code Practices

Incomplete Tests

"I repeat" cried the Lorax, "I speak for the trees"

How do you deal with technical pollution?

Culture

Being "green" requires everyone on board,
especially leadership.

Culture

BDD language communicate business requirements without the business pressure (e.g. Gherkin).

Culture

PM's need to support their Lorax.

Culture

PM's need to protect the focus of your team.
Keep business pressure out.

Design Patterns

Plan to Refactor

Agile is prone to technical debt
because of YAGNI.

Plan to Refactor

"An excellent time to refactor code is right before you extend it." (Ward Cunningham)

Test Driven Development
(TDD)

Continuous Integration

Prevent pollution at the source.

Continuous Integration

Define quality and
the tolerance level of pollution.
(See phpqatools.org and phpmetrics.org)

PR Review

UNLESS someone like you
cares a whole awful lot,
nothing is going to get better.
It's not.

Questions?

References

(In order of reference during presentation.)

Recommended Reading

  • All the references!
  • Brooks, Fred. The Mythical Man-Month: Essays on Software Engineering . Boston: Addison-Wesley, 1975. Print.
  • Gamma, Erich, et all. Design Patterns: Elements of Reusable Object-Oriented Software. Reading, Mass: Addison-Wesley, 1995. Print.
  • Denne, Mark, and Jane Cleland-Huang. Software by Numbers: Low-Risk, High-Return Development. Boston: Prentice Hall, 2003. Print.
  • Johann, Sven and Eberhard Wolff. "Managing Technical Debt." www.infoq.com, May 2013. Web. June 2015.
  • Laribee, David. "Using Agile Techniques to Pay Back Technical Debt." msdn.microsoft.com, December 2009. Web. June 2015.
  • Fowler, Martin. "Design Stamina Hypothesis." martinfowler.com, June 2007. Web. June 2015.
  • Cunningham, Ward. "First Law Of Programming." c2.com, December 2014. Web. June 2015.
  • Cunningham, Ward. "Ward Explains Debt Metaphor." c2.com, January 2011. Web. June 2015.

Recommended Reading Cont'd

Thank You!