GPA Pie Graph
Complexity (flog)
Code Smells (reek)
Slide 43
Slide 43 text
RubyCritic
module RubyCritic
class AnalysedModule
def cost
smells.map(&:cost).inject(0.0, :+) +
(complexity / COMPLEXITY_FACTOR)
end
end
end
Slide 44
Slide 44 text
RubyCritic
module RubyCritic
class AnalysedModule
def cost
smells.map(&:cost).inject(0.0, :+) + # From Reek
(complexity / COMPLEXITY_FACTOR)
end
end
end
Slide 45
Slide 45 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 46
Slide 46 text
Churn vs.
Complexity
Churn (SCM)
Complexity (flog)
Slide 47
Slide 47 text
100
0
1 100_000
Complexity
Churn
Slide 48
Slide 48 text
100
0
1 100_000
“Welcome to
the good place.” ❤
Complexity
Churn
Slide 49
Slide 49 text
100
0
1 100_000
No one understands
these
fi
les but they
work. So don’t change
them.
Complexity
Churn
Slide 50
Slide 50 text
100
0
1 100_000
Everybody
understands these
fi
les
but you need to
change them often
Complexity
Churn
Slide 51
Slide 51 text
100
0
1 100_000
Complexity
Churn
These modules are
complex and are
constantly changing
🤦 🤦 🤦
Slide 52
Slide 52 text
100
0
1 100_000
Complexity
Churn
Refactoring level:
Hard mode
Slide 53
Slide 53 text
Are you getting into a tar
pit, is it a dumpster
fi
re, or
have you found a project
which is easy to maintain?
Slide 54
Slide 54 text
100
0
1 100_000
Welcome to the tar pit.
Complexity
Churn