Gerência e Qualidade de Software - Aula 06 - Técnica de revisão
Understanding Software Review Techniques
Overview of Software Review
- The lecture introduces the concept of software review as a technique for evaluating software artifacts to identify defects.
- Reviews can serve dual purposes: ensuring quality and verifying compliance with defined standards.
- Reviews are primarily static processes, meaning they involve analyzing products without execution, although dynamic reviews exist where execution is involved.
Types of Reviews
- Dynamic reviews include usability inspections that require product execution to assess adequacy.
- The review process is applicable not only to software but also to various development artifacts like models and user manuals.
Defect Propagation in Development
- In each development activity, defects can arise; for instance, during requirements definition due to misunderstandings or lack of consensus.
- Defects identified early can amplify through subsequent activities, affecting multiple parts of the software if not addressed promptly.
Impact of Defect Amplification
- A defect in a non-functional requirement can propagate across several modules, complicating corrections later on.
- An example illustrates how defects can increase by 50% as they move through the development process, leading to more issues down the line.
Importance of Review in Reducing Defects
- Without reviews, a significant number of defects may remain undetected until testing phases; however, some may be caught naturally during documentation work.
- Implementing reviews increases the likelihood of identifying and correcting defects before moving on to subsequent activities.
Enhancing Quality Through Reviews
- By incorporating reviews into the process, teams can improve defect correction rates significantly—potentially increasing from 30% to 60%.
Understanding the Importance of Code Review
The Concept of Inspection in Development
- The idea of inspection was proposed by a classic author in 1986, emphasizing its role in the software development process. Initial costs are higher due to the need for reviews and additional activities.
- Although there is an upfront cost associated with inspections, they ultimately lead to earlier delivery of software products by identifying issues early on.
Advantages of Code Review
- Reviews can uncover multiple defects simultaneously, unlike compilers that may only identify the first error encountered.
- Testing can sometimes mask other problems; however, thorough code reviews help avoid this issue by revealing hidden defects.
- Inspections can be conducted on incomplete artifacts, allowing for feedback even when code isn't fully functional.
- Reviews facilitate subjective evaluations of quality characteristics that are hard to measure quantitatively and provide training opportunities for less experienced team members.
Effectiveness and Limitations of Reviews
- Code inspections detect about 60% of defects while unit tests catch around 30%. However, reviews cannot replace testing as they miss timing-related issues or integration problems between components.
- Timing issues often arise during method calls that depend on specific sequences; these are difficult to identify through review alone.
Challenges Associated with Code Review
- Conducting reviews incurs additional development costs and requires training for team members to perform them effectively.
- Measuring improvements from reviews can be challenging without historical data on existing problems within the software product.
Navigating Team Dynamics During Reviews
- Reviews involve public scrutiny which may lead individuals to feel defensive about their work. It's crucial to maintain a focus on product evaluation rather than personal criticism.
- A constructive approach is necessary during reviews; discussions should center around product flaws rather than individual performance.
Types of Code Review Processes
- Informal reviews lack structured agendas and can occur spontaneously, such as casual conversations or pair programming sessions where one developer observes another's coding process.
Understanding Technical Reviews in Software Development
The Importance of Planning and Follow-Up
- Effective planning is crucial for conducting reviews, which includes reading and marking artifacts, preparing the environment, and scheduling review meetings.
- After a review meeting concludes, it’s essential to track whether identified defects have been corrected; follow-up meetings may be necessary based on defect severity.
Types of Reviews Defined by Standards
- The discussion focuses on two main types of formal reviews: technical reviews and inspections.
- Inspections are a specific type of formal review that should not be confused with general software development reviews; they were proposed by Fagan in 1986.
Characteristics of Inspections
- Inspections aim to identify defects more effectively through structured processes, originally focused on code analysis but applicable to other artifacts as well.
- A checklist is utilized during inspections to guide reviewers in identifying common defects systematically.
Preparation and Execution in Inspections
- Participants must prepare thoroughly before an inspection meeting by reviewing artifacts according to the checklist.
- During the inspection meeting, a designated reader presents the artifact rather than its author, ensuring objectivity in the review process.
Distinction Between Inspection and Other Review Types
- Another form of technical review involves executing software step-by-step (often referred to as "desk checking"), allowing for real-time inspection rather than just revision.
- This method can also serve educational purposes by training team members on algorithms while identifying potential improvements or anomalies within the code.
Conclusion: Balancing Testing and Review Methods