65
#etka17 / #TechnicalDebt / @DocOnDev / @WeAreCTO2 technical Debt Trap

technical Debt Trap - EntwicklertagTechnical debt is a strategic decision • Allow for Rapid Delivery • To Elicit Quick Feedback • And Correct Design #etka17 / #TechnicalDebt

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

Page 1: technical Debt Trap - EntwicklertagTechnical debt is a strategic decision • Allow for Rapid Delivery • To Elicit Quick Feedback • And Correct Design #etka17 / #TechnicalDebt

#etka17 / #TechnicalDebt / @DocOnDev / @WeAreCTO2

technical Debt Trap

Page 2: technical Debt Trap - EntwicklertagTechnical debt is a strategic decision • Allow for Rapid Delivery • To Elicit Quick Feedback • And Correct Design #etka17 / #TechnicalDebt

#etka17 / #TechnicalDebt / @DocOnDev / @WeAreCTO2

Doc Norton .Co-Founder + CEO .

[email protected]

Page 3: technical Debt Trap - EntwicklertagTechnical debt is a strategic decision • Allow for Rapid Delivery • To Elicit Quick Feedback • And Correct Design #etka17 / #TechnicalDebt

#etka17 / #TechnicalDebt / @DocOnDev / @WeAreCTO2

what is technical debt?

Page 4: technical Debt Trap - EntwicklertagTechnical debt is a strategic decision • Allow for Rapid Delivery • To Elicit Quick Feedback • And Correct Design #etka17 / #TechnicalDebt

#etka17 / #TechnicalDebt / @DocOnDev / @WeAreCTO2

“Shipping first time code is like going into debt.”

–Ward Cunningham :: OOPSLA ‘92

Page 5: technical Debt Trap - EntwicklertagTechnical debt is a strategic decision • Allow for Rapid Delivery • To Elicit Quick Feedback • And Correct Design #etka17 / #TechnicalDebt

#etka17 / #TechnicalDebt / @DocOnDev / @WeAreCTO2

“Shipping first time code is like going into debt. A little debt speeds development so long as i t is paid back promptly with a rewrite.”

–Ward Cunningham :: OOPSLA ‘92

Page 6: technical Debt Trap - EntwicklertagTechnical debt is a strategic decision • Allow for Rapid Delivery • To Elicit Quick Feedback • And Correct Design #etka17 / #TechnicalDebt

#etka17 / #TechnicalDebt / @DocOnDev / @WeAreCTO2

“Shipping first time code is like going into debt. A little debt speeds development so long as i t is paid back promptly with a rewrite. 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 :: OOPSLA ‘92

Page 7: technical Debt Trap - EntwicklertagTechnical debt is a strategic decision • Allow for Rapid Delivery • To Elicit Quick Feedback • And Correct Design #etka17 / #TechnicalDebt

#etka17 / #TechnicalDebt / @DocOnDev / @WeAreCTO2

“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 :: OOPSLA ‘92

Page 8: technical Debt Trap - EntwicklertagTechnical debt is a strategic decision • Allow for Rapid Delivery • To Elicit Quick Feedback • And Correct Design #etka17 / #TechnicalDebt

#etka17 / #TechnicalDebt / @DocOnDev / @WeAreCTO2

“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 :: OOPSLA ‘92

Page 9: technical Debt Trap - EntwicklertagTechnical debt is a strategic decision • Allow for Rapid Delivery • To Elicit Quick Feedback • And Correct Design #etka17 / #TechnicalDebt

#etka17 / #TechnicalDebt / @DocOnDev / @WeAreCTO2

“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 :: OOPSLA ‘92

Page 10: technical Debt Trap - EntwicklertagTechnical debt is a strategic decision • Allow for Rapid Delivery • To Elicit Quick Feedback • And Correct Design #etka17 / #TechnicalDebt

#etka17 / #TechnicalDebt / @DocOnDev / @WeAreCTO2

“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 :: OOPSLA ‘92

Page 11: technical Debt Trap - EntwicklertagTechnical debt is a strategic decision • Allow for Rapid Delivery • To Elicit Quick Feedback • And Correct Design #etka17 / #TechnicalDebt

