2010/01/15

Codemash: Credit Crunch Code

Paying Back the Technical Debt

Presented by Gary Short.  The talk was about the shortcuts we have to make when coding and how we can start making up for them.  It’s great learning something from a guy who has a strong Scottish accent.  He is has an outstanding ability to present though.

  • Ward Cunningham was the one who coined the term “technical debt” in 1992
    • Came up with the term as he was doing work for a financial institution, so it was very similar to borrowing money.
    • With financial debt, it can be like “virtual debt” in that you’re aren’t earning as much money as you could on the money that incurred the debt.
  • By incurring the technical debt, you can cause the product to be shipped late (causing a bad brand name), a loss of market share, or loss of excitement to work on the product.
  • Just as financial debt isn’t all bad, technical debt isn’t all bad.
    • If you need to hit a milestone by a certain time to get the company buy in, it’s fine as long as you pay it back
  • The only safe amount of technical debt in a codebase is 0.  But that’s like saying a codebase has 0 bugs.
    • Really just need to get it to a point where you don’t notice the issue, even if it’s really there.
  • You don’t want to have a logarithmic graph describing the technical debt.  You want a saw tooth graph describing it.  So every couple months take some time to pay it down.
  • It’s difficult to calculate the technical debt.  He has a nice, complicated formula that factors in things like employee costs, hardware costs, software licenses and software brand costs.
  • Waterfall methodology is an anti-pattern
    • Because you’re making all decisions up front, the costs go up as the project goes further.  Since you can’t change, it’s an insane amount of cost.
    • Because the subject matter expert has to go through a learning curve (no matter what they know), there’s going to be things that aren’t known up front.
  • Agile isn’t necessarily the fix to the Waterfall anti-pattern
    • Try to incorporate elements of Agile into Waterfall so that the cost isn’t so high
  • Not-Invented Here anti-pattern
    • Development teams spend time developing software which is not core to the problem they are trying solve.
    • Bunch of reasons why not to use a 3rd party product.
    • By having a developer working on a component that they find is harder than initially thought and buy the 3rd party product, they’ve incurred major technical debt.
    • Buy the components if it truly will save time.
    • Use open source if you can.
    • If these don’t work, then work your own
  • Objects that are in code together stay together anti-pattern
    • The classic car example.  Car’s have no behaviors because it’s an inanimate object.  Actors perform behaviors on the object.
    • It’s technical debt because it’s a simpler object graph.  We repay it later because of the cost of adding functionality.
    • Because adding functionality becomes so hard, it damages the brand.
    • It’s not horrible because it allows you to quickly get to market.  Just realize the cost it will incur.  Decide if the debt is worth it.
  • Sensitive Tests anti-pattern
    • tests that are sensitive to context/interface/database
    • make sure tests are as isolated at possible.
  • How to spot technical debt
    • technical debt is pretty much invisible.
    • Take the astronomer approach to finding technical debt in the way that they find planets that can support human life.
    • Using things like the burndown graph to find when issues are coming up.
      • The average productivity should stay pretty consistent
      • If it’s going down, then technical debt is accumulating because it’s harder to add features
      • the number of tests per feature should be pretty similar.
      • if it’s increasing per feature, it’s showing how difficult adding the new features are becoming.
      • if the average team morale is decreasing, it is a good sign things are becoming worse and becoming harder.  Measure this by having the team members rate their happiness on a 1-5 scale anonymously.
  • Technical debt is a silent killer
  • http://c2.com/cgi/wiki?WardExplainsDebtMetaphor
  • http://www.martinfowler.com/bliki/TechnicalDebt.html

On a side note.  Andy Hunt’s keynote over lunch was outstanding.  He talked about the mother of all bugs: the human mind.  It essentially covered all the psychological defects that exist in the human mind.

Post a Comment