So what if you have an existing piece of code where the quality is poor, how can you work to improve this?
Of course, it depends on what aspects are poor, but here are some ideas that I’ve used in the past.
Take Stock – What are the features of the software and how are they tested? Consider the user flow, how do they access these features? Are there any features that users don’t use you could remove?
System Testing – You need to perform a full system test to identify if the features work. In an ideal world, you would automate this, but, likely, this isn’t possible in our types of systems, so this will probably start as a manual test suite for you repeat each release manually (and work towards automation).
Fix – Any areas that don’t work need fixing. As you fix them you should:
Introduce unit tests for any code you change. Increasing unit test coverage will allow more corner cases to be tested and may allow for the system testing to be reduced.
Introduce automated system tests to cover the features you fix. Automated testing may require architectural changes to give the necessary hooks, but these pay off big time in the long run.
Refactor – Sometimes you can’t fix quality problems in isolation, but instead, you need to change the structure of your code. Refactoring can be costly but with some of the biggest payoffs. Don’t try and rewrite the whole application in one go; this rarely succeeds. Instead, try to isolate sections and refactor these, one by one, into your new desired structure (or even an intermediate step towards what you ultimately need).
Enjoyed the article?
Enter your details below to receive new articles and updates by email.
I founded Wiresmith Technology to help engineers improve their systems and products with quality measurement systems.
I'm a Certified LabVIEW Architect, Certified LabVIEW Embedded Developer and LabVIEW Champion.
The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.