#etka17 / #TechnicalDebt / @DocOnDev / @WeAreCTO2

Technical debt is

Page 12: technical Debt Trap - EntwicklertagTechnical debt is a strategic decision • Allow for Rapid Delivery • To Elicit Quick Feedback • And Correct Design #etka17 / #TechnicalDebt

#etka17 / #TechnicalDebt / @DocOnDev / @WeAreCTO2

Technical debt is good

Page 13: technical Debt Trap - EntwicklertagTechnical debt is a strategic decision • Allow for Rapid Delivery • To Elicit Quick Feedback • And Correct Design #etka17 / #TechnicalDebt

#etka17 / #TechnicalDebt / @DocOnDev / @WeAreCTO2

Technical debt is good

Page 14: technical Debt Trap - EntwicklertagTechnical debt is a strategic decision • Allow for Rapid Delivery • To Elicit Quick Feedback • And Correct Design #etka17 / #TechnicalDebt

#etka17 / #TechnicalDebt / @DocOnDev / @WeAreCTO2

Technical debt is good

Page 15: technical Debt Trap - EntwicklertagTechnical debt is a strategic decision • Allow for Rapid Delivery • To Elicit Quick Feedback • And Correct Design #etka17 / #TechnicalDebt

#etka17 / #TechnicalDebt / @DocOnDev / @WeAreCTO2

Technical debt is a strategic decision

• Allow for Rapid Delivery

• To Elicit Quick Feedback

• And Correct Design

Page 16: technical Debt Trap - EntwicklertagTechnical debt is a strategic decision • Allow for Rapid Delivery • To Elicit Quick Feedback • And Correct Design #etka17 / #TechnicalDebt

#etka17 / #TechnicalDebt / @DocOnDev / @WeAreCTO2

technical debt is an indication of learning

• Now know what you need

• Implementation doesn’t match

Page 17: technical Debt Trap - EntwicklertagTechnical debt is a strategic decision • Allow for Rapid Delivery • To Elicit Quick Feedback • And Correct Design #etka17 / #TechnicalDebt

#etka17 / #TechnicalDebt / @DocOnDev / @WeAreCTO2

technical debt is a metaphor

Page 18: technical Debt Trap - EntwicklertagTechnical debt is a strategic decision • Allow for Rapid Delivery • To Elicit Quick Feedback • And Correct Design #etka17 / #TechnicalDebt

#etka17 / #TechnicalDebt / @DocOnDev / @WeAreCTO2

metaphors rockwe reason by analogy

Building

on a

weak founda

tionPuts pressure on our design

Can’t keep running at this pace

It’s raining men(hallelujah)

Page 19: technical Debt Trap - EntwicklertagTechnical debt is a strategic decision • Allow for Rapid Delivery • To Elicit Quick Feedback • And Correct Design #etka17 / #TechnicalDebt

#etka17 / #TechnicalDebt / @DocOnDev / @WeAreCTO2

metaphorphosiswhen metaphors go wrong

Credit CardSHORT-TERM

Long-Term

Return on Investment

OPERATIONALHOME LOAN

Loan Shark

PRAGMATIC

LEVERAGE

Intentional AUTO LOAN

FRAUDULENT

VOLUNTARY

PYRAMID SCHEME

Prudent

Student Loan

HIGH INTEREST

INADVERTENT RECKLESS DEBT IN

THE THIRD QUADRANT

Page 20: technical Debt Trap - EntwicklertagTechnical debt is a strategic decision • Allow for Rapid Delivery • To Elicit Quick Feedback • And Correct Design #etka17 / #TechnicalDebt

#etka17 / #TechnicalDebt / @DocOnDev / @WeAreCTO2

metaphorphosiswhen metaphors go wrong

“quick and dirty” - Martin Fowler

“sloppy” - David Laribee

“just hack it in” - Steve McConnell

“CUT A LOT OF CORNERS” - James Shore

Page 21: technical Debt Trap - EntwicklertagTechnical debt is a strategic decision • Allow for Rapid Delivery • To Elicit Quick Feedback • And Correct Design #etka17 / #TechnicalDebt

