150 likes | 279 Views
“ Since the measuring device has to be constructed by the observer, we have to remember that what we observe is not nature itself, but nature exposed to our method of questioning.” – Werner Karl Heisenberg [Physics and Philosophy 1958]. Metrics for OO Software. Carl Alsford (carl@alsford.me.uk).
E N D
“Since the measuring device has to be constructed by the observer, we have to remember that what we observe is not nature itself, but nature exposed to our method of questioning.” – Werner Karl Heisenberg [Physics and Philosophy 1958] Metrics for OO Software Carl Alsford (carl@alsford.me.uk)
Introduction • What are software metrics • How many metrics to use • Why we need to measure them • Why existing metrics fail for OO • What metrics we can use for OO • Summary • Questions
What are software metrics • Set of specific measurements taken on a particular item or process. • SE metrics are used to measure: • Products • Processes • People
Product metrics • Used to measure • Designs • Source code • Test cases • Used to test which design method is most useful/productive, and which test cases to use
Process Metrics • Used to measure • Analysis • Designing • Coding • Could be used with COCOMO to find out the most productive processes
People metrics • Used to measure • Productivity of coder • Efficiency of tester • Coder tested on how much code they write • Tester tested on how much code they test
How many metrics to use • Not useful to just use one • 3-5 is a practical upper limit • using more does no justify the extra cost • 20 may be used at start of large projects, narrow this down with analysis
Why we need to measure them • They allow us to: • Quantitatively define success/failure • Make managerial decisions • Identify trends • Make estimates • Higher management will understand graphs/data better than jargon
Why existing metrics fail for OO • Due to the very nature of OOP • Inheritance • Encapsulation • Abstraction • These aspects contradict traditional metrics
Inheritance vs. Productivity • Conflicts with the LOC metric • When inherited, a smaller amount of code is written, so less work appears to be done by programmer • Need to find out how much inheritance is used for programmer productivity
Encapsulation • The unit on which metrics will be based is now an object, not a method • Data and code, not just code • Different way of estimating the system is needed
What metrics we can use for OO • Number of children • Depth of inheritance tree • Response/method set for a class
Summary • Metrics are useful, but only if they are taken within the context in which they are meant to be read • OO ones for OO programs, and traditional metrics for linear • Single metrics are not useful, a few need to be compared if any useful conclusions are to be found
References/Further Reading • http://www.ipipan.gda.pl/~marek/objects/TOA/moose.html • https://www.bioline.be/Ittelecom/1999 11 02 Object Oriented Testing Really is Different.pdf • http://satc.gsfc.nasa.gov/support/STC_APR98/apply_oo/apply_oo.html • Software Engineering A Practitioner’s Approach [Pressman, R]
Questions • Any questions? A copy of this presentation is available at http://www.st00pidllama.me.uk/SEADV.ppt