Blog Archives

30+ Java Code Review Checklist Items

This Java code review checklist is not only useful during code reviews, but also to answer an important Java job interview question,

Q. How would you go about evaluating code quality of others’ work?

You also learn a lot from peer code reviews. What has been written well? Why was it done this way? Could this have been written differently?, etc. This is one of the benefits of volunteering to review code via open-source project contribution.


Checklist Description/example
Functionality is implemented in a simple, maintainable, and reusable manner. Keep in mind some of the design principles like  SOLID design principles, Don’t Repeat Yourself (DRY), and Keep It Simple ans Stupid (KISS).

Also, think about the OO concepts — A PIE.   Abstraction, Polymorphism, Inheritance, and Encapsulation. These principles and concepts are all about accomplishing “Low coupling” and “High cohesion“.

Apply functional programming (FP) paradigm where it makes more sense.

Clean code

Checklist Description/example
Use of descriptive and meaningful variable, method and class names as opposed to relying too much on comments. E.g. calculateGst(BigDecimal amount),, etc.

Bad: List list;

Good: List<String> users;

Class and functions should be small and focus on doing one thing. No duplication of code. E.g. for data access logic only, for domain object, for business logic, and for validating input fields, etc.
Read more ...

5 Java unit testing interview Questions and Answers

Q1 Why use mock objects in unit testing? A1 Unit testing is widely accepted as a “best practice” for software development. When you write an object, you must also provide an automated test class containing methods by calling its various public methods with various parameters and making sure that the…

Read more ...

8+ JMeter performance testing interview Q&As

Performance testing is an important process of any software development. You can bring this up yourself to many open-ended questions like — Tell me about yourself? What are some of your recent accomplishments that you are proud of? Setting up a performance/load test script is always the first step in…

Read more ...

Ensuring code quality in Java Q&As

Q1. How do you ensure code quality in your application? A1. Code quality means writing readable, maintainable and robust code, that conforms as much as possible to the style-guideline that is used, and that has as little as possible defects. It also means writing maintainable code with proper automated and…

Read more ...

500+ Enterprise & Core Java programmer & architect Q&As

Java & Big Data Tutorials