3. Spoilers and Counter-Spoilers
My objective
• Competitions about SW maintainability
• I want to tell you about it
• Why?
– Let you know
– Promote the idea
– Get feedback
– Finding competitors
2
5. Spoilers and Counter-Spoilers
Motivation
Why measuring SW quality?
• Many SW competitions reward
– Fast coding (i.e., IEEExtreme programming)
– Efficiency
– Ingenuity
• SW competitions that reward
– Readability
– Maintainability
– Robustness
are not common
Let’s organize a SW quality competition!
3
6. Spoilers and Counter-Spoilers
The problem
• Qualities like efficiency, coding speed, are quantitative
⇒ they are easy to measure objectively
• Qualities like readability, maintainability, . . . are qualitative
⇒ how can we measure them?
⇒ peer review?
– Peer review is subjective . . .
. . . especially with code readability
4
7. Spoilers and Counter-Spoilers
The problem with peer-review
Hungarian Notation
i counter sz name p foo
love it or hate it
5
8. Spoilers and Counter-Spoilers
The problem with peer-review
Casing
with underscores CamelConvention Mixed Convention
6
9. Spoilers and Counter-Spoilers
The problem with peer-review
if (x==NULL) { Code blocks
a_convention();
}
if (x==NULL)
{
another_one();
}
if (x==NULL)
{
use_large_indent();
if (a==0)
{
deeper_and_deeper();
}
}
7
10. Spoilers and Counter-Spoilers
The problem with peer-review
Object-oriented
fAttribute mMethod() pPrivateMethod()
attribute method() private method()
8
21. Spoilers and Counter-Spoilers
We need a / / / model
hero
///
At the end we have a sequence of 5-ple
We suppose that
18
22. Spoilers and Counter-Spoilers
Solving for the scores
Problem: given the 5-ples, find all SP , SS and SC
• N. of unknown
NP + N S + N C
• N. of 5-ple
N. programs × N. spoilers/code × N. CS/spoiled
• We need
N. 5-ple ≥ NP + NS + NC
19
23. Spoilers and Counter-Spoilers
Prizes for everyone!
Best programmer, best spoiler and best counter-spoiler
3 1 2
3 1 2 3 1 2
20
27. Spoilers and Counter-Spoilers
What now?
• Web interface
• Score model
• Experiments
• Details, details, details, . . .
23
28. Spoilers and Counter-Spoilers
Keep in touch
• LinkedIn group
Spoiling and Counter-Spoiling for Software Competitions
• Web site (temporary & mostly empty)
https://sites.google.com/site/counterspoiling/
24
30. Spoilers and Counter-Spoilers
Conclusions
• A method to measure SW maintainability
• Using spoilers and counter-spoilers
• Possible to mix with other metrics
• Work in progress. First competition (hoepfully) soon
Thank you to inkscape and OpenClipArt for the graphics. . .
25