SlideShare a Scribd company logo
1 of 30
Download to read offline
Spoilers and Counter-Spoilers
How 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

                                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
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-review
                                Hungarian Notation

i counter                               sz name             p foo




                        love it            or     hate it




                                       5
Spoilers and Counter-Spoilers

                The problem with peer-review
                                  Casing
with underscores                CamelConvention   Mixed Convention




                                     6
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
Spoilers and Counter-Spoilers

                The problem with peer-review
                                Object-oriented




fAttribute                       mMethod()        pPrivateMethod()


 attribute                       method()         private method()




                                      8
The solution
Spoilers and Counter-Spoilers

                                How it works
                                   Step 1
            Once upon a time, there were few programmers. . .




                                     9
Spoilers and Counter-Spoilers

                                How it works
                                   Step 2
                 . . . who submited code to the competition




                                    10
Spoilers and Counter-Spoilers

                                How it works
                                      Step 3
                                Some evil spoilers. . .




                                        11
Spoilers and Counter-Spoilers

                                How it works
                                      Step 4
                                acquired the code. . .




                                        12
Spoilers and Counter-Spoilers

                                How it works
                                   Step 5
                and introduced some (nasty, subtle) bugs. . .




                                    13
Spoilers and Counter-Spoilers

                                How it works
                                   Step 6
   But then some counter-spoilers (in shining armours) arrived. . .




                                    14
Spoilers and Counter-Spoilers

                                  How it works
                                        Step 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 / / / model
                                  hero
                                   ///

                         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 + 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
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
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



                                     r          Slo
                                s te




                                                     we
                          Fa




                                                      r
                                         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

More Related Content

Similar to Spoilers fosdem-2013

How to become a .net debugging Jedi (.Net Summit, Minsk)
How to become a .net debugging Jedi (.Net Summit, Minsk)How to become a .net debugging Jedi (.Net Summit, Minsk)
How to become a .net debugging Jedi (.Net Summit, Minsk)Moaid Hathot
 
Bluffers guide to Terminology
Bluffers guide to TerminologyBluffers guide to Terminology
Bluffers guide to TerminologyJim Gough
 
Ruby codebases in an entropic universe
Ruby codebases in an entropic universeRuby codebases in an entropic universe
Ruby codebases in an entropic universeNiranjan Paranjape
 
Software Quality via Unit Testing
Software Quality via Unit TestingSoftware Quality via Unit Testing
Software Quality via Unit TestingShaun Abram
 
Know your platform. 7 things every scala developer should know about jvm
Know your platform. 7 things every scala developer should know about jvmKnow your platform. 7 things every scala developer should know about jvm
Know your platform. 7 things every scala developer should know about jvmPawel Szulc
 
How to become a .net debugging jedi (Microsoft R&D Center, Nazareth, Israel)
How to become a .net debugging jedi (Microsoft R&D Center, Nazareth, Israel)How to become a .net debugging jedi (Microsoft R&D Center, Nazareth, Israel)
How to become a .net debugging jedi (Microsoft R&D Center, Nazareth, Israel)Moaid Hathot
 
On the Dichotomy of Debugging Behavior Among Programmers
On the Dichotomy of Debugging Behavior Among ProgrammersOn the Dichotomy of Debugging Behavior Among Programmers
On the Dichotomy of Debugging Behavior Among ProgrammersMoritz Beller
 
Game Engine Code Quality: Is Everything Really That Bad?
Game Engine Code Quality: Is Everything Really That Bad?Game Engine Code Quality: Is Everything Really That Bad?
Game Engine Code Quality: Is Everything Really That Bad?Andrey Karpov
 
Software as a craft (February, 2018)
Software as a craft (February, 2018)Software as a craft (February, 2018)
Software as a craft (February, 2018)Rachel M. Carmena
 
Technical Debt - PHPBenelux
Technical Debt - PHPBeneluxTechnical Debt - PHPBenelux
Technical Debt - PHPBeneluxenaramore
 
Adventures in Asymmetric Warfare
Adventures in Asymmetric WarfareAdventures in Asymmetric Warfare
Adventures in Asymmetric WarfareWill Schroeder
 
The Power Of Refactoring (PHPCon Italia)
The Power Of Refactoring (PHPCon Italia)The Power Of Refactoring (PHPCon Italia)
The Power Of Refactoring (PHPCon Italia)Stefan Koopmanschap
 
Thailand SPIN: Series 3: กุญแจสู่ความสำเร็จในการเขียนโปรแกรมให้ตรงกับความต้อง...
Thailand SPIN: Series 3: กุญแจสู่ความสำเร็จในการเขียนโปรแกรมให้ตรงกับความต้อง...Thailand SPIN: Series 3: กุญแจสู่ความสำเร็จในการเขียนโปรแกรมให้ตรงกับความต้อง...
Thailand SPIN: Series 3: กุญแจสู่ความสำเร็จในการเขียนโปรแกรมให้ตรงกับความต้อง...Software Park Thailand
 
How to Fix Hundreds of Bugs in Legacy Code and Not Die (Unreal Engine 4)
How to Fix Hundreds of Bugs in Legacy Code and Not Die (Unreal Engine 4)How to Fix Hundreds of Bugs in Legacy Code and Not Die (Unreal Engine 4)
How to Fix Hundreds of Bugs in Legacy Code and Not Die (Unreal Engine 4)Andrey Karpov
 
