Spoilers fosdem-2013

Preview:

Citation preview

Spoilers and Counter-SpoilersHow to Measure Software Maintainability

Riccardo Bernardini

bernardini@uniud.it

FOSDEM 2013 – February 2, 2013

Spoilers and Counter-Spoilers

Outline

• My objective

• The problem

• The solution

• What now?

• Conclusion

1

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

The problem

Spoilers and Counter-Spoilers

MotivationWhy 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

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

Spoilers and Counter-Spoilers

The problem with peer-reviewHungarian Notation

i counter sz name p foo

love it or hate it

5

Spoilers and Counter-Spoilers

The problem with peer-reviewCasing

with underscores CamelConvention Mixed Convention

6

Spoilers and Counter-Spoilers

The problem with peer-reviewCode blocksif (x==NULL) {

a_convention();}

if (x==NULL){

another_one();}

if (x==NULL){

use_large_indent();if (a==0){

deeper_and_deeper();}

}

7

Spoilers and Counter-Spoilers

The problem with peer-reviewObject-oriented

fAttribute mMethod() pPrivateMethod()

attribute method() private method()

8

The solution

Spoilers and Counter-Spoilers

How it worksStep 1

Once upon a time, there were few programmers. . .

9

Spoilers and Counter-Spoilers

How it worksStep 2

. . . who submited code to the competition

10

Spoilers and Counter-Spoilers

How it worksStep 3

Some evil spoilers. . .

11

Spoilers and Counter-Spoilers

How it worksStep 4

acquired the code. . .

12

Spoilers and Counter-Spoilers

How it worksStep 5

and introduced some (nasty, subtle) bugs. . .

13

Spoilers and Counter-Spoilers

How it worksStep 6

But then some counter-spoilers (in shining armours) arrived. . .

14

Spoilers and Counter-Spoilers

How it worksStep 7

. . . rescued the code. . .

15

Spoilers and Counter-Spoilers

How it works

. . . and debugged it! The debugging time was registered

16

Spoilers and Counter-Spoilers

How it works

Debugging time components: how to separate them?

17

Spoilers and Counter-Spoilers

We need a //////hero model

At the end we have a sequence of 5-ple

We suppose that

18

Spoilers and Counter-Spoilers

Solving for the scores

Problem: given the 5-ples, find all SP , SS and SC

• N. of unknown

NP + NS + NC

• N. of 5-ple

N. programs × N. spoilers/code × N. CS/spoiled

• We need

N. 5-ple ≥ NP + NS + NC

19

Spoilers and Counter-Spoilers

Prizes for everyone!

Best programmer, best spoiler and best counter-spoiler

1 23

1 23 1 23

20

Spoilers and Counter-Spoilers

Variation: B’n’W competition

Add s and s to the code

21

Spoilers and Counter-Spoilers

Variation: B’n’W competition (2)

Time components

Faster Slower

22

What now?

Spoilers and Counter-Spoilers

What now?

• Web interface

• Score model

• Experiments

• Details, details, details, . . .

23

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

Conclusions

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