Software Development: Code quality at PDMS
Writing software that runs, and meets the client requirements, is one thing. But writing software that is also maintainable, performant, extensible, efficient and readable is another.
In my 20+ years (yikes!) of working in software development, I have seen that there is no magic bullet that ensures that all these metrics are met, but the routine application of a range of different measures within the software development life cycle can all contribute towards the overall quality of the code.
Having an agreed set of coding standards can contribute significantly to the readability and maintainability of code. These cover naming, layout and commenting conventions, as well as language guidelines. It promotes consistency between project teams, making it much easier for new team members to understand the code quickly.
A consistent, familiar solution architecture makes it much easier for developers to navigate their way around the code, and lays out clear patterns for “what code goes where”.
Peer code reviews
Requiring code reviews for all code change-sets promotes within-project consistency and knowledge sharing, and provides an opportunity for a “second pair of eyes” to spot any mistakes.
Working alongside colleagues on the same piece of code provides a great opportunity for learning, as well as a route to delivering quality code faster.
Development guidelines and principles
There are many articles about guiding principles out there, including industry favourites such as “don’t repeat yourself” (DRY), “you ain’t gonna need it” (YAGNI), “convention over configuration”, “keep it simple, stupid” (KISS), and the SOLID principles. Furthermore, developing web applications for accessibility and responsiveness should be the default.
Having an extensive set of unit tests, which are built into the solution from the start, means that updates and refactoring can be applied to the solution with confidence, and increases the likelihood of catching unexpected bugs early on.
Automated build and release pipelines already saves a lot of manual, error-prone effort in deploying software updates through the various test and live environments. They also ensure that the “integration” of all team members’ code changes build successfully, and can be extended to run a suite of integration tests.
Assessment for code security is an important aspect of the peer code review process, and it can be augmented by regularly running automated penetration test tools against test versions of the application. Any vulnerabilities identified can be rectified as soon as possible. Furthermore, signing the code itself, with a company certificate, can increase confidence in the integrity of the code.
Most mature software development life-cycle (SDLC) management tools allow code change-sets to be linked to “requirements” or “bugs” which describe the change or problem. This provides full traceability of the purpose of each code change. Since the software builds and releases are also managed through these tools, it is possible to trace specific change-sets to the build they were included in, and the environments that they have been released to. This is of enormous value when a project is under active development, as anyone on the team can immediately find out which code is where.
Source control branching strategies
Project teams often need to support live systems whilst working on long-running enhancements. It is therefore important to have a branching strategy that supports multiple concurrent development threads.
Where the release process is more than updating the code and the database, check lists can be used to ensure that nothing is forgotten in the run-up to, and during, live releases. These are typically built up over time, based on past experience.
Training and certification
Providing opportunities for developers to undertake external training and certification will always pay dividends. As new technologies and techniques are learnt, they can be disseminated through the company.
Following some, or all, of these processes can help make your application code more maintainable, performant, extensible, efficient and readable. Which, in turn, makes for happier project teams and more profitable projects.
Learn more about our software development services