In medical device systems, breaking code into smaller pieces reduces the need for regression testing and narrows the effect of changes to a smaller area.
For example, suppose we have 15 functions for 3 topics in a single file.
If I change one of the functions in the file, everything needs to be rebuilt and checked .
If I divide the file into 3 separate files with 5 functions each, I only need to rebuild 5 functions and repeat 5 functions. Testing 5 functions requires less testing time than 15 functions.
In addition, when teams of people work on the same code base, code division reduces the likelihood that two or more people are working on the same file. Several people working in the same file have many conflicts, for example, one case that is accidentally deleted during registration.
Thomas Matthews
source share