Code Review Interview Questions
- 1. What is the aim when you do code review?
- Add value to System
- Maintainability
- Operations
- Scalability
- Performance
- Add value to People
- Help them learn new things
- Add to Best Practices
- Identify common mistakes/patterns
- Add value to System
- 2. When do you do code review?
- 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
- I do a highly focused code review when:
- 3. What are the good practices in doing Code Reviews?
- Ideally Pair Programming Reviews
- Fixing comments directly discussing with developers
- 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?
- 1. Use static analysis tools - SONAR
- Ideally Pair Programming Reviews
- 4. What are the things you look for in the Code Review?
- Architecture
- Frameworks choice
- Communication with other sytems
- Testability
- Components
- Relative size
- Reuse
- Existing components
- Creating new components
- Design
- Interactions between classes
- Coupling
- Cohesion
- Layer Responsibilities
- Web Layer
- Business logic creeping in?
- Assemblers
- Business Layer
- Access Layer
- Web Layer
- OOPS principles
- Domain Models
- Unit Tests
- How easy is it to unit test?
- Interactions between classes
- Cross Cutting
- Reuse
- NFRs
- Scalability
- Performance
- Security
- Needs of operations team
- Logging etc
- 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
- Object class methods
- I also try get a hang of the Engineering Practices followed.
- How often is code committed?
- Release practices
- Broken Builds
- Deployment Practices
- Continuous Integration
- Architecture
If you loved these Questions, you will love our PDF Interview Guide with 400+ Questions.
Download it now!.
- Java : Core Java, Advanced Java, Generics, Exception Handling, Serialization, Threads, Synchronization, Java New Features
- Frameworks : Spring, Spring MVC, Struts, Hibernate
- Design : Design, Design Patterns, Code Review
- Architecture : Architecture, Performance & Load Testing, Web Services, REST Web Services,Security, Continuous Integration
Subscribe to:
Posts (Atom)