Category Archives: Software Quality

What’s Needed to Get Your Code Quality Match ISO Standard 25010

The article relates software quality characteristics defined by ISO 25010 standard (SQUARE) with code quality and, recommends on what could be done by the developers to write the code matching the ISO quality standards. SQUARE stands for Software QUAlity Requirements and Evaluation (SQUARE). Please feel free to comment and add further points in any of the sections pertaining to quality characteristics listed later below. As per ISO 25010 (SQUARE) standards, Software quality can be defined, managed and measured in terms of following two broad categories: Quality in Use: Relates to the outcome of human interaction with the software Product Quality: Relates to the static & dynamic properties of the software …

Continue reading

Posted in ISO Standards, Software Quality. Tagged with , , , .

How Cyclomatic Complexity could be used to Measure Code Quality?

The article talks about how McCabe cyclomatic complexity could be used to measure several different aspects of code quality. The objective of this article is to help developer quickly assess the 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? As per Wikipedia definition, Cyclomatic Complexity (CC), developed by Thomas J. McCabe, Sr. in 1976, measures the number of linearly independent paths through a program’s source code. Another page on SonarQube discusses the fact that CC can be measured by adding one (1) to …

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 , .

How to Increase Unit Test Coverage of Legacy Code?

test coverage

The article represents a time-tested approach on how to increase unit test coverage with legacy code. I shall try and answer following relevant questions in order to present the approach on increasing the test coverage of legacy applications (code). What are some of the key challenges? Leadership Buy-in: As soon as you start planning for writing unit tests on legacy applications, you come to realize that it won’t be very effective and smooth without the consideration of code refactoring. The reason being the fact that legacy code in many cases are found to have very high code complexity in terms of cyclomatic complexity and, familiar code smells such long classes, …

Continue reading

Posted in Maintainability, Software Quality, Testing, Unit Testing. Tagged with , .

Top 5 Code Smells Newbies Developers Could Easily Identify & Avoid

code smells

Following is one very popular image which has been used to represent time and again for representing code smells. I am doing it again. Apologies if this one is repeat for some of you. But the image nicely represents how to find if your code really smells. The code smells listed in this article would certainly lead to increase in WTF count 😉 For newbie developers, it has always remained a challenge to write code of great quality from day one. One of the primary concerns they have been found to have is following: What kind of code could be termed as high quality code? There are several characteristics of good …

Continue reading

Posted in Freshers, Software Quality. Tagged with , .

Top 6 Refactoring Patterns to Help You Score 80% in Code Quality

refactoring

This blog lists down top code smells and code refactoring patterns which would help you write good quality code. Top 5 Code Smells Have done several code reviews in past and found following top 5 code smells common across most of these code having code quality issues: Large Class: The classes were found larger enough due to lack of developers’ understanding on one of the primary coding principles which is “Single Responsibility Principle” (SRP). These classes use to get larger due to various methods serving unrelated functionality in the same class. Long Method: The methods have been found longer due to several reasons such as following: Several block of code …

Continue reading

Posted in Code Review, Software Quality. Tagged with .

Top 5 Bad Application Security Practices

bad security practices

We all come across good security practices and make ourselves familiar with them to develop secured code. However, it may also be good idea at times to know about some of the bad security practices such that we, for sure, try and avoid them. [adsenseyu2]   Following are top 5 bad practices you may want to know about: Do NOT interact with un-trusted programs: Make sure that the external programs that your program is invoking for reasons such as data or functionality, must have got reviewed and tested for security compliance. One of the common entry points into secured applications are these unsecured applications and hackers just love them. Hackers, …

Continue reading

Posted in Application Security, Code Review. Tagged with , .

Campus Bytes – New Initiative

college research and revelopment

We are starting on with a new initiative where we would like to review and write about the research & development going on in several engineering colleges across the country (India) and, how they could benefit different IT companies. This would include reviews on white papars published in different journals, college websites, interviews from paper authors, lecturers and professors. In addition, we would like to invite key stakeholders from different IT companies to present their views on these papers and any further research that they would want to fund in one or more areas from within colleges. If you belong to one or more colleges and would like to submit …

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 , .

