148
CTO, New Iron, Austin, TX Janelle Klein ©2015 New Iron Group The Art of Better Creation Date: 10/05/2015 Yay!

The Art of Better

Embed Size (px)

Citation preview

Page 1: The Art of Better

CTO, New Iron, Austin, TXJanelle Klein

©2015 New Iron Group

The Art of Better

Creation Date: 10/05/2015

Yay!

Page 2: The Art of Better

What is this talk about?

How to quantify developer pain

How to identify what’s causing the pain

How to practice avoiding the pain

Idea Flow Learning Framework

Page 3: The Art of Better

Why should I care?

Page 4: The Art of Better

Great Team Disciplined with Best Practices Constantly Working on Improvements+

Project FAILURE

Page 5: The Art of Better

Technical Debt Mistakes

I thought the main obstacle was Technical Debt

Page 6: The Art of Better

?Most of our mistakes were in the

most well-written parts of the code.

Mistakes

Page 7: The Art of Better

We made significantly more mistakes in code that we didn’t write ourselves.

Lower Familiarity

More Mistakes=

There had to be more to the story...

Page 8: The Art of Better

Complex(So*ware(

...pain...

This is what I knew...

What made development feel painful?

Page 9: The Art of Better

Unexpected Behavior

Problem Resolved

Tracking Painful Interaction with the Code (Friction)

Troubleshooting

Progress

5 hours and 18 minutes of troubleshooting...

PAINFUL

Page 10: The Art of Better

What Causes Unexpected Behavior (likeliness)?

What Makes Troubleshooting Time-Consuming (impact)?

Semantic Mistakes

Stale Memory Mistakes

Association Mistakes

Bad Input Assumption

Tedious Change Mistakes

Copy-Edit Mistakes

Transposition Mistakes

Failed Refactor Mistakes

False Alarm

Non-Deterministic Behavior

Ambiguous Clues

Lots of Code Changes

Noisy Output

Cryptic Output

Long Execution Time

Environment Cleanup

Test Data Creation

Using Debugger

Most of the pain was caused by human factors.

What causes PAIN?

Page 11: The Art of Better

What Causes Unexpected Behavior (likeliness)?

What Makes Troubleshooting Time-Consuming (impact)?

Non-Deterministic Behavior

Ambiguous Clues

Lots of Code Changes

Noisy Output

Cryptic Output

Long Execution Time

Environment Cleanup

Test Data Creation

Using Debugger

What causes PAIN?

Most of the pain was caused by human factors.

Semantic Mistakes

Stale Memory Mistakes

Association Mistakes

Bad Input Assumption

Tedious Change Mistakes

Copy-Edit Mistakes

Transposition Mistakes

Failed Refactor Mistakes

False Alarm

Page 12: The Art of Better

PAIN occurs during the process of understanding and extending the software

Complex(So*ware(

PAIN

Not the Code.

Optimize Developer Experience

Page 13: The Art of Better

We spent tons of time working on improvements…

Our Improvements didn’t make much difference.

Page 14: The Art of Better

It took us 2 years to turn the project around.

The Key: Visibility

Page 15: The Art of Better

Consulting…

Builds were breaking

Releases were painful

Productivity slowing to a crawl

Begging for timePAIN

Page 16: The Art of Better

The Team Believed…

Problems Building Up in the Code

PAIN

Page 17: The Art of Better

The Improvements didn’t make much difference.

Brainstorming a List

“Technical Debt” Backlog

Page 18: The Art of Better

What does “better” really mean?

Page 19: The Art of Better

Mentorship = Teaching “Better”

Page 20: The Art of Better

The Interview

GeorgeMe

Page 21: The Art of Better
Page 22: The Art of Better

“Testability”

Page 23: The Art of Better

The Code Review

Eh… could you explain your reasoning?

Page 24: The Art of Better

!=

Different conceptual models for “Better”

“Better” “Better”

Page 25: The Art of Better

14:230:00

George’s Painful Experience

The Experience Review

What made troubleshooting take so long?

Page 26: The Art of Better

The Haystack Principle

“Optimize for small manageable haystacks.”

Lots of unvalidated changes

Easier to find the needle.

Page 27: The Art of Better

7:01

Iterative Validation with Unit Tests7:010:00

Small Haystacks

14:230:00

Skipping Tests and Validating at the End

Big Haystack

“If I decide to skip the unit tests, how will that affect my haystack size?”

Page 28: The Art of Better

14:230:00

George’s Painful Experience

The Experience Review

What made troubleshooting take so long?

Page 29: The Art of Better

The Art of Better

Avoiding Pain

Page 30: The Art of Better

With a data-driven feedback loop for learning what works, we can find our way to better.

Page 31: The Art of Better

Input: Constraints

Target: Minimize Pain

Output: Actual Pain

short-term loop long-term loop

1. Visibility

2. Clarity

3. Awareness

F ocus!

Idea Flow Learning Framework

Systematically Optimize Decisions

Page 32: The Art of Better

Input: Constraints

Target: Minimize Pain

Output: Actual Pain

short-term loop long-term loop

1. Visibility

2. Clarity

3. Awareness

F ocus!

Target - The direction we’re trying to go…

Idea Flow Learning Framework

Page 33: The Art of Better

Input: Constraints

Target: Minimize Pain

Output: Actual Pain

short-term loop long-term loop

1. Visibility

2. Clarity

3. Awareness

F ocus!

Output - The experience we’re trying to improve

Idea Flow Learning Framework

Page 34: The Art of Better

Input: Constraints

Target: Minimize Pain

Output: Actual Pain

short-term loop long-term loop

1. Visibility

2. Clarity

3. Awareness

F ocus!

Input - The constraints that limit our short-term choices…

Idea Flow Learning Framework

Page 35: The Art of Better

Input: Constraints

Target: Minimize Pain

Output: Actual Pain

short-term loop long-term loop

1. Visibility

2. Clarity

3. Awareness

F ocus!

1. Visibility - See the pain

1. Visibility

1. Visibility

Idea Flow Learning Framework

Page 36: The Art of Better

Input: Constraints

Target: Minimize Pain

Output: Actual Pain

short-term loop long-term loop

1. Visibility

2. Clarity

3. Awareness

F ocus!

1. Clarity

2. Clarity

2. Clarity - Explain what’s causing the pain

Idea Flow Learning Framework

Page 37: The Art of Better

Input: Constraints

Target: Minimize Pain

Output: Actual Pain

short-term loop long-term loop

1. Visibility

2. Clarity

3. Awareness

F ocus!

3. Awareness

3. Awareness - Learn to avoid the pain

Idea Flow Learning Framework

Page 38: The Art of Better

Input: Constraints

Target: Minimize Pain

Output: Actual Pain

short-term loop long-term loop

1. Visibility

2. Clarity

3. Awareness

F ocus!

Focus on the biggest pain…

F ocus!F ocus!

Idea Flow Learning Framework

Page 39: The Art of Better

Input: Constraints

Target: Minimize Pain

Output: Actual Pain

short-term loop long-term loop

1. Visibility

2. Clarity

3. Awareness

F ocus!

Idea Flow Learning Framework

Systematically Optimize Decisions

Page 40: The Art of Better

Process Control in Manufacturing

Quality Target

Lower Control Limit

Upper Control Limit

X"

This is “Out of Control”

Lower Variability = Better Control

We don’t improve productivity by trying to go faster, we improve productivity by improving control

Page 41: The Art of Better

“Pain Control” in Software Development

Optimal Friction

Upper Control Limit X"

“Out of Control”

20min

0m

Average Pain per Incident

This is Better

Target

Control Limit

Page 42: The Art of Better

How do I implement “better”?

Page 43: The Art of Better

Three Stages of Mastery

Visibility

Clarity

Awareness

Page 44: The Art of Better

Three Stages of Mastery

Visibility

Clarity

Awareness

Page 45: The Art of Better

Visibility

Learn to see the pain by visualizing the pain with Idea Flow Maps

Page 46: The Art of Better

The Visibility Principle

We can’t solve a problem that we don’t see.

Page 47: The Art of Better

George Lakoff

Metaphors We Live ByJeff Hawkins

On Intelligence

+

How do we “see” (and not see)?

Page 48: The Art of Better

Observe Pattern

“Do I know this pattern?”

Metaphors are patterns of conceptual “Shapes”

Page 49: The Art of Better

Three Different Types of Metaphors

Object Patterns (Thing)

Context/Relationship Patterns (Space)

Process Patterns (Time)

We “see” the world through a fabric of metaphor.

Page 50: The Art of Better

Technical Debt

Debt is a “Thing”

Page 51: The Art of Better

“This looks like a tech debt thing.”

1. Categorize patterns by concept type

Page 52: The Art of Better

“This looks like a painful tech debt thing.”

2. Categorize variations by intensity.

Pain level = 8

Page 53: The Art of Better

= Little Debt

= Medium Debt

= Big Debt

Our Beliefs about Developer Pain

Page 54: The Art of Better

PAIN occurs during the process of understanding and extending the software

Complex(So*ware(

PAIN

Pain occurs over TIME.

Page 55: The Art of Better

What do you think happens when we make this transition?

Process Patterns (Time)

Object Patterns (Thing)

Page 56: The Art of Better
Page 57: The Art of Better
Page 58: The Art of Better

nasa.com/solar-portraits

Metaphors are Filters

Page 59: The Art of Better

Try on the Purple Glasses!

Page 60: The Art of Better

Complex(So*ware(

Idea Flow is the flow of ideas between the developer and the software

“Idea Flow” = Process Pattern

Page 61: The Art of Better

The Idea Flow Process

Conflict Confirm

Rework'

Learn'

Validate(

Modify'

Progress Loop Conflict Loop

Troubleshoot'

Page 62: The Art of Better

Confirmed Expectations

Our brain works like a giant prediction engine…

Page 63: The Art of Better

Violated Expectations

Our brain works like a giant prediction engine…

Page 64: The Art of Better

Process Pattern Match

Process Pattern Mismatch

Confirmation Conflict

Page 65: The Art of Better

The Idea Flow Process

Conflict Confirm

Rework'

Learn'

Validate(

Modify'

Progress Loop Conflict Loop

Troubleshoot'

Page 66: The Art of Better

Conflict Confirm

Rework'

Learn'

Validate(

Modify'

Progress Loop Conflict Loop

Troubleshoot'

“Friction” in the Idea Flow Process

Page 67: The Art of Better

“Idea Flow Map”

“Friction”

A “conflict” starts with an unexpected observation and ends when understanding is resolved.

Page 68: The Art of Better

Idea Flow Mapping Tools

(Open Source, Supported GA ~January 2016)github.com/ideaflow/tools

Page 69: The Art of Better

Let’s Record an Idea Flow Map!

Page 70: The Art of Better

Typical Idea Flow Maps

Single Problem

Multi-Problem

Page 71: The Art of Better

Reading Visual Indicators in Idea Flow Maps

Le#$Atrium$

Le#$Ventricle$

Right$Ventricle$

Right$Atrium$

What’s$causing$this$pa7ern?$

Similar to how an EKG helps doctors diagnose heart problems...

Page 72: The Art of Better

...Idea Flow Maps help developers diagnose software problems.

Problem-Solving Machine

Reading Visual Indicators in Idea Flow Maps

Page 73: The Art of Better

= Solution Strategy

The “Heart” of Software Development(the problem-solving machine)

Page 74: The Art of Better

= Solution Strategy

The “Heart” of Software Development(the problem-solving machine)

Choose a general strategy

Page 75: The Art of Better

= Solution Strategy

The “Heart” of Software Development(the problem-solving machine)

Understand the system

Page 76: The Art of Better

= Solution Strategy

The “Heart” of Software Development(the problem-solving machine)

Code & work out the kinks

Page 77: The Art of Better

= Solution Strategy

The “Heart” of Software Development(the problem-solving machine)

Back to the drawing board

Page 78: The Art of Better

The type of friction depends on where the disruptions are in the problem-solving process

Page 79: The Art of Better

Trial and Error

The Friction is Here

Troubleshooting

Progress

Learning

Rework

Page 80: The Art of Better

Struggling with Understanding the Code

The Friction is Here

Troubleshooting

Progress

Learning

Rework

Page 81: The Art of Better

Struggling with Feedback

The Friction is Here

Troubleshooting

Progress

Learning

Rework

Page 82: The Art of Better

Idea Flow Maps visualize the experienced difficulty of a problem-solving task.

See the pain

Visibility

Page 83: The Art of Better

Three Stages of Mastery

Visibility

Clarity

Awareness

Page 84: The Art of Better

Three Stages of Mastery

Visibility

Clarity

Awareness

Page 85: The Art of Better

Clarity

Learn to explain the causes by expanding your vocabulary of patterns

Page 86: The Art of Better

The Clarity Principle

By naming the patterns,

we start to recognize the patterns.

Page 87: The Art of Better

What patterns do I see?

Page 88: The Art of Better

Object Patterns (Thing)

Context/Relationship Patterns (Space)

Process Patterns (Time)

Define More Shapes

Page 89: The Art of Better

The Ten Pains of Software Development

Troubleshooting

Progress

Learning

Rework

Page 90: The Art of Better

The Ten Pains of Software Development

Design-Fit Pain - When the new feature doesn’t fit well into the existing design.

Page 91: The Art of Better

The Ten Pains of Software Development

Requirements Pain - Bad assumptions about what functionality to build

Page 92: The Art of Better

The Ten Pains of Software Development

Collaboration Pain - Challenges collaborating with other developers on the team.

Page 93: The Art of Better

The Ten Pains of Software Development

Modeling Pain - When it’s difficult to build a conceptual model of the existing software.

Page 94: The Art of Better

The Ten Pains of Software Development

Cognitive Pain - Challenges with complexity and intense thinking

Page 95: The Art of Better

The Ten Pains of Software Development

Alarm Pain - Challenges with false alarms and test maintenance

Page 96: The Art of Better

The Ten Pains of Software Development

Experiment Pain - Challenges with getting feedback by running experiments

Page 97: The Art of Better

The Ten Pains of Software Development

Execution Pain - When changing the code is highly mistake-prone

Page 98: The Art of Better

The Ten Pains of Software Development

An amplifying effect on other problems

Page 99: The Art of Better

What type of pain did we have in the

Troubleshooting

Learning

Rework

Page 100: The Art of Better

Experiment*Pain*

!Numerous!Feedback!Loops!

Itera&ve(Narrowing(

Ambiguous(Clue(

Non6determinis&c(

Lots(of(Test(Cases(

Lots(of(Bugs(

Bad(Input(Assump&on(

Uncertainty(

Difficult(to(Interpret(

Experiment*Pain*

!Slow!Feedback!Loops!

Long%Execu+on%

Noisy%Output%

Limited%Output%

Complex%Behavior%

Non<determinis+c%Behavior%

Lots%of%Code%Changes%

Difficult%to%Interpret%

Test%Input%Genera+on%

Environment%Setup%

Environment%Cleanup%

Have%to%significantly%modify%a%test%

Debugger%

Breakdown the Causes of Pain into Patterns

Page 101: The Art of Better

Tags: #problemtag

Tag the Examples

Page 102: The Art of Better

100 hours

50 hours

Troubleshooting

Learning

Rework

Why categorize problems this way?

Focused Effort = Visible Improvement

Page 103: The Art of Better

Explain the Story of What Happened

Page 104: The Art of Better

JourneyBeginning Ending

Think about the Experience as a Problem-Solving Journey

Page 105: The Art of Better

What were the biggest challenges on the journey?

Constraints

Difficulties

Bad Strategies

Uncertainty

Page 106: The Art of Better

Journey

Constraints

What were the biggest challenges on the journey?

Page 107: The Art of Better

Difficulties

Journey

What were the biggest challenges on the journey?

Page 108: The Art of Better

JourneyBad Strategy

What were the biggest challenges on the journey?

Page 109: The Art of Better

Journey Good Strategy

What were the biggest challenges on the journey?

Page 110: The Art of Better

Journey Uncertainty

What were the biggest challenges on the journey?

Page 111: The Art of Better

What were the challenges?

What other choices did we have?

Explain the Story of What Happened

Page 112: The Art of Better

Our level of understanding is constrained by the diversity of our conceptual metaphors.

Explain the causes of pain

Clarity

Page 113: The Art of Better

Three Stages of Mastery

Visibility

Clarity

Awareness

Page 114: The Art of Better

Three Stages of Mastery

Visibility

Clarity

Awareness

Page 115: The Art of Better

Learn to avoid the pain by running strategy experiments.

Awareness

Page 116: The Art of Better

Clarity without Awareness

This is Hindsight Bias. It’s not that easy!

14:230:00

Lots of changes at once will make troubleshooting difficult

“That was a dumb thing to do. I’ll avoid that next time.”

Page 117: The Art of Better

The ChallengeWe tend to make auto-pilot decisions and do what’s familiar

How do we break decision habits?

Page 118: The Art of Better

Imagine your brain is a decision-making engine

written in code.

BreakpointStop and Think!

Page 119: The Art of Better

Imagine your brain is a decision-making engine

written in code.

BreakpointStop and Think!

Page 120: The Art of Better

What’s a Decision Principle?

1. How do I evaluate my situation?

2. What should I optimize for?

Answers Two Questions

Page 121: The Art of Better

The Haystack Principle

“Optimize for small manageable haystacks.”

“If I decide to skip the unit tests, how will that affect my haystack size?”

Lots of unvalidated changes

Easier to find the needle.

Page 122: The Art of Better

The Awareness Principle

We can’t avoid the pain,

if we can’t predict the pain when making decisions.

Page 123: The Art of Better

Test the Model (Experiments)

Refine the Model (Patterns)

False&Predic,on&

Scien,fic&Model&

Creating an explicit model makes our beliefs testable.

The Scientific Method

Page 124: The Art of Better

Test the Model (Experiments)

Refine the Model (Patterns)

False&Predic,on&

Scien,fic&Model&

The Scientific Method

Creating an explicit model makes our beliefs testable.

Visibility Process

Clarity Process

Awareness Process

Page 125: The Art of Better

The Checklist ManifestoAtul Gawande

Running LeanAsh Maurya

+

Strategy Experiments with Checklists

Page 126: The Art of Better

14:230:00

I want to avoid this…

Thinking Checklist

Is my current approach likely to cause a big haystack?

Situation: start of subtask

Let’s Make a Checklist!

“What question could I ask my future self to recognize similar risks in the future?”

“In what situation would I ask the question?”

Page 127: The Art of Better

0:00

Stop and Think:

Is my current approach likely to cause a big haystack?

Predict: Small haystack

Strategy Experiments

Page 128: The Art of Better

18:120:00

Stop and Think:

Is my current approach likely to cause a big haystack?

Predict: Small haystack

False Prediction

Strategy Experiments

Page 129: The Art of Better

18:120:00

Stop and Think:

Is my current approach likely to cause a big haystack?

False Prediction

Strategy Experiments

High-Risk Situations

1. Unraveling sweater 2. Integration-heavy change 3. High state variation 4. Minimum scope is big

Q: Is my current approach likely to cause a big haystack?

Start of Subtask

Page 130: The Art of Better

Strategy Types (“do”)

1. DependencyAnalysis 2. IncrementalIntegrationTest 3. DataDrivenTest 4. IsolateHardToTestCode

Situation Types (“see”)

1. UnravelingSweater 2. HeavyIntegrationLogic 3. HighStateVariation 4. CoupledExternalDependencies

Haystack Decisions

Codify What Works

DoSee

Page 131: The Art of Better

Best Practices are Backwards

We don’t encounter solutions, we encounter problems.

Do See We need a new data structure!!

Page 132: The Art of Better

Learn to avoid the pain

To improve the quality of decisions, practice asking the right questions at the right time.

Awareness

Page 133: The Art of Better

Three Stages of Mastery

Visibility

Clarity

Awareness

See

Explain

Predict

Page 134: The Art of Better

What decision principles apply to the example?

Page 135: The Art of Better

Experiment Time

Time Warp Bias

Setup Experiment Analyze Results & Decide Next Experiment

Execute

“Optimize experiments for human cycles.”

“How could I reduce the time spent on human cycles?”

Page 136: The Art of Better

Was it time-consuming to setup the inputs? What made it time-consuming?

Was it fast or slow to execute the experiment? What made it time-consuming?

Was it time-consuming to analyze the results? What made it time-consuming?

Execution

Decide Next Action

Setup Inputs

How could we have reduced the human cycles?

Time Warp Questions

Page 137: The Art of Better

Code Sandwich

Behavior Complexity

Observability

Ease of Manipulation

“How can I reduce the thickness of my code sandwich?”

“Optimize for low diagnostic difficulty.”

The thickness of the sandwich increases

troubleshooting difficulty

Page 138: The Art of Better

What behavior were we trying to understand? Was the core behavior complex or simple?

How difficult was it to see what was going on? What made it difficult to see?

How difficult was it to manipulate the behavior? What made it difficult to tinker?

Observability

Ease of Manipulation

Behavior Complexity

How could we reduce the thickness of the code sandwich?

Code Sandwich Questions

Page 139: The Art of Better

Cloud of Possibilities

“How can I generate clues to eliminate some possibilities?”

“Optimize the experiments to generate useful clues.”

Page 140: The Art of Better

Was the cloud of possibilities big or small?

What were some of the clues we saw? Were some of the clues more useful than others?

Scope

Narrowing Speed

How could we have have narrowed the possibilities faster?

Cloud of Possibilities Questions

Page 141: The Art of Better

Input: Constraints

Target: Minimize Pain

Output: Actual Pain

short-term loop long-term loop

1. Visibility

2. Clarity

3. Awareness

F ocus!

Idea Flow Learning Framework

Systematically Optimize Decisions

Page 142: The Art of Better

Why go to all this trouble?

Accelerate productivity improvements by focusing on what matters most.

Make the improvements permanent by improving your decision habits.

Make the case to management for spending time on improvements by quantifying the indirect costs

Page 143: The Art of Better

Open Mastery 2016 We Believe in Peer Mentorship!

Yay!

Page 144: The Art of Better

Free Online Training and Community Support:

Idea Flow Learning Framework

Page 145: The Art of Better

Individuals Free Membership

Companies Paid Membership

Open Mastery Guild Membership

Page 146: The Art of Better

IFM Tools

Anonymized data

Developers Learning Together!

IFM Tools

IFM Tools IFM Tools

IFM Tools

IFM Tools

Community Focus

Integrated #HashTag Glossary

Page 147: The Art of Better

IFM Tools

IFM Tools

IFM Tools IFM Tools

IFM Tools

IFM Tools

Idea Flow Analytics PlatformPrivate data

Companies Learning Together!

Revenue from membership fees to fund core development

Page 148: The Art of Better

@janellekz

Open Mastery 2016Join us! @openmastery

[email protected]

Thank you!

Free e-book if you sign up before publish day! (Jan 2016)

Tweet about #ideaflow!

IFM Tools available at: github.com/ideaflow/tools