#etka17 / #TechnicalDebt / @DocOnDev / @WeAreCTO2

technical debt quadrant

Reckless

Inadvertent

Prudent

Deliberate

“We don’t have time for design”

“We must ship now and deal with

consequences”

“Now we know how we should have done

it”

“What’s Layering?”

Page 22: technical Debt Trap - EntwicklertagTechnical debt is a strategic decision • Allow for Rapid Delivery • To Elicit Quick Feedback • And Correct Design #etka17 / #TechnicalDebt

#etka17 / #TechnicalDebt / @DocOnDev / @WeAreCTO2

“[Many] have explained the debt metaphor and confused it with the idea that you could write code poorly with the intention of doing a good job later.”

–ward Cunningham :: YouTube ‘09

Page 23: technical Debt Trap - EntwicklertagTechnical debt is a strategic decision • Allow for Rapid Delivery • To Elicit Quick Feedback • And Correct Design #etka17 / #TechnicalDebt

#etka17 / #TechnicalDebt / @DocOnDev / @WeAreCTO2

“…confused the debt metaphor with the idea that you could write code poorly…”

–ward Cunningham :: YouTube ‘09

Page 24: technical Debt Trap - EntwicklertagTechnical debt is a strategic decision • Allow for Rapid Delivery • To Elicit Quick Feedback • And Correct Design #etka17 / #TechnicalDebt

#etka17 / #TechnicalDebt / @DocOnDev / @WeAreCTO2

“The ability to pay back debt [...] depends upon you writing code that is clean enough to be able to refactor as you come to understand your problem.”

–ward Cunningham :: YouTube ‘09

Page 25: technical Debt Trap - EntwicklertagTechnical debt is a strategic decision • Allow for Rapid Delivery • To Elicit Quick Feedback • And Correct Design #etka17 / #TechnicalDebt

#etka17 / #TechnicalDebt / @DocOnDev / @WeAreCTO2

“The ability to pay back debt [...] depends upon you writing code that is clean enough to be able to refactor as you come to understand your problem.”

–ward Cunningham :: YouTube ‘09

Page 26: technical Debt Trap - EntwicklertagTechnical debt is a strategic decision • Allow for Rapid Delivery • To Elicit Quick Feedback • And Correct Design #etka17 / #TechnicalDebt

#etka17 / #TechnicalDebt / @DocOnDev / @WeAreCTO2

“Dirty code is to technical debt as the pawn broker is to financial debt.”

–Ward Cunningham :: Twitter ‘09

“Don’t think you are ever going to get your code back.”

Page 27: technical Debt Trap - EntwicklertagTechnical debt is a strategic decision • Allow for Rapid Delivery • To Elicit Quick Feedback • And Correct Design #etka17 / #TechnicalDebt

#etka17 / #TechnicalDebt / @DocOnDev / @WeAreCTO2

technical debt?Ask yourself…

• Is the code clean?

• Is the code tested?

• Is there a learning objective or event?

• Is there a plan for payback?

• Is the business truly informed?

Page 28: technical Debt Trap - EntwicklertagTechnical debt is a strategic decision • Allow for Rapid Delivery • To Elicit Quick Feedback • And Correct Design #etka17 / #TechnicalDebt

#etka17 / #TechnicalDebt / @DocOnDev / @WeAreCTO2

technical debt?If you say no to even one…

• Is the code clean?

• Is the code tested?

• Is there a learning objective or event?

• Is there a plan for payback?

• Is the business truly informed?

... then you don’t have Technical Debt

Page 29: technical Debt Trap - EntwicklertagTechnical debt is a strategic decision • Allow for Rapid Delivery • To Elicit Quick Feedback • And Correct Design #etka17 / #TechnicalDebt

#etka17 / #TechnicalDebt / @DocOnDev / @WeAreCTO2

mess (noun)

• Disorderly accumulation, heap, or jumble

• A state of embarrassing confusion

• An unpleasant or difficult situation

Page 30: technical Debt Trap - EntwicklertagTechnical debt is a strategic decision • Allow for Rapid Delivery • To Elicit Quick Feedback • And Correct Design #etka17 / #TechnicalDebt

