Made with ScholarlyMake flashcards like these from your own notes
Question:What are software metrics?
Answer:Software metrics are quantitative measures used to assess various aspects of the software development process, product quality, and project management.
Question:Why are software metrics important in software engineering?
Answer:Software metrics provide insights into the efficiency, quality, and maintainability of software, helping teams make data-driven decisions to improve software development outcomes.
Question:What are the purposes of software metrics in the software development lifecycle?
Answer:1. Quality Assurance: Measure software quality, such as code maintainability, reliability, and performance. 2. Process Improvement: Identify bottlenecks and areas for improvement in the development process. 3. Project Management: Monitor progress, allocate resources effectively, and predict project outcomes.
Question:What are the three main categories of software metrics?
Answer:1. Process Metrics 2. Product Metrics 3. Project Metrics
Question:What are process metrics?
Answer:Process metrics focus on measuring the effectiveness and efficiency of the software development process, evaluating practices, workflows, and methodologies.
Question:What is defect density?
Answer:Defect Density measures the number of defects per unit of code (e.g., per thousand lines of code). Lower defect density indicates higher software quality.
Question:What is cycle time in software development?
Answer:Cycle Time is the time taken to complete one iteration or phase in the development process, helping teams identify delays and improve efficiency.
Question:What is test coverage?
Answer:Test Coverage is the percentage of code tested by automated or manual tests, indicating the extent to which code is verified for correctness.
Question:What are product metrics?
Answer:Product metrics evaluate the characteristics and quality of the software product itself, assessing aspects such as functionality, reliability, and usability.
Question:What does code complexity measure?
Answer:Code Complexity measures the complexity of code using metrics like Cyclomatic Complexity, which counts the number of linearly independent paths in a program.
Question:What are coupling and cohesion in software engineering?
Answer:Coupling measures the degree of interdependence between software modules, while cohesion assesses the focus of functions within a single module.
Question:What are project metrics?
Answer:Project metrics help project managers track progress, costs, and timelines, valuable for planning, controlling, and assessing project success.
Question:What is effort estimation in project metrics?
Answer:Effort Estimation measures the estimated versus actual hours worked, which helps in resource planning and workload management.
Question:What is budget variance?
Answer:Budget Variance assesses the difference between the budgeted and actual cost, allowing teams to manage costs and control budget overruns.
Question:What is schedule variance?
Answer:Schedule Variance compares the estimated timeline with the actual timeline, providing insights into project delays or early completions.
Question:What tools are commonly used for software metrics?
Answer:1. SonarQube: For analyzing code quality metrics. 2. JIRA: For tracking project metrics. 3. Jenkins: For continuous integration and delivery metrics.
Question:What are the best practices in using software metrics?
Answer:1. Select Relevant Metrics 2. Avoid Over-Reliance on Metrics 3. Regular Monitoring and Adjustment 4. Promote Transparency and Accountability.
Question:What is Cyclomatic Complexity?
Answer:Cyclomatic Complexity is a software metric used to measure the complexity of a program's control flow, developed by Thomas McCabe in 1976.
Question:How is Cyclomatic Complexity calculated?
Answer:Cyclomatic complexity M is calculated using the formula M = E - N + 2P, where E = number of edges, N = number of nodes, and P = number of connected components.
Question:What does a Cyclomatic Complexity value of 1 indicate?
Answer:A program with no control flow, such as a sequence of straight-line code, has a complexity of 1.
Question:What does a Cyclomatic Complexity value between 2 and 10 indicate?
Answer:Generally considered a low complexity, meaning the code is likely easy to read and test.
Question:What is the implication of high Cyclomatic Complexity?
Answer:High complexity suggests that the function or module is complex, making it harder to test thoroughly and maintain.
Question:What is the benefit of Cyclomatic Complexity in testing?
Answer:It helps in determining the minimum number of test cases required for path coverage.
Question:What are the benefits of Cyclomatic Complexity?
Answer:1. Provides a clear, numeric indication of control flow complexity. 2. Helps identify code that might be prone to errors. 3. Assists in planning adequate test cases.
Question:What are the limitations of Cyclomatic Complexity?
Answer:1. It doesn't account for data complexity or readability of code. 2. Higher values may not always indicate problematic code if justified.
Question:What does coupling measure in software design?
Answer:Coupling measures the degree of interdependence between software modules or components.
Question:What is high coupling?
Answer:Modules with high coupling are heavily dependent on one another, making maintenance and updates more challenging.
Question:What is low coupling?
Answer:Modules with low coupling have minimal dependencies on each other, making the system more robust and flexible.
Question:What types of coupling exist?
Answer:1. Content Coupling 2. Common Coupling 3. External Coupling 4. Control Coupling 5. Stamp/Data-Structure Coupling 6. Data Coupling.
Question:What does cohesion measure in software design?
Answer:Cohesion measures how closely related and focused the responsibilities of a single module or component are.
Question:What is high cohesion?
Answer:A module with high cohesion performs a single, well-defined task, leading to better maintainability and readability.
Question:What is low cohesion?
Answer:A module with low cohesion performs multiple, unrelated tasks, making it harder to understand and maintain.
Question:What are the types of cohesion?
Answer:1. Coincidental Cohesion 2. Logical Cohesion 3. Temporal Cohesion 4. Procedural Cohesion 5. Communicational Cohesion 6. Sequential Cohesion 7. Functional Cohesion.
Question:What is the ideal design goal regarding coupling and cohesion?
Answer:Aim for low coupling and high cohesion to achieve modular, flexible, and maintainable code.
Question:How are coupling and cohesion quantified in software metrics?
Answer:High cohesion and low coupling scores usually indicate a well-structured codebase, guiding developers in maintaining high code quality.