Focus on code and requirements
The development of embedded software for critical systems requires strict requirements to be met with limited resources. Tests and the traceability of all work products play a central role here. Comprehensive refactoring must therefore take both the source code and the underlying requirements into account.
Refactoring: More than just code maintenance
Traditionally, refactoring means improving existing code without changing the functionality. However, in the development of critical software, requirements, code and tests are closely intertwined. Changes or incorrect specifications can affect code quality and the entire system, while inconsistencies in tests lead to time-consuming clarifications and weaken the validity of the tests. Refactoring the code in isolation does not do justice to this complex interaction.
Structural culture
Requirements and implementation often differ not only in terms of content, but also structurally. Requirements must therefore occasionally be reorganized or merged to ensure consistency. Conspicuous individual requirements or references to external subsystems indicate future problems. The consequences of such inconsistencies become apparent during testing at the latest: unclear boundaries in component descriptions make test implementation more difficult or cause unnecessary links and side effects. Structural consistency between requirements, code and tests reduces this complexity and improves maintainability, saving time and money in the long term.
Tidy up your room!
A consistent approach to outdated code and obsolete requirements is crucial. Old approaches or dead code hinder the focus on the essentials and unnecessarily increase the maintenance effort. Thanks to modern version management systems, there is no reason to leave irrelevant information in the system.
Order is half the system: clear structures in requirements, code and tests create order, avoid chaos and ensure the long-term stability of the software.
Let's go
- Requirements: Check up-to-dateness, remove redundant content and ensure consistency and unambiguity. Standardized interfaces create a clean integration into the code.
- Code: Check for compliance with requirements, removal of "dead" code and optimization of inefficient sections.
- Tests: Adaptation of existing tests to changed requirements to ensure consistency between requirements, code and tests.
The advantages of an extended refactoring strategy
- Higher software quality: The code remains consistent with the requirements, which increases system stability.
- More efficient development processes: Early clarification and synchronization of requirements and code reduces the need for time-consuming rework later on.
- Longer system service life: Well-documented and synchronized requirements make it easier to adapt to future changes.
- Improved collaboration: A clear link between requirements, code and tests facilitates communication within the team and with stakeholders.
"When used correctly, refactoring becomes a powerful tool that significantly supports the success and longevity of embedded projects. Take advantage of our expertise to make your embedded systems efficient and future-proof. We actively support you every step of the way."
Daniel Luscher
Team Lead Software Engineering