#etka17 / #TechnicalDebt / @DocOnDev / @WeAreCTO2

cruft (noun)

• An unpleasant substance

• The result of shoddy construction

• Redundant, old or improperly written code

Page 31: technical Debt Trap - EntwicklertagTechnical debt is a strategic decision • Allow for Rapid Delivery • To Elicit Quick Feedback • And Correct Design #etka17 / #TechnicalDebt

#etka17 / #TechnicalDebt / @DocOnDev / @WeAreCTO2

But, It’s Just semantics

Page 32: technical Debt Trap - EntwicklertagTechnical debt is a strategic decision • Allow for Rapid Delivery • To Elicit Quick Feedback • And Correct Design #etka17 / #TechnicalDebt

#etka17 / #TechnicalDebt / @DocOnDev / @WeAreCTO2

It’s not Just semantics

Technical Debt is Good

Page 33: technical Debt Trap - EntwicklertagTechnical debt is a strategic decision • Allow for Rapid Delivery • To Elicit Quick Feedback • And Correct Design #etka17 / #TechnicalDebt

#etka17 / #TechnicalDebt / @DocOnDev / @WeAreCTO2

It’s not Just semantics

Quick and Dirty is Technical DebtTechnical Debt is Good

Page 34: technical Debt Trap - EntwicklertagTechnical debt is a strategic decision • Allow for Rapid Delivery • To Elicit Quick Feedback • And Correct Design #etka17 / #TechnicalDebt

#etka17 / #TechnicalDebt / @DocOnDev / @WeAreCTO2

It’s not Just semantics

Quick and Dirty is Good

Page 35: technical Debt Trap - EntwicklertagTechnical debt is a strategic decision • Allow for Rapid Delivery • To Elicit Quick Feedback • And Correct Design #etka17 / #TechnicalDebt

#etka17 / #TechnicalDebt / @DocOnDev / @WeAreCTO2

“We must ship now and deal with

consequences”

technical debt quadrant

Reckless

Inadvertent

Prudent

Deliberate

“We don’t have time for design”

“We must ship now and deal with

consequences”

“Now we know how we should have done

it”

“What’s Layering?”

Page 36: technical Debt Trap - EntwicklertagTechnical debt is a strategic decision • Allow for Rapid Delivery • To Elicit Quick Feedback • And Correct Design #etka17 / #TechnicalDebt

#etka17 / #TechnicalDebt / @DocOnDev / @WeAreCTO2

technical debt quadrant

Reckless

Inadvertent

Prudent

Deliberate

“We don’t have time for design”

“Let’s deploy and gather more information.”

“Now we know how we should have done

it”

“What’s Layering?”

Page 37: technical Debt Trap - EntwicklertagTechnical debt is a strategic decision • Allow for Rapid Delivery • To Elicit Quick Feedback • And Correct Design #etka17 / #TechnicalDebt

#etka17 / #TechnicalDebt / @DocOnDev / @WeAreCTO2

“technical debt”in other fields

Page 38: technical Debt Trap - EntwicklertagTechnical debt is a strategic decision • Allow for Rapid Delivery • To Elicit Quick Feedback • And Correct Design #etka17 / #TechnicalDebt

#etka17 / #TechnicalDebt / @DocOnDev / @WeAreCTO2

“Technical Debt”in other fields

Page 39: technical Debt Trap - EntwicklertagTechnical debt is a strategic decision • Allow for Rapid Delivery • To Elicit Quick Feedback • And Correct Design #etka17 / #TechnicalDebt

#etka17 / #TechnicalDebt / @DocOnDev / @WeAreCTO2

“Technical Debt”in other fields

Page 40: technical Debt Trap - EntwicklertagTechnical debt is a strategic decision • Allow for Rapid Delivery • To Elicit Quick Feedback • And Correct Design #etka17 / #TechnicalDebt

#etka17 / #TechnicalDebt / @DocOnDev / @WeAreCTO2

“Technical Debt”in other fields

RECKLESS AND

DELIBERATERECKLESS AND

INADVERTENT

