GPA Pie Graph
Complexity (flog)
Code Smells (reek)
Slide 73
Slide 73 text
RubyCritic
module RubyCritic
class AnalysedModule
def cost
smells.map(&:cost).inject(0.0, :+) +
(complexity / COMPLEXITY_FACTOR)
end
end
end
Slide 74
Slide 74 text
RubyCritic
module RubyCritic
class AnalysedModule
def cost
smells.map(&:cost).inject(0.0, :+) + # From Reek
(complexity / COMPLEXITY_FACTOR)
end
end
end
Slide 75
Slide 75 text
RubyCritic
module RubyCritic
class AnalysedModule
def cost
smells.map(&:cost).inject(0.0, :+) + # From Reek
(complexity / COMPLEXITY_FACTOR) # From Flog
end
end
end
Slide 76
Slide 76 text
Churn vs.
Complexity
Churn (SCM)
Complexity (flog)
Slide 77
Slide 77 text
100
0
1 100_000
Complexity
Churn
Slide 78
Slide 78 text
100
0
1 100_000
“Welcome to
the good place.” ❤
Complexity
Churn
Slide 79
Slide 79 text
100
0
1 100_000
No one understands
these
fi
les but they
work. So don’t change
them.
Complexity
Churn
Slide 80
Slide 80 text
100
0
1 100_000
“[…], if the code
never changes,
it's not costing us
money.”
Sandi Metz
Complexity
Churn
Slide 81
Slide 81 text
100
0
1 100_000
Everybody
understands these
fi
les
but you need to
change them often
Complexity
Churn
Slide 82
Slide 82 text
100
0
1 100_000
Complexity
Churn
These modules are
complex and are
constantly changing
🤦 🤦 🤦
Slide 83
Slide 83 text
100
0
1 100_000
Complexity
Churn
“Sometimes a class
becomes so complex that
refactoring seems too
dif
fi
cult.”
Michael Feathers
Slide 84
Slide 84 text
What does your project
look like?
Slide 85
Slide 85 text
100
0
1 100_000
Welcome to the tar pit.
Complexity
Churn