Code Review Interview Questions

Code Review Interview Questions
  • 1. What is the aim when you do code review? Code Review - What to look for?
    1. Add value to System
      • Maintainability
      • Operations
      • Scalability
      • Performance
    2. Add value to People
      • Help them learn new things
    3. Add to Best Practices
      • Identify common mistakes/patterns
  • 2. When do you do code review? Code Review - When to do?
    • I do a highly focused code review when:
      • New developer joins the team?
      • New methodology or technology change is being implemented?
      • Vertical Slice is being built
    • Normal Focus
      • Peer Reviews during the sprint
    • Most important thing about code reviews is that they should be done as early and as often as possible
  • 3. What are the good practices in doing Code Reviews?Code Review - Good Practices
    1. Ideally Pair Programming Reviews
      • Fixing comments directly discussing with developers
    2. Steps
      • 1. Use static analysis tools - SONAR
        • components & their sizes & interactions with other components
        • Hotspots
          • Large Classes
          • Complex methods
          • Large Components
          • Lot of dependencies
          • Uncovered Code
        • Static Analysis Tools are a very good start - but I would not just depend on static analysis tools for code review
      • 2. Review Junits for complex methods/classes
        • I think quality of Junit is a great guide to the quality of system
        • Makes all the dependencies very clear
      • 3. Check Readability of code
        • Most important of the 4 principles of Simple Design
      • 4. Check everything mentioned in the fourth category : what?
  • 4. What are the things you look for in the Code Review?Code Review - Checklist
    1. Architecture
      • Frameworks choice
      • Communication with other sytems
      • Testability
      • Components
        • Relative size
      • Reuse
        • Existing components
        • Creating new components
    2. Design
      • Interactions between classes
        • Coupling
        • Cohesion
      • Layer Responsibilities
        • Web Layer
          • Business logic creeping in?
        • Assemblers
        • Business Layer
        • Access Layer
      • OOPS principles
        • Domain Models
      • Unit Tests
        • How easy is it to unit test?
    3. Cross Cutting
      • Reuse
      • NFRs
        • Scalability
        • Performance
        • Security
        • Needs of operations team
          • Logging etc
    4. Code
      • 4 principles of simple design
      • Basics
        • Formatting
        • Size
        • Complexity
        • New language features
        • Documentation
          • Javadoc
      • Scalability
        • Bottlenecks
      • Performance
        • NO premature optimizations
        • Object creation in loops
        • Closing connections and other open stuff
        • Session usage
        • Caching?
        • Database related?
      • Operations
        • Proper Exception Handling
        • Transaction Management
      • Security
      • Unit tests
        • Readable
      • Langauge Specific
        • Object class methods
          • equals
          • hashcode
        • String
        • Generics
        • Enums
        • Creating and destroying objects
    5. I also try get a hang of the Engineering Practices followed.
      • How often is code committed?
      • Release practices
      • Broken Builds
      • Deployment Practices
      • Continuous Integration

If you loved these Questions, you will love our PDF Interview Guide with 400+ Questions.
Download it now!.

400+ Interview Questions in 4 Categories:
  1. Java : Core Java, Advanced Java, Generics, Exception Handling, Serialization, Threads, Synchronization, Java New Features
  2. Frameworks : Spring, Spring MVC, Struts, Hibernate
  3. Design : Design, Design Patterns, Code Review
  4. Architecture : Architecture, Performance & Load Testing, Web Services, REST Web Services,Security, Continuous Integration