Category Archives: Software Quality

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 .

PHP Code Smells and Best Practices

As application in PHP can be written in object oriented manner, most of the code smells found in the world of object-oriented programming also stay valid for PHP. Recently, I happened to do a code review of a PHP project and wanted to share some of the areas which one would want to pay attention to: Naming methods using Camel Case: It is always helpful to write method names in camel case as it is easily readable. For example, instead of writing method names such as “searchurlAction”, one could write “searchUrlAction”. Software quality characteristic impacted in “Usability“. Long Methods: One may want to avoid large method as these methods become …

Continue reading

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

YII framework for faster PHP web application

If you have been looking for developing a web application in a quick manner, then, YII is surely a right choice. YES IT IS! What are some of the important characteristics of yii framework? 1. It is very lightweight. 2. It is based on MVC framework. 3. It comes with a user interface tool which helps in creation of models, views and controllers. 4. It has support of some real good UI framework such as getyiistrap.com, yii bootstrap, yii wheels. 5. It comes with a support of a set of extensions that can be used to include new features quickly in no time. 6. If you love writing code based …

Continue reading

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

Stay Single and Get Admired for Your Code

You might be wondering on the relationship between staying single, getting admired and coding! And, then, staying single forever 🙂 is something which may not be liked by most of us. So, what is this blog all about? Well, with “single, I am trying to point at “Single Responsibility Principle” and with “stay single”, I am pointing towards writing code based on “single responsibility principle”. Well, as the title of this blog goes, if you keep the “Single” responsibility principle (SRP) in mind while writing your code, there are high chances that you will end up with a great piece of code which will get liked by many including your …

Continue reading

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

Learnt Agile Development Processes. Now, What’s Next?

The first step when an organization decides to adopt agile development methodology is to look out for a Agile coach who can train the team on agile development processes. For example, an organization either want to adopt extreme programming practices or SCRUM development practices; Once decided, agile coach take team through the specifics of the development processes. For instance, if one wants to go with SCRUM, one would be made aware of some of the following concepts/stages: Sprint Planning/Backlogs Estimation/Velocity Implementation Reterospectives Burn down charts Well, once the teams get aware of the above procedures as part of agile development process, they get down to adopting the process. However, in …

Continue reading

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

What is the definition of Software Quality?

Even before we try and define what is software quality, it may be a good idea to understand what is meant by term quality? Quality means different to different people. One may call a product or high services of high quality if it serves their needs. Thus, for some people, a cell phone can be of high quality if it provides sound of great quality. However, for others, the ability to browse through social network can be criteria of judging a cellphone (also called as smartphone) quality. To standardize, software quality may be defined as a set of characteristics can be used to measure the following: Outcome of interaction with …

Continue reading

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

Deliverables On-Time vis-a-vis Technical Debt Risk

When we are working under tough deadlines and there is mounted lot of pressure on software engineers to crank out features by features in a short time to meet business needs, there are high possibilities that software system end up getting high technical debt. Is it that delivery managers are not aware of above fact? Most of the times they are. However, they compromise on software quality against the need to take the product to the market. So far so good. However, they should make it a point to clear out some of those debt with a release just meant for that. These kind of releases are sometimes also called …

Continue reading

Posted in Software Quality. Tagged with .

How to Create Software Quality Metrics For Your Project

Well, if you are a software development partner for one or more of your customers, and you are looking forward for some of the following, you may want to adopt software quality metrics: Provide customers with software quality trending on various different software quality characteristic Monitor one or more projects for software quality What are various different things that you could measure for quantifying software quality? Defects Density (Functional Suitability): There are different data points you can use to measure defects density. Defects density can be defined to be one of the following: Number of defects divided by total lines of code written per sprint/release Number of defects divided by …

Continue reading

Posted in Metrics, Software Quality. Tagged with .

How to Write Good Doc Comments for a Class/Method?

Well, software engineers love to jump to the code (minus document) once design is completed. Majority of them do not write the help text around the class or methods. Some of them do write but they do not provide enough information. There are various reasons for the lack of enough comments within a class. Some of them are lack of time, lack of writing/articulation skills etc. Following are some of the questions which would you like to answer as part of comments for method or a class: Functionality: What does the class or the method do? You may want to provide information regarding the business requirement that the component fulfills. …

Continue reading

Posted in Operability, Software Quality. Tagged with , .

A Quick Way to Identify Code with Low Testability

Following is a quick way to identify code with low testability and hence low maintainability: Take any specific public method of the class Count for number of decision points such as following: – If – For – While – Switch – Inline ifs If the number of decision points in a method is more than 15 or so, it could be taken as indication that it may get difficult to write unit tests covering all possible flows. Thus, the code will have lower testability. The number of decision points in a method is also used to define/measure cyclomatic complexity of the method, or more specifically, McCabe Cyclomatic Complexity. Thus, mathematically …

Continue reading

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

5 Things to Consider while Gathering Requirements from your Customers

Most of the time, software engineers are primarily interested in understanding requirements only from functionality perspective or, more simply speaking, understanding the stated needs. However, many a times, the delighting experience is missed due to absence of one or more of following 5 software quality characteristics in software coding stage: Efficiency: This is also termed as “performance requirements” at the time of requirement analysis stage. This goes unspecified as customers are also not very much knowledgeable about how to specify efficiency requirements. Efficiency requirements include consideration of time and memory usage associated with the requirement. Security: Most of the times, software engineers are not very aware of various different security …

Continue reading

Posted in Software Quality.

How to Write Re-usable Code

In my software quality sessions, one of my favorite questions had been “how to write re-usable code”. The most common answer has been following: Once one identified the re-usable components based on the functionality, once can write the components accordingly such that it can be reused. However, this argument required one to identify the reusable components at the design time. The question still remained. How would one write a code that can be termed as re-usable even if the component is not required to be reused at the moment? Another question that I ask is if it is possible to look at the code and say if this is a …

Continue reading

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

Top 5 Software Code Quality Concerns Your Customers May Have

If you want to delight your customer with great software code quality or avoid software code quality concerns of your customer, following are top 5 areas you may want to take care of: Functionality Suitability: Following are three different areas your software code should address: Correctness Completeness Appropriateness Out of above, correctness and completeness can directly be monitored and measured using bug tracking mechanisms. And, it is responsibility of both, developers and testers to make sure that these sub characteristics are complied. Developers achieve it by writing good unit tests, and test engineers achieve it by doing various different form of testing. From metrics perspectives, defect density is the area …

Continue reading

Posted in Software Quality. Tagged with .

Software Quality Review – Scribe OAuth Library

Scribe OAuth Library helps you do quick OAuth based integration with some of the following web applications: Google Facebook Twitter LinkedIn and many more. You could find further details on following page on github. Following will present information on different perspectives: Structure   Maintainability The duplication percentage isn’t very high. Duplication is one of the key criteria that reflects on the maintainability of the code. Higher the duplication, difficult is the code to maintain. Duplication is also considered as one of the code smells. Also, due to unavailability of unit tests in the source code bundle, I could not find the test coverage. Otherwise, test coverage depicts the testability of …

Continue reading

Posted in Maintainability, Metrics, Operability, Review, Software Quality. Tagged with .