Skip to main content
  1. Resources/
  2. Study Materials/
  3. Information & Communication Technology Engineering/
  4. ICT Semester 5/
  5. Software Engineering (4353202)/

3 mins· ·
Milav Dabgar
Author
Milav Dabgar
Experienced lecturer in the electrical and electronic manufacturing industry. Skilled in Embedded Systems, Image Processing, Data Science, MATLAB, Python, STM32. Strong education professional with a Master’s degree in Communication Systems Engineering from L.D. College of Engineering - Ahmedabad.
Lecture 35: Code Review Techniques (Walk-through & Inspection)

Lecture 35: Code Review Techniques (Walk-through & Inspection)

Unit 5: Software Coding and Testing (4353202)

Lecture Agenda

  • Recap of Unit 4
  • What is Code Review?
  • Why is Code Review Important?
  • Technique 1: Code Walkthrough
  • Technique 2: Code Inspection
  • Comparison: Walkthrough vs. Inspection
  • Key Takeaways

Recap of Unit 4

Unit 4 covered Software Project Management, including responsibilities of a Project Manager, size estimation metrics (LOC, FP), estimation techniques (COCOMO, Heuristic, Analytical), project scheduling (Gantt, Burn Down Charts), and risk management (identification, assessment, control).

What is Code Review?

Code Review is a systematic examination of computer source code. It is intended to find mistakes overlooked in the initial development phase, improving the overall quality of software.

It is a crucial part of the software development process, often performed by peers or a dedicated review team.

Why is Code Review Important?

  • Defect Detection: Finds bugs and errors early in the development cycle, reducing rework costs.
  • Improved Code Quality: Ensures adherence to coding standards, best practices, and design principles.
  • Knowledge Transfer: Spreads knowledge about the codebase among team members.
  • Mentoring: Provides an opportunity for less experienced developers to learn from more experienced ones.
  • Increased Maintainability: Leads to cleaner, more understandable, and easier-to-maintain code.

Technique 1: Code Walkthrough

A Code Walkthrough is an informal review where the author of the code presents the code to a small group of peers. The author explains the logic, and the reviewers ask questions and provide feedback.

  • Process:
    1. Author prepares and presents the code.
    2. Reviewers ask questions and identify potential issues.
    3. Discussion is informal and collaborative.
  • Purpose: To gain a better understanding of the code, identify obvious errors, and share knowledge.
  • Participants: Author, 2-3 peers, sometimes a moderator.

Technique 2: Code Inspection

A Code Inspection is a formal and systematic review process led by a trained moderator. It involves a detailed, line-by-line examination of the code to find defects.

  • Process:
    1. Planning: Define scope, roles, and schedule.
    2. Overview: Author explains the code to the team.
    3. Preparation: Reviewers individually examine the code against a checklist.
    4. Inspection Meeting: Reviewers present findings, defects are logged.
    5. Rework: Author fixes identified defects.
    6. Follow-up: Moderator verifies fixes.
  • Purpose: To find as many defects as possible in a structured manner.
  • Participants: Moderator, Author, Reviewers, Recorder.

Comparison: Walkthrough vs. Inspection

FeatureCode WalkthroughCode Inspection
FormalityInformalFormal, structured
GoalUnderstanding, knowledge sharing, minor defect findingSystematic defect finding
LeaderAuthorTrained Moderator
PreparationMinimalRequired (individual review)
Defect RateLowerHigher

Key Takeaways

  • **Code Review** is essential for improving software quality and reducing defects.
  • **Walkthroughs** are informal, author-led sessions for understanding and minor defect finding.
  • **Inspections** are formal, structured processes led by a moderator, aiming for systematic defect detection.
  • Both techniques contribute to better code and knowledge sharing within the team.

Next Lecture

Topic: Software Documentation (Internal & External)

Q & A

Questions & Discussion