Page 41: technical Debt Trap - EntwicklertagTechnical debt is a strategic decision • Allow for Rapid Delivery • To Elicit Quick Feedback • And Correct Design #etka17 / #TechnicalDebt

#etka17 / #TechnicalDebt / @DocOnDev / @WeAreCTO2

technical debt quadrant

Reckless

Inadvertent

Prudent

Deliberate

“We don’t have time for design”

“Let’s deploy and gather more information.”

“Now we know how we should have done

it”

“What’s Layering?”

RECKLESS AND

DELIBERATE

RECKLESS AND

INADVERTENT

Page 42: technical Debt Trap - EntwicklertagTechnical debt is a strategic decision • Allow for Rapid Delivery • To Elicit Quick Feedback • And Correct Design #etka17 / #TechnicalDebt

#etka17 / #TechnicalDebt / @DocOnDev / @WeAreCTO2

technical debt quadrant

Reckless

Inadvertent

Prudent

Deliberate

“We don’t have time for design”

“Let’s deploy and gather more information.”

“Now we know how we should have done

it”

“What’s Layering?”

IRRESPONSIBLE

INCOMPETENTTECHNICAL

DEBT

Page 43: technical Debt Trap - EntwicklertagTechnical debt is a strategic decision • Allow for Rapid Delivery • To Elicit Quick Feedback • And Correct Design #etka17 / #TechnicalDebt

#etka17 / #TechnicalDebt / @DocOnDev / @WeAreCTO2

cruft or debt?

Page 44: technical Debt Trap - EntwicklertagTechnical debt is a strategic decision • Allow for Rapid Delivery • To Elicit Quick Feedback • And Correct Design #etka17 / #TechnicalDebt

#etka17 / #TechnicalDebt / @DocOnDev / @WeAreCTO2

