Preparing Legacy Software for Future Platform Growth

  1. Home
  2. Defense Case Studies

As projects grow, technical debt can substantially slow down future development. Shortcuts made in the initial push to get the product to market are often amplified over time. Skipping steps like static analysis and continuous integration may seem to save time initially. However, unresolved quality issues, slow builds and long run times serve as a hindrance for adding new features. By integrating modern tools and training engineers how to use them, even older code bases can be saved and primed for faster future development.

Our client is a global market leader in precision measurement systems. They sought Cardinal Peak’s product development expertise to help with product performance, stability and feature enhancements for a scalable electronic register platform. The product is an intelligent and powerful micro-processor based meter for liquefied gas and aviation fuels. It has an extremely potent hardware platform, Bluetooth and Wi-Fi capabilities, offering enormous potential for expandability.

Our client was shipping a quality product but recognized opportunities to get it to the next level. At the core of the hardware platform is a new Variscite system on module (SOM) running a Yocto based Debian distribution. The Debian operating system (OS) is extremely versatile and supports a lot of features out of the box. However, the ready-to-go convenience comes at a price. The distribution is loaded with many features, most of which are not relevant to an embedded application like an electronic fuel meter. This bloat results in poorer performance like slow startup and shutdown times. In an effort to get the product out to customers on schedule, our client initially accepted some performance penalties.

Balancing demands for addressing performance, quality and new feature development, our client’s team had limited bandwidth, as well as process challenges that further delayed progress. For example, an outmoded build process required files to be transferred to the board and built on the target for debugging, rather than allowing local testing and then transferring in bulk. In addition, the team was building in a Linux VM on Windows machines requiring significant computing power and making updates cumbersome and time consuming.

Overall software quality can be improved by adopting a consistent development process. For example, by integrating peer review, the team can identify and fix bugs early, share knowledge, and discuss and align on architecture and design goals. Other key components of the new process include:

  • Version control – a system that records changes to a file or set of files over time so that you can recall specific versions later.
  • Standardized software builds – a process which translates human-readable source code into an efficient executable program which can be run on a computer.
  • Static code analysis – a method to improve software quality by examining the code without executing the program to understand the code structure and apply industry standard practices.
  • Traceability – the extent to which documentation or software code can be traced back to its point of origin, for the goal of improving quality and consistency of product development.
  • Frequent testing checkpoints – validating use cases and performing tests often, allowing for quality issues to be addressed early before they can proliferate.

To facilitate process improvement, Cardinal Peak discussed process goals with the customer team and made recommendations based on our wide experience across industries. We included all team members and discussed everyone’s ideas and concerns. We set up tools for implementing the new process and developed communications to manage change, including training.

To support the new process, Cardinal Peak first introduced the team to Docker and Bitbucket, cloud-based tools for streamlining development, virtualization and version control. As the team was already using Atlassian’s Jira product for sprints and ticket assignment, Bitbucket seamlessly integrated into this familiar tool. After the team migrated their codebase from their previous version control system to Git, it was easily uploaded to a Bitbucket project. Docker was used to provide a virtual container for their Linux build environment, allowing for quick builds on the users’ current OS. This allowed users to make quicker builds and only have to transfer one Debian file to install on the target. Both of these tools were picked because they are economical options and easy to integrate into a process the team was already familiar with.

The objective was to choose tools that integrated the new process as quickly as possible without slowing down development. Cardinal Peak selected and developed tools to streamline the transition by targeting the team’s existing skill set. To offset a slight learning curve with the version control system Git, we developed scripts and supporting documentation for the customer’s team.

Finally, the customer realized that switching to modern continuous integration, continuous delivery and deployment (CI/CD) practices would reduce time-to-market, improve software quality and lower their development cost of production. They wanted to complete their ecosystem using continuous integration automation and static analysis tools.

To accomplish this, Jenkins automation and SonarQube static analysis were added to the build environment to complete the deployment process. These tools are purely UI based, allowing project managers to be extra picky about what code is added to the code base in order to decrease the risk of buggy and failing code.

Sonarqube report

SonarQube gives an overview of the “health” of a codebase including bugs and technical debt. It makes it easy to trace quality issues in code through the UI by highlighting and explaining buggy code.

SonarQube provided the team insight into quality issues in the code. They were not caught before since they were outside of the cases in the testing plan and were not covered by unit tests.

SonarQube gives an overview of the “health” of a codebase including bugs and technical debt. It makes it easy to trace quality issues in code through the UI by highlighting and explaining buggy code. Unit testing is the best way to stop bugs and potential code problems in their tracks. However, this code base was too far along to add unit testing and would have required hundreds of hours of effort. By adding static analysis to the project, the team quickly identified existing problems and was able to prioritize fixes based on severity level. It also allows the analysis of new code as it is added, preventing future bugs from propagating.

Learning new tools and building processes in a month’s time is a frustrating task for any seasoned engineer, hyper-focused on continuing development and avoiding slowdowns. Cardinal Peak was able to make this project as smooth as possible by listening to the engineering teams’ concerns and providing tools and support, including documentation and tutorials.

The project ultimately proved successful when the customer team independently and fully transitioned to their new development and deployment ecosystem. They were able to completely transition over the new tools and their upkeep.

Most notably, the team now has a complete CI/CD process to facilitate increased productivity and faster builds. The customer improved the quality of the code base and the speed of their builds significantly and for future enhancements. The key success factor of the project was communication, including active engagement between the customer and Cardinal Peak teams, training in the new process and tools, and detailed documentation.

Contact us today to discuss how we can support your project. Learn more about our DevOps services and the advantages of DevOps and CI/CD.