Browse Prior Art Database

Minimize Dual Maintenance for Different Code Versions

IP.com Disclosure Number: IPCOM000124032D
Original Publication Date: 2005-Apr-06
Included in the Prior Art Database: 2005-Apr-06
Document File: 2 page(s) / 38K

Publishing Venue

IBM

Abstract

This disclosure describes how source code changes can be made to multiple versions of software without needing to create individual source code files for each version or to manually remove special tags in later versions.

This text was extracted from a PDF file.
This is the abbreviated version, containing approximately 52% of the total text.

Page 1 of 2

Minimize Dual Maintenance for Different Code Versions

A program is disclosed that increases the situations where the same code can be used in several releases, reducing dual maintenance, expense and risk. When you have multiple releases of a product (or software that runs on multiple hardware platforms) where simultaneous development can occur in different releases, you will almost certainly end up with source code that is in dual-maintenance. Dual maintenance adds more work and complexity to the source code management process. Dual maintenance means that any change that needs to be done to the source code must be done in multiple versions of a given product. The need to do dual maintenance is created when a change is made in a future release that doesn't apply to the earlier current release, creating a new version of the source code file in the future release. If a programmer does not handle the dual-maintenance of source code correctly, previous known bugs may occur in a future release.

    One solution to avoiding the pitfalls of dual maintenance is to use an #ifdef statement that will automatically do the right thing for the newer version. The downside to this is that the version must be specified in the compile process and the #ifdef statement must manually be removed when it is no longer needed. Also, not all programming languages have a concept of #ifdef statements.

    This program is an enhanced library environment which reduces the need for dual maintenance by allowing developers to effectively make changes in one release and yet affect several releases with different code versions. "Work around" code that is no longer needed in future release is automatically deleted from those releases, thus reducing risk and code size by removing "dead" code.

    When a programmer needs to make a fix in a future version of source code that will put the code into dual maintenance, with this program, they will instead edit the earliest active version of the code and use special comment syntax that will indicate a change that will be made when the future version of the source is released. When the code is extracted at the current release, it effectively remains unchanged. When the code is extracted at that future version level, all code blocks that are intended for that level (determined by the special comment syntax) will automatically be used and the surrounding conditional statements would be eliminated.

    If a user does attempt to make the change at the future release, the library software can determine the appropriate conditional flags and add the code to the latest version that is not yet in dual mai...