Top 4 Java Static Code Analysis Tools

Static Code Analysis

[adsenseyu2] Before going over some of top static code analysis tools for Java, lets quickly look at why do we need static code analysis in the first place? Following are some of the reasons: Rules compliance: Pre-defined rules can be set as per the coding standard and automated static analysis could be run to figure out rules violation. This does cut down on the manual code review for the related rules. Code quality metrics: The static analysis could be used to measure some of the following based on which software code quality can be measured: Code complexity Unit test coverage Re-usability Duplication Reports: Creates management reports that can be used …

Continue reading

Posted in Software Quality. Tagged with , .

Logging Tips/Best Practices for Newbies

When starting the career of application developer in IT with one or more programming languages, one thing which is kept on back burner and kept for really long is logging. In fact, when I started my career as a programmer, when I realized that I wanted to know about what to log and what not to log, it was almost 4 years or so. This was my involvement in learning nitty-gritties of programming language itself, and not paying enough attention to logging at all. And, when I learnt most of it all, I realized how much value I added to programming by logging appropriate stuff in log files which was …

Continue reading

Posted in Freshers, Maintainability, Software Engg. Tagged with .

Top 3 Most Visited Blogs for Great Software Code Quality

Following are top three most visited blogs this month in relation with software code quality: The rule I followed to become a great developer Refactoring 3000 lines of code Security code review tips for application developers Thanks to my readers for appreciating above blogs. I shall keep it flowing…

Posted in Software Quality. Tagged with , .

If I Woke up as a Test Engineer One Day…

If I, being an application developer, have to spend a day as a tester, following are some of the activities I would do: Analyzing Test Cases: Examine test cases and make sure that the coverage is maximum in terms of including all test scenarios in relation with the use cases. Test Automation: Look for the areas which can be automated and suggest the same to my lead/manager. Digg a little deeper in the code to find bugs which are difficult to find in manual testing. Learn techniques in performance testing as I am very passionate about the same. Learn few tips and techniques in security testing, along with knowledge on …

Continue reading

Posted in Software Engg, Software Quality. Tagged with .

The Rule I Followed to become a Great Developer

DISCLAIMER: The article is in no way an intention of bragging about my development capabilities. The intention is only to emphasize in so many ways on a rule which can surely, in my opinion, help developers improve quite a notch and become a better developer. I would like to reach as many developers as possible with an intention to create a belief in them regarding the principle I spoke. Thanks for reading the blog. Please feel free to share. For several years that I spent in IT industry while working on a different roles and responsibilities such as developer, technology lead and architect, I was looking for that ONE THUMB …

Continue reading

Posted in Software Quality. Tagged with , .

Security Code Review Tips for Application Developers

One of the key aspects of secured application development practice is Security code review. Security code review, as like normal code review, could be done either in automated fashion using one or more tools, or in manual fashion where one or more developers are involved in doing code review. Unlike application normal code review where one needs the knowledge of business functionality and programming language & related technologies’ knowledge, Security code review requires knowledge on different aspects of security including some of the following: Common threats (STRIDE can be a great place to start understanding threats) Vulnerabilities (OWASP Top 10 describes most common vulnerabilities) Remediation techniques recommended in that programming …

Continue reading

Posted in Application Security, Code Review. Tagged with .

Refactoring 3000 Lines of Code

Have you come across a class file (object-oriented programming languages) which spanned across 3000 lines of code or more? Or, even, a class of 1000 lines or more. I do have seen many such code in my career and trust me, every time I have come across such instances, I have a painful time working with any changes required to be made in the code. Honestly, the changes was made without much assurance that everything would work fine with this change in now and future. Lets  try and understand what’s the problem with long classes (1000 lines code or more)? Low Maintainability: Such classes score very low in maintainability aspect of …

Continue reading

Posted in Code Review, Software Quality. Tagged with .