GoConqr has a new look! Let us know what you think.

Flashcards

Metrics

harrymt computer science BsC English 60 cards

Cards in this deck (60)

  1. 1What is a software measurement?Deriving a numeric value for an attribute of a software product/process
  2. 2What is a software metric?Any type of measurement which relates to software system, process or related documentation
  3. 3What are some software metrics related to Maintainability?Number of procedure parameters.
    Cyclomatic complexity.
    Program size in lines of code.
    Length of user manual.
  4. 4What are some software metrics related to Portability?Number of procedure parameters.
    Program size in lines of code.
  5. 5What are some software metrics related to Reliability?Cyclomatic complexity.
    Program size in lines of code.
    Number of error messages
  6. 6What are some software metrics related to Usability?Length of user manual.
    Number of error messages.
  7. 7How can we compare software properties across projects?Using the measurement process
    - Data collected during this stage can be maintained as an organisational resource in a database, so comparisons across projects is possible
  8. 8What is a product metric? 2 types?Systematic way to assess quality based on a set of clearly defined rules.
    They help gain insight to design and construction of the software
    Dynamic/Static metrics
  9. 9What are 6 software product metrics?- Fan-in/Fan-out
    - Length of Code
    - Cyclomatic complexity
    - Length of identifiers
    - Depth of conditional nesting
    - Fog index.
  10. 10What are Dynamic Metrics?Collected by measurements made of ...
    a program in execution (e.g. response time, # of failures)
    - Help assess ...
    efficiency and reliability
  11. 11What are Static Metrics?Collected by measurements made of ...
    system representation (e.g. lines of code)
    - Help assess ...
    complexity, understandability and maintainability
  12. 12What is Fan-In/Fan-Out?Fan-in, Number of functions that call function X
    Fan-out, Number of functions that are called by function X
  13. 13High value of Fan-In?A high value means function X is tightly coupled to rest of design
    - Changes to function X will have extensive knock-on effects
  14. 14High value of Fan-Out?High value suggests overall complexity of function X may be high because of the complexity of control logic needed to coordinate the called components.
  15. 15What is the Length of code metric?Size measurement of program
    - Large the size, more complex and error-prone
  16. 16What is Cyclomatic complexity metric?Measure of control complexity/program understandability.
    - Higher is more complex
  17. 17What is Length of identifiers metric?Measure of average length of distinct identifers
    - Longer the identifiers, the more likely they are to be meaningful + more understandable
  18. 18What is Depth of conditional nesting metric?Measure of depth of nesting of if-statements in program
    - Deeper if's are hard to understand and potentially error-prone
  19. 19What is the Fog Index metric?Measure of avg length of words and sentences in documents
    - Higher the value, more difficult it is to understand the document
  20. 20What are 7 object-oriented metrics?- Depth of inheritance tree
    - Method fan-in/fan-out
    - Weighted methods per class
    - Number of overriding operations
    - Number of children
    - Abstractness
    - Instability
  21. 21What is the OO metric: Depth of inheritance tree?- Number of discrete lvls in inheritance tree
    - Deeper inheritance tree, more complex design
    - inheritance is form of strong coupling
  22. 22What is the OO metric: Method fan-in/fan-out?Same thing, but distinguish between calls from other methods in same object and external methods
    - High fan-ins represent good object designs and high level of reuse
    - It’s not possible to maintain high fan-in and low fan outs across the entire system
  23. 23What is the OO metric: Weighted methods per class?Number of methods included in a class, weighted by cyclomatic complexity of each method.
    Higher complex methods in same object = more impact on children = complex.
    Indicates time/effort required to develop/maintain object.
  24. 24What is the OO metric: Number of overriding operations?Number of operations in super-class that are overridden in sub-class.
    - High value means super-class use may not be appropriate for this sub-class
  25. 25What is OO metric: Coupling between Classes?CBO: Number of collaborations between 2 classes
    - As collaboration increases reuse decreases (dependency or code rot)
    - High fan-outs represent class coupling to other classes/objects and thus are undesirable
  26. 26What is OO metric: Number of children?NOC: number of sub classes immediately subordinate to a class
    - As NOC grows, reuse increases - but the abstraction may be diluted
    - NOC gives idea of potential influence class has on design: classes with many children requires more testing
  27. 27What is OO metric: Abstractness (A)?The ratio of # abstract classes/interfaces in package, compared with
    - total # of classes
    - Range is 0 - 1, 0: concrete package, 1: abstract package
  28. 28What is OO metric: Instability (I)?The ratio of efferent coupling (Ce) to total coupling (Ce + Ca)
    - such that I = Ce / (Ce + Ca)
    - This metric is an indicator of the package's resilience to change.
  29. 29What is OO metric: RFC Response For a Class?# methods that could be called in response to a message to a class (local + remote)
    As RFC increases testing effort increases.
    More complex objects = harder to understand
  30. 30What is OO metric: Lack of Cohesion in Methods?# empty intersections - # non-empty intersections
    Notion of a degree of similarity in methods
    If 2 methods use common variable names, they are similar.
    LCOM of 0 isnt cohesive
  31. 31LCOM Formula?LOCM = (|P| > |Q|) ? (|P| - |Q|) : 0
    P: Pairs of variables that have no dups
    Q: only duplicates
  32. 32What is OO metric: Class Size (CS)?Simple measure
    Number of operations
    Number of attributes
    Indicator of too much responsibility
  33. 33What is OO metric: Number of Operations Overridden?A large number for NOO indicates possible problems with the design
  34. 34What is OO metric: Number of Operations Added?The number of operations added by a subclass
    - As operations are added it is farther away from super class
    - As depth increases NOA should decrease
  35. 35What is OO metric: Method Inheritance Factor?All that can be invoked = new or overloaded + things inherited
    MIF can be [0 to 1]
    MIF near 1 means little specializations
    MIF near 0 means large change
  36. 36Why measure software?Determine, Predict, Improve quality of product/process to make comparisons
  37. 37What is Kaizen improvement?Continuous organisation improvement
    - Focus on continuous measure and understanding of process
  38. 38What is a defect?failure todo something
  39. 39What is an error?a wrong result/illegal action
  40. 40What are the main objectives of software quality metrics?1. Facilitate management control, planning and managerial intervention.
    From deviations of timetable/performance
    2. Identify situations for development/maintenance process improvement (prevent or correct)
    - From metrics info performance of teams/units
  41. 41What are the main requirements for software quality metrics?General: Relevant, valid, reliable
    - Operative: Easy/simple, does not require independent data collection
  42. 42What can metrics be evaluated on?Products - Deliverables, documentation
    Processes - Activities related to production of software
    Resources - hardware, people
  43. 43What are some example PROCESS metrics?- Rates of production/productivity
    - Refactoring rate
    - Error density/severity
    - Process timetable
  44. 44What are some example PRODUCT metrics?- Track potential risks
    - Complexity/code quality measures
    - Evaluate teams ability to control quality
  45. 452 Types of measures, examples?Direct measures
    Cost, LOC
    Indirect measures
    Human estimate, functionality, quality, reliability
  46. 46What are some size oriented metrics?LoC, KLoC (1000)
    SLoC (statement)
    Number-of-Function-Points (NFP)
    Errors/KLOC, documentation-pages/KLOC
  47. 47How do we count number of errors?Number-of-Code-Errors (NCE) vs Weighted-number-of-Code-Errors (WCE)
    Weight each error, times by number of errors
  48. 48Benefits of LOC based metrics?Easy to use/compute
    Language + programmer dependent
  49. 49Calculate Halsteads metrics?Program length: N = N1 + N2
    Program vocabulary: n = n1 + n2
    Purity ratio: PR = Nˆ/N
    n1 - number of distinct operators
    n2 - number of distinct operands
    N1 - total number of operators
    N2 - total number of operands
  50. 50Example halsteads metrics? if (k < 2) { if (k > 3) x = x * k; }Distinct operators if ( ) { } > < = * ;
    Distinct operands: k 2 3 x
    n1 - number of distinct operators = 10
    n2 - number of distinct operands = 4
    N1 - total number of operators = 13
    N2 - total number of operands = 7
  51. 51How to calculate basic program complexity?- Volume
    V = N log2(n)
    - Difficulty
    D = n1/2 * N2/n2
    - Program effort
    E = D * V
  52. 52What does Cyclomatic complexity measure?- complexity of a program or module
    - at the same time as it determines
    - the maximum number of independent paths needed to achieve full line coverage of the program.
  53. 53What is Cyclomatic formula?V(G) = E - N + P
    Edges, Nodes, Predicate nodes (diamonds)
  54. 54What are the bounds of cyclomatic complexity rating?< 5 simple and easy to understand.
    > 10 difficult to test
    > 20 the complexity is perceived as high.
    > 50,the software for practical purposes becomes un-testable
  55. 55What is meaning behind V(G)?V(G) # enclosed regions of planar graph.
    - # regions increases # decision paths/loops
    - Quantitative measure of # tests needed
    - Correlates well with rate of errors
  56. 56What is McClure's complexity Metric?Complexity = C + V
    C: Number of comparisons in module
    V: Number of control variables referenced in module
  57. 57What should metrics test? PS-FURPerformance, speed, throughput
    Supportability, maintainability
    -
    Functionality, features of system
    Usability, aesthetics, documentation
    Reliability, frequency of failure, security
  58. 58What are some measures of software quality?- Correctness, defects / KLOC
    - Maintainability, degree to which a program is open to change
    - Integrity, degree to which program is resistant to outside attack
    - Usability, easiness to use, training time
  59. 59Why are software metrics good? 4 prosGive useful info about quality of code
    Allow comparisons between projects, devs, teams and over time
    Suggest areas for improvement
    Give early warnings of problems
  60. 60Why are software metrics good? 2 cons- Interpreted with care as not all projects are equal
    - Management need to know quality problems exist, but developer should know what needs corrected

Information

Description
BsC computer science Flashcards on Metrics, created by harrymt on 16/01/2016.
Created by
harrymt
Views
4
Rating

Feedback

What is it about?

What do you think of the new look?

How do you like it?