Category Archives: Software Quality
AI-assisted Software Development: Tools & Processes
In the rapidly evolving landscape of software development, the integration of artificial intelligence (AI) and generative AI (Gen AI) is not just a luxury but a cornerstone for enhancing software development velocity. This blog delves into the key aspects of Gen AI and AI-assisted software development, presenting actionable takeaways for software leaders, including engineering managers, project managers, product managers, and software engineers. We will look into different tools and related processes that can be enhanced across the entire software development lifecycle. Design & Architect: Crafting the Blueprint Integrate the following tools to speed up the design process while ensuring adherence to best practices, significantly reducing design iteration times. Code & …
Code Quality Interview Questions for Software Developers
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 …
Measure Code Quality using Cyclomatic Complexity
The article talks about how McCabe’s cyclomatic complexity could be used to measure several different aspects of code quality. The objective of this article is to help developers quickly assess code quality by looking at the code. However, let’s try and quickly understand what is cyclomatic complexity and how could it be measured? Thanks for reading it further. And, apologies for spelling mistakes. What is Cyclomatic Complexity? Cyclomatic complexity is a measure of code quality that takes into account the number of independent paths through a piece of code. A high cyclomatic complexity indicates that a piece of code is more difficult to understand and maintain, and is, therefore, more …
Checklist for Effective Code Review
Are you involved in day-to-day code reviews? Would you like to suggest to your team members a checklist that can be used for code reviews? In this blog post, you will learn about key areas to focus on when doing code reviews. Following is a checklist that one could use while doing code review: Functional Suitability: Understand the requirement/use case/user story and ask whether the code you are reviewing meets the requirement or not. This includes the alternate and exception use case flows to be considered for review. Functional suitability is one aspect of code quality that refers to how well the code meets the needs of the user. In …
Single Responsibility Principle with Java Code 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 …
Unit Testing Interview Questions – Set 1
This page lists down the practice tests / interview questions and answers for unit testing (general concepts) which applies for all programming languages. Those wanting to test their unit testing knowledge would find this test useful enough. The goal for this practice test is to help you do quick check of your knowledge in unit testing and prepare appropriately. More importantly, when you are preparing for interviews, these practice tests are intended to be handy enough. Those going for freshers / intern interviews in the area of programming language or for developer positions would also find these practice tests / interview questions to be very helpful. Following topics have been covered as part of …
Software Build & Release Versioning Strategy
The blog represents the software build and release versioning strategy which can be used to tag web or mobile releases with different version numbering schemes as illustrated later. The strategy can as well be used for software versioning. Build/Release Version Numbering Scheme – <major>.<minor>.<patch>.<buildnumber> A release version can be of type <major>.<minor>.<patch>.<buildnumber>. Following is what each of these keywords such as major, minor, patch and buildnumber represents: major: Indicates a significant change in the application which may essentially mean one of the following: The app is re-written The app has changed significantly so much so that backward compatibility with older versions gets broken. Large set of new features At times, …
Solution to Permission Denied (Public Key) for Git Clone
Following error occurs while you are trying to clone a git project. I tried cloning a Github demo project in relation with ReactJS and NodeJS using command such as git clone git@github.com:DavidWells/isomorphic-react-example.git. In this blog, we will look into the solution of this github permission denied (public key) issue related with cloning a project using git clone command. Solution to Permission Denied (Public Key) Error Generated a new SSH Key The details can be found on this page, Generating a new SSH key and additing it to the ssh-agent Add the public key to your Github account As shown in the screenshot below, you would be required to add the …
Mocha Unit Tests with Hello World
This blog helps you get started with Mocha and also present steps and sample tests which can be used to get started. Setup Mocha using NPM For installing Mocha globally such that it can be from anywhere, execute following command: For installing with npm, you may be required to install Nodejs. npm is distributed with NodeJS which implies that downloading and installing NodeJS automatically installs npm on your computer. One can get appropriate version of NodeJS from following page, Download NodeJS. Details on npm can be found on this page, NPM. Execute mocha command to make sure it is installed appropriately. Following is the screenshot of output as a result …
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, …
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 …
SonarLint for Eclipse – Do Proactive Code Quality Check
This blog talks about SonarLint tool for Eclipse IDE which could be used by developers to get on-the-fly feedback for code quality issues when they are writing the code. This feature was always one of the most awaited feature of Sonar and thankfully, it’s out there for Java, Javascript, PHP developers to try it out for themselves. Following is how one could get started: One needs to download and install SonarLint for eclipse within Eclipse IDE. All one needs to do is go to this page (http://www.sonarlint.org/eclipse/ ), click on “Marketplace” button which takes you to install page. Drag and drop “install” button in your eclipse workspace and it would …
Docker – How to Install Mean Environment
This blog represents tips and code samples in relation with how to install MEAN Docker Container for working with MEAN web app.
Javascript – Jasmine Unit Tests for Promise Object
This article represents tips and code samples in relation with how to write unit tests for Promise object when using Jasmine framework. Please feel free to comment/suggest if I missed to mention one or more important points. Also, sorry for the typos. Following are the key points described later in this article: Sample Promise Object Unit Tests related with Promise Object Sample Promise Object Pay attention to some of the following in the code below: Auth module returns a Promise object that returns a User object when resolved or returns an error object in case of error. A JSON object is passed to resolve or reject method. Save the file …
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 …
API – How to Get Started with Facebook API Integration
This article represents steps to get started with Facebook Graph API. In later articles, I shall explain how to integrate using Java and maybe other programming languages. The primary reason I am hooked to Facebook integration these days is my need for getting exploratory data from facebook for data analysis for my Big Data projects. Before getting onto use framework such as RestFB, it is recommended to play with these APIs in the Facebook-provided playground. I shall be talking in detail about how to get started with RestFB in later articles. Please feel free to comment/suggest if I missed to mention one or more important points. Also, sorry for the …
I found it very helpful. However the differences are not too understandable for me