Lord of Code Smells in Padrino Powered by Rabbit 2.1.3
Lord of Code
Smells in
Padrino
Slide 2
Slide 2 text
Lord of Code Smells in Padrino Powered by Rabbit 2.1.3
“Musik”
Slide 3
Slide 3 text
Lord of Code Smells in Padrino Powered by Rabbit 2.1.3
Who Am I
@wikimatze
Running vimberlin.de
Writing padrinobook.com
Slide 4
Slide 4 text
Lord of Code Smells in Padrino Powered by Rabbit 2.1.3
Code Smell
any symptom in the source
code of a program that
possibly indicates a deeper
problem
Slide 5
Slide 5 text
Lord of Code Smells in Padrino Powered by Rabbit 2.1.3
Tools
simplecov: Uses Rubies
1.9’s built-in Coverage
library
metric_fu: Creates churn,
flog, flay …
codeclimate.com: Online
tool – hurray
Slide 6
Slide 6 text
Lord of Code Smells in Padrino Powered by Rabbit 2.1.3
Simplecov
Slide 7
Slide 7 text
Lord of Code Smells in Padrino Powered by Rabbit 2.1.3
metric_fu
uses several other gems to
create graphical output
Slide 8
Slide 8 text
Lord of Code Smells in Padrino Powered by Rabbit 2.1.3
Cane
are certain code quality
thresholds are met like line
length, documentation
ABC complexity
aggregates the number of
assignments, branches,
and conditionals in a unit
Slide 9
Slide 9 text
Lord of Code Smells in Padrino Powered by Rabbit 2.1.3
Cane Image
Slide 10
Slide 10 text
Lord of Code Smells in Padrino Powered by Rabbit 2.1.3
Churn
measures the change ratio
of files
Slide 11
Slide 11 text
Lord of Code Smells in Padrino Powered by Rabbit 2.1.3
Churn Image
Slide 12
Slide 12 text
Lord of Code Smells in Padrino Powered by Rabbit 2.1.3
Flog
flog score measures
complexity
a score of above 20 may
need refactoring
if it is 60 …
Slide 13
Slide 13 text
Lord of Code Smells in Padrino Powered by Rabbit 2.1.3
Chaos image
Slide 14
Slide 14 text
Lord of Code Smells in Padrino Powered by Rabbit 2.1.3
Flog Image
Slide 15
Slide 15 text
Lord of Code Smells in Padrino Powered by Rabbit 2.1.3
Flay
analyzes code similarities
hell it’s just a DRY indicator
code that is too DRY can
become “chafe”
Slide 16
Slide 16 text
Lord of Code Smells in Padrino Powered by Rabbit 2.1.3
Flay image
Slide 17
Slide 17 text
Lord of Code Smells in Padrino Powered by Rabbit 2.1.3
Reek
checks a bunch of code
smells like control couple,
large class, long
parameters list, nested
iterators, …
Slide 18
Slide 18 text
Lord of Code Smells in Padrino Powered by Rabbit 2.1.3
Reek image
Slide 19
Slide 19 text
Lord of Code Smells in Padrino Powered by Rabbit 2.1.3
Roodi
Ruby Object Oriented
Design Inferometer
informs you about design
issues
Slide 20
Slide 20 text
Lord of Code Smells in Padrino Powered by Rabbit 2.1.3
Rood image
Slide 21
Slide 21 text
Lord of Code Smells in Padrino Powered by Rabbit 2.1.3
Saikuro
generates a list of
cyclomatic complexity of
each method
Slide 22
Slide 22 text
Lord of Code Smells in Padrino Powered by Rabbit 2.1.3
Saikuro image
Slide 23
Slide 23 text
Lord of Code Smells in Padrino Powered by Rabbit 2.1.3
Hotspot
gathering of the flog, flay
and reek score
Slide 24
Slide 24 text
Lord of Code Smells in Padrino Powered by Rabbit 2.1.3
Hotspot image
Slide 25
Slide 25 text
Lord of Code Smells in Padrino Powered by Rabbit 2.1.3
Me again
@wikimatze
code examples
wikimatze.de/code-
coverage-tools-for-padrino/
Book preview
padrinobook.com/book
Slide 26
Slide 26 text
Lord of Code Smells in Padrino Powered by Rabbit 2.1.3
Redesigning padrinorb
page