how to develop high-quality software - coderskitchen

How to develop high-quality software

When a physical product is designed for manufacturing, a lot of time is spent on organizing how the item is built and testing the completed product. Manufacturing issues and testing processes are addressed during the design phase, not at the time of production. Consider the design of a circuit board. It is necessary to include test points on a board, as they can’t be added later. While software affords the luxury of being able to include the tests later, the longer one waits, the more expensive it becomes. What if we take a new approach to software development that would significantly improve software quality? As you begin to design a system, think about how to make “manufacturing” and testing as efficient as possible throughout the entire product lifecycle.

Design software with testability in mind

During the initial design and prototyping of a software system, the focus is on functionality and performance. These two items are extremely important, but how useful are they if the resulting program is full of bugs and takes too many resources to maintain? If you are able to shift your focus to designing with “testability” in mind, or at least including it early in your process, then the resulting code would be far higher in quality. In return, it leads to greater saved opportunity cost down the road. Consider the initiatives below to start moving in this direction.

Steps to test your code easily

AvoidDo this instead
  • Overly complex functions with long lists of inputs
  • Direct access to hardware addresses and devices
  • Complex conditions with more than five sub-conditions
  • Function-level status variables
  • Implicit and duplicate switch cases
  • Complex logic that takes time to understand
  • Undefined language features (uninitialized variables).
  • Small and modular functions
  • Access to hardware through a common API layer
  • “If-else-if-else” blocks
  • True global variables (namespaces are ok)
  • Factoring complex logic into sub-functions
  • Constructs that make code flow obvious
  • Explicit codin vs. implicit behaviour

Implement a peer review process

A great starting point for improving testability is to begin paying close attention to coding style and architecture. While size constraints and time-critical components still exist within applications, the overall size and lifecycle of an application have gotten much larger and longer. This increase in size helps to accentuate the benefits of easy to understand code.

Large, bug-addled programs often contain piles of technical debt. One could make the argument that this, in turn, results in the need for greater QA expenditure and thus increased development cost of the product. Alongside this, a lower quality, buggier product also harms the image of the product and producer to the customer which may ultimately result in a lost user.

A related practice to adopting new code styles is implementing a peer-review process. This allows developers not only to familiarize themselves with other aspects of the product but also helps ensure that each developer’s code is readable to someone other than themselves.

Establish a repeatable workflow with metrics

Example of a software change process

The best method to shift a company’s cultural focus towards high-quality software is to establish a repeatable workflow with metrics for any team member who is undertaking quality improvements. It’s important to find a middle-ground of allowance. Don’t be too lenient allowing buggy code. Don’t be too strict preventing a new version from ever being released. These workflows must be appropriate and take into account the circumstances of your organization and product.

It would not be prudent to try and achieve 100% code coverage on an application that has existed for decades. Instead, put this cultural shift into place by performing completeness testing for all new code additions. The code can then be peer-reviewed and tested for correctness. In many cases, doing something is a step better than those who do nothing to improve their code quality. It is also important to show team members tangible results of this new effort as overall issue counts should move down. This also gives QA teams more time for deeper, more efficient, and more comprehensive testing, improving software-quality even further.

Test automation for high-quality software

Use test automation for high-quality software with early bug detection
Use test automation for high-quality software with early bug detection

Another way to take the pressure off of your QA team is to implement some level of test automation. Often, organizations perform testing periodically via manual processes rather than constantly and automatically. Alongside this, similarly to different coding styles, each developer can implement their own testing methodology rather than operating through an organization-wide platform created for testing. This creates a disconnect between the piece of new code and the master branch. It also creates a time lag between when a bug is introduced to the code base and when it is found. The longer the bug lies buried under newer code additions or hacks on top of the original issue, the more difficult it becomes to fix. Automated testing catches these issues before they are merged.

Further reading


Share on linkedin
Share on twitter
Share on whatsapp

Leave a Comment

Related Posts

Improving test efficiency
John Paliotta

Improving test efficiency

Effective software teams are always looking for ways to make their members more efficient. They realize that improving the development process is an good way

Recipe for a successful software demo
Ian Dinwoodie

Recipe for a successful software demo

Software demos are an essential part of a balanced and healthy product development cycle. From internally unveiling a new proof-of-concept to collecting feedback from external

Isolate verify merge_Coderskitchen
Niroshan Rajadurai

Isolate, Verify and Merge

The cost of fixing software is well understood. Much research has been done to demonstrate that fixing defects at the time of introducing them is

Continuous Intetgration on Coderskitchen: Building the ultimate CI machine
Hans Quecke

Building the ultimate CI machine

Software is traditionally designed, coded, then tested. However, poor quality coding and a testing phase at the end of the process can add a significant

Hey there!

Subscribe and get an email every time we’ve got a new quality piece on here.