DataSet aDs, qDs;aDs = _dbConnector.UpdateAgentList();qDs = _dbConnector.GetQueueList();foreach (DataTable aTable in aDs.Tables) { foreach (DataRow aRow in aTable.Rows) { foreach (DataColumn aColumn in aTable.Columns) { DataSet asDs = _dbConnector.GetAgentSkills(aRow[aColumn].ToString());//AgentId foreach (DataTable asTable in asDs.Tables) { foreach (DataRow asRow in asTable.Rows) { foreach (DataColumn asColumn in asTable.Columns) { foreach (DataTable qTable in qDs.Tables) { foreach (DataRow qRow in qTable.Rows) { foreach (DataColumn qColumn in qTable.Columns) { DataSet sqDs = _dbConnector.GetSkillsForQueue(qRow[qColumn].ToString()); foreach (DataTable sqTable in sqDs.Tables) { foreach (DataRow sqRow in sqTable.Rows) { foreach (DataColumn sqColumn in sqTable.Columns) { foreach (string skill in sqRow[sqColumn].ToString().Split(paramDelimStr)) { if (skill == asRow[asColumn].ToString()) { try { _dbConnector.SetAgentQueueSkill(aRow[aColumn].ToString(), qRow[qColumn].ToString(), skill); } catch { continue; } } } } } } } } } } } } } }}

cruft or debt?

Page 45: technical Debt Trap - EntwicklertagTechnical debt is a strategic decision • Allow for Rapid Delivery • To Elicit Quick Feedback • And Correct Design #etka17 / #TechnicalDebt

#etka17 / #TechnicalDebt / @DocOnDev / @WeAreCTO2

DataSet aDs, qDs;aDs = _dbConnector.UpdateAgentList();qDs = _dbConnector.GetQueueList();foreach (DataTable aTable in aDs.Tables) { foreach (DataRow aRow in aTable.Rows) { foreach (DataColumn aColumn in aTable.Columns) { DataSet asDs = _dbConnector.GetAgentSkills(aRow[aColumn].ToString());//AgentId foreach (DataTable asTable in asDs.Tables) { foreach (DataRow asRow in asTable.Rows) { foreach (DataColumn asColumn in asTable.Columns) { foreach (DataTable qTable in qDs.Tables) { foreach (DataRow qRow in qTable.Rows) { foreach (DataColumn qColumn in qTable.Columns) { DataSet sqDs = _dbConnector.GetSkillsForQueue(qRow[qColumn].ToString()); foreach (DataTable sqTable in sqDs.Tables) { foreach (DataRow sqRow in sqTable.Rows) { foreach (DataColumn sqColumn in sqTable.Columns) { foreach (string skill in sqRow[sqColumn].ToString().Split(paramDelimStr)) { if (skill == asRow[asColumn].ToString()) { try { _dbConnector.SetAgentQueueSkill(aRow[aColumn].ToString(), qRow[qColumn].ToString(), skill); } catch { continue; } } } } } } } } } } } } } }}

Page 46: technical Debt Trap - EntwicklertagTechnical debt is a strategic decision • Allow for Rapid Delivery • To Elicit Quick Feedback • And Correct Design #etka17 / #TechnicalDebt

#etka17 / #TechnicalDebt / @DocOnDev / @WeAreCTO2

DataSet aDs, qDs;aDs = _dbConnector.UpdateAgentList();qDs = _dbConnector.GetQueueList();foreach (DataTable aTable in aDs.Tables) { foreach (DataRow aRow in aTable.Rows) { foreach (DataColumn aColumn in aTable.Columns) { DataSet asDs = _dbConnector.GetAgentSkills(aRow[aColumn].ToString());//AgentId foreach (DataTable asTable in asDs.Tables) { foreach (DataRow asRow in asTable.Rows) { foreach (DataColumn asColumn in asTable.Columns) { foreach (DataTable qTable in qDs.Tables) { foreach (DataRow qRow in qTable.Rows) { foreach (DataColumn qColumn in qTable.Columns) { DataSet sqDs = _dbConnector.GetSkillsForQueue(qRow[qColumn].ToString()); foreach (DataTable sqTable in sqDs.Tables) { foreach (DataRow sqRow in sqTable.Rows) { foreach (DataColumn sqColumn in sqTable.Columns) { foreach (string skill in sqRow[sqColumn].ToString().Split(paramDelimStr)) { if (skill == asRow[asColumn].ToString()) { try { _dbConnector.SetAgentQueueSkill(aRow[aColumn].ToString(), qRow[qColumn].ToString(), skill); } catch { continue; } }} } } } } } } } } } } } }

Page 47: technical Debt Trap - EntwicklertagTechnical debt is a strategic decision • Allow for Rapid Delivery • To Elicit Quick Feedback • And Correct Design #etka17 / #TechnicalDebt

#etka17 / #TechnicalDebt / @DocOnDev / @WeAreCTO2

DataSet aDs, qDs, asDs, sqDs;aDs = _dbConnector.UpdateAgentList();qDs = _dbConnector.GetQueueList();

foreach (DataRow aRow in aDS.Tables[0].Rows) { String agentID = aRow[“AgentId”].ToString(); asDs = _dbConnector.GetAgentSkills(agentID); foreach (DataRow asRow in asDs.Tables[0].Rows) { String agentSkill = asRow[“Skill”].ToString(); foreach (DataRow qRow in qDs.Tables[0].Rows) { queueName = qRow[“QueueName”].ToString(); sqDs = _dbConnector.GetSkillsForQueue(queueName); foreach (DataRow sqRow in sqDs.Tables[0].Rows) { foreach (string skill in sqRow[“Skills”].ToString().Split(paramDelimStr)) { if (skill == agentSkill) { try { _dbConnector.SetAgentQueueSkill(agentID, queueName, skill); } catch { continue; }} } } } } }

Page 48: technical Debt Trap - EntwicklertagTechnical debt is a strategic decision • Allow for Rapid Delivery • To Elicit Quick Feedback • And Correct Design #etka17 / #TechnicalDebt

#etka17 / #TechnicalDebt / @DocOnDev / @WeAreCTO2

AgentList agents = new AgentList(_dbConnector.UpdateAgentList());QueueList queues = new QueueList(_dbConnector.GetQueueList());

foreach (Agent agent in agents) { foreach (Skill agentSkill in agent.skills) { foreach (Queue queue in queues) { foreach (Skill queueSkill in queue.skills.Where(x => x == agentSkill)) { try {_dbConnector.SetAgentQueueSkill(agent.agentID, queue.name, agentSkill); } catch { continue; } } } }}

Page 49: technical Debt Trap - EntwicklertagTechnical debt is a strategic decision • Allow for Rapid Delivery • To Elicit Quick Feedback • And Correct Design #etka17 / #TechnicalDebt

#etka17 / #TechnicalDebt / @DocOnDev / @WeAreCTO2

if ((customer.state == “AL” && customer.type == CustomerType.GENERAL_AGENT && customer.revenue > 100000) || (customer.type == CustomerType.RETRO_AGENT && (customer.state == “WI” || customer.state == “IL”)) || (customer.type == CustomerType.FED_MANAGEMENT && customer.revenue > 150000)) { ... }

cruft or debt?

Page 50: technical Debt Trap - EntwicklertagTechnical debt is a strategic decision • Allow for Rapid Delivery • To Elicit Quick Feedback • And Correct Design #etka17 / #TechnicalDebt

#etka17 / #TechnicalDebt / @DocOnDev / @WeAreCTO2

// If customer is Federally Regulatedif ((customer.state == “AL” && customer.type == CustomerType.GENERAL_AGENT && customer.revenue > 100000) || (customer.type == CustomerType.RETRO_AGENT && (customer.state == “WI” || customer.state == “IL”)) || (customer.type == CustomerType.FED_MANAGEMENT && customer.revenue > 150000)) { ... }

Page 51: technical Debt Trap - EntwicklertagTechnical debt is a strategic decision • Allow for Rapid Delivery • To Elicit Quick Feedback • And Correct Design #etka17 / #TechnicalDebt

#etka17 / #TechnicalDebt / @DocOnDev / @WeAreCTO2

if (customer.isFederallyRegulated()) { ... }

Page 52: technical Debt Trap - EntwicklertagTechnical debt is a strategic decision • Allow for Rapid Delivery • To Elicit Quick Feedback • And Correct Design #etka17 / #TechnicalDebt

#etka17 / #TechnicalDebt / @DocOnDev / @WeAreCTO2

double getSpeed() { switch (_type) { case EUROPEAN: return getBaseSpeed(); case AFRICAN: return getBaseSpeed() - getLoadFactor() * _numberOfCoconuts; case NORWEGIAN_BLUE: return (_isNailed) ? 0 : getBaseSpeed(_voltage); } throw new RuntimeException ("Should be unreachable");}

cruft or debt?

Page 53: technical Debt Trap - EntwicklertagTechnical debt is a strategic decision • Allow for Rapid Delivery • To Elicit Quick Feedback • And Correct Design #etka17 / #TechnicalDebt

#etka17 / #TechnicalDebt / @DocOnDev / @WeAreCTO2

class Swallow ... double getSpeed() { return getBaseSpeed(); }end class

class EuropeanSwallow ...end class

class AfricanSwallow ... double getSpeed() { return super.getSpeed - coconutLoad(); } double coconutLoad() { return getLoadFactor() * _numberOfCoconuts; }end class

class NorwegianSwallow ... double getSpeed() { return (_isNailed) ? 0 : getBaseSpeed(_voltage); }end class

Page 54: technical Debt Trap - EntwicklertagTechnical debt is a strategic decision • Allow for Rapid Delivery • To Elicit Quick Feedback • And Correct Design #etka17 / #TechnicalDebt

#etka17 / #TechnicalDebt / @DocOnDev / @WeAreCTO2

cruft is a bad decision

• You are a professional developer

• You’re going to create unintentional cruft

• You have to clean up the existing cruft

Page 55: technical Debt Trap - EntwicklertagTechnical debt is a strategic decision • Allow for Rapid Delivery • To Elicit Quick Feedback • And Correct Design #etka17 / #TechnicalDebt

#etka17 / #TechnicalDebt / @DocOnDev / @WeAreCTO2

The Trap

• Precedent for speed over quality

• Expectation of increased velocity

• Cruft slows you down

• Must write more cruft to keep up

• Ask permission to do your job correctly

Page 56: technical Debt Trap - EntwicklertagTechnical debt is a strategic decision • Allow for Rapid Delivery • To Elicit Quick Feedback • And Correct Design #etka17 / #TechnicalDebt

#etka17 / #TechnicalDebt / @DocOnDev / @WeAreCTO2

Managing Cruft

Page 57: technical Debt Trap - EntwicklertagTechnical debt is a strategic decision • Allow for Rapid Delivery • To Elicit Quick Feedback • And Correct Design #etka17 / #TechnicalDebt

#etka17 / #TechnicalDebt / @DocOnDev / @WeAreCTO2

failing strategYCleaning Sprint

• Schedule Iterations for cleaning code

• Defer quality to cleaning sprint

• Focus on speed/velocity at all other times

Page 58: technical Debt Trap - EntwicklertagTechnical debt is a strategic decision • Allow for Rapid Delivery • To Elicit Quick Feedback • And Correct Design #etka17 / #TechnicalDebt
Page 59: technical Debt Trap - EntwicklertagTechnical debt is a strategic decision • Allow for Rapid Delivery • To Elicit Quick Feedback • And Correct Design #etka17 / #TechnicalDebt

#etka17 / #TechnicalDebt / @DocOnDev / @WeAreCTO2

winning strategyClean Constantly

• Never make an intentional mess

• Monitor your “Technical Debt”

• Follow the Boy Scout Rule

• Remember quality is your responsibility

• NEVER ask permission to do your job correctly

Page 60: technical Debt Trap - EntwicklertagTechnical debt is a strategic decision • Allow for Rapid Delivery • To Elicit Quick Feedback • And Correct Design #etka17 / #TechnicalDebt

#etka17 / #TechnicalDebt / @DocOnDev / @WeAreCTO2

Monitor your cruft

• Code Coverage

• Code Complexity

• Coupling

• Maintainability

• Monitor Trends, Not Points

Page 61: technical Debt Trap - EntwicklertagTechnical debt is a strategic decision • Allow for Rapid Delivery • To Elicit Quick Feedback • And Correct Design #etka17 / #TechnicalDebt

#etka17 / #TechnicalDebt / @DocOnDev / @WeAreCTO2

reviewTechnical Debt

• A strategic design decision

• Requires business to be informed

• Includes a pay-back plan

Cruft• Happens

• Needs to be monitored and cleaned

• Is NOT Technical Debt

Page 62: technical Debt Trap - EntwicklertagTechnical debt is a strategic decision • Allow for Rapid Delivery • To Elicit Quick Feedback • And Correct Design #etka17 / #TechnicalDebt

#etka17 / #TechnicalDebt / @DocOnDev / @WeAreCTO2

reviewTechnical Debt

• A strategic design decision

• Requires business to be informed

• Includes a pay-back plan

Cruft• Happens

• Needs to be monitored and cleaned

• Is NOT Technical Debt

NEVE

R ask

per

mission

to d

o y

our

job

corr

ectl

y

Page 63: technical Debt Trap - EntwicklertagTechnical debt is a strategic decision • Allow for Rapid Delivery • To Elicit Quick Feedback • And Correct Design #etka17 / #TechnicalDebt

#etka17 / #TechnicalDebt / @DocOnDev / @WeAreCTO2

Thank You!

Doc Norton .Co-Founder + CEO .

[email protected]

Page 64: technical Debt Trap - EntwicklertagTechnical debt is a strategic decision • Allow for Rapid Delivery • To Elicit Quick Feedback • And Correct Design #etka17 / #TechnicalDebt

#etka17 / #TechnicalDebt / @DocOnDev / @WeAreCTO2

For More

Doc Norton .Co-Founder + CEO .

[email protected]

Send a blank email to [email protected] with the subject line: TechnicalDebt

Page 65: technical Debt Trap - EntwicklertagTechnical debt is a strategic decision • Allow for Rapid Delivery • To Elicit Quick Feedback • And Correct Design #etka17 / #TechnicalDebt

#etka17 / #TechnicalDebt / @DocOnDev / @WeAreCTO2

technical Debt Trap