ºÝºÝߣ

ºÝºÝߣShare a Scribd company logo
Selling The Investment To Pay
Down Technical Debt
The Code Christmas Tree

Mike Kaiser
@kaisermike

Guy Royse
@guyroyse
The Code Christmas Tree: Selling the Investment for Technical Debt
The Code Christmas Tree: Selling the Investment for Technical Debt
The Code Christmas Tree: Selling the Investment for Technical Debt
Mike Kaiser

Guy Royse
Technical
Debt
The Code Christmas Tree: Selling the Investment for Technical Debt
Code
Christmas
Tree
300

Cyclomatic Complexity

250
200
150
100
50
0
0

1

2

3

4
Number of IFs

5

6

7

8
The Code Christmas Tree: Selling the Investment for Technical Debt
The Code Christmas Tree: Selling the Investment for Technical Debt
Reactions
The Code Christmas Tree: Selling the Investment for Technical Debt
The Code Christmas Tree: Selling the Investment for Technical Debt
The Code Christmas Tree: Selling the Investment for Technical Debt
BVM

Sonar

300

Cyclomatic Complexity

250
200
150
100
50
0
0

1

2

3

4
Number of IFs

5

6

7

8

Microsoft
Tree Mapper
Lessons Learned
?
?
?
?

Make it visible ¨C location matters, size matters
Use charts to enable the conversation
Color can bring about different reactions
Non-developers can understand aspects of the
code if you present it graphically
Questions?
Comments?
Mike Kaiser
@kaisermike
kaiserflyer@gmail.com

Contact

Links

Guy Royse
@guyroyse
guy@guyroyse.com

BVM
http://github.com/guyroyse/bvm or
gem install bvm
Sonar
http://sonarsource.org
Treemapper
http://research.microsoft.com/en-us/downloads/3f3ed95e26d8-4616-a06c-b609df29756f/default.aspx

More Related Content

The Code Christmas Tree: Selling the Investment for Technical Debt

Editor's Notes

  • #3: This is an experience report, so we¡¯d like to start with introducing the situation we faced.Inherited code and pile of debt ¨C quarter of a million lines of codeNew debt is checked in regularly
  • #4: 1 of 3 teams on the same code baseReleasing code about every three months, but not necessarily the same three months..Each team at various early stages of agile maturity / beliefs / excitementThree teams on the same code base, each at varying levels of maturity. Note ¨C Introduce team names here?
  • #5: This is in a fortune 200 financial services company. Being a large company, there was a lot of politics. In addition, with agile just getting started in the company, many around the three teams had different levels of understanding and engagement in change.
  • #6: Mike ¨C In the next 20 minutes we are first going to tell you a bit about ourselves, then our experience, and finally what learned and now recommend- We plan time at the end for questions, but please feel free to ask questions as you have themSo I¡¯m obviously on the left, that¡¯s from my summer vacation in ¡­ In this experience report, I was in the role of IM/Scrummasteron one of the three teams.Guy
  • #7: Ever hear the term spaghetti code? It gives the image of methods calling methods calling methods in circles of unintelligible code.Technical debt is ¡°divergence in the cost to change code with quality from the optimal¡±. Still, the metaphor to personal debt works because until you fix those technical issues (the debt) you pay interest (the negative effects of technical debt). As to those negative effects¡­.When you have technical debt you have business problems. Those short cuts you made in the past lead to slower code changes and higher defects.
  • #8: - In personal debt counseling people are called upon to stop using credit and use cash. This is because¡­.- Also in personal debt counseling people are called upon to bring their financial history with them so they can discuss that data with others
  • #9: Big and VisibleIt¡¯s a tree map. A tree map is ¡­We chose size to be ¡­.. Color is meant to be code complexity or code coverage and why.Why Code ¡°Christmas¡± Tree
  • #14: - We felt this was a good representation of the reaction we got from developers on the three teams.¡°This is cool¡± ¨C XP¡¯ers, Can we use this get people excited about better quality?¡°Huh?¡± ¨C What is technical debt? ¡­ Teaching moments.¡°Is going to make me look bad?¡± ¨C We were able to do two things, First, for this application to be in this bad of shape it took years, so the problem and the solution are owned by all of us. Second, we were able to point to areas of the application recently written by our team ¡­ it was green.
  • #15: Outside the team were sets of IT managers and business stakeholders. Agile was new in company and the concept of technical debt not understood. Our fear was that the ¡°red toner¡± would eventually be looked upon as a threat for them (after all it occurred under their watch) and that they might react negatively.Instead, the charts were slated for expanded use with other applications.- The owning IT director viewed it as a way to drive funding
  • #16: This is the happy part of our story. That IT director, who still had only a light understanding of technical debt, was able to use the charts to get us 3 weeks devoted to technical debt pay-down. Maybe not all the application needed, but a victory not imaginable only weeks before.[Celebration]But like most good blockbuster stories, it doesn¡¯t end there. Our teams had formed a strong cadence of demo-ing our work at the close of each iteration. So a new problem emerged ¡­ how do we demo an entire iteration of ¡®transparent from the UI¡¯ technical debt clean up? We tried showing business users before and after code with the result being more questions than understanding. Then, back to the rescue, our Code Christmas Trees. By this time many business stakeholders had gotten a tour of our charts, so our show and tell incorporated a time series slide show of the charts changing over the three weeks. I wish I had a camera, because just like the surprise ending in the movies, we got applause, for the first time, in a demo.
  • #17: How we did it from Guy¡¯s notes.