Tag Archives: Software Quality

Code Quality Interview Questions for Software Developers

software code quality interview questions

Code quality concepts must be understood well by software developers to write a good quality code. Also, technical lead and technical architects must understand the code quality (or coding) concepts very well in order to review the code (termed as code review) and ensure that good quality software is delivered to the customer. Pictorially, the following represents some of the experiences that software developers, tech leads or technical architects go through while developing software or reviewing software code quality. Enjoy the pictures :).   Often code quality review of poorly written code results in lot of frustrations among project stakeholders. Thus, it is of utmost important to understand different nuances of writing …

Continue reading

Posted in Interview questions, Software Engg, Software Quality. Tagged with , .

Single Responsibility Principle with Java Code Example

single responsibility principle with Java example

Single Responsibility Principle (SRP) is one of the most important object-oriented coding principle which, if followed religiously, can help you write a very good quality code. Here is what SRP states: A block code representing class or method should have just one reason to change In other words, Single Responsibility Principle can be stated as the following: A block of code representing class or a method should do just one thing and do it very well In yet another words, SRP can also be stated as the following: A block of code representing class or method should have just one responsibility or serve just one functionality Pictorially, decide for yourself …

Continue reading

Posted in Maintainability, Reusability, Software Engg, Software Quality. Tagged with , .

Why consider using Guava-like Libraries for API Contract Conditions Checks

This article represents a perspective on why one should consider using Pre/Post condition checks libraries rather than writing it down time and again in their code. While doing code reviews, many a times, I have found people using preconditions checks such as “Not Null” in a casual manner rather than based on API contracts requiring pre and post conditions checks. Such checks, at times,  do make code difficult to read, learn or understand. One may want to rather use home-grown or external (proven ones) libraries for doing such checks. Not only does it enhance code readability and learn-ability but also, it does make you aware of contracts you put in the code thereby including only necessary checks and, …

Continue reading

Posted in Code Review, Software Quality, Tools. Tagged with , .

Liskov Substitution Principle with Java Code Examples

This article describes what is Liskov Substitution Principle along with code examples in Java. Please feel free to comment/suggest if I missed mentioning one or more important points. Also, sorry for the typos. In this post, you will learn some of the following: What is Liskov Substitution Principle (LSP)? Code Samples to Illustrate LSP What is code quality characteristic that represents by LSP? You may also want to check another code quality principle such as Single Responsibility Principle explained with Java Examples. What is Liskov Substitution Principle (LSP)? Take a look at this paper on Liskov Substitution Principle which provides great details on Liskov Substitution Principle. As per LSP, functions …

Continue reading

Posted in Java, Programming, Software Quality. Tagged with , .

5 Reasons Why Every Developer Must Adopt Dockers

This blog represents some of the key reasons why every developer must consider adopting for development. 1. Setup clean Dev environment within no time. Many a time, while developing, we end up changing configuration. Installing new libraries etc. With this act, the Dev environment deviates to a new state which may be different from expected QA and Production environment. With Dockers, one could rather update the image and create new containers in case new libraries need to be installed. 2. Setup Dev environment within minutes. As a matter of fact, developers could actually recreate the Dev environment every morning before starting his work. This ensures that he maintains the state …

Continue reading

Posted in Software Engg, Software Quality. Tagged with , , .

How to use Sonar Dashboard to Report on Software Code Quality

This article represents methods one could adopt to read the sonar dashboard and gather data appropriately to monitor and control the software code quality. The primary reason why I am writing this blog is the fact that I have come across several team leads who asked me the questions related with data on sonar dashboard and what all they could do with it. Please feel free to comment/suggest if I missed to mention one or more important points. Also, sorry for the typos. Following are three different aspects of software quality which could be tracked using Sonar Dashboard: Maintainability (testability, reusability & modularity) Usability (readability and understand-ability) Security Following are …

Continue reading

Posted in Software Quality. Tagged with .

How to Measure Code Maintainability with Sonar

sonar code maintainability

This article talks about 4 different quality parameters found on Sonar dashboard which could help measuring code maintainability. Following are those quality parameters: Unit Test Coverage: Unit Test Coverage depicts code coverage in terms of unit tests written for the classes in the project. Greater test coverage depicts that developers are focusing on writing good unit tests for their code which results in greater test coverage. This also depicts the fact that the code is testable and hence, easier to change as a bad change could lead the unit tests to fail and raise the red flag. And, a code easier to change becomes a code easier to maintain. One …

Continue reading

Posted in Software Quality. Tagged with , .

Attention Developers: Take Care of Your Debts

Clear your technical debts

Hmm.. was the title intriguing enough for you to check out if you as a developer got any debts to clear (such as that represented below :-)? Well, I am talking about what is called as “technical debt” and that is it. 🙂 Believe me, there are high possibilities that most of the developers do have technical debts to clear which they (or someone else) introduce in the system while working on it over a period of time. Lets try and understand what/how/why/whens related with technical debt?   As Fowler writes in his blog, technical Debt is a wonderful metaphor developed by Ward Cunningham to help us think about this …

Continue reading

Posted in Agile Methodology, Software Engg, Software Quality. Tagged with , .

How to Predict Reusability Index of a Standalone Code

Is it possible to predict the reusability index of a block of code in a standalone mode? Meaning, given no information about the code, and just the piece of code, would you be able to predict or tell if the code is highly reusable or not reusable at all? Before going into this, lets understand the basic fundamentals in relation with code reusability. One myth I have come across while discussing the code reusability is that code should be made reusable when demanded by requirements. For example, one says that for reusable services, one should write reusable components and thus, reusable piece of code. When asked to many people, I …

Continue reading

Posted in Reusability, Software Quality. Tagged with , .

I am not sure about the quality of software I delivered?

This is what I got to hear from average software developers across many workshop sessions that I have been undertaking recently in India. Ask a software developer (on an average) if he could make out whether he has delivered a piece of high quality code for required functionality, and the answer that may be expected is YES. The second question that you ask is “How do they know that they delivered a high quality piece of code?”. The answer you get is related with defects primarily against the functional requirements. All they say is that their piece of code has not been found with any bug in Dev/QA/UAT & production …

Continue reading

Posted in Software Quality. Tagged with .

Software Quality & Varied Perceptions

As part of software quality workshops that I have been taking recently, I asked various attendees about how would they define “Software Quality”. It was found that everybody gave different answers on this, and most of them could said to be partially correct. What did the trainees (primarily, software developers) say? Following were some of the common answers: It is about how fast a software screen loads? Is the software secured enough? There should be as minimum defects as possible? If one looks above, they belong to following characteristics of a software product: Efficiency Security Functionality While interacting with end customers which primarily included the developers and team leads/scrum masters, …

Continue reading

Posted in Software Quality. Tagged with .