Towards Malware Decompilation and Reassembly
Towards Malware Decompilation and ReassemblyTowards Malware Decompilation and Reassembly
Towards Malware Decompilation and ReassemblyMarcus Botacin
 
TDD: seriously, try it! 
TDD: seriously, try it! TDD: seriously, try it! 
TDD: seriously, try it! Nacho Cougil
 
TDD - Seriously, try it! - Bucarest Tech Week
TDD - Seriously, try it! - Bucarest Tech WeekTDD - Seriously, try it! - Bucarest Tech Week
TDD - Seriously, try it! - Bucarest Tech WeekNacho Cougil
 
02 greedy, d&c, binary search
02 greedy, d&c, binary search02 greedy, d&c, binary search
02 greedy, d&c, binary searchPankaj Prateek
 

Similar to Spoilers fosdem-2013 (20)

How to become a .net debugging Jedi (.Net Summit, Minsk)
How to become a .net debugging Jedi (.Net Summit, Minsk)How to become a .net debugging Jedi (.Net Summit, Minsk)
How to become a .net debugging Jedi (.Net Summit, Minsk)
 
Bluffers guide to Terminology
Bluffers guide to TerminologyBluffers guide to Terminology
Bluffers guide to Terminology
 
Ruby codebases in an entropic universe
Ruby codebases in an entropic universeRuby codebases in an entropic universe
Ruby codebases in an entropic universe
 
Software Quality via Unit Testing
Software Quality via Unit TestingSoftware Quality via Unit Testing
Software Quality via Unit Testing
 
ASE01.ppt
ASE01.pptASE01.ppt
ASE01.ppt
 
Know your platform. 7 things every scala developer should know about jvm
Know your platform. 7 things every scala developer should know about jvmKnow your platform. 7 things every scala developer should know about jvm
Know your platform. 7 things every scala developer should know about jvm
 
How to become a .net debugging jedi (Microsoft R&D Center, Nazareth, Israel)
How to become a .net debugging jedi (Microsoft R&D Center, Nazareth, Israel)How to become a .net debugging jedi (Microsoft R&D Center, Nazareth, Israel)
How to become a .net debugging jedi (Microsoft R&D Center, Nazareth, Israel)
 
On the Dichotomy of Debugging Behavior Among Programmers
On the Dichotomy of Debugging Behavior Among ProgrammersOn the Dichotomy of Debugging Behavior Among Programmers
On the Dichotomy of Debugging Behavior Among Programmers
 
Clean code
Clean codeClean code
Clean code
 
Game Engine Code Quality: Is Everything Really That Bad?
Game Engine Code Quality: Is Everything Really That Bad?Game Engine Code Quality: Is Everything Really That Bad?
Game Engine Code Quality: Is Everything Really That Bad?
 
Software as a craft (February, 2018)
Software as a craft (February, 2018)Software as a craft (February, 2018)
Software as a craft (February, 2018)
 
Technical Debt - PHPBenelux
Technical Debt - PHPBeneluxTechnical Debt - PHPBenelux
Technical Debt - PHPBenelux
 
Adventures in Asymmetric Warfare
Adventures in Asymmetric WarfareAdventures in Asymmetric Warfare
Adventures in Asymmetric Warfare
 
The Power Of Refactoring (PHPCon Italia)
The Power Of Refactoring (PHPCon Italia)The Power Of Refactoring (PHPCon Italia)
The Power Of Refactoring (PHPCon Italia)
 
Thailand SPIN: Series 3: กุญแจสู่ความสำเร็จในการเขียนโปรแกรมให้ตรงกับความต้อง...
Thailand SPIN: Series 3: กุญแจสู่ความสำเร็จในการเขียนโปรแกรมให้ตรงกับความต้อง...Thailand SPIN: Series 3: กุญแจสู่ความสำเร็จในการเขียนโปรแกรมให้ตรงกับความต้อง...
Thailand SPIN: Series 3: กุญแจสู่ความสำเร็จในการเขียนโปรแกรมให้ตรงกับความต้อง...
 
How to Fix Hundreds of Bugs in Legacy Code and Not Die (Unreal Engine 4)
How to Fix Hundreds of Bugs in Legacy Code and Not Die (Unreal Engine 4)How to Fix Hundreds of Bugs in Legacy Code and Not Die (Unreal Engine 4)
How to Fix Hundreds of Bugs in Legacy Code and Not Die (Unreal Engine 4)
 
Towards Malware Decompilation and Reassembly
Towards Malware Decompilation and ReassemblyTowards Malware Decompilation and Reassembly
Towards Malware Decompilation and Reassembly
 
TDD: seriously, try it! 
TDD: seriously, try it! TDD: seriously, try it! 
TDD: seriously, try it! 
 
TDD - Seriously, try it! - Bucarest Tech Week
TDD - Seriously, try it! - Bucarest Tech WeekTDD - Seriously, try it! - Bucarest Tech Week
TDD - Seriously, try it! - Bucarest Tech Week
 
02 greedy, d&c, binary search
02 greedy, d&c, binary search02 greedy, d&c, binary search
02 greedy, d&c, binary search
 

Spoilers fosdem-2013